}
}
- /**
- * HTMLCacheUpdates are the most common deferred update people use. This
- * is a shortcut method for that.
- * @see HTMLCacheUpdate::__construct()
- * @param Title $title
- * @param string $table
- */
- public static function addHTMLCacheUpdate( $title, $table ) {
- self::addUpdate( new HTMLCacheUpdate( $title, $table ) );
- }
-
/**
* Add a callable update. In a lot of cases, we just need a callback/closure,
* defining a new DeferrableUpdate object is not necessary
* prevent lock contention
*/
public static function doUpdates( $commit = '' ) {
- global $wgDeferredUpdateList;
-
- $updates = array_merge( $wgDeferredUpdateList, self::$updates );
+ $updates = self::$updates;
while ( count( $updates ) ) {
self::clearPendingUpdates();
}
}
- $updates = array_merge( $wgDeferredUpdateList, self::$updates );
+ $updates = self::$updates;
}
}
* want or need to call this. Unit tests need it though.
*/
public static function clearPendingUpdates() {
- global $wgDeferredUpdateList;
- $wgDeferredUpdateList = self::$updates = array();
+ self::$updates = array();
}
}