]> git.mxchange.org Git - friendica.git/blobdiff - mod/match.php
More usage of dbm::is_result($r) instead of count($r):
[friendica.git] / mod / match.php
index db1cac0f7876d8b7106c87b8559c9d0f5e492974..f7fe325b3868937786e2b2cc9fd9728c849babd4 100644 (file)
@@ -27,7 +27,7 @@ function match_content(&$a) {
        $r = q("SELECT `pub_keywords`, `prv_keywords` FROM `profile` WHERE `is-default` = 1 AND `uid` = %d LIMIT 1",
                intval(local_user())
        );
-       if(! count($r))
+       if(! dbm::is_result($r))
                return;
        if(! $r[0]['pub_keywords'] && (! $r[0]['prv_keywords'])) {
                notice( t('No keywords to match. Please add keywords to your default profile.') . EOL);
@@ -67,8 +67,10 @@ function match_content(&$a) {
                                if (!count($match)) {
                                        $jj->photo = str_replace("http:///photo/", get_server()."/photo/", $jj->photo);
                                        $connlnk = $a->get_baseurl() . '/follow/?url=' . $jj->url;
-                                       $photo_menu = array(array(t("View Profile"), zrl($jj->url)));
-                                       $photo_menu[] = array(t("Connect/Follow"), $connlnk);
+                                       $photo_menu = array(
+                                               'profile' => array(t("View Profile"), zrl($jj->url)),
+                                               'follow' => array(t("Connect/Follow"), $connlnk)
+                                       );
 
                                        $contact_details = get_contact_details_by_url($jj->url, local_user());
 
@@ -79,6 +81,7 @@ function match_content(&$a) {
                                                'details'       => $contact_details['location'],
                                                'tags'          => $contact_details['keywords'],
                                                'about'         => $contact_details['about'],
+                                               'account_type'  => account_type($contact_details),
                                                'thumb' => proxy_url($jj->photo, false, PROXY_SIZE_THUMB),
                                                'inttxt' => ' ' . t('is interested in:'),
                                                'conntxt' => t('Connect'),