]> git.mxchange.org Git - friendica.git/blobdiff - mod/directory.php
Merge pull request #5238 from annando/more-abstraction
[friendica.git] / mod / directory.php
index f1e079d68180d96d696f7808c33b1a7bf33818ea..90d7abcc0bfdca51fd2236585205df24c5c86821 100644 (file)
@@ -78,13 +78,12 @@ function directory_content(App $a)
                                (`profile`.`prv_keywords` LIKE '%$search%'))";
        }
 
-       $publish = ((Config::get('system', 'publish_all')) ? '' : " AND `publish` = 1 " );
+       $publish = (Config::get('system', 'publish_all') ? '' : " AND `publish` = 1 " );
 
 
-       $cnt = dba::selectFirst("SELECT COUNT(*) AS `total` FROM `profile`
+       $cnt = dba::fetch_first("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 "
-       );
+                               WHERE `is-default` $publish AND NOT `user`.`blocked` $sql_extra");
        if (DBM::is_result($cnt)) {
                $a->set_pager_total($cnt['total']);
        }
@@ -157,7 +156,7 @@ function directory_content(App $a)
                        $location_e = $location;
 
                        $photo_menu = [
-                               'profile' => [L10n::t("View Profile"), Profile::zrl($profile_link)]
+                               'profile' => [L10n::t("View Profile"), Contact::magicLink($profile_link)]
                        ];
 
                        $entry = [