Page MenuHomePhabricator

No OneTemporary

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
-<?
+<?php
require("/etc/cdrtool/global.inc");
require("sip_statistics.php");
-$SIPstatistics=new SIPstatistics ();
+$SIPstatistics = new SIPstatistics();
$SIPstatistics->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
-<?
+<?php
require("/etc/cdrtool/global.inc");
require("cdr_generic.php");
// purge old logs of debit balance
$PrepaidHistory = new PrepaidHistory();
$PrepaidHistory->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
-<?
+<?php
require("/etc/cdrtool/global.inc");
require('cdr_generic.php');
require("rating.php");
if (!reloadRatingEngineTables()) {
- die("Error: Cannot connect to network Rating Engine $errstr ($errno). \n");
+ die("Error: Cannot connect to network Rating Engine $errstr ($errno). \n");
} else {
- printf ("Rating tables will be reloaded during next normalization. See syslog for more information. \n",$RatingEngine["socketIP"],$RatingEngine["socketPort"]);
+ printf(
+ "Rating tables will be reloaded during next normalization. See syslog for more information. \n",
+ $RatingEngine["socketIP"],
+ $RatingEngine["socketPort"]
+ );
}
?>
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
-<?
+<?php
require("/etc/cdrtool/global.inc");
require("rating.php");
$RatingTables = new RatingTables();
$RatingTables->splitRatingTable();
?>

File Metadata

Mime Type
text/x-diff
Expires
Sat, Nov 23, 2:16 AM (12 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3408583
Default Alt Text
(3 KB)

Event Timeline