Merge "Don't queue refreshLinks jobs on null edit"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 8 Jul 2013 15:16:06 +0000 (15:16 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 8 Jul 2013 15:16:06 +0000 (15:16 +0000)
1  2 
includes/WikiPage.php

diff --combined includes/WikiPage.php
@@@ -2071,7 -2071,9 +2071,9 @@@ class WikiPage implements Page, IDBAcce
  
                // Update the links tables and other secondary data
                if ( $content ) {
-                       $updates = $content->getSecondaryDataUpdates( $this->getTitle(), null, true, $editInfo->output );
+                       $recursive = $options['changed']; // bug 50785
+                       $updates = $content->getSecondaryDataUpdates(
+                               $this->getTitle(), null, $recursive, $editInfo->output );
                        DataUpdate::runUpdates( $updates );
                }
  
                        $editrestriction = isset( $limit['edit'] ) ? array( $limit['edit'] ) : $this->mTitle->getRestrictions( 'edit' );
  
                        $cascadingRestrictionLevels = $wgCascadingRestrictionLevels;
 -                      if ( in_array( 'sysop', $cascadingRestrictionLevels ) ) {
 -                              $cascadingRestrictionLevels[] = 'protect'; // backwards compatibility
 +                      foreach ( array_keys( $cascadingRestrictionLevels, 'sysop' ) as $key ) {
 +                              $cascadingRestrictionLevels[$key] = 'editprotected'; // backwards compatibility
 +                      }
 +                      foreach ( array_keys( $cascadingRestrictionLevels, 'autoconfirmed' ) as $key ) {
 +                              $cascadingRestrictionLevels[$key] = 'editsemiprotected'; // backwards compatibility
                        }
  
                        // The schema allows multiple restrictions