X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=inline;f=mod%2Flockview.php;h=48227cc1eaf47aa0d973e71a621f34e134f71ebf;hb=10ede7314136edb1c475e1af546a59ff4c5648cf;hp=82f93f498566e7be8b8fb5ef9cfdeb93483bb0d1;hpb=0c67c89715df801e0c887be50c9739db3bae7ca3;p=friendica.git
diff --git a/mod/lockview.php b/mod/lockview.php
index 82f93f4985..48227cc1ea 100644
--- a/mod/lockview.php
+++ b/mod/lockview.php
@@ -1,7 +1,8 @@
argc > 1) ? $a->argv[1] : 0);
if (is_numeric($type)) {
@@ -21,8 +22,9 @@ function lockview_content(&$a) {
dbesc($type),
intval($item_id)
);
- if(! count($r))
+ if (! dbm::is_result($r)) {
killme();
+ }
$item = $r[0];
call_hooks('lockview_content', $item);
@@ -52,7 +54,7 @@ function lockview_content(&$a) {
$r = q("SELECT `name` FROM `group` WHERE `id` IN ( %s )",
dbesc(implode(', ', $allowed_groups))
);
- if(count($r))
+ if (dbm::is_result($r))
foreach($r as $rr)
$l[] = '' . $rr['name'] . '';
}
@@ -60,7 +62,7 @@ function lockview_content(&$a) {
$r = q("SELECT `name` FROM `contact` WHERE `id` IN ( %s )",
dbesc(implode(', ',$allowed_users))
);
- if(count($r))
+ if (dbm::is_result($r))
foreach($r as $rr)
$l[] = $rr['name'];
@@ -70,7 +72,7 @@ function lockview_content(&$a) {
$r = q("SELECT `name` FROM `group` WHERE `id` IN ( %s )",
dbesc(implode(', ', $deny_groups))
);
- if(count($r))
+ if (dbm::is_result($r))
foreach($r as $rr)
$l[] = '' . $rr['name'] . '';
}
@@ -78,7 +80,7 @@ function lockview_content(&$a) {
$r = q("SELECT `name` FROM `contact` WHERE `id` IN ( %s )",
dbesc(implode(', ',$deny_users))
);
- if(count($r))
+ if (dbm::is_result($r))
foreach($r as $rr)
$l[] = '' . $rr['name'] . '';
@@ -86,5 +88,5 @@ function lockview_content(&$a) {
echo $o . implode(', ', $l);
killme();
-}
+
}