X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FWidget.php;h=faba55b7a860b483e28022e98909d85eaa2cb899;hb=fe6e600dc5ace900d913d10e4b8518c0f0248239;hp=cc98a8d817fae7fee9c3a2003811a1f918be292b;hpb=8c2efa6df43c3895eb571869621fb7687bdfc404;p=friendica.git
diff --git a/src/Content/Widget.php b/src/Content/Widget.php
index cc98a8d817..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)
. '
';
}
@@ -79,30 +80,31 @@ class Widget
*/
public static function unavailableNetworks()
{
- $networks = array();
+ // Always hide content from these networks
+ $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)) {
@@ -140,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);