]> git.wh0rd.org - tt-rss.git/commitdiff
login system fixes (2)
authorAndrew Dolgov <fox@bah.spb.su>
Thu, 1 Mar 2007 12:29:25 +0000 (13:29 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Thu, 1 Mar 2007 12:29:25 +0000 (13:29 +0100)
functions.js
functions.php

index 35b1e13190553ed86f56785b55b4886fae11cac1..991c0715da6dd55f66f021cdfd8d161aae3176c4 100644 (file)
@@ -56,6 +56,8 @@ function logout_callback() {
        var container = document.getElementById('notify');
        if (xmlhttp.readyState == 4) {
                try {
+                       var date = new Date();
+                       var timestamp = Math.round(date.getTime() / 1000);
                        window.location.href = "tt-rss.php";
                } catch (e) {
                        exception_error("logout_callback", e);
@@ -1538,7 +1540,7 @@ function fatalError(code, message) {
        try {   
 
                if (code == 6) {
-                       //window.location.href = "login.php?rt=none";                   
+                       window.location.href = "tt-rss.php";                    
                } else if (code == 5) {
                        window.location.href = "update.php";
                } else {
index 59086506af41ef06e475f8f8087c88536c624042..70cc16cc9b78d19cfbeec2a98f249503a20a7c03 100644 (file)
 
                if ($_SESSION["cookie_lifetime"] && $_SESSION["uid"]) {
 
-#                      print time() . " vs " .  $_SESSION["cookie_lifetime"];
+                       //print_r($_SESSION);
 
                        if (time() > $_SESSION["cookie_lifetime"]) {
                                return false;
                                        if ($remember_me) {
                                                $_SESSION["cookie_lifetime"] = time() + 
                                                        SESSION_COOKIE_LIFETIME_REMEMBER;
-                                       } else {
+                                       } else if (SESSION_COOKIE_LIFETIME > 0) {
                                                $_SESSION["cookie_lifetime"] = time() + SESSION_COOKIE_LIFETIME;
                                        }