]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
include action in tags
authorcsarven <csarven@controlyourself.ca>
Mon, 24 Nov 2008 02:53:08 +0000 (21:53 -0500)
committercsarven <csarven@controlyourself.ca>
Mon, 24 Nov 2008 02:53:08 +0000 (21:53 -0500)
darcs-hash:20081124025308-eefa4-b4523d386c1dd36d4856949abba1dc8bd8099da0.gz

lib/gallery.php
lib/profilelist.php

index 5356574d7080e5d6c2387cca69f8ed691b866b22..fd13ad1459b01636598918609a7892c315ff8a65 100644 (file)
@@ -134,7 +134,7 @@ class GalleryAction extends Action {
                                          $lim);
                
                if ($display == 'list') {
-                       $profile_list = new ProfileList($other, $profile);
+                       $profile_list = new ProfileList($other, $profile, $this->trimmed('action'));
                        $cnt = $profile_list->show_list();
                } else {
                        $cnt = $this->icon_list($other);
index f8d47f4edab84aae7f32d203a8256a1c6c7f65e2..55d74418702f56b54e332ce59e4764c3958d1fe0 100644 (file)
@@ -26,10 +26,12 @@ class ProfileList {
 
        var $profile = NULL;
        var $owner = NULL;
+       var $action = NULL;
        
-       function __construct($profile, $owner=NULL) {
+       function __construct($profile, $owner=NULL, $action=NULL) {
                $this->profile = $profile;
                $this->owner = $owner;
+               $this->action = $action;
        }
        
        function show_list() {
@@ -124,7 +126,7 @@ class ProfileList {
                                                                                                                                         array('id' => $this->profile->id))),
                                                           _('Tags'));
                        } else {
-                               common_element(_('Tags'));
+                               common_text(_('Tags'));
                        }
                        common_text(":");
                        common_element_end('dt');
@@ -133,9 +135,9 @@ class ProfileList {
                                common_element_start('ul', 'tags xoxo');
                                foreach ($tags as $tag) {
                                        common_element_start('li');
-                                       common_element('a', array('rel' => "tag",
-                                                                                         'href' => common_local_url($action,
-                                                                                                                                                array('nickname' => $user->nickname,
+                                       common_element('a', array('rel' => 'tag',
+                                                                                         'href' => common_local_url($this->action,
+                                                                                                                                                array('nickname' => $this->owner->nickname,
                                                                                                                                                           'tag' => $tag))),
                                                                   $tag);
                                        common_element_end('li');
@@ -150,16 +152,13 @@ class ProfileList {
                }
 
                if ($user) {
-                       $action = NULL;
-                       
+                       $action = NULL;                 
                        if ($user->isSubscribed($this->profile)) {
                                $action = 'subscriptions';
                        } else if (Subscription::pkeyGet(array('subscriber' => $this->profile->id,
                                                                                                   'subscribed' => $user->id))) {
                                $action = 'subscribers';
                        }
-                       
-                       
                }
                
                common_element_end('li');