fixed some php notice messages

This commit is contained in:
SJ 2012-06-21 10:53:42 +02:00
parent 466d0e383f
commit 26807592b5
2 changed files with 6 additions and 3 deletions

View File

@ -9,6 +9,7 @@ class ModelAuditAudit extends Model {
$sort = "ts";
$order = "DESC";
$sortorder = "ORDER BY ts DESC";
$date1 = $date2 = 0;
$q = '';
@ -40,8 +41,10 @@ class ModelAuditAudit extends Model {
$where .= " AND ref IN (" . $this->append_search_criteria($data['ref'], $arr) . ")";
}
if(isset($data['date1'])) { $date1 = $data['date1']; }
if(isset($data['date2'])) { $date2 = $data['date2']; }
$date = fixup_date_condition('ts', $data['date1'], $data['date2']);
$date = fixup_date_condition('ts', $date1, $date2);
if($date) { $where .= " AND $date "; }

View File

@ -44,7 +44,7 @@ class ModelSearchSearch extends Model {
$all_ids = $m['ids'];
} else {
if($data['ref']){
if(isset($data['ref']) && $data['ref']){
$all_ids = $this->query_all_possible_IDs_by_reference($data['ref'], $cache_key);
}
else {
@ -269,7 +269,7 @@ class ModelSearchSearch extends Model {
if(isset($data['attachment_type']) && $data['attachment_type'] == 'any') { $a = "attachments > 0 AND "; }
if($data['tag']) {
if(isset($data['tag']) && $data['tag']) {
$data['tag'] = $this->fixup_sphinx_operators($data['tag']);
$aa = $this->sphx->query("SELECT id FROM " . SPHINX_TAG_INDEX . " WHERE uid=" . $_SESSION['uid'] . " AND MATCH('@tag " . $data['tag'] . " ') ");