Index: trunk/phase3/includes/Article.php |
— | — | @@ -1037,8 +1037,9 @@ |
1038 | 1038 | |
1039 | 1039 | /** |
1040 | 1040 | * Handle action=purge |
| 1041 | + * @param bool $showPage Show the page after purging? |
1041 | 1042 | */ |
1042 | | - function purge() { |
| 1043 | + function purge( $showPage = true ) { |
1043 | 1044 | global $wgUser, $wgRequest, $wgOut; |
1044 | 1045 | |
1045 | 1046 | if ( $wgUser->isAllowed( 'purge' ) || $wgRequest->wasPosted() ) { |
— | — | @@ -1058,6 +1059,10 @@ |
1059 | 1060 | $wgOut->setRobotPolicy( 'noindex,nofollow' ); |
1060 | 1061 | $wgOut->addHTML( $msg ); |
1061 | 1062 | } |
| 1063 | + // Show the page post-purge? 99.99% of the time yes, but sometimes no. |
| 1064 | + if ( $showPage ) { |
| 1065 | + $this->view(); |
| 1066 | + } |
1062 | 1067 | } |
1063 | 1068 | |
1064 | 1069 | /** |
— | — | @@ -1086,7 +1091,6 @@ |
1087 | 1092 | } |
1088 | 1093 | $wgMessageCache->replace( $this->mTitle->getDBkey(), $text ); |
1089 | 1094 | } |
1090 | | - $this->view(); |
1091 | 1095 | } |
1092 | 1096 | |
1093 | 1097 | /** |