From 165cf3fd15a2620007c4795e39ed7daae01eaeb3 Mon Sep 17 00:00:00 2001 From: Chuck Hagenbuch Date: Sat, 25 Jul 2009 11:50:22 -0400 Subject: [PATCH] finish removing the last_file preference --- chora/lib/Chora.php | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/chora/lib/Chora.php b/chora/lib/Chora.php index 1dd17bb4b..8bc192299 100644 --- a/chora/lib/Chora.php +++ b/chora/lib/Chora.php @@ -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); } -- 2.11.0