1.1 --- a/system/classes/search.class.php Sat Nov 07 16:20:34 2009 +0000
1.2 +++ b/system/classes/search.class.php Sat Nov 07 21:52:55 2009 +0100
1.3 @@ -62,6 +62,7 @@
1.4 var $_searchURL = '';
1.5 var $_wordlength;
1.6 var $_verbose = false; // verbose logging
1.7 + var $_titlesOnly = false;
1.8
1.9 /**
1.10 * Constructor
1.11 @@ -104,6 +105,8 @@
1.12 }
1.13 $this->_type = isset($_GET['type']) ? COM_applyFilter($_GET['type']) : 'all';
1.14 $this->_keyType = isset($_GET['keyType']) ? COM_applyFilter($_GET['keyType']) : $_CONF['search_def_keytype'];
1.15 +
1.16 + $this->_titlesOnly = isset($_GET['title']) ? true : false;
1.17 }
1.18
1.19 /**
1.20 @@ -247,6 +250,11 @@
1.21 $searchform->set_var ('query', $escquery);
1.22 $searchform->set_var ('datestart', $this->_dateStart);
1.23 $searchform->set_var ('dateend', $this->_dateEnd);
1.24 + if ($this->_titlesOnly) {
1.25 + $searchform->set_var('title_checked', ' checked="checked"');
1.26 + } else {
1.27 + $searchform->set_var('title_checked', '');
1.28 + }
1.29
1.30 $phrase_selected = '';
1.31 $all_selected = '';
1.32 @@ -453,7 +461,8 @@
1.33 ((!empty($this->_dateStart)) ? '&datestart=' . $this->_dateStart : '' ) .
1.34 ((!empty($this->_dateEnd)) ? '&dateend=' . $this->_dateEnd : '' ) .
1.35 ((!empty($this->_topic)) ? '&topic=' . $this->_topic : '' ) .
1.36 - ((!empty($this->_author)) ? '&author=' . $this->_author : '' );
1.37 + ((!empty($this->_author)) ? '&author=' . $this->_author : '' ) .
1.38 + ($this->_titlesOnly ? '&title=true' : '');
1.39
1.40 $url = "{$this->_searchURL}&type={$this->_type}&mode=";
1.41 $obj = new ListFactory($url.'search', $_CONF['search_limits'], $_CONF['num_search_results']);