]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
prevent js file to get stored in lastUrl
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Tue, 27 Oct 2009 20:42:12 +0000 (20:42 +0000)
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Tue, 27 Oct 2009 20:42:12 +0000 (20:42 +0000)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@442 b3834d28-1941-0410-a4f8-b48e95affb8f

src/SemanticScuttle/header.php
www/jsScuttle.php

index 1b3264339e64647d2c29738731943f547b9f50fc..5b411d9bfff64903b289b8c8236b85deec5df000 100644 (file)
@@ -63,7 +63,14 @@ if (!defined('UNIT_TEST_MODE')) {
         if (isset($_SESSION['lastUrl'])) {
             $GLOBALS['lastUrl'] = $_SESSION['lastUrl'];
         }
-        $_SESSION['lastUrl'] = $_SERVER['REQUEST_URI'];
+        //this here is hacky, but currently the only way to
+        // differentiate between css/js php files and normal
+        // http files
+        if (!isset($GLOBALS['saveInLastUrl'])
+            || $GLOBALS['saveInLastUrl']
+        ) {
+            $_SESSION['lastUrl'] = $_SERVER['REQUEST_URI'];
+        }
     }
 }
 
index 8b19967209b0c46e85cf26e3569300b07209b9a0..6aba4229e5a8e8074d6a0552fa8e35c4cd94370c 100644 (file)
@@ -1,5 +1,6 @@
 <?php
 header('Content-Type: text/javascript');
+$GLOBALS['saveInLastUrl'] = false;
 require_once '../src/SemanticScuttle/header.php';
 require_once 'SemanticScuttle/functions.php';
 $player_root = ROOT .'includes/player/';