(bug 16823) 'Sidebar search form should not use Special:Search view URL as target'
authorAaron Schulz <aaron@users.mediawiki.org>
Wed, 25 Feb 2009 00:13:04 +0000 (00:13 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Wed, 25 Feb 2009 00:13:04 +0000 (00:13 +0000)
includes/SkinTemplate.php
skins/Modern.php
skins/MonoBook.php

index bf6fad3..4317a93 100644 (file)
@@ -259,6 +259,7 @@ class SkinTemplate extends Skin {
                $tpl->set( "helppage", wfMsg('helppage'));
                */
                $tpl->set( 'searchaction', $this->escapeSearchLink() );
+               $tpl->set( 'searchtitle', SpecialPage::getTitleFor('search')->getPrefixedDBKey() );
                $tpl->set( 'search', trim( $wgRequest->getVal( 'search' ) ) );
                $tpl->setRef( 'stylepath', $wgStylePath );
                $tpl->setRef( 'articlepath', $wgArticlePath );
index 95de1ff..6b6651d 100644 (file)
@@ -251,7 +251,8 @@ class ModernTemplate extends QuickTemplate {
        <div id="p-search" class="portlet">
                <h5><label for="searchInput"><?php $this->msg('search') ?></label></h5>
                <div id="searchBody" class="pBody">
-                       <form action="<?php $this->text('searchaction') ?>" id="searchform"><div>
+                       <form action="<?php $this->text('wgScript') ?>" id="searchform"><div>
+                               <input type='hidden' name="title" value="<?php $this->text('searchtitle') ?>"/>
                                <input id="searchInput" name="search" type="text"<?php echo $this->skin->tooltipAndAccesskey('search');
                                        if( isset( $this->data['search'] ) ) {
                                                ?> value="<?php $this->text('search') ?>"<?php } ?> />
index 366199d..2312de0 100644 (file)
@@ -254,7 +254,8 @@ class MonoBookTemplate extends QuickTemplate {
        <div id="p-search" class="portlet">
                <h5><label for="searchInput"><?php $this->msg('search') ?></label></h5>
                <div id="searchBody" class="pBody">
-                       <form action="<?php $this->text('searchaction') ?>" id="searchform"><div>
+                       <form action="<?php $this->text('wgScript') ?>" id="searchform"><div>
+                               <input type='hidden' name="title" value="<?php $this->text('searchtitle') ?>"/>
                                <input id="searchInput" name="search" type="text"<?php echo $this->skin->tooltipAndAccesskey('search');
                                        if( isset( $this->data['search'] ) ) {
                                                ?> value="<?php $this->text('search') ?>"<?php } ?> />