Index: trunk/extensions/ProtectSite/ProtectSite.body.php |
— | — | @@ -57,7 +57,7 @@ |
58 | 58 | |
59 | 59 | /* Constructor */ |
60 | 60 | function __construct( &$request ) { |
61 | | - global $wgMessageCache, $wgMemc; |
| 61 | + global $wgMemc; |
62 | 62 | |
63 | 63 | if( !class_exists( 'BagOStuff' ) || !class_exists( 'MediaWikiBagOStuff' ) ) { |
64 | 64 | global $IP; |
— | — | @@ -68,28 +68,6 @@ |
69 | 69 | $this->mRequest =& $request; |
70 | 70 | $this->persist_data = new MediaWikiBagOStuff(); |
71 | 71 | |
72 | | - /** |
73 | | - * These are dynamically created here because they don't need to vary |
74 | | - * from the common messages and they save on the total count. |
75 | | - */ |
76 | | - $wgMessageCache->addMessages( |
77 | | - array( |
78 | | - 'protectsite-createaccount-0' => wfMsg( 'protectsite-allowall' ), |
79 | | - 'protectsite-createaccount-1' => wfMsg( 'protectsite-allowusersysop' ), |
80 | | - 'protectsite-createaccount-2' => wfMsg( 'protectsite-allowsysop' ), |
81 | | - 'protectsite-createpage-0' => wfMsg( 'protectsite-allowall' ), |
82 | | - 'protectsite-createpage-1' => wfMsg( 'protectsite-allowusersysop' ), |
83 | | - 'protectsite-createpage-2' => wfMsg( 'protectsite-allowsysop' ), |
84 | | - 'protectsite-edit-0' => wfMsg( 'protectsite-allowall' ), |
85 | | - 'protectsite-edit-1' => wfMsg( 'protectsite-allowusersysop' ), |
86 | | - 'protectsite-edit-2' => wfMsg( 'protectsite-allowsysop' ), |
87 | | - 'protectsite-move-0' => wfMsg( 'protectsite-allowusersysop' ), |
88 | | - 'protectsite-move-1' => wfMsg( 'protectsite-allowsysop' ), |
89 | | - 'protectsite-upload-0' => wfMsg( 'protectsite-allowusersysop' ), |
90 | | - 'protectsite-upload-1' => wfMsg( 'protectsite-allowsysop' ) |
91 | | - ) |
92 | | - ); |
93 | | - |
94 | 72 | /* Get data into the value variable/array */ |
95 | 73 | $prot = $wgMemc->get( wfMemcKey( 'protectsite' ) ); |
96 | 74 | if( !$prot ) { |
Index: trunk/extensions/ProtectSite/ProtectSite.i18n.php |
— | — | @@ -32,6 +32,23 @@ |
33 | 33 | 'protectsite-until' => 'Protected until: ', |
34 | 34 | 'protectsite-protect' => 'Protect', |
35 | 35 | 'protectsite-unprotect' => 'Unprotect', |
| 36 | + |
| 37 | + /* epic message duplication... */ |
| 38 | + 'protectsite-createaccount-0' => 'All users', |
| 39 | + 'protectsite-createaccount-1' => 'Registered users and sysops', |
| 40 | + 'protectsite-createaccount-2' => 'Sysops only', |
| 41 | + 'protectsite-createpage-0' => 'All users', |
| 42 | + 'protectsite-createpage-1' => 'Registered users and sysops', |
| 43 | + 'protectsite-createpage-2' => 'Sysops only', |
| 44 | + 'protectsite-edit-0' => 'All users', |
| 45 | + 'protectsite-edit-1' => 'Registered users and sysops', |
| 46 | + 'protectsite-edit-2' => 'Sysops only', |
| 47 | + 'protectsite-move-0' => 'Registered users and sysops', |
| 48 | + 'protectsite-move-1' => 'Sysops only', |
| 49 | + 'protectsite-upload-0' => 'Registered users and sysops', |
| 50 | + 'protectsite-upload-1' => 'Sysops only', |
| 51 | + /* end epic message duplication */ |
| 52 | + |
36 | 53 | 'right-protectsite' => 'Limit actions that can be performed for some groups for a limited time', |
37 | 54 | ); |
38 | 55 | |