r61250 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61249‎ | r61250 | r61251 >
Date:15:25, 19 January 2010
Author:ashley
Status:deferred
Tags:
Comment:
SocialProfile: fix fatal in EditCount.php (PHP 5.3/MW trunk); no longer uses $wgTitle but rather $article->getTitle()
Modified paths:
  • /trunk/extensions/SocialProfile/UserStats/EditCount.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SocialProfile/UserStats/EditCount.php
@@ -10,12 +10,12 @@
1111 $wgHooks['NewRevisionFromEditComplete'][] = 'incEditCount';
1212
1313 function incEditCount( $article, $revision, $baseRevId ) {
14 - global $wgUser, $wgTitle, $wgNamespacesForEditPoints;
 14+ global $wgUser, $wgNamespacesForEditPoints;
1515
1616 // only keep tally for allowable namespaces
1717 if (
1818 !is_array( $wgNamespacesForEditPoints ) ||
19 - in_array( $wgTitle->getNamespace(), $wgNamespacesForEditPoints )
 19+ in_array( $article->getTitle()->getNamespace(), $wgNamespacesForEditPoints )
2020 ) {
2121 $stats = new UserStatsTrack( $wgUser->getID(), $wgUser->getName() );
2222 $stats->incStatField( 'edit' );
@@ -27,12 +27,12 @@
2828 $wgHooks['ArticleDelete'][] = 'removeDeletedEdits';
2929
3030 function removeDeletedEdits( &$article, &$user, &$reason ) {
31 - global $wgTitle, $wgNamespacesForEditPoints;
 31+ global $wgNamespacesForEditPoints;
3232
3333 // only keep tally for allowable namespaces
3434 if (
3535 !is_array( $wgNamespacesForEditPoints ) ||
36 - in_array( $wgTitle->getNamespace(), $wgNamespacesForEditPoints )
 36+ in_array( $article->getTitle()->getNamespace(), $wgNamespacesForEditPoints )
3737 ) {
3838 $dbr = wfGetDB( DB_MASTER );
3939 $res = $dbr->select(

Status & tagging log