<?php
/**
- * See deferred.txt
- */
-
-/**
- * @todo document
+ * See docs/deferred.txt
+ *
+ * @todo document (e.g. one-sentence top-level class description).
*/
class LinksUpdate {
/**
* Constructor
- * Initialize private variables
- * @param $title Integer: FIXME
- * @param $parserOutput FIXME
- * @param $recursive Boolean: FIXME, default 'true'.
+ *
+ * @param Title $title Title of the page we're updating
+ * @param ParserOutput $parserOutput Output from a full parse of this page
+ * @param bool $recursive Queue jobs for recursive updates?
*/
function LinksUpdate( $title, $parserOutput, $recursive = true ) {
global $wgAntiLockFlags;
}
$this->mRecursive = $recursive;
+
+ wfRunHooks( 'LinksUpdateConstructed', array( &$this ) );
}
/**
*/
function doUpdate() {
global $wgUseDumbLinkUpdate;
+
+ wfRunHooks( 'LinksUpdate', array( &$this ) );
if ( $wgUseDumbLinkUpdate ) {
$this->doDumbUpdate();
} else {
$this->doIncrementalUpdate();
}
+ wfRunHooks( 'LinksUpdateComplete', array( &$this ) );
+
}
function doIncrementalUpdate() {
break;
}
$title = Title::makeTitle( $row->page_namespace, $row->page_title );
- $jobs[] = Job::factory( 'refreshLinks', $title );
+ $jobs[] = new RefreshLinksJob( $title, '' );
}
Job::batchInsert( $jobs );
}
}
return $arr;
}
+
+ /**
+ * Return the title object of the page being updated
+ */
+ function getTitle() {
+ return $this->mTitle;
+ }
}
-?>
+