mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-19 06:47:03 +00:00
[pumpio] Fixes:
- x() is deprecated, let's use !empty() instead - added spaces for better readability
This commit is contained in:
parent
42165b6aeb
commit
651226859e
1 changed files with 39 additions and 39 deletions
|
@ -330,8 +330,8 @@ function pumpio_settings(&$a, &$s)
|
|||
|
||||
function pumpio_settings_post(App $a, array &$b)
|
||||
{
|
||||
if (x($_POST,'pumpio-submit')) {
|
||||
if (x($_POST,'pumpio_delete')) {
|
||||
if (!empty($_POST['pumpio-submit'])) {
|
||||
if (!empty($_POST['pumpio_delete'])) {
|
||||
PConfig::set(local_user(), 'pumpio', 'consumer_key' , '');
|
||||
PConfig::set(local_user(), 'pumpio', 'consumer_secret' , '');
|
||||
PConfig::set(local_user(), 'pumpio', 'oauth_token' , '');
|
||||
|
@ -391,7 +391,7 @@ function pumpio_post_local(App $a, array &$b)
|
|||
|
||||
$pumpio_post = intval(PConfig::get(local_user(), 'pumpio', 'post'));
|
||||
|
||||
$pumpio_enable = (($pumpio_post && x($_REQUEST, 'pumpio_enable')) ? intval($_REQUEST['pumpio_enable']) : 0);
|
||||
$pumpio_enable = (($pumpio_post && !empty($_REQUEST['pumpio_enable'])) ? intval($_REQUEST['pumpio_enable']) : 0);
|
||||
|
||||
if ($b['api_source'] && intval(PConfig::get(local_user(), 'pumpio', 'post_by_default'))) {
|
||||
$pumpio_enable = 1;
|
||||
|
@ -1286,7 +1286,7 @@ function pumpio_dopost(&$a, $client, $uid, $self, $post, $own_id, $threadcomplet
|
|||
return $top_item;
|
||||
}
|
||||
|
||||
function pumpio_fetchinbox(&$a, $uid)
|
||||
function pumpio_fetchinbox(App $a, $uid)
|
||||
{
|
||||
$ckey = PConfig::get($uid, 'pumpio', 'consumer_key');
|
||||
$csecret = PConfig::get($uid, 'pumpio', 'consumer_secret');
|
||||
|
@ -1348,14 +1348,14 @@ function pumpio_fetchinbox(&$a, $uid)
|
|||
}
|
||||
}
|
||||
|
||||
foreach ($lastitems AS $item) {
|
||||
foreach ($lastitems as $item) {
|
||||
pumpio_fetchallcomments($a, $uid, $item["uri"]);
|
||||
}
|
||||
|
||||
PConfig::set($uid, 'pumpio', 'last_id', $last_id);
|
||||
}
|
||||
|
||||
function pumpio_getallusers(&$a, $uid)
|
||||
function pumpio_getallusers(App &$a, $uid)
|
||||
{
|
||||
$ckey = PConfig::get($uid, 'pumpio', 'consumer_key');
|
||||
$csecret = PConfig::get($uid, 'pumpio', 'consumer_secret');
|
||||
|
@ -1393,7 +1393,7 @@ function pumpio_getallusers(&$a, $uid)
|
|||
}
|
||||
|
||||
if (is_array($users->items)) {
|
||||
foreach ($users->items AS $user) {
|
||||
foreach ($users->items as $user) {
|
||||
pumpio_get_contact($uid, $user);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue