]> git.mxchange.org Git - friendica.git/blobdiff - include/acl_selectors.php
Remove library/jgrowl
[friendica.git] / include / acl_selectors.php
index 5be3fd1f3f6efeda2564ec4a7c3ff501f4b07c67..599b543ad0ee9fe76efccd897307c5a32a53d6a6 100644 (file)
@@ -5,7 +5,9 @@
 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\Database\DBM;
 use Friendica\Model\Contact;
 use Friendica\Model\GContact;
@@ -32,7 +34,7 @@ function group_select($selname,$selclass,$preselected = false,$size = 4) {
 
        // e.g. 'network_pre_group_deny', 'profile_pre_group_allow'
 
-       call_hooks($a->module . '_pre_' . $selname, $arr);
+       Addon::callHooks($a->module . '_pre_' . $selname, $arr);
 
        if (DBM::is_result($r)) {
                foreach ($r as $rr) {
@@ -50,7 +52,7 @@ function group_select($selname,$selclass,$preselected = false,$size = 4) {
        }
        $o .= "</select>\r\n";
 
-       call_hooks($a->module . '_post_' . $selname, $o);
+       Addon::callHooks($a->module . '_post_' . $selname, $o);
 
 
        return $o;
@@ -111,7 +113,7 @@ function contact_selector($selname, $selclass, $options, $preselected = false)
 
        $x = ['options' => $options, 'size' => $size, 'single' => $single, 'mutual' => $mutual, 'exclude' => $exclude, 'networks' => $networks];
 
-       call_hooks('contact_select_options', $x);
+       Addon::callHooks('contact_select_options', $x);
 
        $o = '';
 
@@ -154,7 +156,7 @@ function contact_selector($selname, $selclass, $options, $preselected = false)
 
        // e.g. 'network_pre_contact_deny', 'profile_pre_contact_allow'
 
-       call_hooks($a->module . '_pre_' . $selname, $arr);
+       Addon::callHooks($a->module . '_pre_' . $selname, $arr);
 
        if (DBM::is_result($r)) {
                foreach ($r as $rr) {
@@ -173,7 +175,7 @@ function contact_selector($selname, $selclass, $options, $preselected = false)
 
        $o .= "</select>\r\n";
 
-       call_hooks($a->module . '_post_' . $selname, $o);
+       Addon::callHooks($a->module . '_post_' . $selname, $o);
 
        return $o;
 }
@@ -232,7 +234,7 @@ function contact_select($selname, $selclass, $preselected = false, $size = 4, $p
 
        // e.g. 'network_pre_contact_deny', 'profile_pre_contact_allow'
 
-       call_hooks($a->module . '_pre_' . $selname, $arr);
+       Addon::callHooks($a->module . '_pre_' . $selname, $arr);
 
        $receiverlist = [];
 
@@ -263,7 +265,7 @@ function contact_select($selname, $selclass, $preselected = false, $size = 4, $p
                $o .= implode(", ", $receiverlist);
        }
 
-       call_hooks($a->module . '_post_' . $selname, $o);
+       Addon::callHooks($a->module . '_post_' . $selname, $o);
 
        return $o;
 }
@@ -350,31 +352,30 @@ function populate_acl($user = null, $show_jotnets = false) {
                if (!$user['hidewall']) {
                        if ($mail_enabled) {
                                $selected = (($pubmail_enabled) ? ' checked="checked" ' : '');
-                               $jotnets .= '<div class="profile-jot-net"><input type="checkbox" name="pubmail_enable"' . $selected . ' value="1" /> ' . t("Post to Email") . '</div>';
+                               $jotnets .= '<div class="profile-jot-net"><input type="checkbox" name="pubmail_enable"' . $selected . ' value="1" /> ' . L10n::t("Post to Email") . '</div>';
                        }
 
-                       call_hooks('jot_networks', $jotnets);
+                       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")
                ],
@@ -671,7 +672,7 @@ function acl_lookup(App $a, $out_type = 'json')
                'search'   => $search,
        ];
 
-       call_hooks('acl_lookup_end', $results);
+       Addon::callHooks('acl_lookup_end', $results);
 
        if ($out_type === 'html') {
                $o = [