]> git.mxchange.org Git - friendica.git/blobdiff - mod/directory.php
Merge pull request #3883 from zeroadam/Issue-#3878
[friendica.git] / mod / directory.php
index c83b7b4116167c3b33218297f5fc44c78dfa073a..b32a58b359d71fd58617cfed9ca7d5d85b8a88d5 100644 (file)
@@ -1,6 +1,8 @@
 <?php
 
 use Friendica\App;
+use Friendica\Core\Config;
+use Friendica\Database\DBM;
 
 function directory_init(App $a) {
        $a->set_pager_itemspage(60);
@@ -26,8 +28,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 +43,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 +68,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 +86,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';