From: umherirrender Date: Fri, 13 Sep 2013 19:14:36 +0000 (+0200) Subject: Always pass user to LogPage::addEntry X-Git-Tag: 1.31.0-rc.0~18768^2 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=d8c1083e04a610557cc74ef88e08e98dbb37c2f6;p=lhc%2Fweb%2Fwiklou.git Always pass user to LogPage::addEntry This avoids getting $wgUser in LogPage::addEntry Change-Id: Ie105cef4ebc3d69aeaef5ee40ce6ee0087a74c69 --- diff --git a/includes/Title.php b/includes/Title.php index 734e009e8a..3ad76b9aee 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -3694,7 +3694,7 @@ class Title { $comment .= wfMessage( 'colon-separator' )->inContentLanguage()->text() . $reason; } // @todo FIXME: $params? - $log->addEntry( 'move_prot', $nt, $comment, array( $this->getPrefixedText() ) ); + $log->addEntry( 'move_prot', $nt, $comment, array( $this->getPrefixedText() ), $wgUser ); } # Update watchlists diff --git a/includes/revisiondelete/RevisionDeleteAbstracts.php b/includes/revisiondelete/RevisionDeleteAbstracts.php index 9ace35a8b6..d822d0913b 100644 --- a/includes/revisiondelete/RevisionDeleteAbstracts.php +++ b/includes/revisiondelete/RevisionDeleteAbstracts.php @@ -203,7 +203,7 @@ abstract class RevDel_List extends RevisionListBase { // Actually add the deletion log entry $log = new LogPage( $logType ); $logid = $log->addEntry( $this->getLogAction(), $params['title'], - $params['comment'], $logParams ); + $params['comment'], $logParams, $this->getUser() ); // Allow for easy searching of deletion log items for revision/log items $log->addRelations( $field, $params['ids'], $logid ); $log->addRelations( 'target_author_id', $params['authorIds'], $logid ); diff --git a/includes/specials/SpecialBlock.php b/includes/specials/SpecialBlock.php index 6ba009ae61..3b73a37485 100644 --- a/includes/specials/SpecialBlock.php +++ b/includes/specials/SpecialBlock.php @@ -772,7 +772,8 @@ class SpecialBlock extends FormSpecialPage { $logaction, Title::makeTitle( NS_USER, $target ), $data['Reason'][0], - $logParams + $logParams, + $performer ); # Relate log ID to block IDs (bug 25763) $blockIds = array_merge( array( $status['id'] ), $status['autoIds'] ); diff --git a/includes/specials/SpecialImport.php b/includes/specials/SpecialImport.php index 0d54bb39bb..d7d860dee1 100644 --- a/includes/specials/SpecialImport.php +++ b/includes/specials/SpecialImport.php @@ -478,7 +478,7 @@ class ImportReporter extends ContextSource { if ( $this->reason ) { $detail .= $this->msg( 'colon-separator' )->inContentLanguage()->text() . $this->reason; } - $log->addEntry( 'upload', $title, $detail ); + $log->addEntry( 'upload', $title, $detail, array(), $this->getUser() ); } else { $interwiki = '[[:' . $this->mInterwiki . ':' . $origTitle->getPrefixedText() . ']]'; @@ -487,7 +487,7 @@ class ImportReporter extends ContextSource { if ( $this->reason ) { $detail .= $this->msg( 'colon-separator' )->inContentLanguage()->text() . $this->reason; } - $log->addEntry( 'interwiki', $title, $detail ); + $log->addEntry( 'interwiki', $title, $detail, array(), $this->getUser() ); } $comment = $detail; // quick diff --git a/includes/specials/SpecialMergeHistory.php b/includes/specials/SpecialMergeHistory.php index 2a86fca3f1..fb5ea65796 100644 --- a/includes/specials/SpecialMergeHistory.php +++ b/includes/specials/SpecialMergeHistory.php @@ -417,7 +417,7 @@ class SpecialMergeHistory extends SpecialPage { $log = new LogPage( 'merge' ); $log->addEntry( 'merge', $targetTitle, $this->mComment, - array( $destTitle->getPrefixedText(), $timestampLimit ) + array( $destTitle->getPrefixedText(), $timestampLimit ), $this->getUser() ); $this->getOutput()->addWikiMsg( 'mergehistory-success', diff --git a/includes/specials/SpecialUnblock.php b/includes/specials/SpecialUnblock.php index 4da5155a21..ca93b6d1fa 100644 --- a/includes/specials/SpecialUnblock.php +++ b/includes/specials/SpecialUnblock.php @@ -211,7 +211,7 @@ class SpecialUnblock extends SpecialPage { # Make log entry $log = new LogPage( 'block' ); - $log->addEntry( 'unblock', $page, $data['Reason'] ); + $log->addEntry( 'unblock', $page, $data['Reason'], array(), $performer ); return true; }