Merge branch '2.5.x' into 2.5.x-albertenhancements

This commit is contained in:
Duncan Sommerville 2015-02-24 10:45:52 -05:00
commit 69d588d2f6
53 changed files with 393 additions and 127 deletions

14
CREDITS
View File

@ -2,6 +2,19 @@
CREDITS
=======
Version 2.5.2
Albert Santoni (albert.santoni@sourcefabric.org)
Denise Rigato (denise.rigato@sourcefabric.org)
Cliff Wang (cliff.wang@sourcefabric.org)
Nareg Asmarian (nareg.asmarian@sourcefabric.org)
Daniel James (daniel.james@sourcefabric.org)
Community Contributors:
Robbt E
Version 2.5.1
Albert Santoni (albert.santoni@sourcefabric.org)
@ -25,6 +38,7 @@ Community Contributors:
John Chewter
Version 2.5.0
-------------

View File

@ -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 {

View File

@ -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") {

View File

@ -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);

View File

@ -209,8 +209,12 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
$interval = 'P21D';
} elseif ($formData["add_show_repeat_type"] == 5) {
$interval = 'P28D';
} elseif ($formData["add_show_repeat_type"] == 2) {
} elseif ($formData["add_show_repeat_type"] == 2 && $formData["add_show_monthly_repeat_type"] == 2) {
$interval = 'P1M';
} elseif ($formData["add_show_repeat_type"] == 2 && $formData["add_show_monthly_repeat_type"] == 3) {
list($weekNumberOfMonth, $dayOfWeek) =
Application_Service_ShowService::getMonthlyWeeklyRepeatInterval(
new DateTime($start_time, $showTimezone));
}
/* Check first show
@ -287,12 +291,26 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
$this->getElement('add_show_duration')->setErrors(array(_('Cannot schedule overlapping shows')));
break 1;
} else {
$repeatShowStart->setTimezone($showTimezone);
$repeatShowEnd->setTimezone($showTimezone);
$repeatShowStart->add(new DateInterval($interval));
$repeatShowEnd->add(new DateInterval($interval));
$repeatShowStart->setTimezone($utc);
$repeatShowEnd->setTimezone($utc);
if ($formData["add_show_repeat_type"] == 2 && $formData["add_show_monthly_repeat_type"] == 3) {
$monthlyWeeklyStart = new DateTime($repeatShowStart->format("Y-m"),
new DateTimeZone("UTC"));
$monthlyWeeklyStart->add(new DateInterval("P1M"));
$repeatShowStart = clone Application_Service_ShowService::getNextMonthlyWeeklyRepeatDate(
$monthlyWeeklyStart,
$formData["add_show_timezone"],
$formData['add_show_start_time'],
$weekNumberOfMonth,
$dayOfWeek);
$repeatShowEnd = clone $repeatShowStart;
$repeatShowEnd->add(new DateInterval("PT".$hours."H".$minutes."M"));
} else {
$repeatShowStart->setTimezone($showTimezone);
$repeatShowEnd->setTimezone($showTimezone);
$repeatShowStart->add(new DateInterval($interval));
$repeatShowEnd->add(new DateInterval($interval));
$repeatShowStart->setTimezone($utc);
$repeatShowEnd->setTimezone($utc);
}
}
}
}

View File

@ -29,8 +29,8 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm
$transition_fade = new Zend_Form_Element_Text("transition_fade");
$transition_fade->setLabel(_("Switch Transition Fade (s)"))
->setFilters(array('StringTrim'))
->addValidator('regex', false, array('/^[0-9]{1,2}(\.\d{1,3})?$/',
'messages' => _('enter a time in seconds 0{.000}')))
->addValidator('regex', false, array('/^\d*(\.\d+)?$/',
'messages' => _('Please enter a time in seconds (eg. 0.5)')))
->setValue($defaultFade)
->setDecorators(array('ViewHelper'));
$this->addElement($transition_fade);

View File

@ -4,6 +4,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
private $criteriaOptions;
private $stringCriteriaOptions;
private $numericCriteriaOptions;
private $sortOptions;
private $limitOptions;
/* We need to know if the criteria value will be a string
@ -122,6 +123,17 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
}
return $this->limitOptions;
}
private function getSortOptions()
{
if (!isset($this->sortOptions)) {
$this->sortOptions = array(
"random" => _("random"),
"newest" => _("newest"),
"oldest" => _("oldest")
);
}
return $this->sortOptions;
}
public function init()
@ -288,6 +300,15 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
}
$this->addElement($repeatTracks);
$sort = new Zend_Form_Element_Select('sp_sort_options');
$sort->setAttrib('class', 'sp_input_select')
->setDecorators(array('viewHelper'))
->setMultiOptions($this->getSortOptions());
if (isset($storedCrit["sort"])) {
$sort->setValue($storedCrit["sort"]["value"]);
}
$this->addElement($sort);
$limit = new Zend_Form_Element_Select('sp_limit_options');
$limit->setAttrib('class', 'sp_input_select')
->setDecorators(array('viewHelper'))
@ -344,7 +365,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
public function preValidation($params)
{
$data = Application_Model_Block::organizeSmartPlyalistCriteria($params['data']);
$data = Application_Model_Block::organizeSmartPlaylistCriteria($params['data']);
// add elelments that needs to be added
// set multioption for modifier according to criteria_field
$modRowMap = array();

View File

@ -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');
}
}

View File

@ -1156,7 +1156,7 @@ SQL;
*/
public function saveSmartBlockCriteria($p_criteria)
{
$data = $this->organizeSmartPlyalistCriteria($p_criteria);
$data = $this->organizeSmartPlaylistCriteria($p_criteria);
// saving dynamic/static flag
$blockType = $data['etc']['sp_type'] == 0 ? 'static':'dynamic';
$this->saveType($blockType);
@ -1224,6 +1224,16 @@ SQL;
}
}
// insert sort info
$qry = new CcBlockcriteria();
$qry->setDbCriteria("sort")
->setDbModifier("N/A")
->setDbValue($p_criteriaData['etc']['sp_sort_options'])
->setDbBlockId($this->id)
->save();
// insert limit info
$qry = new CcBlockcriteria();
$qry->setDbCriteria("limit")
@ -1231,7 +1241,8 @@ SQL;
->setDbValue($p_criteriaData['etc']['sp_limit_value'])
->setDbBlockId($this->id)
->save();
// insert repeate track option
$qry = new CcBlockcriteria();
$qry->setDbCriteria("repeat_tracks")
@ -1352,6 +1363,7 @@ SQL;
"isrc_number" => _("ISRC"),
"label" => _("Label"),
"language" => _("Language"),
"utime" => _("Upload Time"),
"mtime" => _("Last Modified"),
"lptime" => _("Last Played"),
"length" => _("Length"),
@ -1399,6 +1411,8 @@ SQL;
"display_modifier"=>_($modifier));
} else if($criteria == "repeat_tracks") {
$storedCrit["repeat_tracks"] = array("value"=>$value);
} else if($criteria == "sort") {
$storedCrit["sort"] = array("value"=>$value);
} else {
$storedCrit["crit"][$criteria][] = array(
"criteria"=>$criteria,
@ -1503,11 +1517,26 @@ SQL;
$i++;
}
}
// check if file exists
$qry->add("file_exists", "true", Criteria::EQUAL);
$qry->add("hidden", "false", Criteria::EQUAL);
$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();
@ -1537,9 +1566,8 @@ SQL;
Logging::info($e);
}
}
public static function organizeSmartPlyalistCriteria($p_criteria)
{
public static function organizeSmartPlaylistCriteria($p_criteria)
{
$fieldNames = array('sp_criteria_field', 'sp_criteria_modifier', 'sp_criteria_value', 'sp_criteria_extra');
$output = array();
foreach ($p_criteria as $ele) {

View File

@ -88,11 +88,19 @@ class Application_Model_Webstream implements Application_Model_LibraryEditable
public static function deleteStreams($p_ids, $p_userId)
{
$leftOver = self::streamsNotOwnedByUser($p_ids, $p_userId);
if (count($leftOver) == 0) {
CcWebstreamQuery::create()->findPKs($p_ids)->delete();
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
$user = new Application_Model_User($userInfo->id);
$isAdminOrPM = $user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER));
if (!$isAdminOrPM) {
$leftOver = self::streamsNotOwnedByUser($p_ids, $p_userId);
if (count($leftOver) == 0) {
CcWebstreamQuery::create()->findPKs($p_ids)->delete();
} else {
throw new WebstreamNoPermissionException;
}
} else {
throw new WebstreamNoPermissionException;
CcWebstreamQuery::create()->findPKs($p_ids)->delete();
}
}

View File

@ -1109,7 +1109,7 @@ SQL;
$start = $this->getNextRepeatingPopulateStartDateTime($showDay);
if (is_null($repeatInterval)&& $repeatType == REPEAT_MONTHLY_WEEKLY) {
$repeatInterval = $this->getMonthlyWeeklyRepeatInterval($start, $timezone);
$repeatInterval = self::getMonthlyWeeklyRepeatInterval($start, $timezone);
}
//DatePeriod in user's local time
@ -1212,7 +1212,7 @@ SQL;
// We will only need this if the repeat type is MONTHLY_WEEKLY
list($weekNumberOfMonth, $dayOfWeek) =
$this->getMonthlyWeeklyRepeatInterval(
self::getMonthlyWeeklyRepeatInterval(
new DateTime($first_show, new DateTimeZone($timezone)));
$this->repeatType = $showDay->getDbRepeatType();
@ -1272,7 +1272,7 @@ SQL;
$monthlyWeeklyStart = new DateTime($utcStartDateTime->format("Y-m"),
new DateTimeZone("UTC"));
$monthlyWeeklyStart->add(new DateInterval("P1M"));
$start = $this->getNextMonthlyWeeklyRepeatDate(
$start = self::getNextMonthlyWeeklyRepeatDate(
$monthlyWeeklyStart,
$timezone,
$showDay->getDbStartTime(),
@ -1294,7 +1294,7 @@ SQL;
* @param string $showStart
* @param string $timezone user's local timezone
*/
private function getMonthlyWeeklyRepeatInterval($showStart)
public static function getMonthlyWeeklyRepeatInterval($showStart)
{
$start = clone $showStart;
$dayOfMonth = $start->format("j");
@ -1369,7 +1369,7 @@ SQL;
* @param string (i.e. 'first', 'second') $weekNumberOfMonth
* @param string (i.e. 'Monday') $dayOfWeek
*/
private function getNextMonthlyWeeklyRepeatDate(
public static function getNextMonthlyWeeklyRepeatDate(
$start,
$timezone,
$startTime,

View File

@ -95,7 +95,18 @@
<?php endif; ?>
<br />
</dd>
<dd id='sp_sort-element'>
<span class='sp_text_font'>Sort tracks by</span>
<?php echo $this->element->getElement('sp_sort_options') ?>
<?php if($this->element->getElement("sp_sort_options")->hasErrors()) : ?>
<?php foreach($this->element->getElement("sp_sort_options")->getMessages() as $error): ?>
<span class='errors sp-errors'>
<?php echo $error; ?>
</span>
<?php endforeach; ?>
<?php endif; ?>
<br />
</dd>
<dd id='sp_limit-element'>
<span class='sp_text_font'><?php echo $this->element->getElement('sp_limit_value')->getLabel() ?></span>
<?php echo $this->element->getElement('sp_limit_value')?>

View File

@ -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-02-07 10:31+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"

View File

@ -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-02-07 10:31+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"

View File

@ -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-02-07 10:31+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"

View File

@ -6,13 +6,14 @@
# Zsolt Magyar <picizse@gmail.com>, 2014
# Zsolt Magyar <picizse@gmail.com>, 2014
# Sourcefabric <contact@sourcefabric.org>, 2012
# Zsolt Magyar <picizse@gmail.com>, 2015
msgid ""
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"
"Last-Translator: Daniel James <daniel@64studio.com>\n"
"PO-Revision-Date: 2015-01-19 13:10+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"
"Content-Type: text/plain; charset=UTF-8\n"
@ -80,7 +81,7 @@ msgstr "Leúsztatás"
msgid ""
"%1$s copyright &copy; %2$s All rights reserved.%3$sMaintained and "
"distributed under the %4$s by %5$s"
msgstr ""
msgstr "%1$s szerzői & másolási jog; %2$s Minden jog fenntartva.%3$sFejleszti és forgalmazza %4$s alatt a %5$s"
#: airtime_mvc/application/layouts/scripts/livestream.phtml:9
#: airtime_mvc/application/views/scripts/dashboard/stream-player.phtml:2
@ -1097,13 +1098,13 @@ msgstr "Támogatási Visszajelzés Küldése"
#: airtime_mvc/application/forms/RegisterAirtime.php:126
#, php-format
msgid "Promote my station on %s"
msgstr ""
msgstr "Az állomásom közzététele a %s-on"
#: airtime_mvc/application/forms/SupportSettings.php:150
#: airtime_mvc/application/forms/RegisterAirtime.php:151
#, php-format
msgid "By checking this box, I agree to %s's %sprivacy policy%s."
msgstr ""
msgstr "A mező bejelölésével, elfogadom a %s %sadatvédelmi irányelveit%s."
#: airtime_mvc/application/forms/SupportSettings.php:174
#: airtime_mvc/application/forms/RegisterAirtime.php:169
@ -1142,7 +1143,7 @@ msgstr "Újraközvetítés?"
#: airtime_mvc/application/forms/AddShowLiveStream.php:10
#, php-format
msgid "Use %s Authentication:"
msgstr ""
msgstr "%s Hitelesítés Használata:"
#: airtime_mvc/application/forms/AddShowLiveStream.php:16
msgid "Use Custom Authentication:"
@ -2614,7 +2615,7 @@ msgstr "Az Ön számára nem érhető el az alábbi erőforrás."
#: airtime_mvc/application/controllers/ApiController.php:803
#, php-format
msgid "File does not exist in %s"
msgstr ""
msgstr "A fájl nem elérhető itt: %s"
#: airtime_mvc/application/controllers/ApiController.php:854
msgid "Bad request. no 'mode' parameter passed."
@ -2825,7 +2826,7 @@ msgstr "Memória"
#: airtime_mvc/application/views/scripts/systemstatus/index.phtml:14
#, php-format
msgid "%s Version"
msgstr ""
msgstr "%s Verzió"
#: airtime_mvc/application/views/scripts/systemstatus/index.phtml:30
msgid "Disk Space"
@ -2910,13 +2911,13 @@ msgid ""
" collected regularly in order to enhance your user experience.%2$sClick "
"'Yes, help %1$s' and we'll make sure the features you use are constantly "
"improving."
msgstr ""
msgstr "Segítsen az %1$s fejlesztésében, tudassa velünk az ötleteit. Az információk gyűjtése fokozza a felhasználás élményét.%2$sKlikk 'Igen, segítek az %1$s-nak' fejlesztésében, és igyekszek folyamatosan a funkciók használatának javításain fáradozni. "
#: airtime_mvc/application/views/scripts/form/register-dialog.phtml:29
#: airtime_mvc/application/views/scripts/form/support-setting.phtml:29
#, php-format
msgid "Click the box below to promote your station on %s."
msgstr ""
msgstr "Jelöld be a mezőt az állomásod közzétételéhez a %s-on."
#: airtime_mvc/application/views/scripts/form/register-dialog.phtml:67
#: airtime_mvc/application/views/scripts/form/register-dialog.phtml:81
@ -2962,7 +2963,7 @@ msgstr "Jelenlegi Tároló Mappa:"
msgid ""
"Rescan watched directory (This is useful if it is network mount and may be "
"out of sync with %s)"
msgstr ""
msgstr "A figyelt mappa újraellenőrzése (Ez akkor hasznos, ha a hálózati csatolás nincs szinkronban az %s-al)"
#: airtime_mvc/application/views/scripts/form/preferences_watched_dirs.phtml:44
msgid "Remove watched directory"
@ -3017,7 +3018,7 @@ msgid ""
"will be collected regularly in order to enhance your user experience.%sClick"
" the 'Send support feedback' box and we'll make sure the features you use "
"are constantly improving."
msgstr ""
msgstr "Segítse az %s fejlesztését azáltal, hogy a %s tudja, hogy Ön, hogyan használja azt. Információk összegyűjtése céljából, rendszerezve azokat, hogy fokozza a felhasználás élményét.%sKlikkeljen a 'Támogatási Visszajelzés Küldése' mezőbe és győződjön meg arról, hogy a funkciók használatának minősége folyamatosan javul."
#: airtime_mvc/application/views/scripts/form/support-setting.phtml:46
msgid ""
@ -3280,12 +3281,12 @@ msgstr "Hallgatói Statisztika"
#: airtime_mvc/application/views/scripts/dashboard/help.phtml:3
#, php-format
msgid "Welcome to %s!"
msgstr ""
msgstr "Üdvözöljük az %s-nál!"
#: airtime_mvc/application/views/scripts/dashboard/help.phtml:4
#, php-format
msgid "Here's how you can get started using %s to automate your broadcasts: "
msgstr ""
msgstr "Itt van, hogyan tudod elindítani adásaid automatizálását használva az %s-t:"
#: airtime_mvc/application/views/scripts/dashboard/help.phtml:7
msgid ""
@ -3334,12 +3335,12 @@ msgstr "Adásfolyam:"
msgid ""
"%1$s %2$s, the open radio software for scheduling and remote station "
"management."
msgstr ""
msgstr "%1$s %2$s, a nyitott rádiós szoftver, az ütemezett és távoli állomás menedzsment."
#: airtime_mvc/application/views/scripts/dashboard/about.phtml:22
#, php-format
msgid "%1$s %2$s is distributed under the %3$s"
msgstr ""
msgstr "%1$s %2$s-ot %3$s mellett terjesztik"
#: airtime_mvc/application/views/scripts/login/password-change.phtml:3
msgid "New password"
@ -3372,7 +3373,7 @@ msgstr "Vissza a belépéshez"
msgid ""
"Welcome to the %s demo! You can log in using the username 'admin' and the "
"password 'admin'."
msgstr ""
msgstr "Üdvözöljük az %s demó változatában! Jelentkezzen be 'admin' felhasználónévvel és 'admin' jelszóval."
#: airtime_mvc/application/views/scripts/partialviews/header.phtml:3
msgid "Previous:"
@ -3417,7 +3418,7 @@ msgstr "Az Ön próba ideje lejár"
#: airtime_mvc/application/views/scripts/partialviews/trialBox.phtml:9
#, php-format
msgid "Purchase your copy of %s"
msgstr ""
msgstr "Vásárolja meg az Ön %s másolatát"
#: airtime_mvc/application/views/scripts/partialviews/trialBox.phtml:9
msgid "My Account"
@ -3733,7 +3734,7 @@ msgstr "A kapcsolódó műsorok tartalmait bármelyik adás előtt vagy után ke
#: airtime_mvc/application/models/Scheduler.php:195
msgid "Cannot schedule a playlist that contains missing files."
msgstr ""
msgstr "Nem lehet ütemezni olyan lejátszási listát, amely tartalmaz hiányzó fájlokat."
#: airtime_mvc/application/models/Scheduler.php:216
#: airtime_mvc/application/models/Scheduler.php:305
@ -3808,7 +3809,7 @@ msgstr "Üdv. %s, \n\nErre a hivatkozásra kattintva visszaállíthatja a jelsza
#: airtime_mvc/application/models/Auth.php:36
#, php-format
msgid "%s Password Reset"
msgstr ""
msgstr "%s Jelszó Visszaállítás"
#: airtime_mvc/application/services/CalendarService.php:50
msgid "Record file doesn't exist"

View File

@ -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-02-07 10:31+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"

View File

@ -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-02-07 10:31+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"

View File

@ -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-02-07 10:31+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"

View File

@ -10,6 +10,7 @@ body {
}
html, body {
height: 100%;
background: #7f7f7f;
}
#login-page {

View File

@ -63,6 +63,7 @@ $application = new Zend_Application(
require_once (APPLICATION_PATH."/logging/Logging.php");
Logging::setLogPath('/var/log/airtime/zendphp.log');
Logging::setupParseErrorLogging();
// Create application, bootstrap, and run
try {
@ -74,15 +75,19 @@ try {
$application->bootstrap()->run();
}
} catch (Exception $e) {
echo $e->getMessage();
echo "<pre>";
echo $e->getTraceAsString();
echo "</pre>";
Logging::info($e->getMessage());
header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error', true, 500);
Logging::error($e->getMessage());
if (VERBOSE_STACK_TRACE) {
Logging::info($e->getTraceAsString());
echo $e->getMessage();
echo "<pre>";
echo $e->getTraceAsString();
echo "</pre>";
Logging::error($e->getTraceAsString());
} else {
Logging::info($e->getTrace());
Logging::error($e->getTrace());
}
throw $e;
}

View File

@ -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);
});
};

View File

@ -1059,7 +1059,10 @@ var AIRTIME = (function(AIRTIME){
"<i class='icon-white icon-ban-circle'></i></button></div>");
}
$toolbar.append($menu);
if (localStorage.getItem('user-type') != 'G') {
$toolbar.append($menu);
}
$menu = undefined;
$('#timeline-sa').click(function(){mod.selectAll();});

View File

@ -14,6 +14,7 @@
<column>live_stream_pass</column>
<column>linked</column>
<column>is_linkable</column>
<column>image_path</column>
<row>
<value>1</value>
<value>test show</value>
@ -28,6 +29,7 @@
<null />
<value></value>
<value>1</value>
<value></value>
</row>
</table>
@ -338,4 +340,4 @@
<table name="cc_show_hosts">
</table>
</dataset>
</dataset>

View File

@ -14,6 +14,7 @@
<column>live_stream_pass</column>
<column>linked</column>
<column>is_linkable</column>
<column>image_path</column>
<row>
<value>1</value>
<value>test show</value>
@ -28,6 +29,7 @@
<null />
<value></value>
<value>1</value>
<value></value>
</row>
</table>
</dataset>
</dataset>

View File

@ -14,6 +14,7 @@
<column>live_stream_pass</column>
<column>linked</column>
<column>is_linkable</column>
<column>image_path</column>
<row>
<value>1</value>
<value>test show</value>
@ -28,6 +29,7 @@
<null />
<value>1</value>
<value>1</value>
<value></value>
</row>
</table>
@ -134,4 +136,4 @@
<value>1</value>
</row>
</table>
</dataset>
</dataset>

View File

@ -14,6 +14,7 @@
<column>live_stream_pass</column>
<column>linked</column>
<column>is_linkable</column>
<column>image_path</column>
<row>
<value>1</value>
<value>test show</value>
@ -28,6 +29,7 @@
<null />
<value></value>
<value>1</value>
<value></value>
</row>
</table>
@ -104,4 +106,4 @@
<table name="cc_show_hosts">
</table>
</dataset>
</dataset>

View File

@ -14,6 +14,7 @@
<column>live_stream_pass</column>
<column>linked</column>
<column>is_linkable</column>
<column>image_path</column>
<row>
<value>1</value>
<value>test show</value>
@ -28,6 +29,7 @@
<null />
<value>1</value>
<value>1</value>
<value></value>
</row>
</table>
@ -134,4 +136,4 @@
<table name="cc_show_hosts">
</table>
</dataset>
</dataset>

View File

@ -14,6 +14,7 @@
<column>live_stream_pass</column>
<column>linked</column>
<column>is_linkable</column>
<column>image_path</column>
<row>
<value>1</value>
<value>test show</value>
@ -28,6 +29,7 @@
<null />
<value></value>
<value>1</value>
<value></value>
</row>
</table>
@ -94,4 +96,4 @@
<table name="cc_show_hosts">
</table>
</dataset>
</dataset>

View File

@ -14,6 +14,7 @@
<column>live_stream_pass</column>
<column>linked</column>
<column>is_linkable</column>
<column>image_path</column>
<row>
<value>1</value>
<value>test show</value>
@ -28,6 +29,7 @@
<null />
<value></value>
<value>1</value>
<value></value>
</row>
</table>
@ -94,4 +96,4 @@
<table name="cc_show_hosts">
</table>
</dataset>
</dataset>

View File

@ -14,6 +14,7 @@
<column>live_stream_pass</column>
<column>linked</column>
<column>is_linkable</column>
<column>image_path</column>
<row>
<value>1</value>
<value>test show</value>
@ -28,6 +29,7 @@
<null />
<value></value>
<value>1</value>
<value></value>
</row>
</table>
@ -84,4 +86,4 @@
<table name="cc_show_hosts">
</table>
</dataset>
</dataset>

View File

@ -14,6 +14,7 @@
<column>live_stream_pass</column>
<column>linked</column>
<column>is_linkable</column>
<column>image_path</column>
<row>
<value>1</value>
<value>test show</value>
@ -28,6 +29,7 @@
<null />
<value></value>
<value>1</value>
<value></value>
</row>
</table>
@ -248,4 +250,4 @@
<table name="cc_show_hosts">
</table>
</dataset>
</dataset>

View File

@ -14,6 +14,7 @@
<column>live_stream_pass</column>
<column>linked</column>
<column>is_linkable</column>
<column>image_path</column>
<row>
<value>1</value>
<value>test show</value>
@ -28,6 +29,7 @@
<null />
<value></value>
<value>1</value>
<value></value>
</row>
</table>
@ -94,4 +96,4 @@
<table name="cc_show_hosts">
</table>
</dataset>
</dataset>

View File

@ -14,6 +14,7 @@
<column>live_stream_pass</column>
<column>linked</column>
<column>is_linkable</column>
<column>image_path</column>
<row>
<value>1</value>
<value>test show</value>
@ -28,6 +29,7 @@
<null />
<value></value>
<value>1</value>
<value></value>
</row>
</table>
@ -94,4 +96,4 @@
<table name="cc_show_hosts">
</table>
</dataset>
</dataset>

View File

@ -14,6 +14,7 @@
<column>live_stream_pass</column>
<column>linked</column>
<column>is_linkable</column>
<column>image_path</column>
<row>
<value>1</value>
<value>test show</value>
@ -28,6 +29,7 @@
<null />
<value></value>
<value>1</value>
<value></value>
</row>
</table>
@ -134,4 +136,4 @@
<table name="cc_show_hosts">
</table>
</dataset>
</dataset>

View File

@ -14,6 +14,7 @@
<column>live_stream_pass</column>
<column>linked</column>
<column>is_linkable</column>
<column>image_path</column>
<row>
<value>1</value>
<value>test show</value>
@ -28,6 +29,7 @@
<null />
<value></value>
<value>1</value>
<value></value>
</row>
</table>
@ -270,4 +272,4 @@
<table name="cc_show_hosts">
</table>
</dataset>
</dataset>

View File

@ -14,6 +14,7 @@
<column>live_stream_pass</column>
<column>linked</column>
<column>is_linkable</column>
<column>image_path</column>
<row>
<value>1</value>
<value>test show</value>
@ -28,6 +29,7 @@
<null />
<value></value>
<value>1</value>
<value></value>
</row>
</table>
@ -134,4 +136,4 @@
<table name="cc_show_hosts">
</table>
</dataset>
</dataset>

View File

@ -14,6 +14,7 @@
<column>live_stream_pass</column>
<column>linked</column>
<column>is_linkable</column>
<column>image_path</column>
<row>
<value>1</value>
<value>test show</value>
@ -28,6 +29,7 @@
<null />
<value></value>
<value>1</value>
<value></value>
</row>
</table>
@ -260,4 +262,4 @@
<table name="cc_show_hosts">
</table>
</dataset>
</dataset>

View File

@ -14,6 +14,7 @@
<column>live_stream_pass</column>
<column>linked</column>
<column>is_linkable</column>
<column>image_path</column>
<row>
<value>1</value>
<value>test show</value>
@ -28,6 +29,7 @@
<null />
<value></value>
<value>1</value>
<value></value>
</row>
</table>
@ -94,4 +96,4 @@
<table name="cc_show_hosts">
</table>
</dataset>
</dataset>

View File

@ -14,6 +14,7 @@
<column>live_stream_pass</column>
<column>linked</column>
<column>is_linkable</column>
<column>image_path</column>
<row>
<value>1</value>
<value>test show</value>
@ -28,6 +29,7 @@
<null />
<value></value>
<value>1</value>
<value></value>
</row>
</table>
@ -157,4 +159,4 @@
<table name="cc_show_hosts">
</table>
</dataset>
</dataset>

View File

@ -14,6 +14,7 @@
<column>live_stream_pass</column>
<column>linked</column>
<column>is_linkable</column>
<column>image_path</column>
<row>
<value>1</value>
<value>test show</value>
@ -28,6 +29,7 @@
<null />
<value>1</value>
<value>1</value>
<value></value>
</row>
</table>
@ -134,4 +136,4 @@
<value>1</value>
</row>
</table>
</dataset>
</dataset>

View File

@ -14,6 +14,7 @@
<column>live_stream_pass</column>
<column>linked</column>
<column>is_linkable</column>
<column>image_path</column>
<row>
<value>1</value>
<value>test show</value>
@ -28,6 +29,7 @@
<null />
<value></value>
<value>1</value>
<value></value>
</row>
</table>
@ -134,4 +136,4 @@
<table name="cc_show_hosts">
</table>
</dataset>
</dataset>

View File

@ -14,6 +14,7 @@
<column>live_stream_pass</column>
<column>linked</column>
<column>is_linkable</column>
<column>image_path</column>
<row>
<value>1</value>
<value>test show</value>
@ -28,6 +29,7 @@
<null />
<value></value>
<value></value>
<value></value>
</row>
</table>
@ -134,4 +136,4 @@
<table name="cc_show_hosts">
</table>
</dataset>
</dataset>

View File

@ -14,6 +14,7 @@
<column>live_stream_pass</column>
<column>linked</column>
<column>is_linkable</column>
<column>image_path</column>
<row>
<value>1</value>
<value>test show</value>
@ -28,6 +29,7 @@
<null />
<value></value>
<value>1</value>
<value></value>
</row>
</table>
@ -104,4 +106,4 @@
<table name="cc_show_hosts">
</table>
</dataset>
</dataset>

View File

@ -14,6 +14,7 @@
<column>live_stream_pass</column>
<column>linked</column>
<column>is_linkable</column>
<column>image_path</column>
<row>
<value>1</value>
<value>test show</value>
@ -28,6 +29,7 @@
<null />
<value></value>
<value>1</value>
<value></value>
</row>
</table>
@ -84,4 +86,4 @@
<table name="cc_show_hosts">
</table>
</dataset>
</dataset>

54
utils/upgrade.py Executable file
View File

@ -0,0 +1,54 @@
#!/usr/bin/python
import ConfigParser
import argparse
import requests
from urlparse import urlparse
import sys
CONFIG_PATH='/etc/airtime/airtime.conf'
GENERAL_CONFIG_SECTION = "general"
def read_config_file(config_path):
"""Parse the application's config file located at config_path."""
config = ConfigParser.SafeConfigParser()
try:
config.readfp(open(config_path))
except IOError as e:
print "Failed to open config file at " + config_path + ": " + e.strerror
exit(-1)
except Exception:
print e.strerror
exit(-1)
return config
if __name__ == '__main__':
config = read_config_file(CONFIG_PATH)
api_key = config.get(GENERAL_CONFIG_SECTION, 'api_key')
base_url = config.get(GENERAL_CONFIG_SECTION, 'base_url')
base_dir = config.get(GENERAL_CONFIG_SECTION, 'base_dir')
action = "upgrade"
airtime_url = ""
parser = argparse.ArgumentParser()
parser.add_argument('--downgrade', help='Downgrade the station', action="store_true")
parser.add_argument('station_url', help='station URL', nargs='?', default='')
args = parser.parse_args()
if args.downgrade:
action = "downgrade"
if airtime_url == "":
airtime_url = "http://%s%s" % (base_url, base_dir)
# Add http:// if you were lazy and didn't pass a scheme to this script
url = urlparse(airtime_url)
if not url.scheme:
airtime_url = "http://%s" % airtime_url
print "Requesting %s..." % action
r = requests.get("%s/%s" % (airtime_url, action), auth=(api_key, ''))
print r.text
r.raise_for_status()