From bad5057a7414eba7f7133538dd671a1413be00e3 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Mon, 3 Oct 2016 19:47:36 -0700 Subject: start removing db backticks --- Zotlabs/Module/Acl.php | 6 +++--- Zotlabs/Module/Admin.php | 4 ++-- Zotlabs/Module/Cal.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'Zotlabs/Module') diff --git a/Zotlabs/Module/Acl.php b/Zotlabs/Module/Acl.php index 1acd8e320..29c1e5280 100644 --- a/Zotlabs/Module/Acl.php +++ b/Zotlabs/Module/Acl.php @@ -77,7 +77,7 @@ class Acl extends \Zotlabs\Web\Controller { if($search) { - $sql_extra = " AND `name` LIKE " . protect_sprintf( "'%" . dbesc($search) . "%'" ) . " "; + $sql_extra = " AND groups.gname LIKE " . protect_sprintf( "'%" . dbesc($search) . "%'" ) . " "; $sql_extra2 = "AND ( xchan_name LIKE " . protect_sprintf( "'%" . dbesc($search) . "%'" ) . " OR xchan_addr LIKE " . protect_sprintf( "'%" . dbesc($search) . ((strpos($search,'@') === false) ? "%@%'" : "%'")) . ") "; // This horrible mess is needed because position also returns 0 if nothing is found. @@ -105,9 +105,9 @@ class Acl extends \Zotlabs\Web\Controller { if($type == '' || $type == 'g') { $r = q("SELECT groups.id, groups.hash, groups.gname - FROM groups,group_member + FROM groups, group_member WHERE groups.deleted = 0 AND groups.uid = %d - AND group_member.gid=groups.id + AND group_member.gid = groups.id $sql_extra GROUP BY groups.id ORDER BY groups.gname diff --git a/Zotlabs/Module/Admin.php b/Zotlabs/Module/Admin.php index e3702992f..3ffbdd7fa 100644 --- a/Zotlabs/Module/Admin.php +++ b/Zotlabs/Module/Admin.php @@ -101,8 +101,8 @@ class Admin extends \Zotlabs\Web\Controller { } // pending registrations - $r = q("SELECT COUNT(id) AS `count` FROM `register` WHERE `uid` != '0'"); - $pending = $r[0]['count']; + $r = q("SELECT COUNT(id) AS rtotal FROM register WHERE uid != '0'"); + $pending = $r[0]['rtotal']; // available channels, primary and clones $channels = array(); diff --git a/Zotlabs/Module/Cal.php b/Zotlabs/Module/Cal.php index fd4169e68..0d1641efe 100644 --- a/Zotlabs/Module/Cal.php +++ b/Zotlabs/Module/Cal.php @@ -109,7 +109,7 @@ class Cal extends \Zotlabs\Web\Controller { /* edit/create form */ if($event_id) { - $r = q("SELECT * FROM `event` WHERE event_hash = '%s' AND `uid` = %d LIMIT 1", + $r = q("SELECT * FROM event WHERE event_hash = '%s' AND uid = %d LIMIT 1", dbesc($event_id), intval($channel['channel_id']) ); -- cgit v1.2.3