Merge "Improve "selfmove" message's wording"
[lhc/web/wiklou.git] / includes / changes / OldChangesList.php
index 2a53d66..88c3c22 100644 (file)
@@ -25,14 +25,13 @@ class OldChangesList extends ChangesList {
        /**
         * Format a line using the old system (aka without any javascript).
         *
-        * @param RecentChange $rc Passed by reference
+        * @param RecentChange &$rc Passed by reference
         * @param bool $watched (default false)
         * @param int $linenumber (default null)
         *
         * @return string|bool
         */
        public function recentChangesLine( &$rc, $watched = false, $linenumber = null ) {
-
                $classes = $this->getHTMLClasses( $rc, $watched );
                // use mw-line-even/mw-line-odd class only if linenumber is given (feature from T16468)
                if ( $linenumber ) {
@@ -83,7 +82,7 @@ class OldChangesList extends ChangesList {
                if ( $rc->mAttribs['rc_log_type'] ) {
                        $logtitle = SpecialPage::getTitleFor( 'Log', $rc->mAttribs['rc_log_type'] );
                        $this->insertLog( $html, $logtitle, $rc->mAttribs['rc_log_type'] );
-                       $flags = $this->recentChangesFlags( [ 'unpatrolled' =>$unpatrolled,
+                       $flags = $this->recentChangesFlags( [ 'unpatrolled' => $unpatrolled,
                                'bot' => $rc->mAttribs['rc_bot'] ], '' );
                        if ( $flags !== '' ) {
                                $html .= ' ' . $flags;
@@ -143,6 +142,15 @@ class OldChangesList extends ChangesList {
                        $html .= ' ' . $this->numberofWatchingusers( $rc->numberofWatchingusers );
                }
 
+               $html = Html::rawElement( 'span', [
+                       'class' => 'mw-changeslist-line-inner',
+                       'data-target-page' => $rc->getTitle(), // Used for reliable determination of the affiliated page
+               ], $html );
+               if ( is_callable( $this->changeLinePrefixer ) ) {
+                       $prefix = call_user_func( $this->changeLinePrefixer, $rc, $this, false );
+                       $html = Html::rawElement( 'span', [ 'class' => 'mw-changeslist-line-prefix' ], $prefix ) . $html;
+               }
+
                return $html;
        }
 }