r77777 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77776‎ | r77777 | r77778 >
Date:05:55, 5 December 2010
Author:jeroendedauw
Status:deferred (Comments)
Tags:
Comment:
Some cleanup
Modified paths:
  • /trunk/extensions/DSMW/jobs/DSMWUpdateJob.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DSMW/jobs/DSMWUpdateJob.php
@@ -12,18 +12,22 @@
1313 */
1414 class DSMWUpdateJob extends Job {
1515
16 - function __construct( $title ) {
17 - parent::__construct( 'DSMWUpdateJob', $title );
 16+ public function __construct( $title ) {
 17+ parent::__construct( __CLASS__, $title );
1818 }
1919
20 - function run() {
 20+ public function run() {
2121 global $wgServerName, $wgScriptPath, $wgServer, $wgScriptExtension;
 22+
 23+ wfProfileIn( 'DSMWUpdateJob::run()' );
 24+
2225 $urlServer = 'http://' . $wgServerName;
23 - wfProfileIn( 'DSMWUpdateJob::run()' );
 26+
2427 $revids = array();
2528 $revids1 = array();
2629 $page_ids = array();
27 -// Getting all the revision ids of pages having been logootized
 30+
 31+ // Getting all the revision ids of pages having been logootized
2832 $db = wfGetDB( DB_SLAVE );
2933
3034 $model_table = $db->tableName( 'model' );
@@ -86,6 +90,7 @@
8791 $modelAfterIntegrate = $logoot->getModel();
8892 $tmp = serialize( $listOp );
8993 $patchid = sha1( $tmp );
 94+
9095 if ( $ns == NS_FILE || $ns == NS_IMAGE || $ns == NS_MEDIA ) {
9196 $apiUrl = $wgServer . $wgScriptPath . "/api" . $wgScriptExtension;
9297 $onPage = str_replace( array( ' ' ), array( '%20' ), $lastRev->getTitle()->getText() );
@@ -105,12 +110,14 @@
106111 $patch = new Patch( false, false, $listOp, $urlServer, 0 );
107112 $patch->storePage( $lastRev->getTitle()->getText(), $lastRev->getId() );
108113 }
 114+
109115 manager::storeModel( $lastRev->getId(), $sessionId = session_id(), $modelAfterIntegrate, $blobCB = 0 );
110116 }
111117 }
112118
113 -
114119 wfProfileOut( 'DSMWUpdateJob::run()' );
 120+
115121 return true;
116122 }
 123+
117124 }

Comments

#Comment by Jeroen De Dauw (talk | contribs)   05:56, 5 December 2010

Do I get a prize for getting commit #77777? :D

#Comment by MaxSem (talk | contribs)   18:33, 7 December 2010

Yes, you get the revision squatter award :}

Status & tagging log