X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Facl_selectors.php;h=e69ac36f683c20a329d6f8676053a9a06a8a1684;hb=9941c73a313c0478c067885ec9a7fa00c86eef98;hp=caa3e98c231bf82403502fe65d9446553978e5b3;hpb=745bc7cf3f3990a8887fcc806a16d218f82e35db;p=friendica.git
diff --git a/include/acl_selectors.php b/include/acl_selectors.php
index caa3e98c23..e69ac36f68 100644
--- a/include/acl_selectors.php
+++ b/include/acl_selectors.php
@@ -2,14 +2,18 @@
/**
* @file include/acl_selectors.php
*/
+
use Friendica\App;
use Friendica\Content\Feature;
use Friendica\Content\Widget;
use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
+use Friendica\Core\Protocol;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\GContact;
+use Friendica\Util\Network;
require_once "mod/proxy.php";
@@ -182,9 +186,6 @@ function contact_selector($selname, $selclass, $options, $preselected = false)
function contact_select($selname, $selclass, $preselected = false, $size = 4, $privmail = false, $celeb = false, $privatenet = false, $tabindex = null) {
-
- require_once "include/bbcode.php";
-
$a = get_app();
$o = '';
@@ -246,7 +247,7 @@ function contact_select($selname, $selclass, $preselected = false, $size = 4, $p
}
if ($privmail) {
- $trimmed = GetProfileUsername($rr['url'], $rr['name'], false);
+ $trimmed = Protocol::formatMention($rr['url'], $rr['name']);
} else {
$trimmed = mb_substr($rr['name'],0,20);
}
@@ -351,31 +352,30 @@ function populate_acl($user = null, $show_jotnets = false) {
if (!$user['hidewall']) {
if ($mail_enabled) {
$selected = (($pubmail_enabled) ? ' checked="checked" ' : '');
- $jotnets .= '
' . t("Post to Email") . '
';
+ $jotnets .= ' ' . L10n::t("Post to Email") . '
';
}
Addon::callHooks('jot_networks', $jotnets);
} else {
- $jotnets .= sprintf(t('Connectors disabled, since "%s" is enabled.'),
- t('Hide your profile details from unknown viewers?'));
+ $jotnets .= L10n::t('Connectors disabled, since "%s" is enabled.', L10n::t('Hide your profile details from unknown viewers?'));
}
}
$tpl = get_markup_template("acl_selector.tpl");
$o = replace_macros($tpl, [
- '$showall'=> t("Visible to everybody"),
- '$show' => t("show"),
- '$hide' => t("don't show"),
+ '$showall'=> L10n::t("Visible to everybody"),
+ '$show' => L10n::t("show"),
+ '$hide' => L10n::t("don't show"),
'$allowcid' => json_encode($perms['allow_cid']),
'$allowgid' => json_encode($perms['allow_gid']),
'$denycid' => json_encode($perms['deny_cid']),
'$denygid' => json_encode($perms['deny_gid']),
'$networks' => $show_jotnets,
- '$emailcc' => t('CC: email addresses'),
- '$emtitle' => t('Example: bob@example.com, mary@example.com'),
+ '$emailcc' => L10n::t('CC: email addresses'),
+ '$emtitle' => L10n::t('Example: bob@example.com, mary@example.com'),
'$jotnets' => $jotnets,
- '$aclModalTitle' => t('Permissions'),
- '$aclModalDismiss' => t('Close'),
+ '$aclModalTitle' => L10n::t('Permissions'),
+ '$aclModalDismiss' => L10n::t('Close'),
'$features' => [
'aclautomention' => (Feature::isEnabled($user['uid'], "aclautomention") ? "true" : "false")
],
@@ -713,7 +713,7 @@ function navbar_complete(App $a) {
// check if searching in the local global contact table is enabled
$localsearch = Config::get('system','poco_local_search');
- $search = $prefix.notags(trim($_REQUEST['search']));
+ $search = notags(trim($_REQUEST['search']));
$mode = $_REQUEST['smode'];
// don't search if search term has less than 2 characters
@@ -733,7 +733,7 @@ function navbar_complete(App $a) {
if (! $localsearch) {
$p = (($a->pager['page'] != 1) ? '&p=' . $a->pager['page'] : '');
- $x = z_fetch_url(get_server() . '/lsearch?f=' . $p . '&search=' . urlencode($search));
+ $x = Network::curl(get_server() . '/lsearch?f=' . $p . '&search=' . urlencode($search));
if ($x['success']) {
$j = json_decode($x['body'],true);
if ($j && isset($j['results'])) {