]> git.mxchange.org Git - friendica.git/blobdiff - include/api.php
Merge pull request #9757 from MrPetovan/bug/9716-show-edited-date-non-frio
[friendica.git] / include / api.php
index 87ce982b099fb9f5667160354315096dbe8cdc54..5131c9574189e5d622b155fc3979e363505873cc 100644 (file)
@@ -67,7 +67,6 @@ use Friendica\Util\Proxy as ProxyUtils;
 use Friendica\Util\Strings;
 use Friendica\Util\XML;
 
-require_once __DIR__ . '/../mod/share.php';
 require_once __DIR__ . '/../mod/item.php';
 require_once __DIR__ . '/../mod/wall_upload.php';
 
@@ -2164,10 +2163,10 @@ function api_statuses_mentions($type)
        // get last network messages
 
        // params
-       $since_id = $_REQUEST['since_id'] ?? 0;
-       $max_id   = $_REQUEST['max_id']   ?? 0;
-       $count    = $_REQUEST['count']    ?? 20;
-       $page     = $_REQUEST['page']     ?? 1;
+       $since_id = intval($_REQUEST['since_id'] ?? 0);
+       $max_id   = intval($_REQUEST['max_id']   ?? 0);
+       $count    = intval($_REQUEST['count']    ?? 20);
+       $page     = intval($_REQUEST['page']     ?? 1);
 
        $start = max(0, ($page - 1) * $count);
 
@@ -4220,7 +4219,7 @@ function api_fr_photo_create_update($type)
        $deny_cid  = $_REQUEST['deny_cid' ] ?? null;
        $allow_gid = $_REQUEST['allow_gid'] ?? null;
        $deny_gid  = $_REQUEST['deny_gid' ] ?? null;
-       $visibility = !empty($_REQUEST['visibility']) && $_REQUEST['visibility'] !== "false";
+       $visibility = !$allow_cid && !$deny_cid && !$allow_gid && !$deny_gid;
 
        // do several checks on input parameters
        // we do not allow calls without album string
@@ -4766,7 +4765,6 @@ function post_photo_item($hash, $allow_cid, $deny_cid, $allow_gid, $deny_gid, $f
        $arr['guid']          = System::createUUID();
        $arr['uid']           = intval(api_user());
        $arr['uri']           = $uri;
-       $arr['parent-uri']    = $uri;
        $arr['type']          = 'photo';
        $arr['wall']          = 1;
        $arr['resource-id']   = $hash;