* When checking the weekly limit check first that $remaining is numeric before doing any comparisons
* Add support for regexp and like operators in accounting report generator
* Limit the split() to 2 elements in lib/defaults.php3
* Create a AcctUniqueId before adding a row in radacct in log_badlogins.
+* Use Max-Monthly-Session not Max-Weekly-Session for the monthly limit
+* When checking the weekly limit check first that $remaining is numeric before doing any comparisons
Ver 1.62:
* Remove one sql query from user_admin which was not needed.
* Instead of a query like "LIKE 'YYYY-MM-DD%'" use "AcctStopTime >= 'YYYY-MM-DD 00:00:00 AND AcctStopTime
exit();
}
-$monthly_limit = ($item_vals['Max-Weekly-Session'][0] != '') ? $item_vals['Max-Weekly-Session'][0] : $default_vals['Max-Weekly-Session'][0];
+$monthly_limit = ($item_vals['Max-Monthly-Session'][0] != '') ? $item_vals['Max-Monthly-Session'][0] : $default_vals['Max-Monthly-Session'][0];
$monthly_limit = ($monthly_limit) ? $monthly_limit : $config[counter_default_monthly];
$weekly_limit = ($item_vals['Max-Weekly-Session'][0] != '') ? $item_vals['Max-Weekly-Session'][0] : $default_vals['Max-Weekly-Session'][0];
$weekly_limit = ($weekly_limit) ? $weekly_limit : $config[counter_default_weekly];
$tmp = 0;
$extra_msg .= '(Out of weekly quota)';
}
+ if (!is_numeric($remaining))
+ $remaining = $tmp;
if ($remaining > $tmp)
$remaining = $tmp;
$log_color = ($remaining) ? 'green' : 'red';