diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:30:02 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:30:02 -0400 |
commit | 1de335ad3f395ca6861085393ba366a9e3fb4a0d (patch) | |
tree | f1fdd326034e05177596851be6a7127615d81498 /includes/revisiondelete/RevDelList.php | |
parent | 9c75fa8ff6d4d38ef552c00fef5969fb154765e8 (diff) | |
parent | f6d65e533c62f6deb21342d4901ece24497b433e (diff) |
Merge commit 'f6d65'
# Conflicts:
# skins/ArchLinux/ArchLinux.php
Diffstat (limited to 'includes/revisiondelete/RevDelList.php')
-rw-r--r-- | includes/revisiondelete/RevDelList.php | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/includes/revisiondelete/RevDelList.php b/includes/revisiondelete/RevDelList.php index a0ff6672..840fd772 100644 --- a/includes/revisiondelete/RevDelList.php +++ b/includes/revisiondelete/RevDelList.php @@ -247,16 +247,22 @@ abstract class RevDelList extends RevisionListBase { } else { $logType = 'delete'; } - // Add params for effected page and ids + // Add params for affected page and ids $logParams = $this->getLogParams( $params ); // Actually add the deletion log entry - $log = new LogPage( $logType ); - $logid = $log->addEntry( $this->getLogAction(), $params['title'], - $params['comment'], $logParams, $this->getUser() ); + $logEntry = new ManualLogEntry( $logType, $this->getLogAction() ); + $logEntry->setTarget( $params['title'] ); + $logEntry->setComment( $params['comment'] ); + $logEntry->setParameters( $logParams ); + $logEntry->setPerformer( $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 ); - $log->addRelations( 'target_author_ip', $params['authorIPs'], $logid ); + $logEntry->setRelations( array( + $field => $params['ids'], + 'target_author_id' => $params['authorIds'], + 'target_author_ip' => $params['authorIPs'], + ) ); + $logId = $logEntry->insert(); + $logEntry->publish( $logId ); } /** @@ -274,10 +280,10 @@ abstract class RevDelList extends RevisionListBase { */ public function getLogParams( $params ) { return array( - $this->getType(), - implode( ',', $params['ids'] ), - "ofield={$params['oldBits']}", - "nfield={$params['newBits']}" + '4::type' => $this->getType(), + '5::ids' => $params['ids'], + '6::ofield' => $params['oldBits'], + '7::nfield' => $params['newBits'], ); } |