]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/showstream.php
define LACONICA and accept LACONICA for backwards compatibility
[quix0rs-gnu-social.git] / actions / showstream.php
index 678a3174c151800a482b35c41bfdb71f6245a691..4d3067eed37275e35144fc2ecd292e956a0c4954 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Laconica, the distributed open-source microblogging tool
+ * StatusNet, the distributed open-source microblogging tool
  *
  * User profile page
  *
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  * @category  Personal
- * @package   Laconica
- * @author    Evan Prodromou <evan@controlyourself.ca>
- * @author    Sarven Capadisli <csarven@controlyourself.ca>
- * @copyright 2008-2009 Control Yourself, Inc.
+ * @package   StatusNet
+ * @author    Evan Prodromou <evan@status.net>
+ * @author    Sarven Capadisli <csarven@status.net>
+ * @copyright 2008-2009 StatusNet, Inc.
  * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
- * @link      http://laconi.ca/
+ * @link      http://status.net/
  */
 
-if (!defined('LACONICA')) {
+if (!defined('STATUSNET') && !defined('LACONICA')) {
     exit(1);
 }
 
@@ -48,10 +48,10 @@ require_once INSTALLDIR.'/lib/feedlist.php';
  * to subscriptions and stuff, etc.
  *
  * @category Personal
- * @package  Laconica
- * @author   Evan Prodromou <evan@controlyourself.ca>
+ * @package  StatusNet
+ * @author   Evan Prodromou <evan@status.net>
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
- * @link     http://laconi.ca/
+ * @link     http://status.net/
  */
 
 class ShowstreamAction extends ProfileAction
@@ -147,17 +147,6 @@ class ShowstreamAction extends ProfileAction
                               sprintf(_('FOAF for %s'), $this->user->nickname)));
     }
 
-    /**
-     * Output document relationship links
-     *
-     * @return void
-     */
-    function showRelationshipLinks()
-    {
-        $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
-                                     $this->page, 'showstream', array('nickname' => $this->user->nickname));
-    }
-
     function extraHead()
     {
         // for remote subscriptions etc.
@@ -331,10 +320,14 @@ class ShowstreamAction extends ProfileAction
             $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');
@@ -365,7 +358,9 @@ class ShowstreamAction extends ProfileAction
             }
         }
         else {
-            $message .= sprintf(_('Why not [register an account](%%%%action.register%%%%) and then nudge %s or post a notice to his or her attention.'), $this->user->nickname);
+            $message .= sprintf(_('Why not [register an account](%%%%action.%s%%%%) and then nudge %s or post a notice to his or her attention.'),
+                                (!common_config('site','openidonly')) ? 'register' : 'openidlogin',
+                                $this->user->nickname);
         }
 
         $this->elementStart('div', 'guide');
@@ -377,7 +372,7 @@ class ShowstreamAction extends ProfileAction
     {
         $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);
+            : $this->user->getTaggedNotices($this->tag, ($this->page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1, 0, 0, null);
 
         $pnl = new ProfileNoticeList($notice, $this);
         $cnt = $pnl->show();
@@ -393,12 +388,14 @@ class ShowstreamAction extends ProfileAction
     {
         if (!(common_config('site','closed') || common_config('site','inviteonly'))) {
             $m = sprintf(_('**%s** has an account on %%%%site.name%%%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' .
-                 'based on the Free Software [Laconica](http://laconi.ca/) tool. ' .
-                 '[Join now](%%%%action.register%%%%) to follow **%s**\'s notices and many more! ([Read more](%%%%doc.help%%%%))'),
-                 $this->user->nickname, $this->user->nickname);
+                 'based on the Free Software [StatusNet](http://status.net/) tool. ' .
+                 '[Join now](%%%%action.%s%%%%) to follow **%s**\'s notices and many more! ([Read more](%%%%doc.help%%%%))'),
+                 $this->user->nickname,
+                 (!common_config('site','openidonly')) ? 'register' : 'openidlogin',
+                 $this->user->nickname);
         } else {
             $m = sprintf(_('**%s** has an account on %%%%site.name%%%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' .
-                 'based on the Free Software [Laconica](http://laconi.ca/) tool. '),
+                 'based on the Free Software [StatusNet](http://status.net/) tool. '),
                  $this->user->nickname, $this->user->nickname);
        }
         $this->elementStart('div', array('id' => 'anon_notice'));