]> git.mxchange.org Git - friendica.git/blobdiff - mod/network.php
dbstructure now switches in the maintenance mode when updating
[friendica.git] / mod / network.php
index 73cb0eba287d846e269564955663db264c68c5a7..f4af489db9af8cd369301e48001600f6d7c69434 100644 (file)
@@ -502,7 +502,7 @@ function network_content(&$a, $update = 0) {
        }
        elseif($cid) {
 
-               $r = q("SELECT `id`,`name`,`network`,`writable`,`nurl`, `forum`, `prv`, `addr`, `thumb`, `location` FROM `contact` WHERE `id` = %d
+               $r = q("SELECT `id`,`name`,`network`,`writable`,`nurl`, `forum`, `prv`, `contact-type`, `addr`, `thumb`, `location` FROM `contact` WHERE `id` = %d
                                AND `blocked` = 0 AND `pending` = 0 LIMIT 1",
                        intval($cid)
                );
@@ -514,10 +514,11 @@ function network_content(&$a, $update = 0) {
                                'name' => htmlentities($r[0]['name']),
                                'itemurl' => (($r[0]['addr']) ? ($r[0]['addr']) : ($r[0]['nurl'])),
                                'thumb' => proxy_url($r[0]['thumb'], false, PROXY_SIZE_THUMB),
-                               'account_type' => (($r[0]['forum']) || ($r[0]['prv']) ? t('Forum') : ''),
                                'details' => $r[0]['location'],
                        );
 
+                       $entries[0]["account_type"] = account_type($r[0]);
+
                        $o = replace_macros(get_markup_template("viewcontact_template.tpl"),array(
                                'contacts' => $entries,
                                'id' => 'network',
@@ -704,7 +705,7 @@ function network_content(&$a, $update = 0) {
                $parents_str = '';
                $date_offset = "";
 
-               if(count($r)) {
+               if(dbm::is_result($r)) {
                        foreach($r as $rr)
                                if(! in_array($rr['item_id'],$parents_arr))
                                        $parents_arr[] = $rr['item_id'];