From 3b325a576325aa869968506ba0668c285df62ca6 Mon Sep 17 00:00:00 2001 From: Kevin Abel <kevin.abel.0@gmail.com> Date: Mon, 8 Sep 2014 13:00:20 -0500 Subject: [PATCH] Update sample config and export script to use $config var --- configsample.inc.php | 5 +++++ scripts/exportCAPAlert.php | 2 +- scripts/exportJSONAlert.php | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/configsample.inc.php b/configsample.inc.php index 7543e7d..2946b28 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 e211999..4abccf1 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 aabc05f..89970ab 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(); -- GitLab