}
/**
- * Does the script need normal DB access? By default, we give Maintenance
- * scripts admin rights to the DB (when available). Sometimes, a script needs
- * normal access for a reason and sometimes they want no access. Subclasses
- * should override and return one of the following values, as needed:
+ * Does the script need different DB access? By default, we give Maintenance
+ * scripts normal rights to the DB. Sometimes, a script needs admin rights
+ * access for a reason and sometimes they want no access. Subclasses should
+ * override and return one of the following values, as needed:
* Maintenance::DB_NONE - For no DB access at all
- * Maintenance::DB_STD - For normal DB access
- * Maintenance::DB_ADMIN - For admin DB access, default
+ * Maintenance::DB_STD - For normal DB access, default
+ * Maintenance::DB_ADMIN - For admin DB access
* @return int
*/
protected function getDbType() {
- return Maintenance :: DB_ADMIN;
+ return Maintenance::DB_STD;
}
/**
$this->mDescription = "Add a new wiki to the family. Wikimedia specific!";
$this->addArgs( 'language', 'site', 'dbname' );
}
-
+
+ protected function getDbType() {
+ return Maintenance::DB_ADMIN;
+ }
+
public function execute() {
global $IP, $wgLanguageNames, $wgDefaultExternalStore, $wgNoDBParam;
$this->addOption( "old", "Old db prefix [0 for none]", true, true );
$this->addOption( "new", "New db prefix [0 for none]", true, true );
}
-
+
+ protected function getDbType() {
+ return Maintenance::DB_ADMIN;
+ }
+
public function execute() {
// Allow for no old prefix
if( $this->getOption( 'old', 0 ) === '0' ) {
$this->mDescription = "Rename external storage dbs and leave a new one";
$this->addArgs( array( 'olddb', 'newdb' ) );
}
+
+ protected function getDbType() {
+ return Maintenance::DB_ADMIN;
+ }
public function execute() {
global $wgDefaultExternalStore;