]> git.mxchange.org Git - friendica.git/blobdiff - mod/suggest.php
added spaces + curly braces
[friendica.git] / mod / suggest.php
index 00033b2d246feba8b84f961dc4edf4a8587844aa..73f5ffe4b218722247617cf42ab9dcbd9590b6c5 100644 (file)
@@ -59,7 +59,7 @@ function suggest_content(&$a) {
                return;
        }
 
-       $_SESSION['return_url'] = $a->get_baseurl() . '/' . $a->cmd;
+       $_SESSION['return_url'] = App::get_baseurl() . '/' . $a->cmd;
 
        $a->page['aside'] .= findpeople_widget();
        $a->page['aside'] .= follow_widget();
@@ -67,7 +67,7 @@ function suggest_content(&$a) {
 
        $r = suggestion_query(local_user());
 
-       if(! count($r)) {
+       if (! dbm::is_result($r)) {
                $o .= t('No suggestions available. If this is a new site, please try again in 24 hours.');
                return $o;
        }
@@ -76,8 +76,8 @@ function suggest_content(&$a) {
 
        foreach($r as $rr) {
 
-               $connlnk = $a->get_baseurl() . '/follow/?url=' . (($rr['connect']) ? $rr['connect'] : $rr['url']);
-               $ignlnk = $a->get_baseurl() . '/suggest?ignore=' . $rr['id'];
+               $connlnk = App::get_baseurl() . '/follow/?url=' . (($rr['connect']) ? $rr['connect'] : $rr['url']);
+               $ignlnk = App::get_baseurl() . '/suggest?ignore=' . $rr['id'];
                $photo_menu = array(
                        'profile' => array(t("View Profile"), zrl($rr["url"])),
                        'follow' => array(t("Connect/Follow"), $connlnk),
@@ -95,7 +95,7 @@ function suggest_content(&$a) {
                        'details'       => $contact_details['location'],
                        'tags'          => $contact_details['keywords'],
                        'about'         => $contact_details['about'],
-                       'account_type'  => (($contact_details['community']) ? t('Forum') : ''),
+                       'account_type'  => account_type($contact_details),
                        'ignlnk' => $ignlnk,
                        'ignid' => $rr['id'],
                        'conntxt' => t('Connect'),
@@ -113,7 +113,6 @@ function suggest_content(&$a) {
        $o .= replace_macros($tpl,array(
                '$title' => t('Friend Suggestions'),
                '$contacts' => $entries,
-               
        ));
 
        return $o;