Merge "MimeAnalyzer: Add testcases for mp3 detection"
[lhc/web/wiklou.git] / includes / specials / pagers / DeletedContribsPager.php
index a1f6b84..43d7ad4 100644 (file)
@@ -129,7 +129,7 @@ class DeletedContribsPager extends IndexPager {
                $condition = [];
 
                $condition['ar_user_text'] = $this->target;
-               $index = 'usertext_timestamp';
+               $index = 'ar_usertext_timestamp';
 
                return [ $index, $condition ];
        }
@@ -195,6 +195,7 @@ class DeletedContribsPager extends IndexPager {
        function formatRow( $row ) {
                $ret = '';
                $classes = [];
+               $attribs = [];
 
                /*
                 * There may be more than just revision rows. To make sure that we'll only be processing
@@ -213,17 +214,20 @@ class DeletedContribsPager extends IndexPager {
                MediaWiki\restoreWarnings();
 
                if ( $validRevision ) {
+                       $attribs['data-mw-revid'] = $rev->getId();
                        $ret = $this->formatRevisionRow( $row );
                }
 
                // Let extensions add data
-               Hooks::run( 'DeletedContributionsLineEnding', [ $this, &$ret, $row, &$classes ] );
+               Hooks::run( 'DeletedContributionsLineEnding', [ $this, &$ret, $row, &$classes, &$attribs ] );
+               $attribs = wfArrayFilterByKey( $attribs, [ Sanitizer::class, 'isReservedDataAttribute' ] );
 
-               if ( $classes === [] && $ret === '' ) {
+               if ( $classes === [] && $attribs === [] && $ret === '' ) {
                        wfDebug( "Dropping Special:DeletedContribution row that could not be formatted\n" );
                        $ret = "<!-- Could not format Special:DeletedContribution row. -->\n";
                } else {
-                       $ret = Html::rawElement( 'li', [ 'class' => $classes ], $ret ) . "\n";
+                       $attribs['class'] = $classes;
+                       $ret = Html::rawElement( 'li', $attribs, $ret ) . "\n";
                }
 
                return $ret;