* @param string $title Database key form
* @param string $fragment The link fragment (after the "#")
* @param string $interwiki Interwiki prefix
- * @return Title The new object, or null on an error
+ * @return Title|null The new object, or null on an error
*/
public static function makeTitleSafe( $ns, $title, $fragment = '', $interwiki = '' ) {
if ( !MWNamespace::exists( $ns ) ) {
/**
* Updates page_touched for this page; called from LinksUpdate.php
*
- * @param integer $purgeTime TS_MW timestamp [optional]
+ * @param string $purgeTime [optional] TS_MW timestamp
* @return bool True if the update succeeded
*/
public function invalidateCache( $purgeTime = null ) {
* on the number of links. Typically called on create and delete.
*/
public function touchLinks() {
- $u = new HTMLCacheUpdate( $this, 'pagelinks' );
- $u->doUpdate();
-
+ DeferredUpdates::addUpdate( new HTMLCacheUpdate( $this, 'pagelinks' ) );
if ( $this->getNamespace() == NS_CATEGORY ) {
- $u = new HTMLCacheUpdate( $this, 'categorylinks' );
- $u->doUpdate();
+ DeferredUpdates::addUpdate( new HTMLCacheUpdate( $this, 'categorylinks' ) );
}
}
/**
* Get the last touched timestamp
*
- * @param DatabaseBase $db Optional db
+ * @param IDatabase $db Optional db
* @return string Last-touched timestamp
*/
public function getTouched( $db = null ) {