Merge "Don't try to verify XML well-formedness for partial SVG uploads"
[lhc/web/wiklou.git] / includes / page / WikiPage.php
index 81c93a1..61f0504 100644 (file)
@@ -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 );