X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=src%2FContent%2FWidget.php;h=faba55b7a860b483e28022e98909d85eaa2cb899;hb=fc4d01c0880b965585806ca161d71c3dd477989a;hp=a46ccc62eb75a233b0c31b9a7815e0341dca6ab2;hpb=6b14a2623a979c039d9fc70c62c3662b4846a3fd;p=friendica.git
diff --git a/src/Content/Widget.php b/src/Content/Widget.php
index a46ccc62eb..faba55b7a8 100644
--- a/src/Content/Widget.php
+++ b/src/Content/Widget.php
@@ -10,6 +10,7 @@ use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
+use Friendica\Core\Protocol;
use Friendica\Core\System;
use Friendica\Database\DBA;
use Friendica\Model\Contact;
@@ -48,7 +49,7 @@ class Widget
if (Config::get('system', 'invitation_only')) {
$x = PConfig::get(local_user(), 'system', 'invites_remaining');
if ($x || is_site_admin()) {
- $a->page['aside'] .= '
'
+ $a->page['aside'] .= '
'
. L10n::tt('%d invitation available', '%d invitations available', $x)
. '
';
}
@@ -83,27 +84,27 @@ class Widget
$networks = ['face', 'apdn'];
if (!Addon::isEnabled("statusnet")) {
- $networks[] = NETWORK_STATUSNET;
+ $networks[] = Protocol::STATUSNET;
}
if (!Addon::isEnabled("pumpio")) {
- $networks[] = NETWORK_PUMPIO;
+ $networks[] = Protocol::PUMPIO;
}
if (!Addon::isEnabled("twitter")) {
- $networks[] = NETWORK_TWITTER;
+ $networks[] = Protocol::TWITTER;
}
if (Config::get("system", "ostatus_disabled")) {
- $networks[] = NETWORK_OSTATUS;
+ $networks[] = Protocol::OSTATUS;
}
if (!Config::get("system", "diaspora_enabled")) {
- $networks[] = NETWORK_DIASPORA;
+ $networks[] = Protocol::DIASPORA;
}
if (!Addon::isEnabled("pnut")) {
- $networks[] = NETWORK_PNUT;
+ $networks[] = Protocol::PNUT;
}
if (!sizeof($networks)) {
@@ -141,10 +142,7 @@ class Widget
$nets = array();
while ($rr = DBA::fetch($r)) {
- /// @TODO If 'network' is not there, this triggers an E_NOTICE
- if ($rr['network']) {
- $nets[] = array('ref' => $rr['network'], 'name' => ContactSelector::networkToName($rr['network']), 'selected' => (($selected == $rr['network']) ? 'selected' : '' ));
- }
+ $nets[] = array('ref' => $rr['network'], 'name' => ContactSelector::networkToName($rr['network']), 'selected' => (($selected == $rr['network']) ? 'selected' : '' ));
}
DBA::close($r);