Merge branch '2.4.x'

This commit is contained in:
denise 2013-05-31 09:32:29 -04:00
commit b1c18f89db
4 changed files with 54 additions and 72 deletions

View File

@ -154,8 +154,6 @@ class Application_Model_Playlist implements Application_Model_LibraryEditable
*/
public function getContents($filterFiles=false)
{
Logging::info("Getting contents for playlist {$this->id}");
$sql = <<<SQL
SELECT *
FROM (
@ -438,6 +436,12 @@ SQL;
$entry["cueout"] = $entry["cliplength"];
}
$entry["ftype"] = $objType;
$entry["fadein"] = isset($p_item['fadein']) ?
$p_item['fadein'] : $entry["fadein"];
$entry["fadeout"] = isset($p_item['fadeout']) ?
$p_item['fadeout'] : $entry["fadeout"];
}
return $entry;
@ -463,11 +467,10 @@ SQL;
try {
if (is_numeric($p_afterItem)) {
Logging::info("Finding playlist content item {$p_afterItem}");
$afterItem = CcPlaylistcontentsQuery::create()->findPK($p_afterItem);
$index = $afterItem->getDbPosition();
Logging::info("index is {$index}");
$pos = ($addType == 'after') ? $index + 1 : $index;
$contentsToUpdate = CcPlaylistcontentsQuery::create()
@ -500,9 +503,6 @@ SQL;
}
Logging::info("Adding to playlist");
Logging::info("at position {$pos}");
foreach ($p_items as $ac) {
$res = $this->insertPlaylistElement($this->buildEntry($ac, $pos));
@ -512,8 +512,6 @@ SQL;
$db_file->setDbIsPlaylist(true)->save($this->con);
$pos = $pos + 1;
Logging::info("Adding $ac[1] $ac[0]");
}
//reset the positions of the remaining items.
@ -745,7 +743,6 @@ SQL;
if (!is_null($offset)) {
$row->setDbTrackOffset($offset);
Logging::info("Setting offset {$offset} on item {$id}");
$row->save($this->con);
}
}

View File

@ -8,10 +8,9 @@ msgstr ""
"Project-Id-Version: Airtime 2.4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-05-30 11:13-0400\n"
"PO-Revision-Date: 2013-05-30 13:22-0500\n"
"PO-Revision-Date: 2013-05-31 09:27-0500\n"
"Last-Translator: Denise Rigato <denise.rigato@sourcefabric.org>\n"
"Language-Team: German Localization <contact@sourcefabric.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@ -1547,7 +1546,7 @@ msgstr "'Länge' sollte im 00:00:00-Format sein"
#: airtime_mvc/application/forms/SmartBlockCriteria.php:513
#: airtime_mvc/application/forms/SmartBlockCriteria.php:526
msgid "The value should be in timestamp format (e.g. 0000-00-00 or 0000-00-00 00:00:00)"
msgstr ""
msgstr "Der Wert muß im Timestamp-Format eingegeben werden (zB. 0000-00-00 oder 0000-00-00 00:00:00)"
#: airtime_mvc/application/forms/SmartBlockCriteria.php:540
msgid "The value has to be numeric"
@ -2200,7 +2199,7 @@ msgstr "Zu diesem Pfad besteht momentan kein Zugang."
#: airtime_mvc/application/controllers/LocaleController.php:170
#, php-format
msgid "Some stream types require extra configuration. Details about enabling %sAAC+ Support%s or %sOpus Support%s are provided."
msgstr ""
msgstr "Manche Stream-Typen erfordern zusätzliche Konfiguration.Details zum Aktivieren von %sAAC+ Support%s oder %sOpus Support%s sind bereitgestellt."
#: airtime_mvc/application/controllers/LocaleController.php:171
msgid "Connected to the streaming server"
@ -2274,7 +2273,7 @@ msgstr "Warnung: Sendungen können nicht neu verknüpft werden"
#: airtime_mvc/application/controllers/LocaleController.php:196
msgid "By linking your repeating shows any media items scheduled in any repeat show will also get scheduled in the other repeat shows"
msgstr ""
msgstr "Beim Verknüpfen von Sendungswiederholungen werden jegliche Medien, die in einer wiederholten Sendung geplant sind, auch in den anderen Sendungen geplant."
#: airtime_mvc/application/controllers/LocaleController.php:200
msgid "Show"
@ -3646,8 +3645,12 @@ msgstr "Wählen Sie eine Option aus."
msgid "No Records"
msgstr "Keine Datensätze"
#~ msgid "The value should be in timestamp format(eg. 0000-00-00 or 00-00-00 00:00:00)"
#~ msgstr "Der Wert sollte in Zeitstempel-Format vorliegen (z.B. 0000-00-00 oder 00-00-00 00:00:00)"
#~ msgid ""
#~ "The value should be in timestamp format(eg. 0000-00-00 or 00-00-00 "
#~ "00:00:00)"
#~ msgstr ""
#~ "Der Wert sollte in Zeitstempel-Format vorliegen (z.B. 0000-00-00 oder "
#~ "00-00-00 00:00:00)"
#, fuzzy
#~ msgid "Playlist"

