]> git.mxchange.org Git - friendica.git/blobdiff - mod/directory.php
mod/message return to conversation if message deleted
[friendica.git] / mod / directory.php
index 129c3388c9d7e346a04f5e1c352fa819558f6aa9..411024dc1aace31a38e12b6f735d5a693a5a0fd7 100644 (file)
@@ -12,6 +12,7 @@ use Friendica\Core\L10n;
 use Friendica\Database\DBA;
 use Friendica\Model\Contact;
 use Friendica\Model\Profile;
+use Friendica\Util\Proxy as ProxyUtils;
 
 function directory_init(App $a)
 {
@@ -35,8 +36,6 @@ function directory_post(App $a)
 
 function directory_content(App $a)
 {
-       require_once("mod/proxy.php");
-
        if ((Config::get('system', 'block_public') && !local_user() && !remote_user())
                || (Config::get('system', 'block_local_dir') && !local_user() && !remote_user())
        ) {
@@ -77,6 +76,8 @@ function directory_content(App $a)
                                (`profile`.`education` LIKE '%$search%') OR
                                (`profile`.`pub_keywords` LIKE '%$search%') OR
                                (`profile`.`prv_keywords` LIKE '%$search%'))";
+       } else {
+               $sql_extra = '';
        }
 
        $publish = (Config::get('system', 'publish_all') ? '' : " AND `publish` = 1 " );
@@ -148,6 +149,8 @@ function directory_content(App $a)
                                || (x($profile, 'country-name') == 1)
                        ) {
                                $location = L10n::t('Location:');
+                       } else {
+                               $location = '';
                        }
 
                        $gender   = ((x($profile, 'gender')   == 1) ? L10n::t('Gender:')   : false);
@@ -165,7 +168,7 @@ function directory_content(App $a)
                                'id'           => $rr['id'],
                                'url'          => $profile_link,
                                'itemurl'      => $itemurl,
-                               'thumb'        => proxy_url($rr[$photo], false, PROXY_SIZE_THUMB),
+                               'thumb'        => ProxyUtils::proxifyUrl($rr[$photo], false, ProxyUtils::SIZE_THUMB),
                                'img_hover'    => $rr['name'],
                                'name'         => $rr['name'],
                                'details'      => $details,