Well-formedness error
[lhc/web/wiklou.git] / includes / SkinCologneBlue.php
index 515750b..3aa3be2 100644 (file)
@@ -3,11 +3,6 @@
 
 class SkinCologneBlue extends Skin {
 
-       function initPage()
-       {
-               global $wgOut, $wgStyleSheetPath;
-       }
-
        function getStylesheet()
        {
                return "cologneblue.css";
@@ -19,25 +14,26 @@ class SkinCologneBlue extends Skin {
 
                $s = "";
                $qb = $this->qbSetting();
-
+               $mainPageObj = Title::newMainPage();
+               
                $s .= "\n<div id='content'>\n<div id='topbar'>" .
-                 "<table width='100%' border=0 cellspacing=0 cellpadding=8><tr>";
+                 "<table width='100%' border='0' cellspacing='0' cellpadding='8'><tr>";
 
-               $s .= "<td class='top' align=left valign=middle nowrap>";
-               $s .= "<a href=\"" . wfLocalUrlE( urlencode( wfMsg( "mainpage" ) ) ) . "\">";
+               $s .= "<td class='top' align='left' valign='middle' nowrap='nowrap'>";
+               $s .= "<a href=\"" . $mainPageObj->escapeLocalURL() . "\">";
                $s .= "<span id='sitetitle'>" . wfMsg( "sitetitle" ) . "</span></a>";
 
-               $s .= "</td><td class='top' align=right valign=bottom width='100%'>";
+               $s .= "</td><td class='top' align='right' valign='bottom' width='100%'>";
                $s .= $this->sysLinks();
-               $s .= "</td></tr><tr><td valign=top>";
+               $s .= "</td></tr><tr><td valign='top'>";
 
                $s .= "<font size='-1'><span id='sitesub'>";
-               $s .= wfMsg( "sitesubtitle" ) . "</span></font>";
-               $s .= "</td><td align=right>" ;
+               $s .= htmlspecialchars( wfMsg( "sitesubtitle" ) ) . "</span></font>";
+               $s .= "</td><td align='right'>" ;
 
                $s .= "<font size='-1'><span id='langlinks'>" ;
                $s .= str_replace ( "<br>" , "" , $this->otherLanguages() ) ;
-               $s .= "<br>" . $this->pageTitleLinks();
+               $s .= "<br />" . $this->pageTitleLinks();
                $s .= "</span></font>";
 
                $s .= "</td></tr></table>\n";
@@ -45,7 +41,7 @@ class SkinCologneBlue extends Skin {
                $s .= "\n</div>\n<div id='article'>";
 
                $s .= $this->pageTitle();
-               $s .= $this->pageSubtitle() . "\n<p>";
+               $s .= $this->pageSubtitle() . "\n";
                return $s;
        }
 
@@ -53,24 +49,23 @@ class SkinCologneBlue extends Skin {
        {
                global $wgUser, $wgOut;
 
-               $s = "\n</div><br clear=all>\n";
+               $s = "\n</div><br clear='all' />\n";
 
                $s .= "\n<div id='footer'>";
-               $s .= "<table width='98%' border=0 cellspacing=0><tr>";
+               $s .= "<table width='98%' border='0' cellspacing='0'><tr>";
 
                $qb = $this->qbSetting();
                if ( 1 == $qb || 3 == $qb ) { # Left
                        $s .= $this->getQuickbarCompensator();
                }
-               $s .= "<td class='bottom' align=center valign=top>";
+               $s .= "<td class='bottom' align='center' valign='top'>";
 
                $s .= $this->bottomLinks();
-               $s .= "\n<br>" . $this->makeKnownLink( wfMsg( "mainpage" ),
-                 wfMsg( "mainpage" ) ) . " | "
+               $s .= "\n<br />" . $this->makeKnownLink( wfMsg( "mainpage" ) ) . " | "
                  . $this->aboutLink() . " | "
                  . $this->searchForm( wfMsg( "qbfind" ) );
 
-               $s .= "\n<br>" . $this->pageStats();
+               $s .= "\n<br />" . $this->pageStats();
 
                $s .= "</td>";
                if ( 2 == $qb ) { # Right
@@ -110,9 +105,6 @@ class SkinCologneBlue extends Skin {
                        $q = "returnto={$rt}"; 
                }
                
-               $s .= "\n<br>" . $this->makeKnownLink( $li,
-                 wfMsg( "login" ), $q );
-
                $s = "" .
                  $this->makeKnownLink( wfMsg( "mainpage" ), wfMsg( "mainpage" ) )
                  . " | " .
@@ -144,7 +136,7 @@ class SkinCologneBlue extends Skin {
 
                $s = "\n<div id='quickbar'>";
 
-               $sep = "<br>";
+               $sep = "<br />";
                $s .= $this->menuHead( "qbfind" );
                $s .= $this->searchForm();
 
@@ -231,7 +223,12 @@ class SkinCologneBlue extends Skin {
                if ( 0 != $wgUser->getID() && !$wgDisableUploads ) {
                        $s .= $sep . $this->specialLink( "upload" );
                }
-
+               global $wgSiteSupportPage;
+               if( $wgSiteSupportPage) {
+                       $s .= $sep."<a href=\"".htmlspecialchars($wgSiteSupportPage)."\" class =\"internal\">"
+                             .wfMsg( "sitesupport" )."</a>";
+               }
+               
                $s .= $sep . $this->makeKnownLink( $wgLang->specialPage( "Specialpages" ), wfMsg("moredotdotdot") );
 
                $s .= $sep . "\n</div>\n";
@@ -246,14 +243,16 @@ class SkinCologneBlue extends Skin {
 
        function searchForm( $label = "" )
        {
-               global $search;
+               global $wgRequest;
+
+               $search = $wgRequest->getText( 'search' );
                $s = "<form id=\"search\" method=\"get\" class=\"inline\" action=\"" .
                  wfLocalUrlE( "" ) . "\">";
                if ( "" != $label ) { $s .= "{$label}: "; }
 
-               $s .= "<input type=text name=\"search\" size=14 value=\""
-                 . htmlspecialchars(substr($search,0,256)) . "\">"
-                 . "<br><input type=submit name=\"go\" value=\"" . wfMsg( "go" ) . "\"> <input type=submit name=\"fulltext\" value=\"" . wfMsg( "search" ) . "\"></form>";
+               $s .= "<input type='text' name=\"search\" size='14' value=\""
+                 . htmlspecialchars(substr($search,0,256)) . "\" />"
+                 . "<br /><input type='submit' name=\"go\" value=\"" . htmlspecialchars( wfMsg( "go" ) ) . "\" /> <input type='submit' name=\"fulltext\" value=\"" . htmlspecialchars( wfMsg( "search" ) ) . "\" /></form>";
 
                return $s;
        }