From 5fc72d9e513aeae8cd01337132d873d2e6f903b1 Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Wed, 17 Oct 2012 15:28:05 -0400 Subject: [PATCH] add function necessary for saas --- .../application/models/StreamSetting.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/airtime_mvc/application/models/StreamSetting.php b/airtime_mvc/application/models/StreamSetting.php index a5740c70f..cdd7747b7 100644 --- a/airtime_mvc/application/models/StreamSetting.php +++ b/airtime_mvc/application/models/StreamSetting.php @@ -219,6 +219,25 @@ class Application_Model_StreamSetting } } + /* + * Sets indivisual stream setting. + * + * $data - data array. $data is []. + * TODO: Make this SQL a prepared statement! + * + * Do not remove this function. It is called by airtime-system.php + */ + public static function setIndividualStreamSetting($data) + { + $con = Propel::getConnection(); + + foreach ($data as $keyname => $v) { + $sql = "UPDATE cc_stream_setting SET value='$v' WHERE keyname='$keyname'"; + $con->exec($sql); + } + } + + /* * Stores liquidsoap status if $boot_time > save time. * save time is the time that user clicked save on stream setting page