View File

@ -1,4 +1,17 @@
<?php
/**
* Ensures that the user is running this PHP script with root
* permissions. If not running with root permissions, causes the
* script to exit.
*/
function exitIfNotRoot()
{
// Need to check that we are superuser before running this.
if(posix_geteuid() != 0){
echo "Must be root user.\n";
exit(1);
}
}
exitIfNotRoot();
@ -9,54 +22,19 @@ $CC_CONFIG['phpDir'] = $values['general']['airtime_dir'];
require_once($CC_CONFIG['phpDir'].'/application/configs/conf.php');
$CC_CONFIG = Config::getConfig();
/*
// Name of the web server user
$CC_CONFIG['webServerUser'] = $values['general']['web_server_user'];
$CC_CONFIG['phpDir'] = $values['general']['airtime_dir'];
$CC_CONFIG['rabbitmq'] = $values['rabbitmq'];
//$CC_CONFIG['baseUrl'] = $values['general']['base_url'];
//$CC_CONFIG['basePort'] = $values['general']['base_port'];
// Database config
$CC_CONFIG['dsn']['username'] = $values['database']['dbuser'];
$CC_CONFIG['dsn']['password'] = $values['database']['dbpass'];
$CC_CONFIG['dsn']['hostspec'] = $values['database']['host'];
$CC_CONFIG['dsn']['phptype'] = 'pgsql';
$CC_CONFIG['dsn']['database'] = $values['database']['dbname'];
$CC_CONFIG['apiKey'] = array($values['general']['api_key']);
$CC_CONFIG['soundcloud-connection-retries'] = $values['soundcloud']['connection_retries'];
$CC_CONFIG['soundcloud-connection-wait'] = $values['soundcloud']['time_between_retries'];
*/
require_once($CC_CONFIG['phpDir'].'/application/configs/constants.php');
//require_once($CC_CONFIG['phpDir'].'/application/configs/conf.php');
require_once($CC_CONFIG['phpDir'].'/application/logging/Logging.php');
//$CC_CONFIG['phpDir'] = $values['general']['airtime_dir'];
Logging::setLogPath("/var/log/airtime/zendphp.log");
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
get_include_path(),
realpath($CC_CONFIG['phpDir'] . '/library')
get_include_path(),
realpath($CC_CONFIG['phpDir'] . '/library'),
realpath($CC_CONFIG['phpDir']),
realpath($CC_CONFIG['phpDir'].'/application/models'),
)));
function my_autoload($classname){
$CC_CONFIG = Config::getConfig();
$info = explode('_', $classname);
if (isset($info[1]) && isset($info[2])) {
$filename = $info[2].".php";
if ($info[1] == "Model") {
$folderName = "models";
} else if ($info[1] == "Common") {
$folderName = "common";
}
require_once($CC_CONFIG['phpDir'].'/application/'.$folderName.'/'.$filename);
}
}
spl_autoload_register('my_autoload');
require_once 'propel/runtime/lib/Propel.php';
Propel::init($CC_CONFIG['phpDir']."/application/configs/airtime-conf-production.php");
@ -67,6 +45,22 @@ if (file_exists('/usr/share/php/libzend-framework-php')){
require_once('Zend/Loader/Autoloader.php');
$autoloader = Zend_Loader_Autoloader::getInstance();
$autoloader->registerNamespace('Application_');
$resourceLoader = new Zend_Loader_Autoloader_Resource(array(
'basePath' => $CC_CONFIG['phpDir'].'/'.'application',
'namespace' => 'Application',
'resourceTypes' => array(
'model' => array(
'path' => 'models/',
'namespace' => 'Model',
),
'common' => array(
'path' => 'common/',
'namespace' => 'Common',
),
),
));
$infoArray = Application_Model_Preference::GetSystemInfo(true);
@ -88,6 +82,7 @@ if(Application_Model_Preference::GetSupportFeedback() == '1'){
curl_close($ch);
}
// Get latest version from stat server and store to db
if(Application_Model_Preference::GetPlanLevel() == 'disabled'){
$url = 'http://stat.sourcefabric.org/airtime-stats/airtime_latest_version';
@ -113,16 +108,3 @@ if(Application_Model_Preference::GetPlanLevel() == 'disabled'){
curl_close($ch);
}
/**
* Ensures that the user is running this PHP script with root
* permissions. If not running with root permissions, causes the
* script to exit.
*/
function exitIfNotRoot()
{
// Need to check that we are superuser before running this.
if(posix_geteuid() != 0){
echo "Must be root user.\n";
exit(1);
}
}