X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fdirectory.php;h=f29e3eb69ba8e057fa375a71d25a3e42de83276d;hb=3b23f89ca257f972aa9c7beffdd308b1fd1b37e6;hp=c83b7b4116167c3b33218297f5fc44c78dfa073a;hpb=0882b2df9704f9e2b32b9874dceb53a90ca72edd;p=friendica.git diff --git a/mod/directory.php b/mod/directory.php index c83b7b4116..f29e3eb69b 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -1,6 +1,9 @@ set_pager_itemspage(60); @@ -26,8 +29,8 @@ function directory_post(App $a) { function directory_content(App $a) { require_once("mod/proxy.php"); - if((get_config('system','block_public')) && (! local_user()) && (! remote_user()) || - (get_config('system','block_local_dir')) && (! local_user()) && (! remote_user())) { + if((Config::get('system','block_public')) && (! local_user()) && (! remote_user()) || + (Config::get('system','block_local_dir')) && (! local_user()) && (! remote_user())) { notice( t('Public access denied.') . EOL); return; } @@ -41,7 +44,7 @@ function directory_content(App $a) { $search = ((x($_GET,'search')) ? notags(trim(rawurldecode($_GET['search']))) : ''); $gdirpath = ''; - $dirurl = get_config('system','directory'); + $dirurl = Config::get('system','directory'); if(strlen($dirurl)) { $gdirpath = zrl($dirurl,true); } @@ -66,13 +69,13 @@ function directory_content(App $a) { (`profile`.`prv_keywords` LIKE '%$search%'))"; } - $publish = ((get_config('system','publish_all')) ? '' : " AND `publish` = 1 " ); + $publish = ((Config::get('system','publish_all')) ? '' : " AND `publish` = 1 " ); $r = q("SELECT COUNT(*) AS `total` FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` WHERE `is-default` = 1 $publish AND `user`.`blocked` = 0 $sql_extra "); - if (dbm::is_result($r)) + if (DBM::is_result($r)) $a->set_pager_total($r[0]['total']); $order = " ORDER BY `name` ASC "; @@ -84,7 +87,7 @@ function directory_content(App $a) { LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` LEFT JOIN `contact` ON `contact`.`uid` = `user`.`uid` WHERE `is-default` $publish AND `user`.`blocked` = 0 AND `contact`.`self` $sql_extra $order LIMIT ".$limit); - if (dbm::is_result($r)) { + if (DBM::is_result($r)) { if (in_array('small', $a->argv)) { $photo = 'thumb'; @@ -140,12 +143,7 @@ function directory_content(App $a) { $about = ((x($profile,'about') == 1) ? t('About:') : False); - if($a->theme['template_engine'] === 'internal') { - $location_e = template_escape($location); - } - else { - $location_e = $location; - } + $location_e = $location; $photo_menu = array( 'profile' => array(t("View Profile"), zrl($profile_link)) @@ -159,7 +157,7 @@ function directory_content(App $a) { 'img_hover' => $rr['name'], 'name' => $rr['name'], 'details' => $details, - 'account_type' => account_type($rr), + 'account_type' => Contact::getAccountType($rr), 'profile' => $profile, 'location' => $location_e, 'tags' => $rr['pub_keywords'],