finish removing the last_file preference
authorChuck Hagenbuch <chuck@horde.org>
Sat, 25 Jul 2009 15:50:22 +0000 (11:50 -0400)
committerChuck Hagenbuch <chuck@horde.org>
Sat, 25 Jul 2009 15:50:22 +0000 (11:50 -0400)
chora/lib/Chora.php

index 1dd17bb..8bc1922 100644 (file)
@@ -136,26 +136,8 @@ class Chora
         /* Location relative to the sourceroot. */
         $where = preg_replace(array('|^/|', '|\.\.|'), '', $where);
 
-        /* Store last file/repository viewed, and set 'where' to
-         * last_file if necessary. */
-        if ($remember) {
-            if (!isset($_SESSION['chora']['login'])) {
-                $_SESSION['chora']['login'] = 0;
-            }
-
-            /* We store last_sourceroot and last_file only when we have
-             * already displayed at least one page. */
-            if (!empty($_SESSION['chora']['login'])) {
-                $GLOBALS['prefs']->setValue('last_sourceroot', $acts['rt']);
-                $GLOBALS['prefs']->setValue('last_file', $where);
-            } else {
-                /* We are displaying the first page. */
-                if ($last_file && !$where) {
-                    $where = $last_file;
-                }
-                $_SESSION['chora']['login'] = 1;
-            }
-        }
+        /* Store last repository viewed */
+        $GLOBALS['prefs']->setValue('last_sourceroot', $acts['rt']);
 
         $fullname = $sourcerootopts['location'] . (substr($sourcerootopts['location'], -1) == '/' ? '' : '/') . $where;
 
@@ -227,9 +209,6 @@ class Chora
             $message = $message->getMessage();
         }
 
-        /* Don't store the bad file in the user's preferences. */
-        $GLOBALS['prefs']->setValue('last_file', '');
-
         if ($code) {
             header('HTTP/1.0 ' . $code);
         }