$wgOut->developerRequired();
return;
}
- $action = $wgRequest->getText( 'action' );
+ $action = $wgRequest->getVal( 'action' );
$f = new DBLockForm();
if ( "success" == $action ) { $f->showSuccess(); }
$titleObj = Title::makeTitle( NS_SPECIAL, "Lockdb" );
$action = $titleObj->escapeLocalURL( "action=submit" );
- $wgOut->addHTML( "<p>
-<form id=\"lockdb\" method=\"post\" action=\"{$action}\">
+ $wgOut->addHTML( <<<END
+<form id="lockdb" method="post" action="{$action}">
{$elr}:
-<textarea name=\"wpLockReason\" rows=10 cols=60 wrap=virtual>
-</textarea>
-<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" );
+<textarea name="wpLockReason" rows="10" cols="60" wrap="virtual"></textarea>
+<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
+);
}
$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( "" ); }
}
$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
+);
}
$this->showForm( wfMsg( "locknoconfirm" ) );
return;
}
- if ( ! unlink( $wgReadOnlyFile ) ) {
+ if ( @! unlink( $wgReadOnlyFile ) ) {
$wgOut->fileDeleteError( $wgReadOnlyFile );
return;
}