aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mod/acl.php2
-rw-r--r--view/js/acl.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/mod/acl.php b/mod/acl.php
index 8c6eae0b0..c18b56d8b 100644
--- a/mod/acl.php
+++ b/mod/acl.php
@@ -30,7 +30,7 @@ function acl_init(&$a){
if ($search != "") {
$sql_extra = " AND `name` LIKE " . protect_sprintf( "'%" . dbesc($search) . "%'" ) . " ";
- $sql_extra2 = "AND ( xchan_name LIKE " . protect_sprintf( "'%" . dbesc($search) . "%'" ) . " OR xchan_addr LIKE " . protect_sprintf( "'%" . dbesc($search) . "%'" ) . ") ";
+ $sql_extra2 = "AND ( xchan_name LIKE " . protect_sprintf( "'%" . dbesc($search) . "%'" ) . " OR xchan_addr LIKE " . protect_sprintf( "'%" . dbesc($search) . "%@%'" ) . ") ";
// This horrible mess is needed because position also returns 0 if nothing is found. W/ould be MUCH easier if it instead returned a very large value
// Otherwise we could just order by LEAST(POSTION($search IN xchan_name),POSITION($search IN xchan_addr)).
diff --git a/view/js/acl.js b/view/js/acl.js
index f9428e1c5..77c65e21d 100644
--- a/view/js/acl.js
+++ b/view/js/acl.js
@@ -258,7 +258,7 @@ ACL.prototype.get = function(start,count, search){
}
ACL.prototype.populate = function(data){
- var height = Math.ceil(data.tot / that.nw) * 42;
+ var height = Math.ceil(data.items.length / that.nw) * 42;
that.list_content.height(height);
$(data.items).each(function(){
html = "<div class='acl-list-item {4} {7} {5}' title='{6}' id='{2}{3}'>"+that.item_tpl+"</div>";