From 58dc5b3ac8c8b276dd0655c783820aa96d5a25a3 Mon Sep 17 00:00:00 2001 From: Chuck Hagenbuch Date: Fri, 24 Jul 2009 17:30:41 -0400 Subject: [PATCH] remove remember_last_file preference (I thought we'd done this a while ago) --- chora/config/prefs.php.dist | 9 --------- chora/lib/Chora.php | 16 +++++----------- 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/chora/config/prefs.php.dist b/chora/config/prefs.php.dist index 63e22d993..df87aa71e 100644 --- a/chora/config/prefs.php.dist +++ b/chora/config/prefs.php.dist @@ -27,12 +27,3 @@ $_prefs['last_sourceroot'] = array( 'shared' => false, 'type' => 'implicit' ); - -// show the last login time of user -$_prefs['remember_last_file'] = array( - 'value' => 1, - 'locked' => false, - 'shared' => false, - 'type' => 'checkbox', - 'desc' => _("Use last viewed file or directory at login time") -); diff --git a/chora/lib/Chora.php b/chora/lib/Chora.php index 4a0fe23f4..1dd17bb4b 100644 --- a/chora/lib/Chora.php +++ b/chora/lib/Chora.php @@ -70,17 +70,11 @@ class Chora /* Use the last sourceroot used as the default value if the user has * that preference. */ - if ($remember = $GLOBALS['prefs']->getValue('remember_last_file')) { - $last_file = $GLOBALS['prefs']->getValue('last_file') - ? $GLOBALS['prefs']->getValue('last_file') - : null; - $last_sourceroot = $GLOBALS['prefs']->getValue('last_sourceroot') - ? $GLOBALS['prefs']->getValue('last_sourceroot') - : null; - } + $last_sourceroot = $GLOBALS['prefs']->getValue('last_sourceroot') + ? $GLOBALS['prefs']->getValue('last_sourceroot') + : null; - if ($remember && - !empty($last_sourceroot) && + if (!empty($last_sourceroot) && !empty($sourceroots[$last_sourceroot]) && is_array($sourceroots[$last_sourceroot])) { $defaultActs['rt'] = $last_sourceroot; @@ -115,7 +109,7 @@ class Chora if (empty($GLOBALS['conf']['caching'])) { $cache = null; } else { - $cache = &Horde_Cache::singleton($GLOBALS['conf']['cache']['driver'], Horde::getDriverConfig('cache', $GLOBALS['conf']['cache']['driver'])); + $cache = Horde_Cache::singleton($GLOBALS['conf']['cache']['driver'], Horde::getDriverConfig('cache', $GLOBALS['conf']['cache']['driver'])); } $GLOBALS['conf']['paths']['temp'] = Horde::getTempDir(); -- 2.11.0