aboutsummaryrefslogtreecommitdiffstats
path: root/include/socgraph.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/socgraph.php')
-rw-r--r--include/socgraph.php11
1 files changed, 4 insertions, 7 deletions
diff --git a/include/socgraph.php b/include/socgraph.php
index 336c1c0c3..2da0040b0 100644
--- a/include/socgraph.php
+++ b/include/socgraph.php
@@ -364,8 +364,8 @@ function poco() {
elseif(argv(3) === '@self')
$justme = true;
}
- if(argc() > 4 && intval(argv(4)) && $justme == false)
- $cid = intval(argv(4));
+
+ $cid = ((argc() > 4 && intval(argv(4)) && $justme == false) ? intval(argv(4)) : null);
if(! $system_mode) {
@@ -413,11 +413,8 @@ function poco() {
else
$totalResults = 0;
- $startIndex = intval($_GET['startIndex']);
- if(! $startIndex)
- $startIndex = 0;
-
- $itemsPerPage = ((x($_GET,'count') && intval($_GET['count'])) ? intval($_GET['count']) : $totalResults);
+ $startIndex = $_GET['startIndex'] ?? 0;
+ $itemsPerPage = $_GET['count'] ?? $totalResults;
if($system_mode) {
$r = q("SELECT abook.*, xchan.* from abook left join xchan on abook_xchan = xchan_hash where abook_self = 1