dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* Normalize titles in Special:Randomincategory
[lhc/web/wiklou.git]
/
includes
/
SpecialUnlockdb.php
diff --git
a/includes/SpecialUnlockdb.php
b/includes/SpecialUnlockdb.php
index
7808ac5
..
52025e5
100644
(file)
--- a/
includes/SpecialUnlockdb.php
+++ b/
includes/SpecialUnlockdb.php
@@
-1,8
+1,7
@@
<?php
/**
*
<?php
/**
*
- * @package MediaWiki
- * @subpackage SpecialPage
+ * @addtogroup SpecialPage
*/
/**
*/
/**
@@
-31,14
+30,19
@@
function wfSpecialUnlockdb() {
/**
*
/**
*
- * @package MediaWiki
- * @subpackage SpecialPage
+ * @addtogroup SpecialPage
*/
class DBUnlockForm {
function showForm( $err )
{
global $wgOut, $wgUser;
*/
class DBUnlockForm {
function showForm( $err )
{
global $wgOut, $wgUser;
+ global $wgReadOnlyFile;
+ if( !file_exists( $wgReadOnlyFile ) ) {
+ $wgOut->addWikiText( wfMsg( 'databasenotlocked' ) );
+ return;
+ }
+
$wgOut->setPagetitle( wfMsg( "unlockdb" ) );
$wgOut->addWikiText( wfMsg( "unlockdbtext" ) );
$wgOut->setPagetitle( wfMsg( "unlockdb" ) );
$wgOut->addWikiText( wfMsg( "unlockdbtext" ) );
@@
-48,7
+52,7
@@
class DBUnlockForm {
}
$lc = htmlspecialchars( wfMsg( "unlockconfirm" ) );
$lb = htmlspecialchars( wfMsg( "unlockbtn" ) );
}
$lc = htmlspecialchars( wfMsg( "unlockconfirm" ) );
$lb = htmlspecialchars( wfMsg( "unlockbtn" ) );
- $titleObj =
Title::makeTitle( NS_SPECIAL,
"Unlockdb" );
+ $titleObj =
SpecialPage::getTitleFor(
"Unlockdb" );
$action = $titleObj->escapeLocalURL( "action=submit" );
$token = htmlspecialchars( $wgUser->editToken() );
$action = $titleObj->escapeLocalURL( "action=submit" );
$token = htmlspecialchars( $wgUser->editToken() );
@@
-88,7
+92,7
@@
END
$wgOut->showFileDeleteError( $wgReadOnlyFile );
return;
}
$wgOut->showFileDeleteError( $wgReadOnlyFile );
return;
}
- $titleObj =
Title::makeTitle( NS_SPECIAL,
"Unlockdb" );
+ $titleObj =
SpecialPage::getTitleFor(
"Unlockdb" );
$success = $titleObj->getFullURL( "action=success" );
$wgOut->redirect( $success );
}
$success = $titleObj->getFullURL( "action=success" );
$wgOut->redirect( $success );
}
@@
-103,4
+107,4
@@
END
}
}
}
}
-?>
+