diff options
author | Brion Vibber <brion@users.mediawiki.org> | 2004-10-14 05:53:30 +0000 |
---|---|---|
committer | Brion Vibber <brion@users.mediawiki.org> | 2004-10-14 05:53:30 +0000 |
commit | f2f29a11e35d14241fd03808de1f18c55cb4ef8f (patch) | |
tree | a372e68a8e6f1ef57fa926a85c26413dc99af48f /includes/SpecialUnlockdb.php | |
parent | dc9a0d3de09258cd99151fdeabeff18a2bc69954 (diff) | |
download | mediawikicore-f2f29a11e35d14241fd03808de1f18c55cb4ef8f.tar.gz mediawikicore-f2f29a11e35d14241fd03808de1f18c55cb4ef8f.zip |
Fix XHTML tags
Notes
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/5898
Diffstat (limited to 'includes/SpecialUnlockdb.php')
-rw-r--r-- | includes/SpecialUnlockdb.php | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/includes/SpecialUnlockdb.php b/includes/SpecialUnlockdb.php index 80ce71bd06c9..f2d056e081ef 100644 --- a/includes/SpecialUnlockdb.php +++ b/includes/SpecialUnlockdb.php @@ -15,11 +15,11 @@ function wfSpecialUnlockdb() { $wgOut->developerRequired(); return; } - $action = $wgRequest->getText( 'action' ); + $action = $wgRequest->getVal( 'action' ); $f = new DBUnlockForm(); if ( "success" == $action ) { $f->showSuccess(); } - else if ( "submit" == $action ) { $f->doSubmit(); } + else if ( "submit" == $action && $wgRequest->wasPosted() ) { $f->doSubmit(); } else { $f->showForm( "" ); } } @@ -45,18 +45,26 @@ class DBUnlockForm { $titleObj = Title::makeTitle( NS_SPECIAL, "Unlockdb" ); $action = $titleObj->escapeLocalURL( "action=submit" ); - $wgOut->addHTML( "<p> -<form id=\"unlockdb\" method=\"post\" action=\"{$action}\"> -<table border=0><tr> -<td align=right> -<input type=checkbox name=\"wpLockConfirm\"> -</td> -<td align=\"left\">{$lc}<td> -</tr><tr> -<td> </td><td align=left> -<input type=submit name=\"wpLock\" value=\"{$lb}\"> -</td></tr></table> -</form>\n" ); + $wgOut->addHTML( <<<END + +<form id="unlockdb" method="post" action="{$action}"> +<table border="0"> + <tr> + <td align="right"> + <input type="checkbox" name="wpLockConfirm" /> + </td> + <td align="left">{$lc}</td> + </tr> + <tr> + <td> </td> + <td align="left"> + <input type="submit" name="wpLock" value="{$lb}" /> + </td> + </tr> +</table> +</form> +END +); } @@ -69,7 +77,7 @@ class DBUnlockForm { $this->showForm( wfMsg( "locknoconfirm" ) ); return; } - if ( ! unlink( $wgReadOnlyFile ) ) { + if ( @! unlink( $wgReadOnlyFile ) ) { $wgOut->fileDeleteError( $wgReadOnlyFile ); return; } |