]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/vier/theme.php
More usage of dbm::is_result($r) instead of count($r):
[friendica.git] / view / theme / vier / theme.php
index f33a9178ac1d51b7dbeb6d54cf73da98c53e4b26..ef118c6963d447e5d38826df41f00f1d903ced15 100644 (file)
@@ -19,8 +19,6 @@ function vier_init(&$a) {
 
        set_template_engine($a, 'smarty3');
 
-       $a->theme_info = array();
-
        if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname'] or $a->argv[0] === "network" && local_user()) {
                vier_community_info();
 
@@ -149,7 +147,7 @@ function vier_community_info() {
                $r = suggestion_query(local_user(), 0, 9);
 
                $tpl = get_markup_template('ch_directory_item.tpl');
-               if(count($r)) {
+               if(dbm::is_result($r)) {
 
                        $aside['$comunity_profiles_title'] = t('Community Profiles');
                        $aside['$comunity_profiles_items'] = array();
@@ -178,7 +176,7 @@ function vier_community_info() {
                                0, 9);
 
                $tpl = get_markup_template('ch_directory_item.tpl');
-               if(count($r)) {
+               if(dbm::is_result($r)) {
 
                        $aside['$lastusers_title'] = t('Last users');
                        $aside['$lastusers_items'] = array();
@@ -239,12 +237,12 @@ function vier_community_info() {
                                $selected = (($cid == $contact['id']) ? ' forum-selected' : '');
 
                                $entry = array(
-                                       'url' => z_root() . '/network?f=&cid=' . $contact['id'],
-                                       'external_url' => z_root() . '/redir/' . $contact['id'],
+                                       'url' => 'network?f=&cid=' . $contact['id'],
+                                       'external_url' => 'redir/' . $contact['id'],
                                        'name' => $contact['name'],
                                        'cid' => $contact['id'],
                                        'selected'      => $selected,
-                                       'micro' => proxy_url($contact['micro'], false, PROXY_SIZE_MICRO),
+                                       'micro' => App::remove_baseurl(proxy_url($contact['micro'], false, PROXY_SIZE_MICRO)),
                                        'id' => ++$id,
                                );
                                $entries[] = $entry;