aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Hq.php4
-rw-r--r--Zotlabs/Module/Like.php24
2 files changed, 14 insertions, 14 deletions
diff --git a/Zotlabs/Module/Hq.php b/Zotlabs/Module/Hq.php
index cd95ac4b0..0b2d0ea7d 100644
--- a/Zotlabs/Module/Hq.php
+++ b/Zotlabs/Module/Hq.php
@@ -243,8 +243,8 @@ class Hq extends \Zotlabs\Web\Controller {
if (!local_channel())
return;
- $options['offset'] = $_REQUEST['offset'];
- $options['type'] = $_REQUEST['type'];
+ $options['offset'] = $_REQUEST['offset'] ?? 0;
+ $options['type'] = $_REQUEST['type'] ?? '';
$ret = Messages::get_messages_page($options);
diff --git a/Zotlabs/Module/Like.php b/Zotlabs/Module/Like.php
index 8b36e8396..98fa7db5a 100644
--- a/Zotlabs/Module/Like.php
+++ b/Zotlabs/Module/Like.php
@@ -106,7 +106,7 @@ class Like extends Controller {
$o = EMPTY_STR;
$sys_channel = get_sys_channel();
$observer = App::get_observer();
- $interactive = $_REQUEST['interactive'];
+ $interactive = $_REQUEST['interactive'] ?? false;
if ((!$observer) || ($interactive)) {
$o .= '<h1>' . t('Like/Dislike') . '</h1>';
@@ -140,7 +140,7 @@ class Like extends Controller {
$extended_like = false;
$object = $target = null;
$post_type = EMPTY_STR;
- $objtype = EMPTY_STR;
+ $obj_type = EMPTY_STR;
if (argc() == 3) {
@@ -182,7 +182,7 @@ class Like extends Controller {
}
}
$post_type = t('channel');
- $objtype = ACTIVITY_OBJ_PROFILE;
+ $obj_type = ACTIVITY_OBJ_PROFILE;
$profile = $r[0];
}
@@ -211,7 +211,7 @@ class Like extends Controller {
$public = false;
$post_type = t('thing');
- $objtype = ACTIVITY_OBJ_PROFILE;
+ $obj_type = ACTIVITY_OBJ_PROFILE;
$tgttype = ACTIVITY_OBJ_THING;
$links = array();
@@ -273,7 +273,7 @@ class Like extends Controller {
intval($ch[0]['channel_id']),
dbesc($observer['xchan_hash']),
dbesc($activity),
- dbesc(($tgttype) ? $tgttype : $objtype),
+ dbesc(($tgttype) ? $tgttype : $obj_type),
dbesc($obj_id)
);
@@ -446,10 +446,10 @@ class Like extends Controller {
if ($item['obj_type'] === ACTIVITY_OBJ_EVENT)
$post_type = t('event');
- $objtype = (($item['resource_type'] === 'photo') ? ACTIVITY_OBJ_PHOTO : ACTIVITY_OBJ_NOTE);
+ $obj_type = (($item['resource_type'] === 'photo') ? ACTIVITY_OBJ_PHOTO : ACTIVITY_OBJ_NOTE);
- if ($objtype === ACTIVITY_OBJ_NOTE && (!intval($item['item_thread_top'])))
- $objtype = ACTIVITY_OBJ_COMMENT;
+ if ($obj_type === ACTIVITY_OBJ_NOTE && (!intval($item['item_thread_top'])))
+ $obj_type = ACTIVITY_OBJ_COMMENT;
$object = json_encode(Activity::fetch_item(['id' => $item['mid']]));
@@ -508,7 +508,7 @@ class Like extends Controller {
$allow_gid = $item['allow_gid'];
$deny_cid = $item['deny_cid'];
$deny_gid = $item['deny_gid'];
- $private = $item['private'];
+ $private = $item['item_private'];
}
@@ -533,7 +533,7 @@ class Like extends Controller {
}
$arr['verb'] = $activity;
- $arr['obj_type'] = $objtype;
+ $arr['obj_type'] = $obj_type;
$arr['obj'] = $object;
if ($target) {
@@ -569,7 +569,7 @@ class Like extends Controller {
intval($post_id),
dbesc($arr['mid']),
dbesc($activity),
- dbesc(($tgttype) ? $tgttype : $objtype),
+ dbesc(($tgttype) ? $tgttype : $obj_type),
dbesc($obj_id),
dbesc(($target) ? $target : $object)
);
@@ -578,7 +578,7 @@ class Like extends Controller {
dbesc($ch[0]['channel_hash']),
dbesc($arr['mid']),
dbesc($activity),
- dbesc(($tgttype) ? $tgttype : $objtype),
+ dbesc(($tgttype) ? $tgttype : $obj_type),
dbesc($obj_id)
);
if ($r)