]> git.mxchange.org Git - friendica.git/blobdiff - include/contact_widgets.php
Merge pull request #3598 from annando/1707-expiration
[friendica.git] / include / contact_widgets.php
index 16ed33429399a9d3e0f5c29308899a4d3079ca2e..0b82fcb8f36b64b090fe82a99e14d07225d74123 100644 (file)
@@ -1,5 +1,8 @@
 <?php
 
+use Friendica\App;
+use Friendica\Core\Config;
+
 function follow_widget($value = "") {
 
        return replace_macros(get_markup_template('follow.tpl'), array(
@@ -16,6 +19,7 @@ function findpeople_widget() {
        require_once 'include/Contact.php';
 
        $a = get_app();
+       $global_dir = Config::get('system', 'directory');
 
        if (get_config('system', 'invitation_only')) {
                $x = get_pconfig(local_user(), 'system', 'invites_remaining');
@@ -35,7 +39,9 @@ function findpeople_widget() {
                '$suggest' => t('Friend Suggestions'),
                '$similar' => t('Similar Interests'),
                '$random' => t('Random Profile'),
-               '$inv' => t('Invite Friends')
+               '$inv' => t('Invite Friends'),
+               '$directory' => t('View Global Directory'),
+               '$global_dir' => $global_dir
        ));
 
 }
@@ -49,7 +55,7 @@ function unavailable_networks() {
                $networks[] = NETWORK_APPNET;
        }
 
-       if (!plugin_enabled("fbpost") AND !plugin_enabled("facebook")) {
+       if (!plugin_enabled("fbpost") && !plugin_enabled("facebook")) {
                $networks[] = NETWORK_FACEBOOK;
        }
 
@@ -206,8 +212,9 @@ function common_friends_visitor_widget($profile_uid) {
 
        $a = get_app();
 
-       if (local_user() == $profile_uid)
+       if (local_user() == $profile_uid) {
                return;
+       }
 
        $cid = $zcid = 0;