Added default string values.
authorphilippe_mingo <philippe_mingo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 31 Jan 2002 14:14:03 +0000 (14:14 +0000)
committerphilippe_mingo <philippe_mingo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 31 Jan 2002 14:14:03 +0000 (14:14 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2320 7612ce4b-ef26-0410-bec9-ea0150e637f0

plugins/administrator/defines.php
plugins/administrator/options.php

index b405a8405e706e565adde795a9b8f870acdca0f0..f61d3769eb57faac05ad237384e03d5af16e512c 100644 (file)
@@ -67,7 +67,8 @@ $defcfg = array( '$config_version' => array( 'name' => _("Config File Version"),
                                                             'posvals' => $language_values ),
                  '$frame_top' => array( 'name' => _("Top Frame"),
                                         'type' => SMOPT_TYPE_STRING,
-                                        'size' => 40 ),
+                                        'size' => 40,
+                                        'default' => '_top' ),
                  /* --------------------------------------------------------*/
                  'Group2' => array( 'name' => _("Server Settings"),
                                     'type' => SMOPT_TYPE_TITLE ),
index 3d045bec5d76969e2e19742d0c459cc1346ee68a..2bab41ceed40e7d387339aa4c7ccfc1b1b4cfbab 100644 (file)
@@ -311,6 +311,10 @@ foreach ( $newcfg as $k => $v ) {
                 $v = '"' . $HTTP_POST_VARS[$e] . '"';
                 $newcfg[$k] = $v;
             }
+            if ( $v == '""' && isset( $defcfg[$k]['default'] ) ) {
+                $v = "'" . $defcfg[$k]['default'] . "'";
+                $newcfg[$k] = $v;
+            }
             echo "<tr><td>$name</td><td>".
                  "<input size=\"$size\" name=\"adm_$n\" value=\"" . substr( $v, 1, strlen( $v ) - 2 ) . "\">";
             if ( isset( $defcfg[$k]['comment'] ) ) {