]> git.mxchange.org Git - friendica.git/blobdiff - mod/msearch.php
Fix formatting and PHP notice in mod/photos
[friendica.git] / mod / msearch.php
index 460b9c303919074332576f861e48b770370368a2..a652bc8ed87b92d86a646a3043b932b1f79ea65a 100644 (file)
@@ -1,6 +1,8 @@
 <?php
 
 use Friendica\App;
+use Friendica\Core\System;
+use Friendica\Database\DBM;
 
 function msearch_post(App $a) {
 
@@ -16,7 +18,7 @@ function msearch_post(App $a) {
                dbesc($search)
        );
 
-       if (dbm::is_result($r))
+       if (DBM::is_result($r))
                $total = $r[0]['total'];
 
        $results = array();
@@ -27,12 +29,12 @@ function msearch_post(App $a) {
                intval($perpage)
        );
 
-       if (dbm::is_result($r)) {
+       if (DBM::is_result($r)) {
                foreach($r as $rr)
                        $results[] = array(
                                'name' => $rr['name'],
-                               'url' => App::get_baseurl() . '/profile/' . $rr['nickname'],
-                               'photo' => App::get_baseurl() . '/photo/avatar/' . $rr['uid'] . '.jpg',
+                               'url' => System::baseUrl() . '/profile/' . $rr['nickname'],
+                               'photo' => System::baseUrl() . '/photo/avatar/' . $rr['uid'] . '.jpg',
                                'tags' => str_replace(array(',','  '),array(' ',' '),$rr['pub_keywords'])
                        );
        }