Fix login/logout under XHTML
authorBrion Vibber <brion@users.mediawiki.org>
Sat, 3 Apr 2004 10:59:26 +0000 (10:59 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sat, 3 Apr 2004 10:59:26 +0000 (10:59 +0000)
includes/OutputPage.php
includes/SpecialUserlogin.php
includes/SpecialUserlogout.php

index 6ad71b3..e4f79a1 100644 (file)
@@ -554,7 +554,7 @@ class OutputPage {
                        $titleObj = Title::newFromText( $returnto );
                        $wgOut->addMeta( "http:Refresh", "10;url=" . $titleObj->escapeFullURL() );
                }
-               $wgOut->addHTML( "\n<p>$r\n" );
+               $wgOut->addHTML( "\n<p>$r</p>\n" );
        }
 
        # This function takes the existing and broken links for the page
index 75f2db2..1d72bea 100644 (file)
@@ -278,7 +278,7 @@ class LoginForm {
                $wgOut->setPageTitle( wfMsg( "loginsuccesstitle" ) );
                $wgOut->setRobotpolicy( "noindex,nofollow" );
                $wgOut->setArticleRelated( false );
-               $wgOut->addHTML( $msg . "\n<p>" );
+               $wgOut->addHTML( $msg );
                $wgOut->returnToMain();
        }
 
@@ -357,56 +357,56 @@ class LoginForm {
                $encEmail = wfEscapeHTML( $this->mEmail );
 
                if ($wgUser->getID() != 0) {
-                       $cambutton = "<input tabindex=6 type=submit name=\"wpCreateaccountMail\" value=\"{$cam}\">";
+                       $cambutton = "<input tabindex='6' type='submit' name=\"wpCreateaccountMail\" value=\"{$cam}\" />";
                } else {
                        $cambutton = "";
                }
 
                $wgOut->addHTML( "
        <form name=\"userlogin\" id=\"userlogin\" method=\"post\" action=\"{$action}\">
-       <table border=0><tr>
-       <td align=right>$yn:</td>
-       <td align=left>
-       <input tabindex=1 type=text name=\"wpName\" value=\"{$encName}\" size=20>
+       <table border='0'><tr>
+       <td align='right'>$yn:</td>
+       <td align='left'>
+       <input tabindex='1' type='text' name=\"wpName\" value=\"{$encName}\" size='20' />
        </td>
-       <td align=left>
-       <input tabindex=3 type=submit name=\"wpLoginattempt\" value=\"{$li}\">
+       <td align='left'>
+       <input tabindex='3' type='submit' name=\"wpLoginattempt\" value=\"{$li}\" />
        </td>
        </tr>
        <tr>
-       <td align=right>$yp:</td>
-       <td align=left>
-       <input tabindex=2 type=password name=\"wpPassword\" value=\"{$encPassword}\" size=20>
+       <td align='right'>$yp:</td>
+       <td align='left'>
+       <input tabindex='2' type='password' name=\"wpPassword\" value=\"{$encPassword}\" size='20' />
+       </td>
+       <td align='left'>
+       <input tabindex='7' type='checkbox' name=\"wpRemember\" value=\"1\" id=\"wpRemember\"$checked /><label for=\"wpRemember\">$rmp</label>
        </td>
-       <td align=left>
-       <input tabindex=7 type=checkbox name=\"wpRemember\" value=\"1\" id=\"wpRemember\"$checked><label for=\"wpRemember\">$rmp</label>
-       </td>                      
        </tr>");
 
                if ($wgUser->isAllowedToCreateAccount()) {
                        $encRetype = htmlspecialchars( $this->mRetype );
                        $encEmail = htmlspecialchars( $this->mEmail );
-       $wgOut->addHTML("<tr><td colspan=3>&nbsp;</td></tr><tr>
-       <td align=right>$ypa:</td>
-       <td align=left>
-       <input tabindex=4 type=password name=\"wpRetype\" value=\"{$encRetype}\" 
-       size=20>
+       $wgOut->addHTML("<tr><td colspan='3'>&nbsp;</td></tr><tr>
+       <td align='right'>$ypa:</td>
+       <td align='left'>
+       <input tabindex='4' type='password' name=\"wpRetype\" value=\"{$encRetype}\" 
+       size='20' />
        </td><td>$nuo</td></tr>
        <tr>
-       <td align=right>$ye:</td>
-       <td align=left>
-       <input tabindex=5 type=text name=\"wpEmail\" value=\"{$encEmail}\" size=20>
-       </td><td align=left>
-       <input tabindex=6 type=submit name=\"wpCreateaccount\" value=\"{$ca}\">
+       <td align='right'>$ye:</td>
+       <td align='left'>
+       <input tabindex='5' type='text' name=\"wpEmail\" value=\"{$encEmail}\" size='20' />
+       </td><td align='left'>
+       <input tabindex='6' type='submit' name=\"wpCreateaccount\" value=\"{$ca}\" />
        $cambutton
        </td></tr>");
                }
 
                $wgOut->addHTML("
-       <tr><td colspan=3>&nbsp;</td></tr><tr>
-       <td colspan=3 align=left>
-       <p>$efl<br>
-       <input tabindex=8 type=submit name=\"wpMailmypassword\" value=\"{$mmp}\">
+       <tr><td colspan='3'>&nbsp;</td></tr><tr>
+       <td colspan='3' align='left'>
+       <p>$efl<br />
+       <input tabindex='8' type='submit' name=\"wpMailmypassword\" value=\"{$mmp}\" /></p>
        </td></tr></table>
        </form>\n" );
                $wgOut->addHTML( $endText );
index c86f55a..182c9bf 100644 (file)
@@ -7,7 +7,7 @@ function wfSpecialUserlogout()
        $wgUser->logout();
        $wgOut->mCookies = array();
        $wgOut->setRobotpolicy( "noindex,nofollow" );
-       $wgOut->addHTML( wfMsg( "logouttext" ) . "\n<p>" );
+       $wgOut->addHTML( wfMsg( "logouttext" ) );
        $wgOut->returnToMain();
 }