From f2f29a11e35d14241fd03808de1f18c55cb4ef8f Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 14 Oct 2004 05:53:30 +0000 Subject: [PATCH] Fix XHTML tags --- includes/SpecialLockdb.php | 36 ++++++++++++++++++++-------------- includes/SpecialUnlockdb.php | 38 ++++++++++++++++++++++-------------- 2 files changed, 44 insertions(+), 30 deletions(-) diff --git a/includes/SpecialLockdb.php b/includes/SpecialLockdb.php index 363ac9141a..bbc8e7e0be 100644 --- a/includes/SpecialLockdb.php +++ b/includes/SpecialLockdb.php @@ -16,7 +16,7 @@ function wfSpecialLockdb() $wgOut->developerRequired(); return; } - $action = $wgRequest->getText( 'action' ); + $action = $wgRequest->getVal( 'action' ); $f = new DBLockForm(); if ( "success" == $action ) { $f->showSuccess(); } @@ -54,21 +54,27 @@ class DBLockForm { $titleObj = Title::makeTitle( NS_SPECIAL, "Lockdb" ); $action = $titleObj->escapeLocalURL( "action=submit" ); - $wgOut->addHTML( "

-

+ $wgOut->addHTML( << {$elr}: - - - - -
- -{$lc} -
  - -
-\n" ); + + + + + + + + + + +
+ + {$lc}
  + +
+ +END +); } diff --git a/includes/SpecialUnlockdb.php b/includes/SpecialUnlockdb.php index 80ce71bd06..f2d056e081 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( "

-

- - - -
- -{$lc} -
  - -
-
\n" ); + $wgOut->addHTML( << + + + + + + + + + +
+ + {$lc}
  + +
+ +END +); } @@ -69,7 +77,7 @@ class DBUnlockForm { $this->showForm( wfMsg( "locknoconfirm" ) ); return; } - if ( ! unlink( $wgReadOnlyFile ) ) { + if ( @! unlink( $wgReadOnlyFile ) ) { $wgOut->fileDeleteError( $wgReadOnlyFile ); return; } -- 2.20.1