X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fdirectory.php;h=411024dc1aace31a38e12b6f735d5a693a5a0fd7;hb=92c4ca091193e571d76a9db7b2d4078e2b3dc473;hp=f7e37591aef95887abb2b0e16619bfea7f26d51d;hpb=ecea7425f8ad11ace4af39d476919e3203bff44f;p=friendica.git diff --git a/mod/directory.php b/mod/directory.php index f7e37591ae..411024dc1a 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -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()) ) { @@ -60,7 +59,7 @@ function directory_content(App $a) } if ($search) { - $search = dbesc($search); + $search = DBA::escape($search); $sql_extra = " AND ((`profile`.`name` LIKE '%$search%') OR (`user`.`nickname` LIKE '%$search%') OR @@ -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,