use Friendica\Database\DBA;
use Friendica\Model\Contact;
use Friendica\Model\Profile;
+use Friendica\Util\Proxy as ProxyUtils;
function directory_init(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())
) {
}
if ($search) {
- $search = dbesc($search);
+ $search = DBA::escape($search);
$sql_extra = " AND ((`profile`.`name` LIKE '%$search%') OR
(`user`.`nickname` LIKE '%$search%') OR
(`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 " );
|| (x($profile, 'country-name') == 1)
) {
$location = L10n::t('Location:');
+ } else {
+ $location = '';
}
$gender = ((x($profile, 'gender') == 1) ? L10n::t('Gender:') : false);
'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,