]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Trac #894 and #1013 - fixed bad redirects after delete notice
authorZach Copley <zach@controlyourself.ca>
Fri, 6 Feb 2009 00:16:10 +0000 (16:16 -0800)
committerZach Copley <zach@controlyourself.ca>
Fri, 6 Feb 2009 00:16:10 +0000 (16:16 -0800)
12 files changed:
actions/all.php
actions/deletenotice.php
actions/favorited.php
actions/noticesearch.php
actions/public.php
actions/replies.php
actions/showfavorites.php
actions/showgroup.php
actions/showstream.php
actions/tag.php
lib/mailbox.php
lib/personal.php

index b03ad7ec367af5ac115e9037ef2276d61694b3b1..d75d1b94612b8f6adc42cd5f22c61490fed98a6f 100644 (file)
@@ -42,6 +42,9 @@ class AllAction extends Action
         if (!$this->page) {
             $this->page = 1;
         }
+        
+        common_set_returnto($this->selfUrl());
+        
         return true;
     }
 
index d4b8e50e5e4cd5e397cec27f1279e35d9937ef8e..fc4a74eac97e52f49bd3717977c7a03f8bbc7e95 100644 (file)
@@ -134,6 +134,10 @@ class DeletenoticeAction extends DeleteAction
 
         $url = common_get_returnto();
 
+
+        $urlval = ($url) ? $url : 'null';
+        common_debug("deleteNotice() - returnto url = $urlval");  
+
         if ($url) {
             common_set_returnto(null);
         } else {
index 4155b3a234d22f036f16a77220ed71ea4b982cae..fd5ff413cbbfd9cc8f0ac478c7aa084a7c0d43ca 100644 (file)
@@ -104,6 +104,9 @@ class FavoritedAction extends Action
     {
         parent::prepare($args);
         $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
+        
+        common_set_returnto($this->selfUrl());
+        
         return true;
     }
 
index 630fb8857475b20749007355def56aad09a9bd65..c0c23812094408ce65e73003f3a3c8aa5255f75e 100644 (file)
@@ -48,6 +48,16 @@ require_once INSTALLDIR.'/lib/searchaction.php';
  */
 class NoticesearchAction extends SearchAction
 {
+
+    function prepare($args)
+    {
+        parent::prepare($args);
+
+        common_set_returnto($this->selfUrl());
+
+        return true;
+    }
+    
     /**
      * Get instructions
      * 
index cfdc99bb375471c7552862c3a325b2a05f2a5170..cc6537f74f8afd4731f2bd15162fbaf176bd8bc7 100644 (file)
@@ -73,6 +73,9 @@ class PublicAction extends Action
     {
         parent::prepare($args);
         $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
+        
+        common_set_returnto($this->selfUrl());
+        
         return true;
     }
 
index 9ec373a96bc37575bac9dac5cc667ea57dd17113..7eff74a6691e34505ceda2aa6dccbf9bc979bf33 100644 (file)
@@ -83,6 +83,8 @@ class RepliesAction extends Action
 
         $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
 
+        common_set_returnto($this->selfUrl());
+        
         return true;
     }
 
index bb68f8d94f6d69f2336301c451b4fc2f305d2911..31479e1a7891d0933e63cb8bc5735ccc99d59345 100644 (file)
@@ -112,6 +112,8 @@ class ShowfavoritesAction extends Action
             $this->page = 1;
         }
 
+        common_set_returnto($this->selfUrl());
+        
         return true;
     }
 
index 468990e7ba1051396ddeebc935d2e14fcdb6daeb..7bc68fbc64a151ac377c414a4ace0e0d52997d26 100644 (file)
@@ -129,6 +129,8 @@ class ShowgroupAction extends Action
             return false;
         }
 
+        common_set_returnto($this->selfUrl());
+
         return true;
     }
 
index 4b16799697e31fec7e13dc9f303ddbffa32a2dbe..224bbce9fbcce84be1fa8af4b0573d6c1cfe9ba1 100644 (file)
@@ -110,6 +110,8 @@ class ShowstreamAction extends Action
 
         $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
 
+        common_set_returnto($this->selfUrl());
+        
         return true;
     }
 
index 803026e624d574df2d2ebb9ebf3cbc8f921dd639..4401f892a94603df41e2b06748bba5cca35bcb05 100644 (file)
@@ -37,6 +37,9 @@ class TagAction extends Action
         }
 
         $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
+        
+        common_set_returnto($this->selfUrl());
+        
         return true;
     }
 
index 8d5d44e49de6df002df9fa10749a51500577519b..e8323dc289917c9fd3b07d5bb0ac021cf3fc260a 100644 (file)
@@ -63,6 +63,8 @@ class MailboxAction extends PersonalAction
             $this->page = 1;
         }
 
+        common_set_returnto($this->selfUrl());
+
         return true;
     }
 
index 900df0257f78205a156a7d07f29df6edf573062a..e46350c630870385b44236a0cdc27e2f163db49c 100644 (file)
@@ -55,7 +55,6 @@ class PersonalAction extends Action
     function handle($args)
     {
         parent::handle($args);
-        common_set_returnto($this->selfUrl());
     }
 
 }