? config/.prefs.php.swp
? templates/prefs/initialpageselect.inc
Index: deleteobject.php
===================================================================
RCS file: /repository/turba/deleteobject.php,v
retrieving revision 1.10
diff -p -U2 -r1.10 deleteobject.php
--- deleteobject.php	19 Mar 2002 01:57:51 -0000	1.10
+++ deleteobject.php	13 May 2002 23:18:36 -0000
@@ -20,5 +20,5 @@ $driver = &Turba_Source::singleton($sour
 $key = Horde::getFormData('key');
 if ($driver->removeObject($key)) {
-    header('Location: ' . Horde::url('search.php', true));
+    header('Location: ' . Horde::url($prefs->getValue('initial_page'), true));
 } else {
     $notification->push(_("There was an error deleting this object. Contact your system administrator for further help."), 'horde.error');
Index: editobject.php
===================================================================
RCS file: /repository/turba/editobject.php,v
retrieving revision 1.18
diff -p -U2 -r1.18 editobject.php
--- editobject.php	19 Mar 2002 01:57:52 -0000	1.18
+++ editobject.php	13 May 2002 23:18:36 -0000
@@ -18,5 +18,5 @@ require_once TURBA_BASE . '/lib/ObjectVi
 $source = Horde::getFormData('source');
 if ($source === null || !isset($cfgSources[$source])) {
-    header('Location: ' . Horde::applicationUrl('search.php', true));
+    header('Location: ' . Horde::applicationUrl($prefs->getValue('initial_page'), true));
 }
 
Index: index.php
===================================================================
RCS file: /repository/turba/index.php,v
retrieving revision 1.18
diff -p -U2 -r1.18 index.php
--- index.php	15 Apr 2002 20:59:28 -0000	1.18
+++ index.php	13 May 2002 23:18:36 -0000
@@ -21,5 +21,5 @@ if ($turba_configured) {
     include_once TURBA_BASE . '/lib/base.php';
 
-    $uri = 'search.php';
+    $uri = $prefs->getValue('initial_page');
     if (!empty($_SERVER['QUERY_STRING'])) {
         $uri .= '?' . $_SERVER['QUERY_STRING'];
Index: prefs.php
===================================================================
RCS file: /repository/turba/prefs.php,v
retrieving revision 1.10
diff -p -U2 -r1.10 prefs.php
--- prefs.php	27 Mar 2002 12:23:47 -0000	1.10
+++ prefs.php	13 May 2002 23:18:36 -0000
@@ -23,4 +23,13 @@ function handle_columnselect($updated)
 }
 
+function handle_initialpageselect($updated)
+{
+    global $prefs;
+
+    $initial_page = Horde::getFormData('initial_page');
+    $prefs->setValue('initial_page', $initial_page);
+    return true;
+}
+
 function prefs_callback()
 {
Index: config/prefs.php.dist
===================================================================
RCS file: /repository/turba/config/prefs.php.dist,v
retrieving revision 1.10
diff -p -U2 -r1.10 prefs.php.dist
--- config/prefs.php.dist	19 Feb 2002 18:00:55 -0000	1.10
+++ config/prefs.php.dist	13 May 2002 23:18:37 -0000
@@ -14,4 +14,11 @@ $prefGroups['columns'] = array(
     'members' => array('columnselect'));
 
+$prefGroups['display'] = array(
+    'column' => _("Display Options"),
+    'label' => _("Default Display"),
+    'desc' => _("Select view to display by default."),
+    'members' => array('initialpageselect')
+);
+
 
 // user language
@@ -37,2 +44,14 @@ $_prefs['columns'] = array(
     'type' => 'implicit'
 );
+
+// select widget for the initial_page preference
+$_prefs['initialpageselect'] = array('type' => 'special');
+    
+// the page to display.  Either 'browse.php' or 'search.php'
+$_prefs['initial_page'] = array(
+    'value' => 'search.php',
+    'locked' => false,
+    'shared' => false,
+    'type' => 'implicit'
+);
+

diff -p -N -U 2 -r /tmp/templates/prefs/initialpageselect.inc templates/prefs/initialpageselect.inc
--- /tmp/templates/prefs/initialpageselect.inc	Wed Dec 31 19:00:00 1969
+++ templates/prefs/initialpageselect.inc	Mon May 13 18:45:34 2002
@@ -0,0 +1,23 @@
+<?php
+if (!$prefs->isLocked('initial_page')): 
+    if ($prefs->getValue('initial_page') == 'search.php') {
+        $search_option = '<option value="search.php" selected="selected">' .
+                        _("Directory Search") . "</option>\n";
+    } else {
+        $search_option = '<option value="search.php">' . _("Directory Search") . "</option>\n";
+    }
+        $browse_option = '<option value="browse.php">' . _("Directory Listing") . "</option>\n";
+?>
+
+<table border="0">
+<tr>
+    <td>
+        <?= _("View to display by default") ?><br />
+	    <select name="initial_page">
+	        <?= $browse_option?>
+	        <?= $search_option?>
+	    </select>
+    </td>
+</tr></table>
+
+<?php endif; ?>
