Continued:

- added array as type-hint
- don't forget & (call-by-reference) here as $b is maybe being modified in the
  function

Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
Roland Häder 2018-05-10 15:31:19 +02:00
parent 6c3a37efda
commit 39421cf1a4
No known key found for this signature in database
GPG key ID: B72F8185C6C7BD78
11 changed files with 24 additions and 28 deletions

View file

@ -70,7 +70,7 @@ function blockem_addon_settings(&$a, &$s)
}
function blockem_addon_settings_post(App $a, $b) {
function blockem_addon_settings_post(App $a, array &$b) {
if(! local_user())
return;
@ -81,7 +81,7 @@ function blockem_addon_settings_post(App $a, $b) {
}
}
function blockem_enotify_store(App $a, $b) {
function blockem_enotify_store(App $a, array &$b) {
$words = PConfig::get($b['uid'],'blockem','words');
if($words) {
@ -140,16 +140,12 @@ function blockem_prepare_body_content_filter(App $a, array &$hook_data)
}
function blockem_display_item(App $a, array &$b) {
if (empty($b['output']['body'])) {
return;
}
if (strstr($b['output']['body'],'id="blockem-wrap-')) {
$b['output']['thumb'] = $a->get_baseurl() . "/images/person-80.jpg";
}
}
function blockem_conversation_start(App $a, $b) {
function blockem_conversation_start(App $a, array &$b) {
if(! local_user())
return;
@ -177,7 +173,7 @@ EOT;
}
function blockem_item_photo_menu(App $a, $b) {
function blockem_item_photo_menu(App $a, array &$b) {
if((! local_user()) || ($b['item']['self']))
return;

View file

@ -34,7 +34,7 @@ function dwpost_uninstall() {
}
function dwpost_jot_nets(App $a, $b) {
function dwpost_jot_nets(App $a, array &$b) {
if(! local_user())
return;
@ -108,7 +108,7 @@ function dwpost_settings(App $a, $s) {
}
function dwpost_settings_post(App $a, $b) {
function dwpost_settings_post(App $a, array &$b) {
if(x($_POST,'dwpost-submit')) {
@ -121,7 +121,7 @@ function dwpost_settings_post(App $a, $b) {
}
function dwpost_post_local(App $a, $b) {
function dwpost_post_local(App $a, array &$b) {
// This can probably be changed to allow editing by pointing to a different API endpoint
@ -152,7 +152,7 @@ function dwpost_post_local(App $a, $b) {
function dwpost_send(App $a, $b) {
function dwpost_send(App $a, array &$b) {
if($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited']))
return;

View file

@ -80,7 +80,7 @@ class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div>';
return;
}
function fromgplus_addon_settings_post(App $a, $b) {
function fromgplus_addon_settings_post(App $a, array &$b) {
if(! local_user())
return;

View file

@ -52,7 +52,7 @@ function irc_addon_settings(App $a, $s) {
}
function irc_addon_settings_post(App $a, $b) {
function irc_addon_settings_post(App $a, array &$b) {
if(! local_user())
return;

View file

@ -36,7 +36,7 @@ function js_upload_uninstall() {
}
function js_upload_form(App $a, $b) {
function js_upload_form(App $a, array &$b) {
$b['default_upload'] = false;
@ -136,7 +136,7 @@ EOT;
}
function js_upload_post_init(App $a, $b) {
function js_upload_post_init(App $a, array &$b) {
// list of valid extensions, ex. array("jpeg", "xml", "bmp")
@ -164,7 +164,7 @@ function js_upload_post_init(App $a, $b) {
}
function js_upload_post_file(App $a, $b) {
function js_upload_post_file(App $a, array &$b) {
$result = $a->data['upload_result'];
@ -175,7 +175,7 @@ function js_upload_post_file(App $a, $b) {
}
function js_upload_post_end(App $a, $b) {
function js_upload_post_end(App $a, array &$b) {
logger('upload_post_end');
if(x($a->data,'upload_jsonresponse')) {

View file

@ -61,7 +61,7 @@ function pageheader_addon_settings(App $a, $s) {
}
function pageheader_addon_settings_post(App $a, $b) {
function pageheader_addon_settings_post(App $a, array &$b) {
if(! is_site_admin())
return;

View file

@ -22,7 +22,7 @@ function smilies_adult_uninstall() {
function smilies_adult_smilies(App $a, $b) {
function smilies_adult_smilies(App $a, array &$b) {
$b['texts'][] = '(o)(o)';
$b['icons'][] = '<img class="smiley" src="' . $a->get_baseurl() . '/addon/smilies_adult/icons/tits.gif' . '" alt="' . '(o)(o)' . '" />';
@ -42,4 +42,4 @@ function smilies_adult_smilies(App $a, $b) {
$b['texts'][] = ':finger';
$b['icons'][] = '<img class="smiley" src="' . $a->get_baseurl() . '/addon/smilies_adult/icons/finger.gif' . '" alt="' . ':finger' . '" />';
}
}

View file

@ -712,7 +712,7 @@ function statusnet_prepare_body(App $a, array &$b)
}
}
function statusnet_cron(App $a, $b)
function statusnet_cron(App $a, array &$b)
{
$last = Config::get('statusnet', 'last_poll');

View file

@ -172,7 +172,7 @@ function tumblr_callback($a) {
return $o;
}
function tumblr_jot_nets(App $a, $b) {
function tumblr_jot_nets(App $a, array &$b) {
if (! local_user()) {
return;
}
@ -270,7 +270,7 @@ function tumblr_settings(App $a, $s) {
}
function tumblr_settings_post(App $a, $b) {
function tumblr_settings_post(App $a, array &$b) {
if(x($_POST,'tumblr-submit')) {
@ -320,7 +320,7 @@ function tumblr_post_local(App $a, array &$b) {
function tumblr_send(App $a, $b) {
function tumblr_send(App $a, array &$b) {
if($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) {
return;

View file

@ -658,7 +658,7 @@ function twitter_addon_admin(App $a, &$o)
]);
}
function twitter_cron(App $a, $b)
function twitter_cron(App $a, array &$b)
{
$last = Config::get('twitter', 'last_poll');
@ -726,7 +726,7 @@ function twitter_cron(App $a, $b)
Config::set('twitter', 'last_poll', time());
}
function twitter_expire(App $a, $b)
function twitter_expire(App $a, array &$b)
{
$days = Config::get('twitter', 'expire');

View file

@ -18,7 +18,7 @@ function unicode_smilies_uninstall() {
Addon::unregisterHook('smilie', 'addon/unicode_smilies/unicode_smilies.php', 'unicode_smilies_smilies');
}
function unicode_smilies_smilies(App $a, $b) {
function unicode_smilies_smilies(App $a, array &$b) {
Smilies::add($b, ':-)', '&#x1F600;');
Smilies::add($b, ':)', '&#x1F600;');
Smilies::add($b, ':-(', '&#x1F641;');