aboutsummaryrefslogtreecommitdiffstats
path: root/App.php
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mekanisti.fi>2009-11-17 09:49:44 +0200
committerFilipp Lepalaan <filipp@mekanisti.fi>2009-11-17 09:49:44 +0200
commita14477fd1140d09c3079b3477be265cc5e1410da (patch)
tree9affa0e48f341c317414be895552b6f436ba274a /App.php
parent6ce2a6c65c9c9eba1e7660d151b6a709ecfa625f (diff)
downloadmain-a14477fd1140d09c3079b3477be265cc5e1410da.tar.gz
main-a14477fd1140d09c3079b3477be265cc5e1410da.tar.bz2
main-a14477fd1140d09c3079b3477be265cc5e1410da.zip
More fixes
Diffstat (limited to 'App.php')
-rw-r--r--App.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/App.php b/App.php
index 1c45735..3085efe 100644
--- a/App.php
+++ b/App.php
@@ -175,8 +175,12 @@ class App
* @param string [$where] URL to redirect to
* @return void
*/
- static function redirect($url)
+ static function redirect($url = null)
{
+ if (!$url) {
+ // Is it smart to redirect back to the page which redirected here?
+ $url = $_SERVER['HTTP_REFERER'];
+ }
header("HTTP/1.1 303 See Other");
header("Location: $url");
}