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
<?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");
+?>