diff --git a/configsample.inc.php b/configsample.inc.php index 7543e7d5bb1eaf26af08627cd90d067ddf5f5bb4..2946b283acb5c1eb31505c999c1ab41a60ca7413 100644 --- a/configsample.inc.php +++ b/configsample.inc.php @@ -9,3 +9,8 @@ function autoload($class) spl_autoload_register('autoload'); set_include_path(__DIR__ . '/src' ); + +$config = array( + 'proxyUrl' => 'http://www.getrave.com/rss/unl/channel1', + 'recentTimeframe' => '', +); diff --git a/scripts/exportCAPAlert.php b/scripts/exportCAPAlert.php index e211999f087647dd606ef166043393724f67deba..4abccf149f5d651a5eb9c52226b58249b8109350 100644 --- a/scripts/exportCAPAlert.php +++ b/scripts/exportCAPAlert.php @@ -2,7 +2,7 @@ require_once dirname(__FILE__).'/../config.inc.php'; require_once 'functions.inc.php'; -$output = getCAPData(); +$output = getCAPData($config); file_put_contents(dirname(__FILE__).'/../www/xml/unlcap.xml', $output->toXML('alert', 'urn:oasis:names:tc:emergency:cap:1.2')); include dirname(__FILE__).'/exportJSONAlert.php'; diff --git a/scripts/exportJSONAlert.php b/scripts/exportJSONAlert.php index aabc05fd0c7de6eede49cdf3a6e5423c3539fd45..89970ab43e71d5f47be96088e39cd1ec87f9033d 100644 --- a/scripts/exportJSONAlert.php +++ b/scripts/exportJSONAlert.php @@ -4,12 +4,12 @@ require_once dirname(__FILE__).'/../config.inc.php'; require_once 'functions.inc.php'; if (!isset($output)) { - $output = getCAPData(); + $output = getCAPData($config); } $jsonContents = $output->toJSON('alert'); -$jsonContents = 'unlAlerts.data = ' . $jsonContents . "\n"; +$jsonContents = 'unlAlerts.data = ' . $jsonContents . ";\n"; $jsonContents .= 'try { unlAlerts.server.init();