r12527 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r12526‎ | r12527 | r12528 >
Date:18:15, 8 January 2006
Author:hashar
Status:old
Tags:
Comment:
Fix #2571: Duplicate anchors and missing form id tag in search form on Cologne Blue skin
Modified paths:
  • /trunk/phase3/skins/CologneBlue.php (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/CologneBlue.php
@@ -16,6 +16,8 @@
1717 * @subpackage Skins
1818 */
1919 class SkinCologneBlue extends Skin {
 20+ # We have several search form. Make sure they have different id
 21+ var $searchFormCount = '' ;
2022
2123 function getStylesheet() {
2224 return "common/cologneblue.css?1";
@@ -300,17 +302,17 @@
301303
302304 function searchForm( $label = "" )
303305 {
304 - global $wgRequest;
 306+ global $wgRequest, $searchFormCount;
305307
306308 $search = $wgRequest->getText( 'search' );
307309 $action = $this->escapeSearchLink();
308 - $s = "<form id=\"search\" method=\"get\" class=\"inline\" action=\"$action\">";
 310+ $s = "<form id=\"searchForm{$searchFormCount}\" method=\"get\" class=\"inline\" action=\"$action\">";
309311 if ( "" != $label ) { $s .= "{$label}: "; }
310312
311 - $s .= "<input type='text' name=\"search\" size='14' value=\""
 313+ $s .= "<input type='text' name=\"searchInput{$searchFormCount}\" size='14' value=\""
312314 . htmlspecialchars(substr($search,0,256)) . "\" />"
313315 . "<br /><input type='submit' name=\"go\" value=\"" . htmlspecialchars( wfMsg( "go" ) ) . "\" /> <input type='submit' name=\"fulltext\" value=\"" . htmlspecialchars( wfMsg( "search" ) ) . "\" /></form>";
314 -
 316+ $searchFormCount++;
315317 return $s;
316318 }
317319 }

Status & tagging log