And this was true... *sigh*
[lhc/web/wiklou.git] / includes / HTMLCacheUpdate.php
index 83086da..636d73f 100644 (file)
@@ -53,7 +53,7 @@ class HTMLCacheUpdate
                wfRunHooks( 'HTMLCacheUpdate::doUpdate', array($this->mTitle) );
        }
 
-       function insertJobs( ResultWrapper $res ) {
+       protected function insertJobs( ResultWrapper $res ) {
                $numRows = $res->numRows();
                $numBatches = ceil( $numRows / $this->mRowsPerJob );
                $realBatchSize = $numRows / $numBatches;
@@ -83,17 +83,13 @@ class HTMLCacheUpdate
                Job::batchInsert( $jobs );
        }
 
-       function getPrefix() {
+       protected function getPrefix() {
                static $prefixes = array(
                        'pagelinks' => 'pl',
                        'imagelinks' => 'il',
                        'categorylinks' => 'cl',
                        'templatelinks' => 'tl',
                        'redirect' => 'rd',
-
-                       # Not needed
-                       # 'externallinks' => 'el',
-                       # 'langlinks' => 'll'
                );
 
                if ( is_null( $this->mPrefix ) ) {
@@ -105,11 +101,11 @@ class HTMLCacheUpdate
                return $this->mPrefix;
        }
 
-       function getFromField() {
+       public function getFromField() {
                return $this->getPrefix() . '_from';
        }
 
-       function getToCondition() {
+       public function getToCondition() {
                $prefix = $this->getPrefix();
                switch ( $this->mTable ) {
                        case 'pagelinks':
@@ -130,7 +126,7 @@ class HTMLCacheUpdate
        /**
         * Invalidate a set of IDs, right now
         */
-       function invalidateIDs( ResultWrapper $res ) {
+       public function invalidateIDs( ResultWrapper $res ) {
                global $wgUseFileCache, $wgUseSquid;
 
                if ( $res->numRows() == 0 ) {
@@ -186,7 +182,9 @@ class HTMLCacheUpdate
 }
 
 /**
- * @todo document (e.g. one-sentence top-level class description).
+ * Job wrapper for HTMLCacheUpdate. Gets run whenever a related
+ * job gets called from the queue.
+ * 
  * @ingroup JobQueue
  */
 class HTMLCacheUpdateJob extends Job {
@@ -205,7 +203,7 @@ class HTMLCacheUpdateJob extends Job {
                $this->end = $params['end'];
        }
 
-       function run() {
+       public function run() {
                $update = new HTMLCacheUpdate( $this->title, $this->table );
 
                $fromField = $update->getFromField();