use Friendica\Core\Protocol;
use Friendica\Core\Renderer;
use Friendica\Core\System;
+use Friendica\Core\Session;
use Friendica\Database\DBA;
use Friendica\Model\Contact;
use Friendica\Model\FileTag;
// Always hide content from these networks
$networks = ['face', 'apdn'];
+ if (!Addon::isEnabled("discourse")) {
+ $networks[] = Protocol::DISCOURSE;
+ }
+
if (!Addon::isEnabled("statusnet")) {
$networks[] = Protocol::STATUSNET;
}
foreach (FileTag::fileToArray($saved) as $savedFolderName) {
$terms[] = ['ref' => $savedFolderName, 'name' => $savedFolderName];
}
+
+ usort($terms, function ($a, $b) {
+ return strcmp($a['name'], $b['name']);
+ });
return self::filter(
'file',
return;
}
- $cid = $zcid = 0;
+ $zcid = 0;
- if (!empty($_SESSION['remote'])) {
- foreach ($_SESSION['remote'] as $visitor) {
- if ($visitor['uid'] == $profile_uid) {
- $cid = $visitor['cid'];
- break;
- }
- }
- }
+ $cid = Session::getRemoteContactID($profile_uid);
if (!$cid) {
if (Profile::getMyURL()) {