Merge branch '2.4.x' into 2.4.x-saas

Conflicts:
	python_apps/pypo/liquidsoap_scripts/ls_script.liq
	utils/phone_home_stat.php
This commit is contained in:
Naomi Aro 2013-06-26 01:25:26 -04:00
commit f2d5fa96da
114 changed files with 9850 additions and 9170 deletions

View file

@ -523,6 +523,15 @@ class ApiController extends Zend_Controller_Action
}
//Updating a metadata change.
else {
//CC-5207 - restart media-monitor causes it to reevaluate all
//files in watched directories, and reset their cue-in/cue-out
//values. Since media-monitor has nothing to do with cue points
//let's unset it here. Note that on mode == "create", we still
//want media-monitor sending info about cue_out which by default
//will be equal to length of track until silan can take over.
unset($md['MDATA_KEY_CUE_IN']);
unset($md['MDATA_KEY_CUE_OUT']);
$file->setMetadata($md);
}
} elseif ($mode == "moved") {

View file

@ -24,7 +24,7 @@ class ErrorController extends Zend_Controller_Action
}
// Log exception, if logger available
if ($log = $this->getLog()) {
if (($log = $this->getLog())) {
$log->crit($this->view->message, $errors->exception);
}

View file

@ -393,7 +393,8 @@ class LibraryController extends Zend_Controller_Action
}
$c[0] = $c['item_id'];
}
$newPl->addAudioClips($contents, null, 'begining');
$newPl->addAudioClips($contents, null, 'before');
$newPl->setCreator(Application_Model_User::getCurrentUser()->getId());
$newPl->setDescription($originalPl->getDescription());
@ -425,6 +426,9 @@ class LibraryController extends Zend_Controller_Action
$request = $this->getRequest();
$file_id = $this->_getParam('id', null);
$file = Application_Model_StoredFile::RecallById($file_id);
@ -437,7 +441,15 @@ class LibraryController extends Zend_Controller_Action
$form->populate($file->getDbColMetadata());
if ($request->isPost()) {
if ($form->isValid($request->getPost())) {
$js = $this->_getParam('data');
$serialized = array();
//need to convert from serialized jQuery array.
foreach ($js as $j) {
$serialized[$j["name"]] = $j["value"];
}
if ($form->isValid($serialized)) {
$formValues = $this->_getParam('data', null);
$formdata = array();

View file

@ -9,36 +9,36 @@ class ListenerstatController extends Zend_Controller_Action
->addActionContext('get-data', 'json')
->initContext();
}
public function indexAction()
{
$CC_CONFIG = Config::getConfig();
$request = $this->getRequest();
$baseUrl = Application_Common_OsPath::getBaseDir();
$this->view->headScript()->appendFile($baseUrl.'js/flot/jquery.flot.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/flot/jquery.flot.crosshair.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/airtime/listenerstat/listenerstat.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$offset = date("Z") * -1;
$this->view->headScript()->appendScript("var serverTimezoneOffset = {$offset}; //in seconds");
$this->view->headScript()->appendFile($baseUrl.'js/timepicker/jquery.ui.timepicker.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/airtime/buttons/buttons.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/airtime/utilities/utilities.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headLink()->appendStylesheet($baseUrl.'css/jquery.ui.timepicker.css?'.$CC_CONFIG['airtime_version']);
//default time is the last 24 hours.
$now = time();
$from = $request->getParam("from", $now - (24*60*60));
$to = $request->getParam("to", $now);
$start = DateTime::createFromFormat("U", $from, new DateTimeZone("UTC"));
$start->setTimezone(new DateTimeZone(date_default_timezone_get()));
$end = DateTime::createFromFormat("U", $to, new DateTimeZone("UTC"));
$end->setTimezone(new DateTimeZone(date_default_timezone_get()));
$form = new Application_Form_DateRange();
$form->populate(array(
'his_date_start' => $start->format("Y-m-d"),
@ -46,7 +46,7 @@ class ListenerstatController extends Zend_Controller_Action
'his_date_end' => $end->format("Y-m-d"),
'his_time_end' => $end->format("H:i")
));
$errorStatus = Application_Model_StreamSetting::GetAllListenerStatErrors();
Logging::info($errorStatus);
$out = array();
@ -57,25 +57,24 @@ class ListenerstatController extends Zend_Controller_Action
}
$out[$key[0]] = $v['value'];
}
$this->view->errorStatus = $out;
$this->view->date_form = $form;
}
public function getDataAction(){
$request = $this->getRequest();
$current_time = time();
$params = $request->getParams();
$starts_epoch = $request->getParam("startTimestamp", $current_time - (60*60*24));
$ends_epoch = $request->getParam("endTimestamp", $current_time);
$mountName = $request->getParam("mountName", null);
$startsDT = DateTime::createFromFormat("U", $starts_epoch, new DateTimeZone("UTC"));
$endsDT = DateTime::createFromFormat("U", $ends_epoch, new DateTimeZone("UTC"));
$data = Application_Model_ListenerStat::getDataPointsWithinRange($startsDT->format("Y-m-d H:i:s"), $endsDT->format("Y-m-d H:i:s"), $mountName);
$this->_helper->json->sendJson($data);
$data = Application_Model_ListenerStat::getDataPointsWithinRange($startsDT->format("Y-m-d H:i:s"), $endsDT->format("Y-m-d H:i:s"));
$this->_helper->json->sendJson($data);
}
}

View file

@ -167,7 +167,7 @@ class LocaleController extends Zend_Controller_Action
"Are you sure you want to remove the watched folder?" => _("Are you sure you want to remove the watched folder?"),
"This path is currently not accessible." => _("This path is currently not accessible."),
//preferences/streamsetting.js
"Some steam types require extra configuration. Details about enabling %sAAC+ Support%s or %sOpus Support%s are provided." => _("Some steam types require extra configuration. Details about enabling %sAAC+ Support%s or %sOpus Support%s are provided."),
"Some stream types require extra configuration. Details about enabling %sAAC+ Support%s or %sOpus Support%s are provided." => _("Some stream types require extra configuration. Details about enabling %sAAC+ Support%s or %sOpus Support%s are provided."),
"Connected to the streaming server" => _("Connected to the streaming server"),
"The stream is disabled" => _("The stream is disabled"),
"Getting information from the server..." => _("Getting information from the server..."),
@ -193,6 +193,7 @@ class LocaleController extends Zend_Controller_Action
"If your live streaming client does not ask for a username, this field should be 'source'." => _("If your live streaming client does not ask for a username, this field should be 'source'."),
"The show instance doesn't exist anymore!" => _("The show instance doesn't exist anymore!"),
"Warning: Shows cannot be re-linked" => _("Warning: Shows cannot be re-linked"),
"By linking your repeating shows any media items scheduled in any repeat show will also get scheduled in the other repeat shows" => _("By linking your repeating shows any media items scheduled in any repeat show will also get scheduled in the other repeat shows"),
//schedule/full-calendar-functions
//already in schedule/add-show.js
//"The show instance doesn't exist anymore!" => _("The show instance doesn't exist anymore!"),

View file

@ -30,6 +30,7 @@ class PreferenceController extends Zend_Controller_Action
$this->view->statusMsg = "";
$form = new Application_Form_Preferences();
$values = array();
if ($request->isPost()) {
$params = $request->getPost();
@ -137,11 +138,12 @@ class PreferenceController extends Zend_Controller_Action
$setting[$t['keyname']] = $t['value'];
}
$name_map = array('ogg' => 'Ogg Vorbis',
'aacplus' => 'AAC+',
$name_map = array(
'ogg' => 'Ogg Vorbis',
'fdkaac' => 'AAC+',
'aac' => 'AAC',
'opus' => 'Opus',
'mp3' => 'MP3'
'mp3' => 'MP3',
);
// get predefined type and bitrate from pref table
@ -162,7 +164,7 @@ class PreferenceController extends Zend_Controller_Action
$stream_bitrates = array();
foreach ($temp_bitrate as $type) {
if (intval($type) <= $max_bitrate) {
$stream_bitrates[trim($type)] = strtoupper(trim($type))." Kbit/s";
$stream_bitrates[trim($type)] = strtoupper(trim($type))." kbit/s";
}
}
@ -193,6 +195,7 @@ class PreferenceController extends Zend_Controller_Action
$s1_data = array();
$s2_data = array();
$s3_data = array();
$values = array();
foreach($postData as $k=>$v) {
$v = explode('=', urldecode($v));
if (strpos($v[0], "s1_data") !== false) {

View file

@ -600,6 +600,7 @@ class ScheduleController extends Zend_Controller_Action
$baseUrl = $this->getRequest()->getBaseUrl();
$url = $file->getRelativeFileUrl($baseUrl).'download/true';
$menu = array();
$menu[] = array('action' => array('type' => 'gourl', 'url' => $url),
'title' => _('Download'));

View file

@ -41,6 +41,7 @@ class UserController extends Zend_Controller_Action
if ($request->isPost()) {
$params = $request->getPost();
$postData = explode('&', $params['data']);
$formData = array();
foreach($postData as $k=>$v) {
$v = explode('=', $v);
$formData[$v[0]] = urldecode($v[1]);