use Friendica\Model\FileTag;
use Friendica\Model\GContact;
use Friendica\Model\Profile;
-
-require_once 'boot.php';
-require_once 'include/dba.php';
+use Friendica\Util\Strings;
+use Friendica\Util\XML;
class Widget
{
*/
public static function findPeople()
{
- $a = get_app();
+ $a = \get_app();
$global_dir = Config::get('system', 'directory');
if (Config::get('system', 'invitation_only')) {
$extra_sql = self::unavailableNetworks();
- $r = DBA::p("SELECT DISTINCT(`network`) FROM `contact` WHERE `uid` = ? AND `network` != '' $extra_sql ORDER BY `network`",
+ $r = DBA::p("SELECT DISTINCT(`network`) FROM `contact` WHERE `uid` = ? AND NOT `deleted` AND `network` != '' $extra_sql ORDER BY `network`",
local_user()
);
}
return Renderer::replaceMacros(Renderer::getMarkupTemplate('nets.tpl'), array(
- '$title' => L10n::t('Networks'),
+ '$title' => L10n::t('Protocols'),
'$desc' => '',
'$sel_all' => (($selected == '') ? 'selected' : ''),
- '$all' => L10n::t('All Networks'),
+ '$all' => L10n::t('All Protocols'),
'$nets' => $nets,
'$base' => $baseurl,
));
return '';
}
- if (!Feature::isEnabled(local_user(), 'filing')) {
- return '';
- }
-
$saved = PConfig::get(local_user(), 'system', 'filetags');
if (!strlen($saved)) {
return;
if ($cnt) {
foreach ($matches as $mtch)
{
- $unescaped = xmlify(FileTag::decode($mtch[1]));
+ $unescaped = XML::escape(FileTag::decode($mtch[1]));
$terms[] = array('name' => $unescaped, 'selected' => (($selected == $unescaped) ? 'selected' : ''));
}
}
*/
public static function categories($baseurl, $selected = '')
{
- $a = get_app();
+ $a = \get_app();
if (!Feature::isEnabled($a->profile['profile_uid'], 'categories')) {
return '';
if ($cnt) {
foreach ($matches as $mtch) {
- $unescaped = xmlify(FileTag::decode($mtch[1]));
+ $unescaped = XML::escape(FileTag::decode($mtch[1]));
$terms[] = array('name' => $unescaped, 'selected' => (($selected == $unescaped) ? 'selected' : ''));
}
}
if (!$cid) {
if (Profile::getMyURL()) {
$contact = DBA::selectFirst('contact', ['id'],
- ['nurl' => normalise_link(Profile::getMyURL()), 'uid' => $profile_uid]);
+ ['nurl' => Strings::normaliseLink(Profile::getMyURL()), 'uid' => $profile_uid]);
if (DBA::isResult($contact)) {
$cid = $contact['id'];
} else {
- $gcontact = DBA::selectFirst('gcontact', ['id'], ['nurl' => normalise_link(Profile::getMyURL())]);
+ $gcontact = DBA::selectFirst('gcontact', ['id'], ['nurl' => Strings::normaliseLink(Profile::getMyURL())]);
if (DBA::isResult($gcontact)) {
$zcid = $gcontact['id'];
}
*/
public static function tagCloud($limit = 50)
{
- $a = get_app();
+ $a = \get_app();
if (!$a->profile['profile_uid'] || !$a->profile['url']) {
return '';