]> git.entuzijast.net Git - freeradius-dialup-admin.git/commitdiff
Also cache the default.vals file.
authorkkalev <kkalev>
Sun, 8 Sep 2002 14:36:58 +0000 (14:36 +0000)
committerkkalev <kkalev>
Sun, 8 Sep 2002 14:36:58 +0000 (14:36 +0000)
Changelog
lib/defaults.php3

index 3457a9ccfcdbe1f8789a76585fd39638e18b4bf0..23407d7c65b16f712b8fef33949f8c1a3baeadc8 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -42,6 +42,7 @@ Ver 1.59:
   shown
 * In lib/sql/defaults.php3 instead of doing a select for each group the user belongs to, do one select with
   a where in () caluse.
+* Also cache the default.vals file.
 Ver 1.55:
 * Update the FAQ about missing attributes from the user/group edit pages and add a few comments
   in the configuration files
index 3d081a67c2dbe38b41aa342bc292b472fe214171..1d2154744bb80a484c054cb98fc81ac443e8f6bc 100644 (file)
@@ -1,11 +1,19 @@
 <?php
-$ARR=file("$config[general_default_file]");
-foreach($ARR as $val) {
-       $val=chop($val);
-       if (ereg('^[[:space:]]*#',$val) || ereg('^[[:space:]]*$',$val))
-               continue;
-       list($key,$v)=split(":[[:space:]]*",$val);
-       $default_vals["$key"][0]="$v";
+if (!isset($text_default_vals)){
+       $ARR=file("$config[general_default_file]");
+       foreach($ARR as $val) {
+               $val=chop($val);
+               if (ereg('^[[:space:]]*#',$val) || ereg('^[[:space:]]*$',$val))
+                       continue;
+               list($key,$v)=split(":[[:space:]]*",$val);
+               $text_default_vals["$key"][0]="$v";
+       }
+       if (!isset($text_default_vals))
+               $text_default_vals["NOT_EXIST"][0] = '0';
+       if ($config[general_use_session] == 'yes')
+               session_register('text_default_vals');
 }
+$default_vals = $text_default_vals;
 if (is_file("../lib/$config[general_lib_type]/defaults.php3"))
         include("../lib/$config[general_lib_type]/defaults.php3");
+?>