]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/subscriptions.php
add stub email canonicalizer
[quix0rs-gnu-social.git] / actions / subscriptions.php
index 653c6d2b5e5c2d0b52a016256f86bb73ae723702..ef0e36e300fc7a65661c0e10d957b472018a9773 100644 (file)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-if (!defined('LACONICA')) { exit(1) }
+if (!defined('LACONICA')) { exit(1); }
 
 class SubscriptionsAction extends Action {
        
@@ -47,26 +47,31 @@ class SubscriptionsAction extends Action {
 
                $subs_count = $subs->find();
                
-               common_start_element('div', 'subscriptions');
+               common_element_start('div', 'subscriptions');
                
                $idx = 0;
                
                while ($subs->fetch()) {
                        $idx++;
                        if ($idx % SUBSCRIPTIONS_PER_ROW == 1) {
-                               common_start_element('div', 'row');
+                               common_element_start('div', 'row');
                        }
 
-                       common_start_element('a', array('title' => $subs->fullname ||
+                       common_element_start('a', array('title' => $subs->fullname ||
                                                                                                   $subs->nickname,
                                                                                        'href' => $subs->profileurl,
                                                                                        'class' => 'subscription'));
-                       common_element('img', array('src' => $subs->avatar,
-                                                                               'class' => 'avatar'));
-                       common_end_element('a');
+                       $avatar = $subs->getAvatar(AVATAR_STREAM_SIZE);
+                       common_element('img', array('src' => (($avatar) ? $avatar->url : DEFAULT_STREAM_AVATAR),
+                                                                               'width' => AVATAR_STREAM_SIZE,
+                                                                               'height' => AVATAR_STREAM_SIZE,
+                                                                               'class' => 'avatar stream'));
+                       common_element_end('a');
+
+                       # XXX: subscribe form here
                        
                        if ($idx % SUBSCRIPTIONS_PER_ROW == 0) {
-                               common_end_element('div');
+                               common_element_end('div');
                        }
                        
                        if ($idx == SUBSCRIPTIONS_PER_PAGE) {
@@ -91,6 +96,6 @@ class SubscriptionsAction extends Action {
                                                                          'class' => 'next'),
                                           _t('Next'));
                }
-               common_end_element('div');
+               common_element_end('div');
        }
 }
\ No newline at end of file