]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch 'testing' of gitorious.org:statusnet/mainline into testing
authorEvan Prodromou <evan@status.net>
Sat, 17 Sep 2011 20:29:58 +0000 (16:29 -0400)
committerEvan Prodromou <evan@status.net>
Sat, 17 Sep 2011 20:29:58 +0000 (16:29 -0400)
actions/logout.php
lib/accountprofileblock.php
plugins/OMB/OMBPlugin.php

index 567d808cd1f7e38863f77d1087dc8cc68758f7b9..4e51271d43c95d0990b8e1b2f29a14b4019ee20f 100644 (file)
@@ -73,7 +73,13 @@ class LogoutAction extends Action
             }
             Event::handle('EndLogout', array($this));
 
-            common_redirect(common_local_url('public'), 303);
+            if (common_config('singleuser', 'enabled')) {
+                $user = User::singleUser();
+                common_redirect(common_local_url('showstream',
+                                                 array('nickname' => $user->nickname)));
+            } else {
+                common_redirect(common_local_url('public'), 303);
+            }
         }
     }
 
index 59c27776018dac7c2bfddaf27e5557bf120bf0e0..4eca000c9efed19ae3857a99962d5cd48e8b7e26 100644 (file)
@@ -138,9 +138,6 @@ class AccountProfileBlock extends ProfileBlock
             if (Event::handle('StartProfilePageActionsElements', array($this->out, $this->profile))) {
                 if (empty($cur)) { // not logged in
                     if (Event::handle('StartProfileRemoteSubscribe', array($this->out, $this->profile))) {
-                        $this->out->elementStart('li', 'entity_subscribe');
-                        $this->showRemoteSubscribeLink();
-                        $this->out->elementEnd('li');
                         Event::handle('EndProfileRemoteSubscribe', array($this->out, $this->profile));
                     }
                 } else {
@@ -298,16 +295,6 @@ class AccountProfileBlock extends ProfileBlock
         $this->out->elementEnd('li');
     }
 
-    function showRemoteSubscribeLink()
-    {
-        $url = common_local_url('remotesubscribe',
-                                array('nickname' => $this->profile->nickname));
-        $this->out->element('a', array('href' => $url,
-                                  'class' => 'entity_remote_subscribe'),
-                       // TRANS: Link text for link that will subscribe to a remote profile.
-                       _m('BUTTON','Subscribe'));
-    }
-
     function show()
     {
         $this->out->elementStart('div', 'profile_block account_profile_block section');
index c532c4c8940f1850de2b99c0a6187e04558ce024..de0088cc8e60789b35ec055db76ec6b06f5d91ae 100644 (file)
@@ -377,6 +377,20 @@ class OMBPlugin extends Plugin
         return true;
     }
 
+    function onStartProfileRemoteSubscribe($out, $profile)
+    {
+        $out->elementStart('li', 'entity_subscribe');
+        $url = common_local_url('remotesubscribe',
+                                array('nickname' => $this->profile->nickname));
+        $out->element('a', array('href' => $url,
+                                  'class' => 'entity_remote_subscribe'),
+                       // TRANS: Link text for link that will subscribe to a remote profile.
+                       _m('BUTTON','Subscribe'));
+        $out->elementEnd('li');
+
+        return false;
+    }
+
     /**
      * Plugin version info
      *