Add support for Number grouping(commafy) based on CLDR number grouping patterns like...
[lhc/web/wiklou.git] / includes / WikiPage.php
index c177115..b95faed 100644 (file)
@@ -371,8 +371,7 @@ class WikiPage extends Page {
                $lc = LinkCache::singleton();
 
                if ( $data ) {
-                       $lc->addGoodLinkObj( $data->page_id, $this->mTitle,
-                               $data->page_len, $data->page_is_redirect, $data->page_latest );
+                       $lc->addGoodLinkObjFromRow( $this->mTitle, $data );
 
                        $this->mTitle->loadFromRow( $data );
 
@@ -1720,7 +1719,7 @@ class WikiPage extends Page {
                                                        array(  'gtl_from_wiki' => wfGetID(),
                                                                        'gtl_from_page' => $id )
                                                        );
-               }
+                       }
                }
 
                # If using cleanup triggers, we can skip some manual deletes
@@ -1984,7 +1983,7 @@ class WikiPage extends Page {
                $edit->revid = $revid;
                $edit->newText = $text;
                $edit->pst = $this->preSaveTransform( $text, $user, $popts );
-               $edit->popts = $this->getParserOptions( true );
+               $edit->popts = $this->makeParserOptions( new User );
                $edit->output = $wgParser->parse( $edit->pst, $this->mTitle, $edit->popts, true, true, $revid );
                $edit->oldText = $this->getRawText();
 
@@ -2561,15 +2560,12 @@ class WikiPage extends Page {
 
        /**
         * Get parser options suitable for rendering the primary article wikitext
-        * @param $canonical boolean Determines that the generated options must not depend on user preferences (see bug 14404)
         * @return mixed ParserOptions object or boolean false
-        * @deprecated since 1.19
         */
-       public function getParserOptions( $canonical = false ) {
-               global $wgUser, $wgLanguageCode;
-               if ( !$this->mParserOptions || $canonical ) {
-                       $user = !$canonical ? $wgUser : new User;
-                       $this->mParserOptions = $this->makeParserOptions( $user );
+       public function getParserOptions() {
+               global $wgUser;
+               if ( !$this->mParserOptions ) {
+                       $this->mParserOptions = $this->makeParserOptions( $wgUser );
                }
                // Clone to allow modifications of the return value without affecting cache
                return clone $this->mParserOptions;