Merge branch '2.5.x' into 2.5.x-installer
Conflicts: airtime_mvc/public/index.php
This commit is contained in:
commit
8c9981a155
|
@ -119,7 +119,7 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
|||
|
||||
$view->headScript()->appendFile($baseUrl.'js/libs/underscore-min.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||
|
||||
$view->headScript()->appendFile($baseUrl.'js/libs/jquery.stickyPanel.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||
// $view->headScript()->appendFile($baseUrl.'js/libs/jquery.stickyPanel.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||
$view->headScript()->appendFile($baseUrl.'js/qtip/jquery.qtip.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||
$view->headScript()->appendFile($baseUrl.'js/jplayer/jquery.jplayer.min.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
$view->headScript()->appendFile($baseUrl.'js/sprintf/sprintf-0.7-beta1.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||
|
|
|
@ -204,10 +204,14 @@ class AudiopreviewController extends Zend_Controller_Action
|
|||
$elementMap['element_mp3'] = $track['item_id'];
|
||||
} elseif (strtolower($mime) === 'audio/ogg') {
|
||||
$elementMap['element_oga'] = $track['item_id'];
|
||||
} elseif (strtolower($mime) === 'audio/vorbis') {
|
||||
$elementMap['element_oga'] = $track['item_id'];
|
||||
} elseif (strtolower($mime) === 'audio/mp4') {
|
||||
$elementMap['element_m4a'] = $track['item_id'];
|
||||
} elseif (strtolower($mime) === 'audio/wav') {
|
||||
$elementMap['element_wav'] = $track['item_id'];
|
||||
} elseif (strtolower($mime) === 'audio/x-wav') {
|
||||
$elementMap['element_wav'] = $track['item_id'];
|
||||
} elseif (strtolower($mime) === 'audio/x-flac') {
|
||||
$elementMap['element_flac'] = $track['item_id'];
|
||||
} else {
|
||||
|
@ -289,10 +293,14 @@ class AudiopreviewController extends Zend_Controller_Action
|
|||
$elementMap['element_mp3'] = $track['item_id'];
|
||||
} elseif (strtolower($mime) === 'audio/ogg') {
|
||||
$elementMap['element_oga'] = $track['item_id'];
|
||||
} elseif (strtolower($mime) === 'audio/vorbis') {
|
||||
$elementMap['element_oga'] = $track['item_id'];
|
||||
} elseif (strtolower($mime) === 'audio/mp4') {
|
||||
$elementMap['element_m4a'] = $track['item_id'];
|
||||
} elseif (strtolower($mime) === 'audio/wav') {
|
||||
$elementMap['element_wav'] = $track['item_id'];
|
||||
} elseif (strtolower($mime) === 'audio/x-wav') {
|
||||
$elementMap['element_wav'] = $track['item_id'];
|
||||
} elseif (strtolower($mime) === 'audio/x-flac') {
|
||||
$elementMap['element_flac'] = $track['item_id'];
|
||||
} else {
|
||||
|
|
|
@ -34,16 +34,13 @@ class PreferenceController extends Zend_Controller_Action
|
|||
$form = new Application_Form_Preferences();
|
||||
$values = array();
|
||||
|
||||
if ($request->isPost()) {
|
||||
$params = $request->getPost();
|
||||
$postData = explode('&', $params['data']);
|
||||
foreach($postData as $k=>$v) {
|
||||
$v = explode('=', $v);
|
||||
$values[$v[0]] = urldecode($v[1]);
|
||||
}
|
||||
if ($form->isValid($values)) {
|
||||
|
||||
if ($request->isPost()) {
|
||||
$values = $request->getPost();
|
||||
if ($form->isValid($values))
|
||||
{
|
||||
Application_Model_Preference::SetHeadTitle($values["stationName"], $this->view);
|
||||
Application_Model_Preference::SetStationDescription($values["stationDescription"]);
|
||||
Application_Model_Preference::SetDefaultCrossfadeDuration($values["stationDefaultCrossfadeDuration"]);
|
||||
Application_Model_Preference::SetDefaultFadeIn($values["stationDefaultFadeIn"]);
|
||||
Application_Model_Preference::SetDefaultFadeOut($values["stationDefaultFadeOut"]);
|
||||
|
@ -52,6 +49,15 @@ class PreferenceController extends Zend_Controller_Action
|
|||
Application_Model_Preference::SetDefaultTimezone($values["timezone"]);
|
||||
Application_Model_Preference::SetWeekStartDay($values["weekStartDay"]);
|
||||
|
||||
$logoUploadElement = $form->getSubForm('preferences_general')->getElement('stationLogo');
|
||||
$logoUploadElement->receive();
|
||||
$imagePath = $logoUploadElement->getFileName();
|
||||
|
||||
// Only update the image logo if the new logo is non-empty
|
||||
if (!is_null($imagePath) && $imagePath != "") {
|
||||
Application_Model_Preference::SetStationLogo($imagePath);
|
||||
}
|
||||
|
||||
Application_Model_Preference::SetEnableSystemEmail($values["enableSystemEmail"]);
|
||||
Application_Model_Preference::SetSystemEmail($values["systemEmail"]);
|
||||
Application_Model_Preference::SetMailServerConfigured($values["configureMailServer"]);
|
||||
|
@ -73,12 +79,14 @@ class PreferenceController extends Zend_Controller_Action
|
|||
|
||||
$this->view->statusMsg = "<div class='success'>". _("Preferences updated.")."</div>";
|
||||
$this->view->form = $form;
|
||||
$this->_helper->json->sendJson(array("valid"=>"true", "html"=>$this->view->render('preference/index.phtml')));
|
||||
//$this->_helper->json->sendJson(array("valid"=>"true", "html"=>$this->view->render('preference/index.phtml')));
|
||||
} else {
|
||||
$this->view->form = $form;
|
||||
$this->_helper->json->sendJson(array("valid"=>"false", "html"=>$this->view->render('preference/index.phtml')));
|
||||
//$this->_helper->json->sendJson(array("valid"=>"false", "html"=>$this->view->render('preference/index.phtml')));
|
||||
}
|
||||
}
|
||||
$this->view->logoImg = Application_Model_Preference::GetStationLogo();
|
||||
|
||||
$this->view->form = $form;
|
||||
}
|
||||
|
||||
|
@ -111,13 +119,9 @@ class PreferenceController extends Zend_Controller_Action
|
|||
Application_Model_Preference::SetSupportFeedback($values["SupportFeedback"]);
|
||||
Application_Model_Preference::SetPublicise($values["Publicise"]);
|
||||
|
||||
$form->Logo->receive();
|
||||
$imagePath = $form->Logo->getFileName();
|
||||
|
||||
Application_Model_Preference::SetStationCountry($values["Country"]);
|
||||
Application_Model_Preference::SetStationCity($values["City"]);
|
||||
Application_Model_Preference::SetStationDescription($values["Description"]);
|
||||
Application_Model_Preference::SetStationLogo($imagePath);
|
||||
if (isset($values["Privacy"])) {
|
||||
Application_Model_Preference::SetPrivacyPolicyCheck($values["Privacy"]);
|
||||
}
|
||||
|
@ -125,10 +129,6 @@ class PreferenceController extends Zend_Controller_Action
|
|||
$this->view->statusMsg = "<div class='success'>"._("Support setting updated.")."</div>";
|
||||
}
|
||||
|
||||
$logo = Application_Model_Preference::GetStationLogo();
|
||||
if ($logo) {
|
||||
$this->view->logoImg = $logo;
|
||||
}
|
||||
$privacyChecked = false;
|
||||
if (Application_Model_Preference::GetPrivacyPolicyCheck() == 1) {
|
||||
$privacyChecked = true;
|
||||
|
@ -151,6 +151,15 @@ class PreferenceController extends Zend_Controller_Action
|
|||
$this->view->form = $watched_dirs_pref;
|
||||
}
|
||||
|
||||
public function removeLogoAction()
|
||||
{
|
||||
$this->view->layout()->disableLayout();
|
||||
// Remove reliance on .phtml files to render requests
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
Application_Model_Preference::SetStationLogo("");
|
||||
}
|
||||
|
||||
public function streamSettingAction()
|
||||
{
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
|
|
|
@ -136,7 +136,6 @@ class ScheduleController extends Zend_Controller_Action
|
|||
$editable = $user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER));
|
||||
|
||||
$calendar_interval = Application_Model_Preference::GetCalendarTimeScale();
|
||||
Logging::info($calendar_interval);
|
||||
if ($calendar_interval == "agendaDay") {
|
||||
list($start, $end) = Application_Model_Show::getStartEndCurrentDayView();
|
||||
} else if ($calendar_interval == "agendaWeek") {
|
||||
|
|
|
@ -283,6 +283,14 @@ class ShowbuilderController extends Zend_Controller_Action
|
|||
$mediaItems = $request->getParam("mediaIds", array());
|
||||
$scheduledItems = $request->getParam("schedIds", array());
|
||||
|
||||
$log_vars = array();
|
||||
$log_vars["url"] = $_SERVER['HTTP_HOST'];
|
||||
$log_vars["action"] = "showbuilder/schedule-add";
|
||||
$log_vars["params"] = array();
|
||||
$log_vars["params"]["media_items"] = $mediaItems;
|
||||
$log_vars["params"]["scheduled_items"] = $scheduledItems;
|
||||
Logging::info($log_vars);
|
||||
|
||||
try {
|
||||
$scheduler = new Application_Model_Scheduler();
|
||||
$scheduler->scheduleAfter($scheduledItems, $mediaItems);
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
<?php
|
||||
|
||||
require_once 'customfilters/ImageSize.php';
|
||||
|
||||
class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
||||
{
|
||||
|
||||
public function init()
|
||||
{
|
||||
$maxLens = Application_Model_Show::getMaxLengths();
|
||||
$this->setEnctype(Zend_Form::ENCTYPE_MULTIPART);
|
||||
|
||||
$notEmptyValidator = Application_Form_Helper_ValidationTypes::overrideNotEmptyValidator();
|
||||
$rangeValidator = Application_Form_Helper_ValidationTypes::overrideBetweenValidator(0, 59.9);
|
||||
|
@ -34,6 +37,25 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
|||
$stationDescription->setAttrib('rows', 4);
|
||||
$this->addElement($stationDescription);
|
||||
|
||||
// Station Logo
|
||||
$stationLogoUpload = new Zend_Form_Element_File('stationLogo');
|
||||
$stationLogoUpload->setLabel(_('Station Logo:'))
|
||||
->setDescription(_("Note: Anything larger than 600x600 will be resized."))
|
||||
->setRequired(false)
|
||||
->addValidator('Count', false, 1)
|
||||
->addValidator('Extension', false, 'jpg,jpeg,png,gif')
|
||||
->setMaxFileSize(1000000)
|
||||
->addFilter('ImageSize');
|
||||
$stationLogoUpload->setAttrib('accept', 'image/*');
|
||||
$this->addElement($stationLogoUpload);
|
||||
|
||||
$stationLogoRemove = new Zend_Form_Element_Button('stationLogoRemove');
|
||||
$stationLogoRemove->setLabel(_('Remove'));
|
||||
$stationLogoRemove->setAttrib('class', 'btn');
|
||||
$stationLogoRemove->setAttrib('id', 'logo-remove-btn');
|
||||
$stationLogoRemove->setAttrib('onclick', 'removeLogo();');
|
||||
$this->addElement($stationLogoRemove);
|
||||
|
||||
//Default station crossfade duration
|
||||
$this->addElement('text', 'stationDefaultCrossfadeDuration', array(
|
||||
'class' => 'input_text',
|
||||
|
|
|
@ -7,9 +7,6 @@ class Application_Form_Preferences extends Zend_Form
|
|||
{
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
|
||||
$this->setMethod('post');
|
||||
|
||||
|
||||
$this->setDecorators(array(
|
||||
array('ViewScript', array('viewScript' => 'form/preferences.phtml'))
|
||||
));
|
||||
|
@ -31,5 +28,12 @@ class Application_Form_Preferences extends Zend_Form
|
|||
$soundcloud_pref = new Application_Form_SoundcloudPreferences();
|
||||
$this->addSubForm($soundcloud_pref, 'preferences_soundcloud');
|
||||
|
||||
$submit = new Zend_Form_Element_Submit('submit');
|
||||
$submit->setLabel(_('Save'));
|
||||
//$submit->removeDecorator('Label');
|
||||
$submit->setAttribs(array('class'=>'btn right-floated'));
|
||||
$submit->removeDecorator('DtDdWrapper');
|
||||
|
||||
$this->addElement($submit);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
|
||||
require_once 'customfilters/ImageSize.php';
|
||||
|
||||
class Application_Form_SupportSettings extends Zend_Form
|
||||
{
|
||||
|
||||
|
@ -96,17 +94,6 @@ class Application_Form_SupportSettings extends Zend_Form
|
|||
->setAttrib('COLS','58');
|
||||
$this->addElement($description);
|
||||
|
||||
// Station Logo
|
||||
$upload = new Zend_Form_Element_File('Logo');
|
||||
$upload->setLabel(_('Station Logo:'))
|
||||
->setRequired(false)
|
||||
->setDecorators(array('File'))
|
||||
->addValidator('Count', false, 1)
|
||||
->addValidator('Extension', false, 'jpg,jpeg,png,gif')
|
||||
->addFilter('ImageSize');
|
||||
$upload->setAttrib('accept', 'image/*');
|
||||
$this->addElement($upload);
|
||||
|
||||
//enable support feedback
|
||||
$this->addElement('checkbox', 'SupportFeedback', array(
|
||||
'label' => _('Send support feedback'),
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<body>
|
||||
|
||||
<?php echo $this->partial('partialviews/trialBox.phtml', array("is_trial"=>$this->isTrial(), "trial_remain"=> $this->trialRemaining())) ?>
|
||||
<div id="Panel">
|
||||
<div id="Panel" class="sticky">
|
||||
<div class="logo"></div>
|
||||
<?php echo $this->versionNotify();
|
||||
$sss = $this->SourceSwitchStatus();
|
||||
|
|
|
@ -38,52 +38,50 @@ class Logging {
|
|||
return $p_msg;
|
||||
}
|
||||
}
|
||||
|
||||
/** @param debugMode Prints the function name, file, and line number. This is slow as it uses debug_backtrace()
|
||||
* so don't use it unless you need it.
|
||||
*/
|
||||
private static function getLinePrefix($debugMode=false)
|
||||
{
|
||||
$linePrefix = "";
|
||||
|
||||
if (array_key_exists('SERVER_NAME', $_SERVER)) {
|
||||
$linePrefix .= $_SERVER['SERVER_NAME'] . " ";
|
||||
}
|
||||
|
||||
if ($debugMode) {
|
||||
//debug_backtrace is SLOW so we don't want this invoke unless there was a real error! (hence $debugMode)
|
||||
$bt = debug_backtrace();
|
||||
$caller = $bt[1];
|
||||
$file = basename($caller['file']);
|
||||
$line = $caller['line'];
|
||||
$function = "Unknown function";
|
||||
if (array_key_exists(2, $bt)) {
|
||||
$function = $bt[2]['function'];
|
||||
}
|
||||
$linePrefix .= "[$file:$line - $function()] - ";
|
||||
}
|
||||
|
||||
return $linePrefix;
|
||||
}
|
||||
|
||||
public static function info($p_msg)
|
||||
{
|
||||
$bt = debug_backtrace();
|
||||
|
||||
$caller = array_shift($bt);
|
||||
$file = basename($caller['file']);
|
||||
$line = $caller['line'];
|
||||
|
||||
$caller = array_shift($bt);
|
||||
$function = $caller['function'];
|
||||
|
||||
$logger = self::getLogger();
|
||||
$logger->info("[$file : $function() : line $line] - ".self::toString($p_msg));
|
||||
$logger->info(self::getLinePrefix() . self::toString($p_msg));
|
||||
}
|
||||
|
||||
public static function warn($p_msg)
|
||||
{
|
||||
$bt = debug_backtrace();
|
||||
|
||||
$caller = array_shift($bt);
|
||||
$file = basename($caller['file']);
|
||||
$line = $caller['line'];
|
||||
|
||||
$caller = array_shift($bt);
|
||||
$function = $caller['function'];
|
||||
|
||||
$logger = self::getLogger();
|
||||
$logger->warn("[$file : $function() : line $line] - "
|
||||
. self::toString($p_msg));
|
||||
$logger->warn(self::getLinePrefix() . self::toString($p_msg));
|
||||
}
|
||||
|
||||
public static function error($p_msg)
|
||||
{
|
||||
$bt = debug_backtrace();
|
||||
|
||||
$caller = array_shift($bt);
|
||||
$file = basename($caller['file']);
|
||||
$line = $caller['line'];
|
||||
|
||||
$caller = array_shift($bt);
|
||||
$function = $caller['function'];
|
||||
|
||||
$logger = self::getLogger();
|
||||
$logger->err("[$file : $function() : line $line] - "
|
||||
. self::toString($p_msg));
|
||||
$logger->err(self::getLinePrefix(true) . self::toString($p_msg));
|
||||
}
|
||||
|
||||
public static function debug($p_msg)
|
||||
|
@ -92,17 +90,8 @@ class Logging {
|
|||
return;
|
||||
}
|
||||
|
||||
$bt = debug_backtrace();
|
||||
|
||||
$caller = array_shift($bt);
|
||||
$file = basename($caller['file']);
|
||||
$line = $caller['line'];
|
||||
|
||||
$caller = array_shift($bt);
|
||||
$function = $caller['function'];
|
||||
|
||||
$logger = self::getLogger();
|
||||
$logger->debug("[$file : $function() : line $line] - ".self::toString($p_msg));
|
||||
$logger->debug(self::getLinePrefix(true) . self::toString($p_msg));
|
||||
}
|
||||
// kind of like debug but for printing arrays more compactly (skipping
|
||||
// empty elements
|
||||
|
@ -134,4 +123,49 @@ class Logging {
|
|||
Propel::setLogger(null);
|
||||
}
|
||||
|
||||
public static function loggingShutdownCallback()
|
||||
{
|
||||
//Catch the types of errors that PHP doesn't normally let us catch and
|
||||
//would otherwise log to the apache log. We route these to our Airtime log to improve the modularity
|
||||
//and reliability of our error logging. (All errors are in one spot!)
|
||||
$err = error_get_last();
|
||||
if (!is_array($err) || !array_key_exists('type', $err)) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch($err['type'])
|
||||
{
|
||||
case E_ERROR:
|
||||
case E_PARSE:
|
||||
case E_CORE_ERROR:
|
||||
case E_CORE_WARNING:
|
||||
case E_COMPILE_ERROR:
|
||||
case E_COMPILE_WARNING:
|
||||
//error_log("Oh noes, a fatal: " . var_export($err, true), 1, 'fatals@example.com');
|
||||
$errorStr = '';
|
||||
if (array_key_exists('message', $err)) {
|
||||
$errorStr .= $err['message'];
|
||||
}
|
||||
if (array_key_exists('file', $err))
|
||||
{
|
||||
$errorStr .= ' at ' .$err['file'];
|
||||
}
|
||||
if (array_key_exists('line', $err))
|
||||
{
|
||||
$errorStr .= ':' . $err['line'];
|
||||
}
|
||||
|
||||
$errorStr .= "\n" . var_export($err, true);
|
||||
Logging::error($errorStr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public static function setupParseErrorLogging()
|
||||
{
|
||||
//Static callback:
|
||||
register_shutdown_function('Logging::loggingShutdownCallback');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1517,24 +1517,27 @@ SQL;
|
|||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// check if file exists
|
||||
$qry->add("file_exists", "true", Criteria::EQUAL);
|
||||
$qry->add("hidden", "false", Criteria::EQUAL);
|
||||
if (isset($storedCrit['sort'])) {
|
||||
$sortTracks = $storedCrit['sort']['value'];
|
||||
}
|
||||
if ($sortTracks == 'newest') {
|
||||
$qry->addDescendingOrderByColumn('utime');
|
||||
}
|
||||
else if ($sortTracks == 'oldest') {
|
||||
$qry->addAscendingOrderByColumn('utime');
|
||||
}
|
||||
else {
|
||||
$qry->addAscendingOrderByColumn('random()');
|
||||
}
|
||||
$sortTracks = 'random';
|
||||
if (isset($storedCrit['sort'])) {
|
||||
$sortTracks = $storedCrit['sort']['value'];
|
||||
}
|
||||
if ($sortTracks == 'newest') {
|
||||
$qry->addDescendingOrderByColumn('utime');
|
||||
}
|
||||
else if ($sortTracks == 'oldest') {
|
||||
$qry->addAscendingOrderByColumn('utime');
|
||||
}
|
||||
else if ($sortTracks == 'random') {
|
||||
$qry->addAscendingOrderByColumn('random()');
|
||||
} else {
|
||||
Logging::warning("Unimplemented sortTracks type in ".__FILE__);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
// construct limit restriction
|
||||
$limits = array();
|
||||
|
||||
|
|
|
@ -37,8 +37,6 @@ class Application_Model_Preference
|
|||
if ($isUserValue && is_null($userId))
|
||||
throw new Exception("User id can't be null for a user preference {$key}.");
|
||||
|
||||
Application_Common_Database::prepareAndExecute("LOCK TABLE cc_pref");
|
||||
|
||||
//Check if key already exists
|
||||
$sql = "SELECT COUNT(*) FROM cc_pref"
|
||||
." WHERE keystr = :key";
|
||||
|
@ -589,13 +587,12 @@ class Application_Model_Preference
|
|||
|
||||
public static function SetStationLogo($imagePath)
|
||||
{
|
||||
if (!empty($imagePath)) {
|
||||
$image = @file_get_contents($imagePath);
|
||||
$image = base64_encode($image);
|
||||
self::setValue("logoImage", $image);
|
||||
} else {
|
||||
Logging::warn("Attempting to set imagePath to empty string");
|
||||
if (empty($imagePath)) {
|
||||
Logging::info("Removed station logo");
|
||||
}
|
||||
$image = @file_get_contents($imagePath);
|
||||
$image = base64_encode($image);
|
||||
self::setValue("logoImage", $image);
|
||||
}
|
||||
|
||||
public static function GetStationLogo()
|
||||
|
|
|
@ -828,7 +828,8 @@ class Application_Model_Scheduler
|
|||
"fade_in = '{$file["fadein"]}', ".
|
||||
"fade_out = '{$file["fadeout"]}', ".
|
||||
"clip_length = '{$file["cliplength"]}', ".
|
||||
"position = {$pos} ".
|
||||
"position = {$pos}, ".
|
||||
"instance_id = {$instanceId} ".
|
||||
"WHERE id = {$sched["id"]}";
|
||||
|
||||
Application_Common_Database::prepareAndExecute(
|
||||
|
|
|
@ -93,6 +93,7 @@ class Application_Model_Webstream implements Application_Model_LibraryEditable
|
|||
$isAdminOrPM = $user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER));
|
||||
|
||||
if (!$isAdminOrPM) {
|
||||
//Make sure the user has ownership of ALL the selected webstreams before
|
||||
$leftOver = self::streamsNotOwnedByUser($p_ids, $p_userId);
|
||||
if (count($leftOver) == 0) {
|
||||
CcWebstreamQuery::create()->findPKs($p_ids)->delete();
|
||||
|
@ -280,13 +281,22 @@ class Application_Model_Webstream implements Application_Model_LibraryEditable
|
|||
private static function getPlsUrl($url)
|
||||
{
|
||||
$content = self::getUrlData($url);
|
||||
$ini = parse_ini_string($content, true);
|
||||
|
||||
if ($ini !== false && isset($ini["playlist"]) && isset($ini["playlist"]["File1"])) {
|
||||
return $ini["playlist"]["File1"];
|
||||
$matches = array();
|
||||
$numStreams = 0; //Number of streams explicitly listed in the PLS.
|
||||
|
||||
if (preg_match("/NumberOfEntries=([0-9]*)/", $content, $matches) !== FALSE) {
|
||||
$numStreams = $matches[1];
|
||||
}
|
||||
|
||||
throw new Exception(_("Could not parse PLS playlist"));
|
||||
//Find all the stream URLs in the playlist
|
||||
if (preg_match_all("/File[0-9]*=(.*)/", $content, $matches) !== FALSE) {
|
||||
//This array contains all the streams! If we need fallback stream URLs in the future,
|
||||
//they're already in this array...
|
||||
return $matches[1][0];
|
||||
} else {
|
||||
throw new Exception(_("Could not parse PLS playlist"));
|
||||
}
|
||||
}
|
||||
|
||||
private static function getM3uUrl($url)
|
||||
|
|
|
@ -402,6 +402,7 @@ class Application_Service_ShowFormService
|
|||
->filterByDbShowId($this->ccShow->getDbId())
|
||||
->filterByDbModifiedInstance(false)
|
||||
->filterByDbStarts(gmdate("Y-m-d H:i:s"), Criteria::GREATER_THAN)
|
||||
->orderByDbStarts()
|
||||
->findOne();
|
||||
|
||||
$starts = new DateTime($ccShowInstance->getDbStarts(), new DateTimeZone("UTC"));
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<form method="<?php echo $this->element->getMethod() ?>" enctype="multipart/form-data">
|
||||
<?php echo $this->element->getElement('csrf') ?>
|
||||
|
||||
<?php echo $this->element->getSubform('preferences_general') ?>
|
||||
|
||||
<h3 class="collapsible-header" id="email-server-heading"><span class="arrow-icon"></span><?php echo _("Email / Mail Server Settings"); ?></h3>
|
||||
<div class="collapsible-content" id="email-server-settings">
|
||||
<?php echo $this->element->getSubform('preferences_email_server') ?>
|
||||
|
@ -12,5 +12,7 @@
|
|||
<div class="collapsible-content" id="soundcloud-settings">
|
||||
<?php echo $this->element->getSubform('preferences_soundcloud') ?>
|
||||
</div>
|
||||
<br>
|
||||
<?php echo $this->element->submit->render() ?>
|
||||
|
||||
</form>
|
||||
|
|
|
@ -5,6 +5,16 @@
|
|||
|
||||
<?php echo $this->element->getElement('stationDescription')->render() ?>
|
||||
|
||||
<?php echo $this->element->getElement('stationLogo')->render() ?>
|
||||
|
||||
<?php echo $this->element->getElement('stationLogoRemove')->render() ?>
|
||||
|
||||
<!-- <button id="logo-remove-btn" value="Remove" class="btn">Remove</button>-->
|
||||
|
||||
<div id="Logo-img-container">
|
||||
<img onError="this.onerror = '';this.style.visibility='hidden';$('#logo-remove-btn').hide();$('[id^=stationLogoRemove]').each(function(i,v){v.style.width=v.style.height=v.style.margin=v.style.padding='0px';});" id="logo-img" onload='resizeImg(this, 450, 450);' src="data:image/png;base64,<?php echo $this->element->getView()->logoImg ?>" />
|
||||
</div>
|
||||
|
||||
<?php echo $this->element->getElement('locale')->render() ?>
|
||||
|
||||
<?php echo $this->element->getElement('timezone')->render() ?>
|
||||
|
|
|
@ -143,26 +143,6 @@
|
|||
</ul>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
<dt id="Logo-label" class="block-display">
|
||||
<label class="optional" for="Description"><?php echo $this->element->getElement('Logo')->getLabel() ?></label>
|
||||
</dt>
|
||||
<dd id="Logo-element" class="block-display clearfix">
|
||||
<?php if($this->element->getView()->logoImg){?>
|
||||
<div id="Logo-img-container"><img id="logo-img" onload='resizeImg(this, 450, 450);' src="data:image/png;base64,<?php echo $this->element->getView()->logoImg ?>" /></div>
|
||||
<?php }?>
|
||||
|
||||
<?php echo $this->element->getElement('Logo') ?>
|
||||
<div class="info-text">
|
||||
<p><?php echo _("Note: Anything larger than 600x600 will be resized.")?></p>
|
||||
</div>
|
||||
<?php if($this->element->getElement('Logo')->hasErrors()) : ?>
|
||||
<ul class='errors'>
|
||||
<?php foreach($this->element->getElement('Logo')->getMessages() as $error): ?>
|
||||
<li><?php echo $error; ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
</dl>
|
||||
<div id="show_what_sending" style="display: block;">
|
||||
<fieldset class="display_field toggle closed">
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
<div class="ui-widget ui-widget-content block-shadow simple-formblock clearfix padded-strong preferences">
|
||||
<h2 style="float:left"><?php echo _("Preferences") ?></h2>
|
||||
<?php $baseUrl = Application_Common_OsPath::getBaseDir(); ?>
|
||||
<form method="post" id="pref_form" enctype="application/x-www-form-urlencoded">
|
||||
|
||||
<button name="pref_save" id="pref_save" type="button" class="btn right-floated"><?php echo _("Save") ?></button>
|
||||
<form method="post" id="pref_form" enctype="multipart/form-data">
|
||||
|
||||
<?php echo $this->form->getElement('submit')->render() ?>
|
||||
<div style="clear:both"></div>
|
||||
|
||||
|
||||
<?php
|
||||
echo $this->statusMsg;
|
||||
echo $this->form;
|
||||
?>
|
||||
<br />
|
||||
<button name="pref_save" id="pref_save" type="button" class="btn right-floated"><?php echo _("Save") ?></button>
|
||||
</form>
|
||||
</div>
|
||||
|
|
Binary file not shown.
|
@ -8,7 +8,7 @@ msgstr ""
|
|||
"Project-Id-Version: Airtime\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2014-11-13 13:55-0500\n"
|
||||
"PO-Revision-Date: 2015-01-15 11:11+0000\n"
|
||||
"PO-Revision-Date: 2015-04-24 17:20+0000\n"
|
||||
"Last-Translator: Daniel James <daniel@64studio.com>\n"
|
||||
"Language-Team: Azerbaijani (http://www.transifex.com/projects/p/airtime/language/az/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
|
|
Binary file not shown.
|
@ -9,7 +9,7 @@ msgstr ""
|
|||
"Project-Id-Version: Airtime\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2014-11-13 13:55-0500\n"
|
||||
"PO-Revision-Date: 2014-11-14 09:58+0000\n"
|
||||
"PO-Revision-Date: 2015-05-07 08:03+0000\n"
|
||||
"Last-Translator: Daniel James <daniel@64studio.com>\n"
|
||||
"Language-Team: Czech (Czech Republic) (http://www.transifex.com/projects/p/airtime/language/cs_CZ/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
|
|
Binary file not shown.
|
@ -10,7 +10,7 @@ msgstr ""
|
|||
"Project-Id-Version: Airtime\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2014-11-13 13:55-0500\n"
|
||||
"PO-Revision-Date: 2015-01-15 11:11+0000\n"
|
||||
"PO-Revision-Date: 2015-04-24 17:20+0000\n"
|
||||
"Last-Translator: Daniel James <daniel@64studio.com>\n"
|
||||
"Language-Team: German (Austria) (http://www.transifex.com/projects/p/airtime/language/de_AT/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
|
|
Binary file not shown.
|
@ -11,7 +11,7 @@ msgstr ""
|
|||
"Project-Id-Version: Airtime\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2014-11-13 13:55-0500\n"
|
||||
"PO-Revision-Date: 2015-01-15 11:11+0000\n"
|
||||
"PO-Revision-Date: 2015-05-07 08:03+0000\n"
|
||||
"Last-Translator: Daniel James <daniel@64studio.com>\n"
|
||||
"Language-Team: English (United Kingdom) (http://www.transifex.com/projects/p/airtime/language/en_GB/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
|
|
Binary file not shown.
|
@ -12,7 +12,7 @@ msgstr ""
|
|||
"Project-Id-Version: Airtime\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2014-11-13 13:55-0500\n"
|
||||
"PO-Revision-Date: 2015-01-19 13:10+0000\n"
|
||||
"PO-Revision-Date: 2015-05-07 08:03+0000\n"
|
||||
"Last-Translator: Zsolt Magyar <picizse@gmail.com>\n"
|
||||
"Language-Team: Hungarian (Hungary) (http://www.transifex.com/projects/p/airtime/language/hu_HU/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
|
|
Binary file not shown.
|
@ -8,7 +8,7 @@ msgstr ""
|
|||
"Project-Id-Version: Airtime\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2014-11-13 13:55-0500\n"
|
||||
"PO-Revision-Date: 2015-01-15 11:11+0000\n"
|
||||
"PO-Revision-Date: 2015-04-24 17:20+0000\n"
|
||||
"Last-Translator: Daniel James <daniel@64studio.com>\n"
|
||||
"Language-Team: Armenian (Armenia) (http://www.transifex.com/projects/p/airtime/language/hy_AM/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
|
|
Binary file not shown.
|
@ -11,7 +11,7 @@ msgstr ""
|
|||
"Project-Id-Version: Airtime\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2014-11-13 13:55-0500\n"
|
||||
"PO-Revision-Date: 2014-11-14 16:45+0000\n"
|
||||
"PO-Revision-Date: 2015-04-22 10:23+0000\n"
|
||||
"Last-Translator: asantoni_sourcefabric <albert.santoni@sourcefabric.org>\n"
|
||||
"Language-Team: Japanese (http://www.transifex.com/projects/p/airtime/language/ja/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
|
|
Binary file not shown.
|
@ -8,7 +8,7 @@ msgstr ""
|
|||
"Project-Id-Version: Airtime\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2014-11-13 13:55-0500\n"
|
||||
"PO-Revision-Date: 2015-01-15 11:11+0000\n"
|
||||
"PO-Revision-Date: 2015-04-24 17:20+0000\n"
|
||||
"Last-Translator: Daniel James <daniel@64studio.com>\n"
|
||||
"Language-Team: Georgian (http://www.transifex.com/projects/p/airtime/language/ka/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
@ -11,7 +11,7 @@ msgstr ""
|
|||
"Project-Id-Version: Airtime\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2014-11-13 13:55-0500\n"
|
||||
"PO-Revision-Date: 2015-01-15 11:11+0000\n"
|
||||
"PO-Revision-Date: 2015-05-07 08:03+0000\n"
|
||||
"Last-Translator: Felipe Thomaz Pedroni\n"
|
||||
"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/airtime/language/pt_BR/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -143,8 +143,22 @@ select {
|
|||
* html .clearfix, * html li { height: 1%;}
|
||||
.clearfix, #side_playlist li { display: block; }
|
||||
|
||||
|
||||
/* Master Panel */
|
||||
|
||||
.sticky {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 2000;
|
||||
border-top: 0;
|
||||
}
|
||||
|
||||
.push {
|
||||
width: 100%;
|
||||
height: 139px;
|
||||
}
|
||||
|
||||
#sticky {
|
||||
position:fixed;
|
||||
height:130px;
|
||||
|
@ -152,7 +166,6 @@ select {
|
|||
left:0;
|
||||
}
|
||||
|
||||
|
||||
#master-panel {
|
||||
background:#3d3d3d url(images/masterpanel_bg.png) repeat-x 0 0;
|
||||
height:100px;
|
||||
|
@ -363,6 +376,8 @@ select {
|
|||
|
||||
|
||||
.wrapper {
|
||||
position: absolute;
|
||||
top: 139px;
|
||||
margin: 0 5px 0 5px;
|
||||
padding:10px 0 0 0;
|
||||
}
|
||||
|
@ -1110,10 +1125,10 @@ input[type="checkbox"] {
|
|||
left:0;
|
||||
margin-bottom:140px;
|
||||
}*/
|
||||
.sticky {
|
||||
padding:0;
|
||||
width:100%;
|
||||
}
|
||||
/*.sticky {*/
|
||||
/*padding:0;*/
|
||||
/*width:100%;*/
|
||||
/*}*/
|
||||
|
||||
.floated-panel {
|
||||
margin-top:0;
|
||||
|
@ -2122,6 +2137,7 @@ span.errors.sp-errors{
|
|||
}
|
||||
.preferences {
|
||||
width: 500px;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
.manage-folders {
|
||||
width: 610px;
|
||||
|
@ -2186,6 +2202,19 @@ dd.radio-inline-list, .preferences dd.radio-inline-list, .stream-config dd.radio
|
|||
height: 120px;
|
||||
}
|
||||
|
||||
.preferences #stationLogoRemove-label {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.preferences #logo-remove-btn {
|
||||
float: right;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.preferences #Logo-img-container {
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
#show_time_info {
|
||||
font-size:12px;
|
||||
height:30px;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
$(document).ready(function() {
|
||||
|
||||
$("#Panel").stickyPanel({
|
||||
topPadding: 1,
|
||||
afterDetachCSSClass: "floated-panel",
|
||||
savePanelSpace: true
|
||||
});
|
||||
|
||||
/* Removed as this is now (hopefully) unnecessary */
|
||||
//$("#Panel").stickyPanel({
|
||||
// topPadding: 1,
|
||||
// afterDetachCSSClass: "floated-panel",
|
||||
// savePanelSpace: true
|
||||
//});
|
||||
|
||||
//this statement tells the browser to fade out any success message after 5 seconds
|
||||
setTimeout(function(){$(".success").fadeOut("slow", function(){$(this).empty()});}, 5000);
|
||||
|
@ -52,8 +52,8 @@ var i18n_days_short = [
|
|||
$.i18n._("We"),
|
||||
$.i18n._("Th"),
|
||||
$.i18n._("Fr"),
|
||||
$.i18n._("Sa"),
|
||||
]
|
||||
$.i18n._("Sa")
|
||||
];
|
||||
|
||||
function adjustDateToServerDate(date, serverTimezoneOffset){
|
||||
//date object stores time in the browser's localtime. We need to artificially shift
|
||||
|
|
|
@ -316,15 +316,24 @@ var AIRTIME = (function(AIRTIME) {
|
|||
};
|
||||
|
||||
mod.fnDeleteItems = function(aMedia) {
|
||||
|
||||
|
||||
//Prevent the user from spamming the delete button while the AJAX request is in progress
|
||||
AIRTIME.button.disableButton("btn-group #sb-trash", false);
|
||||
//Hack to immediately show the "Processing" div in DataTables to give the user some sort of feedback.
|
||||
$(".dataTables_processing").css('visibility','visible');
|
||||
|
||||
$.post(baseUrl+"library/delete",
|
||||
{"format": "json", "media": aMedia},
|
||||
function(json){
|
||||
if (json.message !== undefined) {
|
||||
alert(json.message);
|
||||
}
|
||||
|
||||
chosenItems = {};
|
||||
oTable.fnStandingRedraw();
|
||||
|
||||
//Re-enable the delete button
|
||||
AIRTIME.button.enableButton("btn-group #sb-trash", false);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -96,6 +96,11 @@ function setSoundCloudCheckBoxListener() {
|
|||
});
|
||||
}
|
||||
|
||||
function removeLogo() {
|
||||
$.post(baseUrl+'Preference/remove-logo', function(json){});
|
||||
location.reload();
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$('.collapsible-header').live('click',function() {
|
||||
|
@ -103,7 +108,8 @@ $(document).ready(function() {
|
|||
$(this).toggleClass("closed");
|
||||
return false;
|
||||
}).next().hide();
|
||||
|
||||
|
||||
/* No longer using AJAX for this form. Zend + our code makes it needlessly hard to deal with. -- Albert
|
||||
$('#pref_save').live('click', function() {
|
||||
var data = $('#pref_form').serialize();
|
||||
var url = baseUrl+'Preference/index';
|
||||
|
@ -116,7 +122,7 @@ $(document).ready(function() {
|
|||
setConfigureMailServerListener();
|
||||
setEnableSystemEmailsListener();
|
||||
});
|
||||
});
|
||||
});*/
|
||||
|
||||
showErrorSections();
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ signal.signal(signal.SIGINT, keyboardInterruptHandler)
|
|||
#need to wait for Python 2.7 for this..
|
||||
#logging.captureWarnings(True)
|
||||
|
||||
POLL_INTERVAL = 1800
|
||||
POLL_INTERVAL = 480
|
||||
|
||||
class PypoFetch(Thread):
|
||||
|
||||
|
|
Loading…
Reference in New Issue