Index: trunk/extensions/BoardVote/BoardVote_body.php |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | |
23 | 23 | function execute( $par ) { |
24 | 24 | global $wgUser, $wgDBname, $wgInputEncoding, $wgRequest, |
25 | | - $wgBoardVoteEditCount, $wgBoardVoteEndDate; |
| 25 | + $wgBoardVoteEditCount, $wgBoardVoteEndDate, $wgBoardVoteStartDate; |
26 | 26 | |
27 | 27 | $this->mUserKey = iconv( $wgInputEncoding, "UTF-8", $wgUser->getName() ) . "@$wgDBname"; |
28 | 28 | $this->mPosted = $wgRequest->wasPosted(); |
— | — | @@ -42,15 +42,29 @@ |
43 | 43 | |
44 | 44 | $this->setHeaders(); |
45 | 45 | |
| 46 | + global $wgOut; |
| 47 | + |
| 48 | + if ( wfTimestampNow() < $wgBoardVoteStartDate && !$this->isAdmin() ) { |
| 49 | + $wgOut->addWikiText( wfMsg( 'boardvote_notstarted' ) ); |
| 50 | + return; |
| 51 | + } |
| 52 | + |
| 53 | + if ( $wgUser->isBlocked() ) { |
| 54 | + $wgOut->blockedPage(); |
| 55 | + return; |
| 56 | + } |
| 57 | + |
46 | 58 | if ( wfTimestampNow() > $wgBoardVoteEndDate ) { |
47 | 59 | $this->mFinished = true; |
48 | 60 | } else { |
49 | 61 | $this->mFinished = false; |
50 | 62 | } |
51 | 63 | |
52 | | - global $wgOut; |
53 | | - $wgOut->addWikiText( wfMsg( 'boardvote_closed' ) ); |
54 | 64 | |
| 65 | + if ( $this->mFinished ) { |
| 66 | + $wgOut->addWikiText( wfMsg( 'boardvote_closed' ) ); |
| 67 | + } |
| 68 | + |
55 | 69 | if ( $this->mAction == "list" ) { |
56 | 70 | $this->displayList(); |
57 | 71 | } elseif ( $this->mAction == "dump" ) { |
Index: trunk/extensions/BoardVote/BoardVote.i18n.php |
— | — | @@ -69,6 +69,7 @@ |
70 | 70 | 'boardvote_unstrike' => "Unstrike", |
71 | 71 | 'boardvote_needadmin' => "Only election administrators can perform this operation.", |
72 | 72 | 'boardvote_sitenotice' => "<a href=\"{{localurle:Special:Boardvote/vote}}\">Wikimedia Board Elections</a>: Vote open until July 12", |
| 73 | + 'boardvote_notstarted' => 'Voting has not yet started', |
73 | 74 | 'boardvote_closed' => 'Voting is now closed, see [http://meta.wikimedia.org/wiki/Elections_for_the_Board_of_Trustees_of_the_Wikimedia_Foundation%2C_2006/En the elections page for results] soon.', |
74 | 75 | 'boardvote_edits_many' => 'many', |
75 | 76 | 'group-boardvote' => 'Board vote admins', |