diff --git a/scripts/harvestStatistics.php b/scripts/harvestStatistics.php index 0fee1de..7c9b1f1 100644 --- a/scripts/harvestStatistics.php +++ b/scripts/harvestStatistics.php @@ -1,9 +1,9 @@ #!/usr/bin/php -harvestStatistics(); ?> diff --git a/scripts/purgeTables.php b/scripts/purgeTables.php index d5b818b..927ca5e 100644 --- a/scripts/purgeTables.php +++ b/scripts/purgeTables.php @@ -1,40 +1,40 @@ #!/usr/bin/php -purge(); print "\n"; // purge old CDRs when using a central radius table while (list($k,$v) = each($DATASOURCES)) { if (strlen($v['purgeCDRsAfter'])) { - $class_name=$v["class"]; + $class_name = $v["class"]; - $log=sprintf("Datasource: %s\n",$v['name']); + $log = sprintf("Datasource: %s\n", $v['name']); print $log; - syslog(LOG_NOTICE,$log); + syslog(LOG_NOTICE, $log); unset($CDRS); $CDRS = new $class_name($k); - if ($argv[1] && !preg_match("/^(\d{4})(\d{2})$/",$argv[1],$m)) { - print "Error: Month must be in YYYYMM format\n"; + if ($argv[1] && !preg_match("/^(\d{4})(\d{2})$/", $argv[1], $m)) { + print "Error: Month must be in YYYYMM format\n"; continue; } else { - $endDate=date('Y-m-d', time() - 3600*24*$v['purgeCDRsAfter']); - $log=sprintf("Purge CDRs before %s\n",$endDate); - print $log; - syslog(LOG_NOTICE,$log); + $endDate = date('Y-m-d', time() - 3600 * 24 * $v['purgeCDRsAfter']); + $log = sprintf("Purge CDRs before %s\n", $endDate); + print $log; + syslog(LOG_NOTICE, $log); } $CDRS->purgeTable($argv[1]); print "\n"; } } ?> diff --git a/scripts/reloadRatingTables.php b/scripts/reloadRatingTables.php index 31723bf..2d22f9d 100644 --- a/scripts/reloadRatingTables.php +++ b/scripts/reloadRatingTables.php @@ -1,12 +1,16 @@ #!/usr/bin/php - diff --git a/scripts/splitRatingTables.php b/scripts/splitRatingTables.php index 813cd13..7af984e 100644 --- a/scripts/splitRatingTables.php +++ b/scripts/splitRatingTables.php @@ -1,9 +1,9 @@ #!/usr/bin/php -splitRatingTable(); ?>