Fix XHTML tags

This commit is contained in:
Brion Vibber 2004-10-14 05:53:30 +00:00
parent dc9a0d3de0
commit f2f29a11e3
2 changed files with 44 additions and 30 deletions

View file

@ -16,7 +16,7 @@ function wfSpecialLockdb()
$wgOut->developerRequired(); $wgOut->developerRequired();
return; return;
} }
$action = $wgRequest->getText( 'action' ); $action = $wgRequest->getVal( 'action' );
$f = new DBLockForm(); $f = new DBLockForm();
if ( "success" == $action ) { $f->showSuccess(); } if ( "success" == $action ) { $f->showSuccess(); }
@ -54,21 +54,27 @@ class DBLockForm {
$titleObj = Title::makeTitle( NS_SPECIAL, "Lockdb" ); $titleObj = Title::makeTitle( NS_SPECIAL, "Lockdb" );
$action = $titleObj->escapeLocalURL( "action=submit" ); $action = $titleObj->escapeLocalURL( "action=submit" );
$wgOut->addHTML( "<p> $wgOut->addHTML( <<<END
<form id=\"lockdb\" method=\"post\" action=\"{$action}\"> <form id="lockdb" method="post" action="{$action}">
{$elr}: {$elr}:
<textarea name=\"wpLockReason\" rows=10 cols=60 wrap=virtual> <textarea name="wpLockReason" rows="10" cols="60" wrap="virtual"></textarea>
</textarea> <table border="0">
<table border=0><tr> <tr>
<td align=right> <td align="right">
<input type=checkbox name=\"wpLockConfirm\"> <input type="checkbox" name="wpLockConfirm" />
</td> </td>
<td align=left>{$lc}<td> <td align="left">{$lc}</td>
</tr><tr> </tr>
<td>&nbsp;</td><td align=left> <tr>
<input type=submit name=\"wpLock\" value=\"{$lb}\"> <td>&nbsp;</td>
</td></tr></table> <td align="left">
</form>\n" ); <input type="submit" name="wpLock" value="{$lb}" />
</td>
</tr>
</table>
</form>
END
);
} }

View file

@ -15,11 +15,11 @@ function wfSpecialUnlockdb() {
$wgOut->developerRequired(); $wgOut->developerRequired();
return; return;
} }
$action = $wgRequest->getText( 'action' ); $action = $wgRequest->getVal( 'action' );
$f = new DBUnlockForm(); $f = new DBUnlockForm();
if ( "success" == $action ) { $f->showSuccess(); } if ( "success" == $action ) { $f->showSuccess(); }
else if ( "submit" == $action ) { $f->doSubmit(); } else if ( "submit" == $action && $wgRequest->wasPosted() ) { $f->doSubmit(); }
else { $f->showForm( "" ); } else { $f->showForm( "" ); }
} }
@ -45,18 +45,26 @@ class DBUnlockForm {
$titleObj = Title::makeTitle( NS_SPECIAL, "Unlockdb" ); $titleObj = Title::makeTitle( NS_SPECIAL, "Unlockdb" );
$action = $titleObj->escapeLocalURL( "action=submit" ); $action = $titleObj->escapeLocalURL( "action=submit" );
$wgOut->addHTML( "<p> $wgOut->addHTML( <<<END
<form id=\"unlockdb\" method=\"post\" action=\"{$action}\">
<table border=0><tr> <form id="unlockdb" method="post" action="{$action}">
<td align=right> <table border="0">
<input type=checkbox name=\"wpLockConfirm\"> <tr>
</td> <td align="right">
<td align=\"left\">{$lc}<td> <input type="checkbox" name="wpLockConfirm" />
</tr><tr> </td>
<td>&nbsp;</td><td align=left> <td align="left">{$lc}</td>
<input type=submit name=\"wpLock\" value=\"{$lb}\"> </tr>
</td></tr></table> <tr>
</form>\n" ); <td>&nbsp;</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" ) ); $this->showForm( wfMsg( "locknoconfirm" ) );
return; return;
} }
if ( ! unlink( $wgReadOnlyFile ) ) { if ( @! unlink( $wgReadOnlyFile ) ) {
$wgOut->fileDeleteError( $wgReadOnlyFile ); $wgOut->fileDeleteError( $wgReadOnlyFile );
return; return;
} }