From ca65450537aa7c1903480e7b7daecde22c2463cf Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Fri, 8 Feb 2019 23:12:05 -0500 Subject: [PATCH] Add query path capabilities to /itemsource --- src/Module/Itemsource.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Module/Itemsource.php b/src/Module/Itemsource.php index 4d85ef15ce..9e62a568c8 100644 --- a/src/Module/Itemsource.php +++ b/src/Module/Itemsource.php @@ -17,10 +17,18 @@ class Itemsource extends \Friendica\BaseModule return; } + $a = self::getApp(); + + if (!empty($a->argv[1])) { + $guid = $a->argv[1]; + } + + $guid = defaults($_REQUEST['guid'], $guid); + $source = ''; $item_uri = ''; - if (!empty($_REQUEST['guid'])) { - $item = Model\Item::selectFirst([], ['guid' => $_REQUEST['guid']]); + if (!empty($guid)) { + $item = Model\Item::selectFirst([], ['guid' => $guid]); $conversation = Model\Conversation::getByItemUri($item['uri']); -- 2.39.5