From 2d11595a33901a7789f54fc22e21ce6180f9f41b Mon Sep 17 00:00:00 2001 From: "paul.baranowski" Date: Thu, 24 Mar 2011 16:44:23 -0400 Subject: [PATCH 01/13] CC-2100 Remove tables that are not in use Removed tables from the schema. --- build/schema.xml | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) diff --git a/build/schema.xml b/build/schema.xml index f00ad14fb..3bd235e09 100644 --- a/build/schema.xml +++ b/build/schema.xml @@ -24,13 +24,6 @@ - - - - - - -
@@ -295,45 +288,4 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
From ab5a6bc1c526930edd020c409eee3a9b3a403185 Mon Sep 17 00:00:00 2001 From: martin Date: Mon, 28 Mar 2011 16:28:23 -0400 Subject: [PATCH 02/13] CC-1990: Widget to display schedule and "Now Playing" on any website -added third requested widget --- plugins/jquery.showinfo.js | 109 +++++++++++++++++++++++++++++++++++-- 1 file changed, 105 insertions(+), 4 deletions(-) diff --git a/plugins/jquery.showinfo.js b/plugins/jquery.showinfo.js index c31381a10..87b5c1ad8 100644 --- a/plugins/jquery.showinfo.js +++ b/plugins/jquery.showinfo.js @@ -6,6 +6,7 @@ sourceDomain: "http://localhost/", //where to get show status from }; var options = $.extend(defaults, options); + options.sourceDomain = addEndingBackslash(options.sourceDomain); return this.each(function() { var obj = $(this); @@ -58,7 +59,7 @@ $.ajax({ url: options.sourceDomain + "api/live-info/", dataType:"jsonp", success:function(data){ processData(data); }, error:function(jqXHR, textStatus, errorThrown){}}); - setTimeout(getServerData, defaults.updatePeriod*1000); + setTimeout(getServerData, options.updatePeriod*1000); } }); }; @@ -71,9 +72,10 @@ var defaults = { updatePeriod: 5, //seconds sourceDomain: "http://localhost/", //where to get show status from - audioStreamSource: "" //where to get audio stream from + audioStreamSource: "http://localhost:8000/airtime.mp3" //where to get audio stream from }; var options = $.extend(defaults, options); + options.sourceDomain = addEndingBackslash(options.sourceDomain); return this.each(function() { var obj = $(this); @@ -106,7 +108,7 @@ } obj.empty(); - obj.append("Listen WADR Live"); + obj.append("Listen WADR Live"); obj.append("

"+showStatus+" >>

