minor gui fixes

This commit is contained in:
SJ
2013-03-24 10:02:34 +01:00
parent 97800b32fa
commit 4fefb6c33f
3 changed files with 13 additions and 3 deletions

View File

@ -759,6 +759,9 @@ class ModelSearchSearch extends Model {
public function add_search_term($term = '') {
if($term == '') { return 0; }
parse_str($term, $s);
if(!isset($s['search']) || $s['search'] == '') { return 0; }
if($this->update_search_term($term) == 0) {
AUDIT(ACTION_SAVE_SEARCH, '', '', '', $term);
$query = $this->db->query("INSERT INTO " . TABLE_SEARCH . " (email, ts, term) VALUES(?,?,?)", array($_SESSION['email'], time(), $term));