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';
// 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);
$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
$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;