Effectively remove EDIT_DEFER_UPDATES flag
[lhc/web/wiklou.git] / includes / page / WikiPage.php
index 98cc80a..3a77c94 100644 (file)
@@ -1588,8 +1588,6 @@ class WikiPage implements Page, IDBAccessObject {
         *          Do not log the change in recentchanges
         *      EDIT_FORCE_BOT
         *          Mark the edit a "bot" edit regardless of user rights
-        *      EDIT_DEFER_UPDATES
-        *          Defer some of the updates until the end of index.php
         *      EDIT_AUTOSUMMARY
         *          Fill in blank summaries with generated text where possible
         *
@@ -1650,8 +1648,6 @@ class WikiPage implements Page, IDBAccessObject {
         *          Do not log the change in recentchanges
         *      EDIT_FORCE_BOT
         *          Mark the edit a "bot" edit regardless of user rights
-        *      EDIT_DEFER_UPDATES
-        *          Defer some of the updates until the end of index.php
         *      EDIT_AUTOSUMMARY
         *          Fill in blank summaries with generated text where possible
         *
@@ -1945,11 +1941,6 @@ class WikiPage implements Page, IDBAccessObject {
                        Hooks::run( 'PageContentInsertComplete', $hook_args );
                }
 
-               // Do updates right now unless deferral was requested
-               if ( !( $flags & EDIT_DEFER_UPDATES ) ) {
-                       DeferredUpdates::doUpdates();
-               }
-
                // Return the new revision (or null) to the caller
                $status->value['revision'] = $revision;
 
@@ -3221,8 +3212,7 @@ class WikiPage implements Page, IDBAccessObject {
 
                // Images
                if ( $title->getNamespace() == NS_FILE ) {
-                       $update = new HTMLCacheUpdate( $title, 'imagelinks' );
-                       $update->doUpdate();
+                       DeferredUpdates::addUpdate( new HTMLCacheUpdate( $title, 'imagelinks' ) );
                }
 
                // User talk pages