* Count online users correctly (through a separate query) in user_finger.
* Use the correct max results variable in lib/*/find.php3
* In time2strclock also show days if applicable
+* In lib/sql/attrmap.php3, only register variables once. Go through $show_attrs and set default attribute
+ mappings for any attribute that a mapping does not exist.
Ver 1.78:
* Add a snmp_clearsession which can disconnect a user by using the Cisco AAA Session MIB
* Add a configuration directive general_sessionclear_bin
$rev_attrmap =$_SESSION['rev_attrmap'];
$attr_type = $_SESSION['attr_type'];
}
-$ARR = file("$config[general_sql_attrmap]");
-foreach($ARR as $val){
- $val=chop($val);
- if (ereg('^[[:space:]]*#',$val) || ereg('^[[:space:]]*$',$val))
- continue;
- list($type,$key,$v)=split('[[:space:]]+',$val);
- $attrmap["$key"]=$v;
- $rev_attrmap["$v"] = $key;
- $attr_type["$key"]=$type;
+else{
+ $ARR = file("$config[general_sql_attrmap]");
+ foreach($ARR as $val){
+ $val=chop($val);
+ if (ereg('^[[:space:]]*#',$val) || ereg('^[[:space:]]*$',$val))
+ continue;
+ list($type,$key,$v)=split('[[:space:]]+',$val);
+ $attrmap["$key"]=$v;
+ $rev_attrmap["$v"] = $key;
+ $attr_type["$key"]=$type;
+ }
+ if (isset($show_attrs)){
+ foreach($show_attrs as $key => $desc){
+ if ($attrmap["$key"] == ''){
+ $attrmap["$key"] = $key;
+ $attr_type["key"] = 'replyItem';
+ $rev_attrmap["$key"] = $key;
+ }
+ }
+ }
if ($config[general_use_session] == 'yes'){
session_register('attrmap');
session_register('rev_attrmap');