Removed notices in the frio theme (#5610)

* Removed notices in the frio theme

* And fixed notices in the notifications

* And some more in frio

* Null is the default value

* And some small notice in the probing removed

* Added note

* Clarified note

* And a removed notice in OStatus
This commit is contained in:
Michael Vogel 2018-08-14 21:37:44 +02:00 committed by Hypolite Petovan
parent 576aea124c
commit 1283b99c6f
6 changed files with 32 additions and 23 deletions

View file

@ -165,39 +165,41 @@ class NotificationsManager extends BaseObject
*/
public function getTabs()
{
$selected = defaults(self::getApp()->argv, 1, '');
$tabs = [
[
'label' => L10n::t('System'),
'url' => 'notifications/system',
'sel' => ((self::getApp()->argv[1] == 'system') ? 'active' : ''),
'sel' => (($selected == 'system') ? 'active' : ''),
'id' => 'system-tab',
'accesskey' => 'y',
],
[
'label' => L10n::t('Network'),
'url' => 'notifications/network',
'sel' => ((self::getApp()->argv[1] == 'network') ? 'active' : ''),
'sel' => (($selected == 'network') ? 'active' : ''),
'id' => 'network-tab',
'accesskey' => 'w',
],
[
'label' => L10n::t('Personal'),
'url' => 'notifications/personal',
'sel' => ((self::getApp()->argv[1] == 'personal') ? 'active' : ''),
'sel' => (($selected == 'personal') ? 'active' : ''),
'id' => 'personal-tab',
'accesskey' => 'r',
],
[
'label' => L10n::t('Home'),
'url' => 'notifications/home',
'sel' => ((self::getApp()->argv[1] == 'home') ? 'active' : ''),
'sel' => (($selected == 'home') ? 'active' : ''),
'id' => 'home-tab',
'accesskey' => 'h',
],
[
'label' => L10n::t('Introductions'),
'url' => 'notifications/intros',
'sel' => ((self::getApp()->argv[1] == 'intros') ? 'active' : ''),
'sel' => (($selected == 'intros') ? 'active' : ''),
'id' => 'intro-tab',
'accesskey' => 'i',
],

View file

@ -232,7 +232,7 @@ class Probe
if (!$lrdd) {
$parts = @parse_url($uri);
if (!$parts) {
if (!$parts || empty($parts["host"]) || empty($parts["path"])) {
return [];
}

View file

@ -1351,13 +1351,15 @@ class OStatus
switch ($siteinfo["type"]) {
case 'photo':
$imgdata = Image::getInfoFromURL($siteinfo["image"]);
if ($imgdata) {
$attributes = ["rel" => "enclosure",
"href" => $siteinfo["image"],
"type" => $imgdata["mime"],
"length" => intval($imgdata["size"])];
XML::addElement($doc, $root, "link", "", $attributes);
if (!empty($siteinfo["image"])) {
$imgdata = Image::getInfoFromURL($siteinfo["image"]);
if ($imgdata) {
$attributes = ["rel" => "enclosure",
"href" => $siteinfo["image"],
"type" => $imgdata["mime"],
"length" => intval($imgdata["size"])];
XML::addElement($doc, $root, "link", "", $attributes);
}
}
break;
case 'video':