X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fpage%2FWikiPage.php;h=61f0504e1467f6b858797f1bc123d02cd0100899;hb=cad7a1125dc910b8ee19c8f675099ed65c0a6018;hp=81c93a1f324dd3e44ec0d7986bb3399e40591576;hpb=5309ad3df1f7c7c5794c1b014396427fbd53a7c1;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index 81c93a1f32..61f0504e14 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -278,7 +278,6 @@ class WikiPage implements Page, IDBAccessObject { 'page_namespace', 'page_title', 'page_restrictions', - 'page_counter', 'page_is_redirect', 'page_is_new', 'page_random', @@ -346,8 +345,7 @@ class WikiPage implements Page, IDBAccessObject { } /** - * Set the general counter, title etc data loaded from - * some source. + * Load the object from a given source by title * * @param object|string|int $from One of the following: * - A DB query result object. @@ -2142,6 +2140,7 @@ class WikiPage implements Page, IDBAccessObject { * @param array $options Array of options, following indexes are used: * - changed: boolean, whether the revision changed the content (default true) * - created: boolean, whether the revision created the page (default false) + * - moved: boolean, whether the page was moved (default false) * - oldcountable: boolean or null (default null): * - boolean: whether the page was counted as an article before that * revision, only used in changed is true and created is false @@ -2152,7 +2151,12 @@ class WikiPage implements Page, IDBAccessObject { wfProfileIn( __METHOD__ ); - $options += array( 'changed' => true, 'created' => false, 'oldcountable' => null ); + $options += array( + 'changed' => true, + 'created' => false, + 'moved' => false, + 'oldcountable' => null + ); $content = $revision->getContent(); // Parse the text @@ -2201,7 +2205,7 @@ class WikiPage implements Page, IDBAccessObject { $title = $this->mTitle->getPrefixedDBkey(); $shortTitle = $this->mTitle->getDBkey(); - if ( !$options['changed'] ) { + if ( !$options['changed'] && !$options['moved'] ) { $good = 0; } elseif ( $options['created'] ) { $good = (int)$this->isCountable( $editInfo );