]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/profilesection.php
whitespace and formatting in showstream.php
[quix0rs-gnu-social.git] / lib / profilesection.php
index 087adb2ef61c82d452f75fa605e9548cb5f51076..8ed290e03aa3c6195567da6c50401f8b12924cdf 100644 (file)
@@ -52,15 +52,19 @@ class ProfileSection extends Section
     {
         $profiles = $this->getProfiles();
 
-        $cnt = 0;
+        if (!$profiles) {
+            return false;
+        }
 
-        $this->out->elementStart('ul', 'entities users xoxo');
+        $cnt = 0;
 
+        $this->out->elementStart('table');
+        $this->out->elementStart('tbody');
         while ($profiles->fetch() && ++$cnt <= PROFILES_PER_SECTION) {
             $this->showProfile($profiles);
         }
-
-        $this->out->elementEnd('ul');
+        $this->out->elementEnd('tbody');
+        $this->out->elementEnd('table');
 
         return ($cnt > PROFILES_PER_SECTION);
     }
@@ -72,7 +76,9 @@ class ProfileSection extends Section
 
     function showProfile($profile)
     {
-        $this->out->elementStart('li', 'vcard');
+        $this->out->elementStart('tr');
+        $this->out->elementStart('td');
+        $this->out->elementStart('span', 'vcard');
         $this->out->elementStart('a', array('title' => ($profile->fullname) ?
                                        $profile->fullname :
                                        $profile->nickname,
@@ -80,7 +86,7 @@ class ProfileSection extends Section
                                        'rel' => 'contact member',
                                        'class' => 'url'));
         $avatar = $profile->getAvatar(AVATAR_MINI_SIZE);
-        $this->out->element('img', array('src' => (($avatar) ? common_avatar_display_url($avatar) :  common_default_avatar(AVATAR_MINI_SIZE)),
+        $this->out->element('img', array('src' => (($avatar) ? $avatar->displayUrl() :  Avatar::defaultImage(AVATAR_MINI_SIZE)),
                                     'width' => AVATAR_MINI_SIZE,
                                     'height' => AVATAR_MINI_SIZE,
                                     'class' => 'avatar photo',
@@ -88,10 +94,13 @@ class ProfileSection extends Section
                                     $profile->fullname :
                                     $profile->nickname));
         $this->out->element('span', 'fn nickname', $profile->nickname);
+        $this->out->elementEnd('span');
         $this->out->elementEnd('a');
+        $this->out->elementEnd('td');
         if ($profile->value) {
-            $this->out->element('span', 'value', $profile->value);
+            $this->out->element('td', 'value', $profile->value);
         }
-        $this->out->elementEnd('li');
+
+        $this->out->elementEnd('tr');
     }
 }