Merge "config: Change ConfigException to extend LogicException"
[lhc/web/wiklou.git] / includes / actions / HistoryAction.php
index 658ee48..4df2f56 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 use MediaWiki\MediaWikiServices;
-use Wikimedia\Rdbms\ResultWrapper;
+use Wikimedia\Rdbms\IResultWrapper;
 use Wikimedia\Rdbms\FakeResultWrapper;
 
 /**
@@ -139,8 +139,10 @@ class HistoryAction extends FormlessAction {
                }
                return $year && $month && $day ? $year . '-' . $month . '-' . $day : '';
        }
+
        /**
         * Print the history page for an article.
+        * @return string|null
         */
        function onView() {
                $out = $this->getOutput();
@@ -150,7 +152,7 @@ class HistoryAction extends FormlessAction {
                 * Allow client caching.
                 */
                if ( $out->checkLastModified( $this->page->getTouched() ) ) {
-                       return; // Client cache fresh and headers sent, nothing more to do.
+                       return null; // Client cache fresh and headers sent, nothing more to do.
                }
 
                $this->preCacheMessages();
@@ -184,10 +186,13 @@ class HistoryAction extends FormlessAction {
                $feedType = $request->getRawVal( 'feed' );
                if ( $feedType !== null ) {
                        $this->feed( $feedType );
-                       return;
+                       return null;
                }
 
-               $this->addHelpLink( '//meta.wikimedia.org/wiki/Special:MyLanguage/Help:Page_history', true );
+               $this->addHelpLink(
+                       'https://meta.wikimedia.org/wiki/Special:MyLanguage/Help:Page_history',
+                       true
+               );
 
                // Fail nicely if article doesn't exist.
                if ( !$this->page->exists() ) {
@@ -212,7 +217,7 @@ class HistoryAction extends FormlessAction {
                                ]
                        );
 
-                       return;
+                       return null;
                }
 
                $ts = $this->getTimestampFromRequest( $request );
@@ -296,6 +301,8 @@ class HistoryAction extends FormlessAction {
                        $pager->getNavigationBar()
                );
                $out->preventClickjacking( $pager->getPreventClickjacking() );
+
+               return null;
        }
 
        /**
@@ -306,7 +313,7 @@ class HistoryAction extends FormlessAction {
         * @param int $limit The limit number of revisions to get
         * @param int $offset
         * @param int $direction Either self::DIR_PREV or self::DIR_NEXT
-        * @return ResultWrapper
+        * @return IResultWrapper
         */
        function fetchRevisions( $limit, $offset, $direction ) {
                // Fail if article doesn't exist.