Merge "install.php: Allow extensions and skins to be specified"
[lhc/web/wiklou.git] / includes / actions / HistoryAction.php
index 20637fc..7d6b548 100644 (file)
@@ -62,12 +62,25 @@ class HistoryAction extends FormlessAction {
 
        protected function getDescription() {
                // Creation of a subtitle link pointing to [[Special:Log]]
-               return MediaWikiServices::getInstance()->getLinkRenderer()->makeKnownLink(
+               $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
+               $subtitle = $linkRenderer->makeKnownLink(
                        SpecialPage::getTitleFor( 'Log' ),
                        $this->msg( 'viewpagelogs' )->text(),
                        [],
                        [ 'page' => $this->getTitle()->getPrefixedText() ]
                );
+
+               $links = [];
+               // Allow extensions to add more links
+               Hooks::run( 'HistoryPageToolLinks', [ $this->getContext(), $linkRenderer, &$links ] );
+               if ( $links ) {
+                       $subtitle .= ''
+                               . $this->msg( 'word-separator' )->escaped()
+                               . $this->msg( 'parentheses' )
+                                       ->rawParams( $this->getLanguage()->pipeList( $links ) )
+                                       ->escaped();
+               }
+               return $subtitle;
        }
 
        /**
@@ -345,12 +358,13 @@ class HistoryAction extends FormlessAction {
                        $rev->getComment()
                );
                if ( $rev->getComment() == '' ) {
-                       global $wgContLang;
+                       $contLang = MediaWikiServices::getInstance()->getContentLanguage();
                        $title = $this->msg( 'history-feed-item-nocomment',
                                $rev->getUserText(),
-                               $wgContLang->timeanddate( $rev->getTimestamp() ),
-                               $wgContLang->date( $rev->getTimestamp() ),
-                               $wgContLang->time( $rev->getTimestamp() ) )->inContentLanguage()->text();
+                               $contLang->timeanddate( $rev->getTimestamp() ),
+                               $contLang->date( $rev->getTimestamp() ),
+                               $contLang->time( $rev->getTimestamp() )
+                       )->inContentLanguage()->text();
                } else {
                        $title = $rev->getUserText() .
                                $this->msg( 'colon-separator' )->inContentLanguage()->text() .
@@ -557,7 +571,7 @@ class HistoryPager extends ReverseChronologicalPager {
 
        private function getRevisionButton( $name, $msg ) {
                $this->preventClickjacking();
-               # Note bug #20966, <button> is non-standard in IE<8
+               # Note T22966, <button> is non-standard in IE<8
                $element = Html::element(
                        'button',
                        [