Avoid warnings in addons

This commit is contained in:
Michael 2018-07-08 17:19:35 +00:00
parent aae9da33dc
commit 3874e491f9
7 changed files with 12 additions and 5 deletions

View file

@ -138,6 +138,10 @@ function blockem_prepare_body_content_filter(\Friendica\App $a, &$hook_data)
}
function blockem_display_item(&$a,&$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";
}
@ -177,7 +181,7 @@ function blockem_item_photo_menu(&$a,&$b) {
$blocked = false;
$author = $b['item']['author-link'];
if(is_array($a->data['blockem'])) {
if(!empty($a->data['blockem'])) {
foreach($a->data['blockem'] as $bloke) {
if(link_compare($bloke,$author)) {
$blocked = true;

View file

@ -477,7 +477,7 @@ function jappixmini_script(App $a)
return;
}
if ($_GET["mode"] == "minimal") {
if (defaults($_GET, "mode", '') == "minimal") {
return;
}

View file

@ -94,7 +94,7 @@ function openstreetmap_location($a, &$item)
}
}
if ($target == "") {
if (empty($target)) {
$target = $nomserver.'?q='.urlencode($item['location']);
}

View file

@ -957,6 +957,7 @@ function pumpio_dolike(&$a, $uid, $self, $post, $own_id, $threadcompletion = tru
$likedata['gravity'] = GRAVITY_ACTIVITY;
$likedata['uid'] = $uid;
$likedata['wall'] = 0;
$likedata['network'] = NETWORK_PUMPIO;
$likedata['uri'] = Item::newURI($uid);
$likedata['parent-uri'] = $orig_post["uri"];
$likedata['contact-id'] = $contactid;

View file

@ -30,7 +30,7 @@ function rendertime_page_end(&$a, &$o) {
$ignored_modules = ["fbrowser"];
$ignored = in_array($a->module, $ignored_modules);
if (is_site_admin() && ($_GET["mode"] != "minimal") && !$a->is_mobile && !$a->is_tablet && !$ignored) {
if (is_site_admin() && (defaults($_GET, "mode", '') != "minimal") && !$a->is_mobile && !$a->is_tablet && !$ignored) {
$o = $o.'<div class="renderinfo">'. L10n::t("Database: %s/%s, Network: %s, Rendering: %s, Session: %s, I/O: %s, Other: %s, Total: %s",
round($a->performance["database"] - $a->performance["database_write"], 3),
round($a->performance["database_write"], 3),

View file

@ -126,6 +126,8 @@ function showmore_prepare_body(\Friendica\App $a, &$hook_data)
if (get_body_length($hook_data['html']) > $chars) {
$found = true;
$shortened = trim(showmore_cutitem($hook_data['html'], $chars)) . "...";
} else {
$found = false;
}
if ($found) {

View file

@ -131,7 +131,7 @@ function xmpp_converse(App $a)
return;
}
if ($_GET["mode"] == "minimal") {
if (defaults($_GET, "mode", '') == "minimal") {
return;
}