diff --git a/index.php b/index.php index 96416c70..c2536b66 100644 --- a/index.php +++ b/index.php @@ -834,7 +834,7 @@ ?>
  • - +
  • @@ -912,7 +912,7 @@ $("#identfilter").on('input', function() { clearTimeout(typingTimer); if (this.value) { - typingTimer = setTimeout(identfilter,doneTypingInterval); + typingTimer = setTimeout(fnidentfilter,doneTypingInterval); } }); diff --git a/js/map.common.js b/js/map.common.js index a2e7b624..d8eac0d1 100644 --- a/js/map.common.js +++ b/js/map.common.js @@ -173,8 +173,8 @@ function alliance(selectObj) { var alliance = selectObj.options[idx].value; createCookie('filter_alliance',alliance,2); } -function identfilter() { - var ident = $("#identfilter").value; +function fnidentfilter() { + var ident = $("#identfilter").val(); createCookie('filter_ident',ident,2); } function mmsifilter() { diff --git a/require/class.SpotterLive.php b/require/class.SpotterLive.php index 117859ae..a17c85c5 100644 --- a/require/class.SpotterLive.php +++ b/require/class.SpotterLive.php @@ -95,7 +95,7 @@ public function getFilter($filter = array(),$where = false,$and = false) { } } if (isset($filter['ident']) && !empty($filter['ident'])) { - $filter_query_where .= " AND ident = '".$filter['ident']."'"; + $filter_query_where .= " AND ident LIKE '".$filter['ident']."%'"; } if (isset($filter['id']) && !empty($filter['id'])) { $filter_query_where .= " AND flightaware_id = '".$filter['id']."'";