]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch '0.7.x' into 0.8.x
authorEvan Prodromou <evan@controlyourself.ca>
Sun, 14 Jun 2009 22:58:19 +0000 (15:58 -0700)
committerEvan Prodromou <evan@controlyourself.ca>
Sun, 14 Jun 2009 22:58:19 +0000 (15:58 -0700)
1  2 
actions/showstream.php
lib/router.php

diff --combined actions/showstream.php
index e2f4e24d435ea7476132f7a22a16fc9cbed6743e,641228bc731d90f97139ea8316e95f0203dee69c..72316b2592ffeb26d6a04c80b4d309fd7c763a5b
@@@ -68,9 -68,6 +68,9 @@@ class ShowstreamAction extends ProfileA
          } else {
              $base = $this->user->nickname;
          }
 +        if (!empty($this->tag)) {
 +            $base .= sprintf(_(' tagged %s'), $this->tag);
 +        }
  
          if ($this->page == 1) {
              return $base;
  
      function getFeeds()
      {
 +        if (!empty($this->tag)) {
 +            return array(new Feed(Feed::RSS1,
 +                common_local_url('userrss',
 +                    array('nickname' => $this->user->nickname,
 +                        'tag' => $this->tag)),
 +                sprintf(_('Notice feed for %s tagged %s (RSS 1.0)'),
 +                    $this->user->nickname, $this->tag)));
 +        }
 +
          return array(new Feed(Feed::RSS1,
                                common_local_url('userrss',
                                                 array('nickname' => $this->user->nickname)),
              $blocked = $cur->hasBlocked($this->profile);
              $this->elementStart('li', 'entity_block');
              if ($blocked) {
-                 $ubf = new UnblockForm($this, $this->profile);
+                 $ubf = new UnblockForm($this, $this->profile,
+                                        array('action' => 'showstream',
+                                              'nickname' => $this->profile->nickname));
                  $ubf->show();
              } else {
-                 $bf = new BlockForm($this, $this->profile);
+                 $bf = new BlockForm($this, $this->profile,
+                                     array('action' => 'showstream',
+                                           'nickname' => $this->profile->nickname));
                  $bf->show();
              }
              $this->elementEnd('li');
  
      function showNotices()
      {
 -        $notice = $this->user->getNotices(($this->page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1);
 +        $notice = empty($this->tag)
 +            ? $this->user->getNotices(($this->page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1)
 +            : $this->user->getTaggedNotices(($this->page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1, 0, 0, null, $this->tag);
  
          $pnl = new ProfileNoticeList($notice, $this);
          $cnt = $pnl->show();
diff --combined lib/router.php
index 456d1793e3245bf333343aae7ee4213245420fda,748966567f9ab86717e6a43ff1ae9277b29924e4..5db401e7418e12d46cedb39dffceb4c82f9fc39d
@@@ -101,7 -101,7 +101,7 @@@ class Route
          $main = array('login', 'logout', 'register', 'subscribe',
                        'unsubscribe', 'confirmaddress', 'recoverpassword',
                        'invite', 'favor', 'disfavor', 'sup',
-                       'block', 'subedit');
+                       'block', 'unblock', 'subedit');
  
          foreach ($main as $a) {
              $m->connect('main/'.$a, array('action' => $a));
          // settings
  
          foreach (array('profile', 'avatar', 'password', 'openid', 'im',
 -                       'email', 'sms', 'twitter', 'other') as $s) {
 +                       'email', 'sms', 'twitter', 'design', 'other') as $s) {
              $m->connect('settings/'.$s, array('action' => $s.'settings'));
          }
  
          $m->connect('search/notice/rss?q=:q', array('action' => 'noticesearchrss'),
                      array('q' => '.+'));
  
 -        // notice
 +        $m->connect('attachment/:attachment/ajax',
 +                    array('action' => 'attachment_ajax'),
 +                    array('attachment' => '[0-9]+'));
 +
 +        $m->connect('attachment/:attachment/thumbnail',
 +                    array('action' => 'attachment_thumbnail'),
 +                    array('attachment' => '[0-9]+'));
  
          $m->connect('notice/new', array('action' => 'newnotice'));
          $m->connect('notice/new?replyto=:replyto',
                      array('action' => 'newnotice'),
                      array('replyto' => '[A-Za-z0-9_-]+'));
 +
 +        $m->connect('notice/:notice/file', 
 +            array('action' => 'file'), 
 +            array('notice' => '[0-9]+'));
 +        
          $m->connect('notice/:notice',
                      array('action' => 'shownotice'),
                      array('notice' => '[0-9]+'));
                      array('action' => 'deletenotice'),
                      array('notice' => '[0-9]+'));
  
 +        // conversation
 +
 +        $m->connect('conversation/:id',
 +                    array('action' => 'conversation'),
 +                    array('id' => '[0-9]+'));
 +
          $m->connect('message/new', array('action' => 'newmessage'));
          $m->connect('message/new?to=:to', array('action' => 'newmessage'), array('to' => '[A-Za-z0-9_-]+'));
          $m->connect('message/:message',
                      array('size' => '(original|96|48|24)',
                            'nickname' => '[a-zA-Z0-9]{1,64}'));
  
 +        $m->connect(':nickname/tag/:tag/rss',
 +            array('action' => 'userrss'),
 +            array('nickname' => '[a-zA-Z0-9]{1,64}'),
 +            array('tag' => '[a-zA-Z0-9]+'));
 +
 +        $m->connect(':nickname/tag/:tag',
 +                    array('action' => 'showstream'),
 +                    array('nickname' => '[a-zA-Z0-9]{1,64}'),
 +                    array('tag' => '[a-zA-Z0-9]+'));
 +
          $m->connect(':nickname',
                      array('action' => 'showstream'),
                      array('nickname' => '[a-zA-Z0-9]{1,64}'));