"); obj.append("
    " + "
  • Current: "+currentShowName+ @@ -129,12 +131,111 @@ $.ajax({ url: options.sourceDomain + "api/live-info/", dataType:"jsonp", success:function(data){ processData(data); }, error:function(jqXHR, textStatus, errorThrown){}}); - setTimeout(getServerData, defaults.updatePeriod*1000); + setTimeout(getServerData, options.updatePeriod*1000); } }); }; })(jQuery); +(function($){ + $.fn.airtimeWeekSchedule = function(options) { + + var defaults = { + sourceDomain: "http://localhost/", //where to get show status from + updatePeriod: 600, + dowText: {monday:"Monday", tuesday:"Tuesday", wednesday:"Wednesday", thursday:"Thursday", friday:"Friday", saturday:"Saturday", sunday:"Sunday"}, + miscText: {time:"Time", programName:"Program Name", details:"Details", readMore:"Read More"} + }; + var options = $.extend(defaults, options); + options.sourceDomain = addEndingBackslash(options.sourceDomain); + + return this.each(function() { + var obj = $(this); + obj.empty(); + + obj.attr("class", "ui-tabs"); + + var dow = ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"]; + + var html = '
      '; + for (var i=0; i'+options.dowText[dow[i]]+''; + } + html += '
    '; + + for (var i=0; i' + } + obj.append(html); + getServerData(); + + function updateWidget(data){ + for (var i=0; i'+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+options.miscText.time+''+ + ''+options.miscText.programName+''+ + ''+options.miscText.details+''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''; + var daySchedule = data[dow[i]]; + for (var j=0; j'+ + ''+getTime(daySchedule[j].show_starts)+ " - " + getTime(daySchedule[j].show_ends)+''+ + ''+ + '

    '+daySchedule[j].show_name+'

    '+ + ''+ + ''+ + ''+ + ''+ + ''; + } + html += + ''+ + ''; + + $("#"+dow[i]).empty(); + $("#"+dow[i]).append(html); + } + } + + function processData(data){ + updateWidget(data); + } + + function getServerData(){ + $.ajax({ url: options.sourceDomain + "api/week-info/", dataType:"jsonp", success:function(data){ + processData(data); + }, error:function(jqXHR, textStatus, errorThrown){}}); + setTimeout(getServerData, options.updatePeriod*1000); + } + }); + }; +})(jQuery); + +function addEndingBackslash(str){ + if (str.charAt(str.length-1) != '/') + return str+'/'; + else return str; +} + /* ScheduleData class BEGIN */ function ScheduleData(data){ this.data = data; From 2aa0cd22c6d4d546d2cc2347949fdc76080172e8 Mon Sep 17 00:00:00 2001 From: martin Date: Mon, 28 Mar 2011 16:29:50 -0400 Subject: [PATCH 03/13] CC-1990: Widget to display schedule and "Now Playing" on any website -update to API controller to support new widget --- application/controllers/ApiController.php | 18 +++++++++++++++-- application/models/Shows.php | 24 +++++++++++++++++++++++ 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/application/controllers/ApiController.php b/application/controllers/ApiController.php index 1cc2e0303..335ae52e0 100644 --- a/application/controllers/ApiController.php +++ b/application/controllers/ApiController.php @@ -104,8 +104,6 @@ class ApiController extends Zend_Controller_Action } public function liveInfoAction(){ - global $CC_CONFIG; - // disable the view and the layout $this->view->layout()->disableLayout(); $this->_helper->viewRenderer->setNoRender(true); @@ -126,6 +124,22 @@ class ApiController extends Zend_Controller_Action echo $_GET['callback'].'('.json_encode($result).')'; } + public function weekInfoAction(){ + // disable the view and the layout + $this->view->layout()->disableLayout(); + $this->_helper->viewRenderer->setNoRender(true); + + $dow = array("sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"); + + $result = array(); + for ($i=0; $i<7; $i++){ + $result[$dow[$i]] = Show_DAL::GetShowsByDayOfWeek($i); + } + + header("Content-type: text/javascript"); + echo $_GET['callback'].'('.json_encode($result).')'; + } + public function scheduleAction() { global $CC_CONFIG; diff --git a/application/models/Shows.php b/application/models/Shows.php index 8aa83beae..2ba843697 100644 --- a/application/models/Shows.php +++ b/application/models/Shows.php @@ -935,4 +935,28 @@ class Show_DAL { return $CC_DBC->GetAll($sql); } + public static function GetShowsByDayOfWeek($day){ + //DOW FROM TIMESTAMP + //The day of the week (0 - 6; Sunday is 0) (for timestamp values only) + + //SELECT EXTRACT(DOW FROM TIMESTAMP '2001-02-16 20:38:40'); + //Result: 5 + + global $CC_CONFIG, $CC_DBC; + $sql = "SELECT" + ." si.starts as show_starts," + ." si.ends as show_ends," + ." s.name as show_name," + ." s.url as url" + ." FROM $CC_CONFIG[showInstances] si" + ." LEFT JOIN $CC_CONFIG[showTable] s" + ." ON si.show_id = s.id" + ." WHERE EXTRACT(DOW FROM si.starts) = $day" + ." AND EXTRACT(WEEK FROM si.starts) = EXTRACT(WEEK FROM localtimestamp)"; + + //echo $sql; + + return $CC_DBC->GetAll($sql); + } + } From d6c8e8ca3ddafa1ec2f4a6e22b455a7ecbe0d12b Mon Sep 17 00:00:00 2001 From: martin Date: Mon, 28 Mar 2011 18:07:16 -0400 Subject: [PATCH 04/13] CC-2092: When listening to a rebroadcast show, UI is telling me show is empty -Fixed --- application/models/Schedule.php | 25 +++++++++++++++++++++++++ application/models/Shows.php | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/application/models/Schedule.php b/application/models/Schedule.php index d1d556e1f..d2cb8e801 100644 --- a/application/models/Schedule.php +++ b/application/models/Schedule.php @@ -466,6 +466,30 @@ class Schedule { { global $CC_CONFIG, $CC_DBC; + $sql = "SELECT DISTINCT" + ." pt.name," + ." ft.track_title," + ." ft.artist_name," + ." ft.album_title," + ." st.starts," + ." st.ends," + ." st.clip_length," + ." st.media_item_played," + ." st.group_id," + ." show.name as show_name," + ." st.instance_id" + ." FROM $CC_CONFIG[scheduleTable] st" + ." LEFT JOIN $CC_CONFIG[filesTable] ft" + ." ON st.file_id = ft.id" + ." LEFT JOIN $CC_CONFIG[playListTable] pt" + ." ON st.playlist_id = pt.id" + ." LEFT JOIN $CC_CONFIG[showInstances] si" + ." ON st.instance_id = si.id" + ." LEFT JOIN $CC_CONFIG[showTable] show" + ." ON si.show_id = show.id" + ." WHERE st.starts < si.ends"; + +/* $sql = "SELECT DISTINCT pt.name, ft.track_title, ft.artist_name, ft.album_title, st.starts, st.ends, st.clip_length, st.media_item_played, st.group_id, show.name as show_name, st.instance_id" ." FROM $CC_CONFIG[scheduleTable] st, $CC_CONFIG[filesTable] ft, $CC_CONFIG[playListTable] pt, $CC_CONFIG[showInstances] si, $CC_CONFIG[showTable] show" ." WHERE st.playlist_id = pt.id" @@ -473,6 +497,7 @@ class Schedule { ." AND st.instance_id = si.id" ." AND si.show_id = show.id" ." AND st.starts < si.ends"; +*/ if ($timePeriod < 0){ $sql .= " AND st.ends < TIMESTAMP '$timeStamp'" diff --git a/application/models/Shows.php b/application/models/Shows.php index 2ba843697..71273c00d 100644 --- a/application/models/Shows.php +++ b/application/models/Shows.php @@ -930,7 +930,7 @@ class Show_DAL { ." OR (si.starts < TIMESTAMP '$timeNow' + INTERVAL '$end seconds' AND si.ends > TIMESTAMP '$timeNow' + INTERVAL '$end seconds'))" //checking for st.starts IS NULL so that the query also returns shows that do not have any items scheduled. ." AND (st.starts < si.ends OR st.starts IS NULL)" - ." ORDER BY st.starts"; + ." ORDER BY si.starts, st.starts"; return $CC_DBC->GetAll($sql); } From d745201afe2950ccded7f98fb01a94aa0e96ece2 Mon Sep 17 00:00:00 2001 From: martin Date: Mon, 28 Mar 2011 18:23:57 -0400 Subject: [PATCH 05/13] CC-2098: Only push playlists that havent ended yet -re-added ability to specify to/from time ranges --- application/models/Schedule.php | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/application/models/Schedule.php b/application/models/Schedule.php index d2cb8e801..d336546a5 100644 --- a/application/models/Schedule.php +++ b/application/models/Schedule.php @@ -653,17 +653,24 @@ class Schedule { * @param string $p_toDateTime * In the format "YYYY-MM-DD-HH-mm-SS" */ - public static function GetScheduledPlaylists() + public static function GetScheduledPlaylists($p_fromDateTime = null, $p_toDateTime = null) { global $CC_CONFIG, $CC_DBC; - $t1 = new DateTime(); - $range_start = $t1->format("Y-m-d H:i:s"); - - $t2 = new DateTime(); - $t2->add(new DateInterval("PT24H")); - $range_end = $t2->format("Y-m-d H:i:s"); - + if (is_null($p_fromDateTime)) { + $t1 = new DateTime(); + $range_start = $t1->format("Y-m-d H:i:s"); + } else { + $range_start = Schedule::PypoTimeToAirtimeTime($p_fromDateTime); + } + if (is_null($p_fromDateTime)) { + $t2 = new DateTime(); + $t2->add(new DateInterval("PT24H")); + $range_end = $t2->format("Y-m-d H:i:s"); + } else { + $range_end = Schedule::PypoTimeToAirtimeTime($p_toDateTime); + } + // Scheduler wants everything in a playlist $data = Schedule::GetItems($range_start, $range_end, true); $playlists = array(); From 18ef86cee181f92e7c8ca5a3097b3a8470e54670 Mon Sep 17 00:00:00 2001 From: Naomi Date: Tue, 29 Mar 2011 12:24:32 -0400 Subject: [PATCH 06/13] CC-2111 : Show-recorder should automatically NOT record silence a user might want to adjust these sound levels for their own system setup. --- python_apps/show-recorder/testrecordscript.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_apps/show-recorder/testrecordscript.py b/python_apps/show-recorder/testrecordscript.py index c7fb2691d..cb8fa7cf6 100644 --- a/python_apps/show-recorder/testrecordscript.py +++ b/python_apps/show-recorder/testrecordscript.py @@ -61,7 +61,7 @@ class ShowRecorder(Thread): filename = self.filename.replace(" ", "-") filepath = "%s%s.%s" % (config["base_recorded_files"], filename, self.filetype) - command = "ecasound -i alsa -o %s -t:%s" % (filepath, length) + command = "ecasound -i alsa -o %s -t:%s -ge:5,1,0,-1" % (filepath, length) args = command.split(" ") print "starting record" From 37a4d7bce4a86e25ed53e18a5649399d700dde74 Mon Sep 17 00:00:00 2001 From: Naomi Date: Tue, 29 Mar 2011 12:45:22 -0400 Subject: [PATCH 07/13] CC-2111 : Show-recorder should automatically NOT record silence --- python_apps/show-recorder/testrecordscript.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_apps/show-recorder/testrecordscript.py b/python_apps/show-recorder/testrecordscript.py index cb8fa7cf6..a352e1f26 100644 --- a/python_apps/show-recorder/testrecordscript.py +++ b/python_apps/show-recorder/testrecordscript.py @@ -61,7 +61,7 @@ class ShowRecorder(Thread): filename = self.filename.replace(" ", "-") filepath = "%s%s.%s" % (config["base_recorded_files"], filename, self.filetype) - command = "ecasound -i alsa -o %s -t:%s -ge:5,1,0,-1" % (filepath, length) + command = "ecasound -i alsa -o %s -t:%s -ge:3,1,0,-1" % (filepath, length) args = command.split(" ") print "starting record" From 8c522352d7e8afdaac3c588a20f49cfe4cf28252 Mon Sep 17 00:00:00 2001 From: Naomi Date: Tue, 29 Mar 2011 12:47:34 -0400 Subject: [PATCH 08/13] CC-2110 : Soundcloud file metadata adding a users function which will prob be used for metadata... when I see what's needed. --- application/models/Shows.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/application/models/Shows.php b/application/models/Shows.php index 8aa83beae..fc78138e3 100644 --- a/application/models/Shows.php +++ b/application/models/Shows.php @@ -58,6 +58,24 @@ class Show { $show->setDbBackgroundColor($backgroundColor); } + public function getHosts() + { + global $CC_DBC; + + $sql = "SELECT first_name, last_name + FROM cc_show_hosts LEFT JOIN cc_subjs ON cc_show_hosts.subjs_id = cc_subjs.id + WHERE show_id = {$this->_showId}"; + + $hosts = $CC_DBC->GetAll($sql); + + $res = array(); + foreach($hosts as $host) { + $res[] = $host['first_name']." ".$host['last_name']; + } + + return $res; + } + public function cancelShow($day_timestamp) { global $CC_DBC; From bd54738c1b2e2b31039f783890d7e347ee5f7952 Mon Sep 17 00:00:00 2001 From: martin Date: Tue, 29 Mar 2011 12:53:52 -0400 Subject: [PATCH 09/13] CC-2104: Use PIP to install python packages -Done --- install/installInit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/installInit.php b/install/installInit.php index 1efaa4833..7e0ab2323 100644 --- a/install/installInit.php +++ b/install/installInit.php @@ -194,7 +194,7 @@ class AirtimeInstall { public static function SetUpPythonEggs() { //install poster streaming upload - $command = "sudo easy_install poster"; + $command = "pip install poster"; @exec($command); } From 0ad7a0afcdb5cd9ae8cd6d26efc50cf78366230a Mon Sep 17 00:00:00 2001 From: martin Date: Tue, 29 Mar 2011 12:59:15 -0400 Subject: [PATCH 10/13] CC-2104: Use PIP to install python packages -Now uninstalls poster package. --- install/airtime-uninstall.php | 1 + install/installInit.php | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/install/airtime-uninstall.php b/install/airtime-uninstall.php index 5b9a58c3a..40a77b8bc 100644 --- a/install/airtime-uninstall.php +++ b/install/airtime-uninstall.php @@ -21,6 +21,7 @@ require_once(dirname(__FILE__).'/installInit.php'); AirtimeInstall::ExitIfNotRoot(); AirtimeInstall::RemoveSymlinks(); +AirtimeInstall::RemovePythonPackages(); echo "******************************* Uninstall Begin ********************************".PHP_EOL; //------------------------------------------------------------------------ diff --git a/install/installInit.php b/install/installInit.php index 7e0ab2323..bf263bf04 100644 --- a/install/installInit.php +++ b/install/installInit.php @@ -198,6 +198,11 @@ class AirtimeInstall { @exec($command); } + public static function RemovePythonPackages(){ + $command = "pip uninstall poster"; + @exec($command); + } + public static function DeleteFilesRecursive($p_path) { $command = "rm -rf $p_path"; From d66bcea044ebbb83ef20b2e0d9056d53af7fb735 Mon Sep 17 00:00:00 2001 From: martin Date: Tue, 29 Mar 2011 14:09:06 -0400 Subject: [PATCH 11/13] CC-2104: Use PIP to install python packages -removed pip install/uninstall from install scripts. Added to wiki instead. --- install/airtime-install.php | 3 --- install/airtime-uninstall.php | 1 - install/installInit.php | 12 ------------ 3 files changed, 16 deletions(-) diff --git a/install/airtime-install.php b/install/airtime-install.php index 1d350f1e1..a0428878c 100644 --- a/install/airtime-install.php +++ b/install/airtime-install.php @@ -52,9 +52,6 @@ AirtimeInstall::CreateSymlinks($CC_CONFIG["storageDir"]); echo "* Importing Sample Audio Clips".PHP_EOL; system(__DIR__."/../utils/airtime-import --copy ../audio_samples/ > /dev/null"); -echo "* Python eggs Setup".PHP_EOL; -AirtimeInstall::SetUpPythonEggs(); - echo PHP_EOL."*** Pypo Installation ***".PHP_EOL; system("python ".__DIR__."/../python_apps/pypo/install/pypo-install.py"); diff --git a/install/airtime-uninstall.php b/install/airtime-uninstall.php index 40a77b8bc..5b9a58c3a 100644 --- a/install/airtime-uninstall.php +++ b/install/airtime-uninstall.php @@ -21,7 +21,6 @@ require_once(dirname(__FILE__).'/installInit.php'); AirtimeInstall::ExitIfNotRoot(); AirtimeInstall::RemoveSymlinks(); -AirtimeInstall::RemovePythonPackages(); echo "******************************* Uninstall Begin ********************************".PHP_EOL; //------------------------------------------------------------------------ diff --git a/install/installInit.php b/install/installInit.php index bf263bf04..d720daaab 100644 --- a/install/installInit.php +++ b/install/installInit.php @@ -191,18 +191,6 @@ class AirtimeInstall { system($command); } - public static function SetUpPythonEggs() - { - //install poster streaming upload - $command = "pip install poster"; - @exec($command); - } - - public static function RemovePythonPackages(){ - $command = "pip uninstall poster"; - @exec($command); - } - public static function DeleteFilesRecursive($p_path) { $command = "rm -rf $p_path"; From e8b80d1e7bf4deb8b36fb0fcd0154ddccbefae64 Mon Sep 17 00:00:00 2001 From: "paul.baranowski" Date: Tue, 29 Mar 2011 14:10:18 -0400 Subject: [PATCH 12/13] Updated 3rd party software packages info. --- LICENSE_3RD_PARTY | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/LICENSE_3RD_PARTY b/LICENSE_3RD_PARTY index 892af37a1..06dcf9016 100644 --- a/LICENSE_3RD_PARTY +++ b/LICENSE_3RD_PARTY @@ -29,8 +29,19 @@ Linked code: - License: LGPLv3 * Soundcloud php api wrapper - - https://github.com/mptre/php-soundcloud/blob/master/Services/Soundcloud.php + - Web site: https://github.com/mptre/php-soundcloud/blob/master/Services/Soundcloud.php - License: MIT + - Compatible with the GPL: Yes. See http://www.gnu.org/licenses/license-list.html + + * Kombu + - Web site: http://pypi.python.org/pypi/kombu/ + - License: New BSD + - Compatible with GPLv3? Yes. + + * PHP-AMQPLIB + - Web site: https://github.com/tnc/php-amqplib + - License: LGPLv2.1 + - Compatible with GPLv3? Yes ---------------- Non-linked code: From b73e58551ff763a0e36e97972e14888cc57a4121 Mon Sep 17 00:00:00 2001 From: martin Date: Tue, 29 Mar 2011 14:44:51 -0400 Subject: [PATCH 13/13] CC-2128: storageUrlPort in application/configs/conf.php not being used -fixed --- application/configs/conf.php | 37 ------------------------------- application/models/StoredFile.php | 3 ++- 2 files changed, 2 insertions(+), 38 deletions(-) diff --git a/application/configs/conf.php b/application/configs/conf.php index 74c3b10ac..b96db1f1d 100644 --- a/application/configs/conf.php +++ b/application/configs/conf.php @@ -61,38 +61,6 @@ $CC_CONFIG = array( 'zendPath' => dirname(__FILE__).'/../../library/Zend', 'phingPath' => dirname(__FILE__).'/../../library/phing', - // name of admin group - //'AdminsGr' => 'Admins', - - // name of station preferences group -// 'StationPrefsGr'=> 'StationPrefs', - - // name of 'all users' group - //'AllGr' => 'All', - - /* ==================================== application-specific configuration */ -// 'objtypes' => array( -// 'Storage' => array(/*'Folder',*/ 'File' /*, 'Replica'*/), -// 'File' => array(), -// 'audioclip' => array(), -// 'playlist' => array(), -// ), -// 'allowedActions'=> array( -// 'File' => array('editPrivs', 'write', 'read'), -// 'audioclip' => array('editPrivs', 'write', 'read'), -// 'playlist' => array('editPrivs', 'write', 'read'), -// ), -// 'allActions' => array( -// 'editPrivs', 'write', 'read', 'subjects' -// ), - - /* =================================================== cron configuration */ - 'cronUserName' => 'www-data', -# 'lockfile' => dirname(__FILE__).'/cron/cron.lock', - 'lockfile' => dirname(__FILE__).'/stor/buffer/cron.lock', - 'cronfile' => dirname(__FILE__).'/cron/croncall.php', - 'paramdir' => dirname(__FILE__).'/cron/params', -// 'systemPrefId' => "0", // ID for system prefs in prefs table ); // Add database table names @@ -119,11 +87,6 @@ $CC_CONFIG['permSequence'] = $CC_CONFIG['permTable'].'_id'; $CC_CONFIG['subjSequence'] = $CC_CONFIG['subjTable'].'_id'; $CC_CONFIG['smembSequence'] = $CC_CONFIG['smembTable'].'_id'; -// System users/groups - they cannot be deleted -//$CC_CONFIG['sysSubjs'] = array( -// 'root', /*$CC_CONFIG['AdminsGr'],*/ /*$CC_CONFIG['AllGr'],*/ $CC_CONFIG['StationPrefsGr'] -//); - // Add libs to the PHP path $old_include_path = get_include_path(); set_include_path('.'.PATH_SEPARATOR.$CC_CONFIG['pearPath'] diff --git a/application/models/StoredFile.php b/application/models/StoredFile.php index ecff91caa..cd98aff60 100644 --- a/application/models/StoredFile.php +++ b/application/models/StoredFile.php @@ -1481,7 +1481,8 @@ class StoredFile { public function getFileUrl() { global $CC_CONFIG; - return "http://".$CC_CONFIG["storageUrlHost"] + return "http://$CC_CONFIG[storageUrlHost]" + .":$CC_CONFIG[storageUrlPort]" .$CC_CONFIG["apiPath"]."get-media/file/" .$this->gunid.".".$this->getFileExtension(); }