mirror of
https://github.com/e107inc/e107.git
synced 2025-01-29 10:38:08 +01:00
Fixes #2008 - Search Form URL
This commit is contained in:
parent
1c156cd8fb
commit
9eba6b5a23
@ -27,7 +27,7 @@ if(!isset($SEARCH_SHORTCODE))
|
||||
if(!isset($SEARCH_TOP_TABLE))
|
||||
{
|
||||
$SEARCH_TOP_TABLE = "<div>
|
||||
<form id='searchform' method='get' action='".e_SELF."'>
|
||||
<form id='searchform' method='get' action='{SEARCH_FORM_URL}'>
|
||||
<table style='".USER_WIDTH."' class='table fborder'><tr>
|
||||
<td class='forumheader3' style='width: 40%'>".LAN_199."</td>
|
||||
<td class='forumheader3' style='width: 60%; white-space: nowrap'>
|
||||
@ -135,7 +135,7 @@ if(!isset($POST_CHECKBOXES))
|
||||
|
||||
|
||||
$SEARCH_TEMPLATE['form']['start'] = '
|
||||
<form class="form-horizontal" role="form" id="searchform" method="get" action="'.e_SELF.'">
|
||||
<form class="form-horizontal" role="form" id="searchform" method="get" action="{SEARCH_FORM_URL}">
|
||||
<div class="form-group">
|
||||
<label for="inputEmail3" class="col-sm-3 control-label">'.LAN_199.'</label>
|
||||
<div class="col-sm-9">{SEARCH_MAIN}
|
||||
|
@ -61,12 +61,12 @@ if (isset($custom_query[5]) && $custom_query[5]) {
|
||||
$value_text = "value=''";
|
||||
}
|
||||
|
||||
|
||||
$search_form_url = e107::getUrl()->create('search');
|
||||
|
||||
if(deftrue('BOOTSTRAP'))
|
||||
{
|
||||
$text = '
|
||||
<form class="form-inline" method="get" action="'.e_HTTP.'search.php">
|
||||
<form class="form-inline" method="get" action="'.$search_form_url.'">
|
||||
<div class="input-group">
|
||||
<input class="form-control search" type="text" name="q" size="20" maxlength="50" '.$value_text.' />
|
||||
<input type="hidden" name="r" value="0" />';
|
||||
@ -85,7 +85,7 @@ if(deftrue('BOOTSTRAP'))
|
||||
}
|
||||
else // Legacy v1 code.
|
||||
{
|
||||
$text = "<form class='form-inline' method='get' action='".e_HTTP."search.php'>";
|
||||
$text = "<form class='form-inline' method='get' action='".$search_form_url."'>";
|
||||
|
||||
$text .= "
|
||||
<div>
|
||||
@ -109,7 +109,10 @@ else // Legacy v1 code.
|
||||
if (isset($searchflat) && $searchflat)
|
||||
{
|
||||
echo $text;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
$ns->tablerender(LAN_SEARCH." ".SITENAME, "<div style='text-align:center'>".$text."</div>", 'search');
|
||||
}
|
||||
|
||||
?>
|
11
search.php
11
search.php
@ -238,6 +238,17 @@ class search extends e_shortcode
|
||||
return $this->message;
|
||||
}
|
||||
|
||||
function sc_search_form_url($parm='')
|
||||
{
|
||||
return e107::getUrl()->create('search');
|
||||
}
|
||||
|
||||
|
||||
|
||||
// -----------------------
|
||||
|
||||
|
||||
|
||||
private function selectElement($parm)
|
||||
{
|
||||
// standard search config
|
||||
|
Loading…
x
Reference in New Issue
Block a user