X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fdirectory.php;h=f29e3eb69ba8e057fa375a71d25a3e42de83276d;hb=c54a2c1e83822f6e043b449468570d2c9ed3ab3a;hp=98afad77cfbec3cb0faf36ae9e180e77630085eb;hpb=cd1724eb9ef4e07ced4c9019dd7bad55dc21abce;p=friendica.git diff --git a/mod/directory.php b/mod/directory.php index 98afad77cf..f29e3eb69b 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -2,6 +2,8 @@ use Friendica\App; use Friendica\Core\Config; +use Friendica\Database\DBM; +use Friendica\Model\Contact; function directory_init(App $a) { $a->set_pager_itemspage(60); @@ -73,7 +75,7 @@ function directory_content(App $a) { $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 "; @@ -85,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'; @@ -141,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)) @@ -160,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'],