addDescription( 'Rename a restriction level' ); $this->addArg( 'oldlevel', 'Old name of restriction level', true ); $this->addArg( 'newlevel', 'New name of restriction level', true ); } public function execute() { $oldLevel = $this->getArg( 0 ); $newLevel = $this->getArg( 1 ); $dbm = wfGetDB( DB_MASTER ); $dbm->update( 'page_restrictions', [ 'pr_level' => $newLevel ], [ 'pr_level' => $oldLevel ], __METHOD__ ); } } $maintClass = RenameRestrictions::class; require_once RUN_MAINTENANCE_IF_MAIN;