]> git.mxchange.org Git - friendica.git/blobdiff - mod/directory.php
Add database doc about the new oembed.maxwidth field
[friendica.git] / mod / directory.php
index 98afad77cfbec3cb0faf36ae9e180e77630085eb..f29e3eb69ba8e057fa375a71d25a3e42de83276d 100644 (file)
@@ -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'],