Index: trunk/extensions/SocialProfile/UserBoard/SpecialSendBoardBlast.php |
— | — | @@ -27,12 +27,6 @@ |
28 | 28 | public function execute( $params ) { |
29 | 29 | global $wgRequest, $wgOut, $wgUser, $wgUserBoardScripts; |
30 | 30 | |
31 | | - // Add CSS & JS |
32 | | - $wgOut->addExtensionStyle( $wgUserBoardScripts . '/BoardBlast.css' ); |
33 | | - $wgOut->addScriptFile( $wgUserBoardScripts . '/BoardBlast.js' ); |
34 | | - |
35 | | - $output = ''; |
36 | | - |
37 | 31 | // This feature is available only to logged-in users. |
38 | 32 | if ( !$wgUser->isLoggedIn() ) { |
39 | 33 | $wgOut->setPageTitle( wfMsg( 'boardblastlogintitle' ) ); |
— | — | @@ -40,6 +34,24 @@ |
41 | 35 | return ''; |
42 | 36 | } |
43 | 37 | |
| 38 | + // Is the database locked? |
| 39 | + if( wfReadOnly() ) { |
| 40 | + $wgOut->readOnlyPage(); |
| 41 | + return false; |
| 42 | + } |
| 43 | + |
| 44 | + // Blocked through Special:Block? No access for you! |
| 45 | + if( $wgUser->isBlocked() ) { |
| 46 | + $wgOut->blockedPage( false ); |
| 47 | + return false; |
| 48 | + } |
| 49 | + |
| 50 | + // Add CSS & JS |
| 51 | + $wgOut->addExtensionStyle( $wgUserBoardScripts . '/BoardBlast.css' ); |
| 52 | + $wgOut->addScriptFile( $wgUserBoardScripts . '/BoardBlast.js' ); |
| 53 | + |
| 54 | + $output = ''; |
| 55 | + |
44 | 56 | if ( $wgRequest->wasPosted() ) { |
45 | 57 | $wgOut->setPageTitle( wfMsg( 'messagesenttitle' ) ); |
46 | 58 | $b = new UserBoard(); |