From: Sethakill Date: Sat, 7 May 2016 15:18:08 +0000 (+0200) Subject: Special:Lockdb return error when database is locked. X-Git-Tag: 1.31.0-rc.0~7057^2 X-Git-Url: http://git.cyclocoop.org/%27.parametre_url%28%20%20%20generer_action_auteur%28%27charger_plugin%27%2C%20%27update_flux%27%29%2C%27update_flux%27%2C%20%27oui%27%29.%27?a=commitdiff_plain;h=c6d8b513a695e5446108fa8c339f66f49daf59c7;p=lhc%2Fweb%2Fwiklou.git Special:Lockdb return error when database is locked. Bug: T134650 Change-Id: Ia8950d0f2ae8a151df1fa1c05e9d33cb7e8e7f10 --- diff --git a/includes/specials/SpecialLockdb.php b/includes/specials/SpecialLockdb.php index cb7eb36c2e..37494c5de1 100644 --- a/includes/specials/SpecialLockdb.php +++ b/includes/specials/SpecialLockdb.php @@ -47,6 +47,9 @@ class SpecialLockdb extends FormSpecialPage { if ( !is_writable( dirname( $this->getConfig()->get( 'ReadOnlyFile' ) ) ) ) { throw new ErrorPageError( 'lockdb', 'lockfilenotwritable' ); } + if ( file_exists( $this->getConfig()->get( 'ReadOnlyFile' ) ) ) { + throw new ErrorPageError( 'lockdb', 'databaselocked' ); + } } protected function getFormFields() { diff --git a/languages/i18n/en.json b/languages/i18n/en.json index a521ab5a77..10072b9e2b 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -2421,6 +2421,7 @@ "lockdbsuccesstext": "The database has been locked.
\nRemember to [[Special:UnlockDB|remove the lock]] after your maintenance is complete.", "unlockdbsuccesstext": "The database has been unlocked.", "lockfilenotwritable": "The database lock file is not writable.\nTo lock or unlock the database, this needs to be writable by the web server.", + "databaselocked": "The database is already locked.", "databasenotlocked": "The database is not locked.", "lockedbyandtime": "(by {{GENDER:$1|$1}} on $2 at $3)", "move-page": "Move $1", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index ce019cf71c..bc92b05c0a 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -2599,6 +2599,7 @@ "lockdbsuccesstext": "Used as message text in [[Special:LockDB]].\n\nSee also:\n* {{msg-mw|Lockdbsuccesssub|subtitle}}\n* {{msg-mw|Lockdbsuccesstext|text}}\n* {{msg-mw|Unlockdbsuccesssub|subtitle}}\n* {{msg-mw|Unlockdbsuccesstext|text}}", "unlockdbsuccesstext": "Used as message text in [[Special:UnlockDB]].\n\nSee also:\n* {{msg-mw|Lockdbsuccesssub|subtitle}}\n* {{msg-mw|Lockdbsuccesstext|text}}\n* {{msg-mw|Unlockdbsuccesssub|subtitle}}\n* {{msg-mw|Unlockdbsuccesstext|text}}", "lockfilenotwritable": "'No longer needed' on wikipedia.", + "databaselocked": "Used as error message in [[Special:LockDB]].\nThe title of this error message is {{msg-mw|Lockdb}}.\n\nSee also:\n* {{msg-mw|Lockdb|title}}\n* {{msg-mw|Databaselocked|message}}", "databasenotlocked": "Used as error message in [[Special:UnlockDB]].\nThe title of this error message is {{msg-mw|Lockdb}}.\n\nSee also:\n* {{msg-mw|Lockdb|title}}\n* {{msg-mw|Databasenotlocked|message}}", "lockedbyandtime": "Used as part of the message when a database is locked through [[Special:LockDB]]. Parameters:\n* $1 is the user that locked the database.\n* $2 is the date on which the lock was made\n* $3 is the time at which the lock was made", "move-page": "Used as page title of [[Special:MovePage]] to move pages.\n\nSee example: [[Special:MovePage/Portal:En]].\n\nParameters:\n* $1 - the name of the page to be moved (without link)\n{{Identical|Move}}",