X-Git-Url: https://git.mxchange.org/?p=friendica-addons.git;a=blobdiff_plain;f=ifttt%2Fifttt.php;h=8a457df37aad16708a3b2e1790a2aae1e4a198ee;hp=384b955c0b182c7350671a63203fd867d8f660d6;hb=27b60e003f92dd9f3aebbeddb34ebb905488ca82;hpb=9fef6fd5639ed9edcdf84ca12fb0f2682377cc83 diff --git a/ifttt/ifttt.php b/ifttt/ifttt.php index 384b955c..8a457df3 100644 --- a/ifttt/ifttt.php +++ b/ifttt/ifttt.php @@ -97,7 +97,7 @@ function ifttt_post(App $a) $nickname = $a->argv[1]; - $user = dba::select('user', ['uid'], ['nickname' => $nickname], ['limit' => 1]); + $user = dba::selectFirst('user', ['uid'], ['nickname' => $nickname]); if (!DBM::is_result($user)) { logger('User ' . $nickname . ' not found.', LOGGER_DEBUG); return; @@ -120,13 +120,13 @@ function ifttt_post(App $a) return; } - $item = array(); + $item = []; if (isset($_REQUEST['type'])) { $item['type'] = $_REQUEST['type']; } - if (!in_array($item['type'], array('status', 'link', 'photo'))) { + if (!in_array($item['type'], ['status', 'link', 'photo'])) { logger('Unknown item type ' . $item['type'], LOGGER_DEBUG); return; }