From 32c23ef562fc963c2972c51895b4cfa71743e495 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Thu, 10 Mar 2016 15:43:59 -0800 Subject: some minor cleanups --- include/attach.php | 2 +- include/security.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/attach.php b/include/attach.php index 2777b5813..343922a52 100644 --- a/include/attach.php +++ b/include/attach.php @@ -846,7 +846,7 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) { // Caution: This re-uses $sql_options set further above - $r = q("select id, aid, uid, hash, creator, filename, filetype, filesize, revision, folder, os_storage, is_photo, flags, created, edited, allow_cid, allow_gid, deny_cid, deny_gid from attach where uid = %d and hash = '%s' $sql_options limit 1", + $r = q("select * from attach where uid = %d and hash = '%s' $sql_options limit 1", intval($channel_id), dbesc($hash) ); diff --git a/include/security.php b/include/security.php index 215cc92cb..f3cf2d1b6 100644 --- a/include/security.php +++ b/include/security.php @@ -415,7 +415,7 @@ function init_groups_visitor($contact_id) { $r = q("SELECT hash FROM `groups` left join group_member on groups.id = group_member.gid WHERE xchan = '%s' ", dbesc($contact_id) ); - if(count($r)) { + if($r) { foreach($r as $rr) $groups[] = $rr['hash']; } -- cgit v1.2.3