Merge "Allow logging arbitrary extra data in MWExceptionHandler::logException"
[lhc/web/wiklou.git] / includes / revisiondelete / RevDelLogItem.php
index b8b0c5c..829eefa 100644 (file)
@@ -19,6 +19,8 @@
  * @ingroup RevisionDelete
  */
 
+use MediaWiki\Revision\RevisionRecord;
+
 /**
  * Item class for a logging table row
  */
@@ -39,8 +41,14 @@ class RevDelLogItem extends RevDelItem {
                return 'log_user_text';
        }
 
+       public function getAuthorActorField() {
+               return 'log_actor';
+       }
+
        public function canView() {
-               return LogEventsList::userCan( $this->row, Revision::DELETED_RESTRICTED, $this->list->getUser() );
+               return LogEventsList::userCan(
+                       $this->row, RevisionRecord::DELETED_RESTRICTED, $this->list->getUser()
+               );
        }
 
        public function canViewContent() {
@@ -71,7 +79,7 @@ class RevDelLogItem extends RevDelItem {
                $dbw->update( 'recentchanges',
                        [
                                'rc_deleted' => $bits,
-                               'rc_patrolled' => 1
+                               'rc_patrolled' => RecentChange::PRC_AUTOPATROLLED
                        ],
                        [
                                'rc_logid' => $this->row->log_id,
@@ -101,7 +109,7 @@ class RevDelLogItem extends RevDelItem {
                $loglink = $this->list->msg( 'parentheses' )->rawParams( $loglink )->escaped();
                // User links and action text
                $action = $formatter->getActionText();
-               // Comment
+
                $comment = CommentStore::getStore()->getComment( 'log_comment', $this->row )->text;
                $comment = $this->list->getLanguage()->getDirMark()
                        . Linker::commentBlock( $comment );