diff --git a/application/Address/AddressModel.php b/application/Address/AddressModel.php index 1c0f2841f..c62dd5711 100644 --- a/application/Address/AddressModel.php +++ b/application/Address/AddressModel.php @@ -225,7 +225,6 @@ class AddressModel { $sql .= " LIMIT " . $limit['count']; } } - mfLoghandler::singleton()->debug($sql); $res = $db->query($sql); @@ -484,7 +483,16 @@ class AddressModel { $where .= " " . $filter['add-where']; } - //var_dump($filter, $where);exit; + if (array_key_exists("Controller!", $filter)) { + $termstring = trim($filter['search_term!']); + $termExplode = explode(" ", $termstring); + foreach ($termExplode as $term) { + $wherestring .= " AND (`customer_number` LIKE '%" . $term . "%' OR `company` LIKE '%" . $term . "%' OR `firstname` LIKE '%" . $term . "%' OR `lastname` LIKE '%" . $term . "%' OR `street` LIKE '%" . $term . "%' OR `zip` LIKE '%" . $term . "%' OR `city` LIKE '%" . $term . "%') "; + } + $where .= " AND customer_number > 0 $wherestring"; + } + +// var_dump($filter, $where);exit; return $where; } diff --git a/application/Calendar/CalendarModel.php b/application/Calendar/CalendarModel.php index 417470b26..c795d1923 100644 --- a/application/Calendar/CalendarModel.php +++ b/application/Calendar/CalendarModel.php @@ -249,6 +249,7 @@ class CalendarModel $Allcalendar[$value->user->name] = $key; } $Allcalendar['Daniel Whoknows'] = 2; + $Allcalendar['Stefan Plaschg'] = 26; $res = $dbcal->select("cal_events", "id, uuid, calendar_id, user_id, start_time, end_time, timezone, all_day_event, name, description, location, repeat_end_time, reminder, ctime, mtime, muser_id, busy, status, resource_event_id, private, rrule, background, files_folder_id, read_only, category_id, exception_for_event_id, recurrence_id, is_organizer,event_type,customer,customer_info,customer_info_send,customer_info_reminder,busy,attendees,organizer,is_organizer,accepted", "1=1 AND id='" . $id . "' ORDER BY id"); if ($dbcal->num_rows($res)) { $data = $dbcal->fetch_array($res);