]> git.mxchange.org Git - friendica.git/commitdiff
Add query path capabilities to /itemsource
authorHypolite Petovan <hypolite@mrpetovan.com>
Sat, 9 Feb 2019 04:12:05 +0000 (23:12 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sat, 9 Feb 2019 04:12:05 +0000 (23:12 -0500)
src/Module/Itemsource.php

index 4d85ef15ceff2a408a79087e92234daf4f349ae5..9e62a568c89bf93b68c4e97f3347f5963da21d7e 100644 (file)
@@ -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']);