X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Factions%2FHistoryAction.php;h=50d210f6e27c29c3fa74ad29671d389108885251;hb=00ca49cda319a863e38d373f8133ebf29414545e;hp=8e6bcd9529add343a8b8376af1c573784a2cd81b;hpb=10aa784a46041582a447b8a15c1a6bad0fdc6143;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/actions/HistoryAction.php b/includes/actions/HistoryAction.php index 8e6bcd9529..50d210f6e2 100644 --- a/includes/actions/HistoryAction.php +++ b/includes/actions/HistoryAction.php @@ -87,7 +87,7 @@ class HistoryAction extends FormlessAction { * Print the history page for an article. */ function onView() { - global $wgScript, $wgUseFileCache, $wgSquidMaxage; + global $wgScript, $wgUseFileCache; $out = $this->getOutput(); $request = $this->getRequest(); @@ -101,10 +101,6 @@ class HistoryAction extends FormlessAction { wfProfileIn( __METHOD__ ); - if ( $request->getFullRequestURL() == $this->getTitle()->getInternalURL( 'action=history' ) ) { - $out->setSquidMaxage( $wgSquidMaxage ); - } - $this->preCacheMessages(); # Fill in the file cache if not set already @@ -208,6 +204,11 @@ class HistoryAction extends FormlessAction { * @return ResultWrapper */ function fetchRevisions( $limit, $offset, $direction ) { + // Fail if article doesn't exist. + if( !$this->getTitle()->exists() ) { + return new FakeResultWrapper( array() ); + } + $dbr = wfGetDB( DB_SLAVE ); if ( $direction == HistoryPage::DIR_PREV ) {