r47773 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47772‎ | r47773 | r47774 >
Date:00:13, 25 February 2009
Author:aaron
Status:ok (Comments)
Tags:
Comment:
(bug 16823) 'Sidebar search form should not use Special:Search view URL as target'
Modified paths:
  • /trunk/phase3/includes/SkinTemplate.php (modified) (history)
  • /trunk/phase3/skins/Modern.php (modified) (history)
  • /trunk/phase3/skins/MonoBook.php (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/MonoBook.php
@@ -254,7 +254,8 @@
255255 <div id="p-search" class="portlet">
256256 <h5><label for="searchInput"><?php $this->msg('search') ?></label></h5>
257257 <div id="searchBody" class="pBody">
258 - <form action="<?php $this->text('searchaction') ?>" id="searchform"><div>
 258+ <form action="<?php $this->text('wgScript') ?>" id="searchform"><div>
 259+ <input type='hidden' name="title" value="<?php $this->text('searchtitle') ?>"/>
259260 <input id="searchInput" name="search" type="text"<?php echo $this->skin->tooltipAndAccesskey('search');
260261 if( isset( $this->data['search'] ) ) {
261262 ?> value="<?php $this->text('search') ?>"<?php } ?> />
Index: trunk/phase3/skins/Modern.php
@@ -251,7 +251,8 @@
252252 <div id="p-search" class="portlet">
253253 <h5><label for="searchInput"><?php $this->msg('search') ?></label></h5>
254254 <div id="searchBody" class="pBody">
255 - <form action="<?php $this->text('searchaction') ?>" id="searchform"><div>
 255+ <form action="<?php $this->text('wgScript') ?>" id="searchform"><div>
 256+ <input type='hidden' name="title" value="<?php $this->text('searchtitle') ?>"/>
256257 <input id="searchInput" name="search" type="text"<?php echo $this->skin->tooltipAndAccesskey('search');
257258 if( isset( $this->data['search'] ) ) {
258259 ?> value="<?php $this->text('search') ?>"<?php } ?> />
Index: trunk/phase3/includes/SkinTemplate.php
@@ -259,6 +259,7 @@
260260 $tpl->set( "helppage", wfMsg('helppage'));
261261 */
262262 $tpl->set( 'searchaction', $this->escapeSearchLink() );
 263+ $tpl->set( 'searchtitle', SpecialPage::getTitleFor('search')->getPrefixedDBKey() );
263264 $tpl->set( 'search', trim( $wgRequest->getVal( 'search' ) ) );
264265 $tpl->setRef( 'stylepath', $wgStylePath );
265266 $tpl->setRef( 'articlepath', $wgArticlePath );

Follow-up revisions

RevisionCommit summaryAuthorDate
r48807release note lines for r47771, r47773, r47776brion11:47, 25 March 2009

Comments

#Comment by Melancholie (talk | contribs)   22:38, 3 March 2009

Why is there a <div> behind <form action="<?php $this->text('wgScript') ?>" id="searchform">, actually?

Removing the div tag

 <form action="<?php $this->text('wgScript') ?>" id="searchform"><div>
 </div></form>

like

 <form action="<?php $this->text('wgScript') ?>" id="searchform">
 </form>

gives the exactly same result, so this remaining wrapping div tag seems superfluous to me!

#Comment by Melancholie (talk | contribs)   22:38, 3 March 2009

Why is there a <div> behind <form action="<?php $this->text('wgScript') ?>" id="searchform">, actually?

Removing the div tag

 <form action="<?php $this->text('wgScript') ?>" id="searchform"><div>
 </div></form>

like

 <form action="<?php $this->text('wgScript') ?>" id="searchform">
 </form>

gives the exactly same result, so this remaining wrapping div tag seems superfluous to me!

Status & tagging log