]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Okay, let's try that again. uiconversion of peopletag.php
authorZach Copley <zach@controlyourself.ca>
Sat, 24 Jan 2009 11:06:46 +0000 (03:06 -0800)
committerZach Copley <zach@controlyourself.ca>
Sat, 24 Jan 2009 11:06:46 +0000 (03:06 -0800)
actions/peopletag.php

index 7c2f2b84c2674b81fe212c6fc8e99a9c15f61e28..221ece2a9a7f3d9bef4618a94c18a83c88021a58 100644 (file)
@@ -24,35 +24,33 @@ require_once INSTALLDIR.'/lib/profilelist.php';
 class PeopletagAction extends Action
 {
     
+    var $tag = null;
+    var $page = null;
+        
     function handle($args)
     {
+        parent::handle($args);    
+        
+        parent::prepare($args);
 
-        parent::handle($args);
+        $this->tag = $this->trimmed('tag');
 
-        $tag = $this->trimmed('tag');
-        
-        if (!common_valid_profile_tag($tag)) {
-            $this->clientError(sprintf(_('Not a valid people tag: %s'), $tag));
+        if (!common_valid_profile_tag($this->tag)) {
+            $this->clientError(sprintf(_('Not a valid people tag: %s'), $this->tag));
             return;
         }
 
-        $page = $this->trimmed('page');
-        
-        if (!$page) {
-            $page = 1;
-        }
-
-        $this->showPeople($tag, $page);
+        $this->page = $this->trimmed('page');
 
+        if (!$this->page) {
+            $this->page = 1;
+        }
+        
+        $this->showPage();
     }
     
-    function title() 
-    {
-        return sprintf(_('Users self-tagged with %s - page %d'), $tag, $page,
-                           null, $tag, array($this, 'show_top'));
-    }
-
-    function showPeople($tag, $page)
+  
+    function showContent()
     {
         
         $profile = new Profile();
@@ -74,16 +72,21 @@ class PeopletagAction extends Action
                                 'WHERE profile_tag.tagger = profile_tag.tagged ' .
                                 'AND tag = "%s" ' .
                                 'ORDER BY profile_tag.modified DESC ' . 
-                                $lim, $tag));
+                                $lim, $this->tag));
 
         $pl = new ProfileList($profile, null, $this);
         $cnt = $pl->show();
         
-        $this->pagination($page > 1,
+        $this->pagination($this->page > 1,
                           $cnt > PROFILES_PER_PAGE,
-                          $page,
+                          $this->page,
                           $this->trimmed('action'),
-                          array('tag' => $tag));
+                          array('tag' => $this->tag));
+    }
+    
+    function title() 
+    {
+        return sprintf( _('Users self-tagged with %s - page %d'), $this->tag, $this->page);
     }
     
 }