Always pass user to LogPage::addEntry
authorumherirrender <umherirrender_de.wp@web.de>
Fri, 13 Sep 2013 19:14:36 +0000 (21:14 +0200)
committerumherirrender <umherirrender_de.wp@web.de>
Fri, 13 Sep 2013 19:14:36 +0000 (21:14 +0200)
This avoids getting $wgUser in LogPage::addEntry

Change-Id: Ie105cef4ebc3d69aeaef5ee40ce6ee0087a74c69

includes/Title.php
includes/revisiondelete/RevisionDeleteAbstracts.php
includes/specials/SpecialBlock.php
includes/specials/SpecialImport.php
includes/specials/SpecialMergeHistory.php
includes/specials/SpecialUnblock.php

index 734e009..3ad76b9 100644 (file)
@@ -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
index 9ace35a..d822d09 100644 (file)
@@ -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 );
index 6ba009a..3b73a37 100644 (file)
@@ -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'] );
index 0d54bb3..d7d860d 100644 (file)
@@ -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
index 2a86fca..fb5ea65 100644 (file)
@@ -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',
index 4da5155..ca93b6d 100644 (file)
@@ -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;
        }