]> git.mxchange.org Git - friendica.git/blobdiff - mod/msearch.php
Fix formatting and PHP notice in mod/photos
[friendica.git] / mod / msearch.php
index fcf87f9588d0c6796d315f4352e7ecdf6754b1cf..a652bc8ed87b92d86a646a3043b932b1f79ea65a 100644 (file)
@@ -2,6 +2,7 @@
 
 use Friendica\App;
 use Friendica\Core\System;
+use Friendica\Database\DBM;
 
 function msearch_post(App $a) {
 
@@ -17,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();
@@ -28,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'])
                        );
        }