1.1 --- a/public_html/docs/english/theme.html Sat Nov 07 20:39:08 2009 +0100
1.2 +++ b/public_html/docs/english/theme.html Sat Nov 07 21:52:55 2009 +0100
1.3 @@ -222,6 +222,8 @@
1.4 <li>Added a <code>{remoteservice}</code> variable in
1.5 <tt>admin/user/edituser.thtml</tt> to optionally display the name of the
1.6 service a Remote User was using to log in.</li>
1.7 +<li>Added a <code>{title_checked}</code> variable to <tt>search/searchform.thtml</tt>, so that the "Refine search" option can keep the status of the "Titles
1.8 + Only" checkbox.</li>
1.9 </ul>
1.10
1.11 <h3>Cosmetic changes</h3>
2.1 --- a/public_html/docs/history Sat Nov 07 20:39:08 2009 +0100
2.2 +++ b/public_html/docs/history Sat Nov 07 21:52:55 2009 +0100
2.3 @@ -4,6 +4,8 @@
2.4 ------------
2.5
2.6 Changes since 1.6.1b1:
2.7 +- "Refine search" lost the status of the "Titles Only" checkbox [Dirk]
2.8 + Note: This fix requires a change in search/searchform.thtml
2.9 - Improved display of the "Sort by" and "Show n results" dropdowns on the
2.10 search results page (feature request #0000910) [Sami, LWC]
2.11 - Fixed wrong path reported in case of a missing 'data' directory (reported by
3.1 --- a/public_html/layout/professional/search/searchform.thtml Sat Nov 07 20:39:08 2009 +0100
3.2 +++ b/public_html/layout/professional/search/searchform.thtml Sat Nov 07 21:52:55 2009 +0100
3.3 @@ -10,7 +10,7 @@
3.4 <option value="all" {key_all_selected}>{lang_all_words}</option>
3.5 <option value="any" {key_any_selected}>{lang_any_word}</option>
3.6 </select>
3.7 - <input type="checkbox" value="true" name="title"{xhtml}>{lang_titles}
3.8 + <input type="checkbox" value="true" name="title"{title_checked}{xhtml}>{lang_titles}
3.9 </td>
3.10 </tr>
3.11 <tr>
4.1 --- a/system/classes/search.class.php Sat Nov 07 20:39:08 2009 +0100
4.2 +++ b/system/classes/search.class.php Sat Nov 07 21:52:55 2009 +0100
4.3 @@ -62,6 +62,7 @@
4.4 var $_searchURL = '';
4.5 var $_wordlength;
4.6 var $_verbose = false; // verbose logging
4.7 + var $_titlesOnly = false;
4.8
4.9 /**
4.10 * Constructor
4.11 @@ -104,6 +105,8 @@
4.12 }
4.13 $this->_type = isset($_GET['type']) ? COM_applyFilter($_GET['type']) : 'all';
4.14 $this->_keyType = isset($_GET['keyType']) ? COM_applyFilter($_GET['keyType']) : $_CONF['search_def_keytype'];
4.15 +
4.16 + $this->_titlesOnly = isset($_GET['title']) ? true : false;
4.17 }
4.18
4.19 /**
4.20 @@ -247,6 +250,11 @@
4.21 $searchform->set_var ('query', $escquery);
4.22 $searchform->set_var ('datestart', $this->_dateStart);
4.23 $searchform->set_var ('dateend', $this->_dateEnd);
4.24 + if ($this->_titlesOnly) {
4.25 + $searchform->set_var('title_checked', ' checked="checked"');
4.26 + } else {
4.27 + $searchform->set_var('title_checked', '');
4.28 + }
4.29
4.30 $phrase_selected = '';
4.31 $all_selected = '';
4.32 @@ -453,7 +461,8 @@
4.33 ((!empty($this->_dateStart)) ? '&datestart=' . $this->_dateStart : '' ) .
4.34 ((!empty($this->_dateEnd)) ? '&dateend=' . $this->_dateEnd : '' ) .
4.35 ((!empty($this->_topic)) ? '&topic=' . $this->_topic : '' ) .
4.36 - ((!empty($this->_author)) ? '&author=' . $this->_author : '' );
4.37 + ((!empty($this->_author)) ? '&author=' . $this->_author : '' ) .
4.38 + ($this->_titlesOnly ? '&title=true' : '');
4.39
4.40 $url = "{$this->_searchURL}&type={$this->_type}&mode=";
4.41 $obj = new ListFactory($url.'search', $_CONF['search_limits'], $_CONF['num_search_results']);