Index: trunk/phase3/maintenance/renameDbPrefix.php |
— | — | @@ -29,7 +29,11 @@ |
30 | 30 | $this->addOption( "old", "Old db prefix [0 for none]", true, true ); |
31 | 31 | $this->addOption( "new", "New db prefix [0 for none]", true, true ); |
32 | 32 | } |
33 | | - |
| 33 | + |
| 34 | + protected function getDbType() { |
| 35 | + return Maintenance::DB_ADMIN; |
| 36 | + } |
| 37 | + |
34 | 38 | public function execute() { |
35 | 39 | // Allow for no old prefix |
36 | 40 | if( $this->getOption( 'old', 0 ) === '0' ) { |
Index: trunk/phase3/maintenance/renamewiki.php |
— | — | @@ -30,6 +30,10 @@ |
31 | 31 | $this->mDescription = "Rename external storage dbs and leave a new one"; |
32 | 32 | $this->addArgs( array( 'olddb', 'newdb' ) ); |
33 | 33 | } |
| 34 | + |
| 35 | + protected function getDbType() { |
| 36 | + return Maintenance::DB_ADMIN; |
| 37 | + } |
34 | 38 | |
35 | 39 | public function execute() { |
36 | 40 | global $wgDefaultExternalStore; |
Index: trunk/phase3/maintenance/addwiki.php |
— | — | @@ -31,7 +31,11 @@ |
32 | 32 | $this->mDescription = "Add a new wiki to the family. Wikimedia specific!"; |
33 | 33 | $this->addArgs( 'language', 'site', 'dbname' ); |
34 | 34 | } |
35 | | - |
| 35 | + |
| 36 | + protected function getDbType() { |
| 37 | + return Maintenance::DB_ADMIN; |
| 38 | + } |
| 39 | + |
36 | 40 | public function execute() { |
37 | 41 | global $IP, $wgLanguageNames, $wgDefaultExternalStore, $wgNoDBParam; |
38 | 42 | |
Index: trunk/phase3/maintenance/Maintenance.php |
— | — | @@ -224,17 +224,17 @@ |
225 | 225 | } |
226 | 226 | |
227 | 227 | /** |
228 | | - * Does the script need normal DB access? By default, we give Maintenance |
229 | | - * scripts admin rights to the DB (when available). Sometimes, a script needs |
230 | | - * normal access for a reason and sometimes they want no access. Subclasses |
231 | | - * should override and return one of the following values, as needed: |
| 228 | + * Does the script need different DB access? By default, we give Maintenance |
| 229 | + * scripts normal rights to the DB. Sometimes, a script needs admin rights |
| 230 | + * access for a reason and sometimes they want no access. Subclasses should |
| 231 | + * override and return one of the following values, as needed: |
232 | 232 | * Maintenance::DB_NONE - For no DB access at all |
233 | | - * Maintenance::DB_STD - For normal DB access |
234 | | - * Maintenance::DB_ADMIN - For admin DB access, default |
| 233 | + * Maintenance::DB_STD - For normal DB access, default |
| 234 | + * Maintenance::DB_ADMIN - For admin DB access |
235 | 235 | * @return int |
236 | 236 | */ |
237 | 237 | protected function getDbType() { |
238 | | - return Maintenance :: DB_ADMIN; |
| 238 | + return Maintenance::DB_STD; |
239 | 239 | } |
240 | 240 | |
241 | 241 | /** |