Last modified: 2006-07-13 00:16:23 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T8642, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 6642 - Special:Unlockdb - Don't show display the form to unlock the database when it's not locked.
Special:Unlockdb - Don't show display the form to unlock the database when it...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
1.8.x
All All
: Lowest trivial (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-07-12 06:03 UTC by Nick Jenkins
Modified: 2006-07-13 00:16 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Nick Jenkins 2006-07-12 06:03:39 UTC
-------------------------------------------------------
root@bling:/var/www/hosts/mediawiki/wiki# svn diff includes/SpecialUnlockdb.php
Index: includes/SpecialUnlockdb.php
===================================================================
--- includes/SpecialUnlockdb.php    (revision 15560)
+++ includes/SpecialUnlockdb.php    (working copy)
@@ -37,9 +37,15 @@
 class DBUnlockForm {
  function showForm( $err )
  {
-  global $wgOut, $wgUser;
+  global $wgOut, $wgUser, $wgReadOnlyFile;

   $wgOut->setPagetitle( wfMsg( "unlockdb" ) );
+
+  if ( !file_exists($wgReadOnlyFile) ) {
+   $wgOut->addWikiText( "The database is not currently locked, so it cannot be
unlocked." );
+   return;
+  }
+
   $wgOut->addWikiText( wfMsg( "unlockdbtext" ) );

   if ( "" != $err ) {
root@bling:/var/www/hosts/mediawiki/wiki#
-------------------------------------------------------

(but should use wfMsg instead of a hard-coded string).
Comment 1 Rob Church 2006-07-12 11:07:24 UTC
You know what's nice? When people leave us patches as attachments. It makes
viewing the diff and saving and applying the patch even easier, especially in
the case of larger patches.
Comment 2 Rob Church 2006-07-12 11:33:50 UTC
Fixed in SVN trunk, r15565.
Comment 3 Nick Jenkins 2006-07-13 00:16:23 UTC
Thank you, and I didn't realise bugzilla would screw up the formatting quite so
badly. :-(

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links