CC-3346: Recorder: Merge recorder with pypo
- Upgrade for 2.0.2
This commit is contained in:
parent
06c825479b
commit
4e72c1150d
|
@ -1,3 +1,3 @@
|
|||
<?php
|
||||
|
||||
define('AIRTIME_VERSION', '2.0.1');
|
||||
define('AIRTIME_VERSION', '2.0.2');
|
||||
|
|
|
@ -53,7 +53,7 @@ MIN=$(($RANDOM%60))
|
|||
echo "$MIN $HOUR * * * root /usr/lib/airtime/utils/phone_home_stat" > /etc/cron.d/airtime-crons
|
||||
|
||||
echo "* Creating /usr/lib/airtime"
|
||||
|
||||
rm -rf "/usr/lib/airtime"
|
||||
if [ "$python_service" -eq "0" ]; then
|
||||
python $AIRTIMEROOT/python_apps/api_clients/install/api_client_install.py
|
||||
|
||||
|
|
|
@ -107,6 +107,10 @@ if (strcmp($version, "2.0.1") < 0){
|
|||
passthru("php --php-ini $SCRIPTPATH/../airtime-php.ini $SCRIPTPATH/../upgrades/airtime-2.0.1/airtime-upgrade.php");
|
||||
pause();
|
||||
}
|
||||
if (strcmp($version, "2.0.2") < 0){
|
||||
passthru("php --php-ini $SCRIPTPATH/../airtime-php.ini $SCRIPTPATH/../upgrades/airtime-2.0.2/airtime-upgrade.php");
|
||||
pause();
|
||||
}
|
||||
|
||||
//set the new version in the database.
|
||||
$sql = "DELETE FROM cc_pref WHERE keystr = 'system_version'";
|
||||
|
|
|
@ -0,0 +1,252 @@
|
|||
<?php
|
||||
|
||||
require_once('DB.php');
|
||||
|
||||
/* These are helper functions that are common to each upgrade such as
|
||||
* creating connections to a database, backing up config files etc.
|
||||
*/
|
||||
class UpgradeCommon{
|
||||
const CONF_FILE_AIRTIME = "/etc/airtime/airtime.conf";
|
||||
const CONF_FILE_PYPO = "/etc/airtime/pypo.cfg";
|
||||
const CONF_FILE_LIQUIDSOAP = "/etc/airtime/liquidsoap.cfg";
|
||||
const CONF_FILE_MEDIAMONITOR = "/etc/airtime/media-monitor.cfg";
|
||||
const CONF_FILE_API_CLIENT = "/etc/airtime/api_client.cfg";
|
||||
|
||||
const CONF_PYPO_GRP = "pypo";
|
||||
const CONF_WWW_DATA_GRP = "www-data";
|
||||
const CONF_BACKUP_SUFFIX = "202";
|
||||
const VERSION_NUMBER = "2.0.2";
|
||||
|
||||
public static function SetDefaultTimezone()
|
||||
{
|
||||
$sql = "SELECT valstr from cc_pref WHERE keystr = 'timezone'";
|
||||
|
||||
$result = self::queryDb($sql);
|
||||
$timezone = $result['valstr'];
|
||||
|
||||
date_default_timezone_set($timezone);
|
||||
}
|
||||
|
||||
public static function connectToDatabase($p_exitOnError = true)
|
||||
{
|
||||
global $CC_DBC, $CC_CONFIG;
|
||||
$CC_DBC = DB::connect($CC_CONFIG['dsn'], FALSE);
|
||||
if (PEAR::isError($CC_DBC)) {
|
||||
echo $CC_DBC->getMessage().PHP_EOL;
|
||||
echo $CC_DBC->getUserInfo().PHP_EOL;
|
||||
echo "Database connection problem.".PHP_EOL;
|
||||
echo "Check if database '{$CC_CONFIG['dsn']['database']}' exists".
|
||||
" with corresponding permissions.".PHP_EOL;
|
||||
if ($p_exitOnError) {
|
||||
exit(1);
|
||||
}
|
||||
} else {
|
||||
$CC_DBC->setFetchMode(DB_FETCHMODE_ASSOC);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static function DbTableExists($p_name)
|
||||
{
|
||||
global $CC_DBC;
|
||||
$sql = "SELECT * FROM ".$p_name;
|
||||
$result = $CC_DBC->GetOne($sql);
|
||||
if (PEAR::isError($result)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private static function GetAirtimeSrcDir()
|
||||
{
|
||||
return __DIR__."/../../../airtime_mvc";
|
||||
}
|
||||
|
||||
public static function MigrateTablesToVersion($dir, $version)
|
||||
{
|
||||
echo "Upgrading database, may take several minutes, please wait".PHP_EOL;
|
||||
|
||||
$appDir = self::GetAirtimeSrcDir();
|
||||
$command = "php --php-ini $dir/../../airtime-php.ini ".
|
||||
"$appDir/library/doctrine/migrations/doctrine-migrations.phar ".
|
||||
"--configuration=$dir/../../DoctrineMigrations/migrations.xml ".
|
||||
"--db-configuration=$appDir/library/doctrine/migrations/migrations-db.php ".
|
||||
"--no-interaction migrations:migrate $version";
|
||||
system($command);
|
||||
}
|
||||
|
||||
public static function BypassMigrations($dir, $version)
|
||||
{
|
||||
$appDir = self::GetAirtimeSrcDir();
|
||||
$command = "php --php-ini $dir/../../airtime-php.ini ".
|
||||
"$appDir/library/doctrine/migrations/doctrine-migrations.phar ".
|
||||
"--configuration=$dir/../../DoctrineMigrations/migrations.xml ".
|
||||
"--db-configuration=$appDir/library/doctrine/migrations/migrations-db.php ".
|
||||
"--no-interaction --add migrations:version $version";
|
||||
system($command);
|
||||
}
|
||||
|
||||
public static function upgradeConfigFiles(){
|
||||
|
||||
$configFiles = array(UpgradeCommon::CONF_FILE_AIRTIME,
|
||||
UpgradeCommon::CONF_FILE_PYPO,
|
||||
UpgradeCommon::CONF_FILE_LIQUIDSOAP,
|
||||
UpgradeCommon::CONF_FILE_MEDIAMONITOR,
|
||||
UpgradeCommon::CONF_FILE_API_CLIENT);
|
||||
|
||||
// Backup the config files
|
||||
$suffix = date("Ymdhis")."-".UpgradeCommon::VERSION_NUMBER;
|
||||
foreach ($configFiles as $conf) {
|
||||
// do not back up monit cfg
|
||||
if (file_exists($conf)) {
|
||||
echo "Backing up $conf to $conf$suffix.bak".PHP_EOL;
|
||||
//copy($conf, $conf.$suffix.".bak");
|
||||
exec("cp -p $conf $conf$suffix.bak"); //use cli version to preserve file attributes
|
||||
}
|
||||
}
|
||||
|
||||
self::CreateIniFiles(UpgradeCommon::CONF_BACKUP_SUFFIX);
|
||||
self::MergeConfigFiles($configFiles, $suffix);
|
||||
}
|
||||
|
||||
/**
|
||||
* This function creates the /etc/airtime configuration folder
|
||||
* and copies the default config files to it.
|
||||
*/
|
||||
public static function CreateIniFiles($suffix)
|
||||
{
|
||||
if (!file_exists("/etc/airtime/")){
|
||||
if (!mkdir("/etc/airtime/", 0755, true)){
|
||||
echo "Could not create /etc/airtime/ directory. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (!copy(__DIR__."/airtime.conf.$suffix", self::CONF_FILE_AIRTIME)){
|
||||
echo "Could not copy airtime.conf to /etc/airtime/. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
if (!copy(__DIR__."/pypo.cfg.$suffix", self::CONF_FILE_PYPO)){
|
||||
echo "Could not copy pypo.cfg to /etc/airtime/. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
if (!copy(__DIR__."/media-monitor.cfg.$suffix", self::CONF_FILE_MEDIAMONITOR)){
|
||||
echo "Could not copy meadia-monitor.cfg to /etc/airtime/. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
if (!copy(__DIR__."/api_client.cfg.$suffix", self::CONF_FILE_API_CLIENT)){
|
||||
echo "Could not copy api_client.cfg to /etc/monit/conf.d/. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
private static function MergeConfigFiles($configFiles, $suffix) {
|
||||
foreach ($configFiles as $conf) {
|
||||
// we want to use new liquidsoap.cfg so don't merge
|
||||
// also for monit
|
||||
if( $conf == self::CONF_FILE_LIQUIDSOAP){
|
||||
continue;
|
||||
}
|
||||
if (file_exists("$conf$suffix.bak")) {
|
||||
|
||||
if($conf === self::CONF_FILE_AIRTIME) {
|
||||
// Parse with sections
|
||||
$newSettings = parse_ini_file($conf, true);
|
||||
$oldSettings = parse_ini_file("$conf$suffix.bak", true);
|
||||
}
|
||||
else {
|
||||
$newSettings = self::ReadPythonConfig($conf);
|
||||
$oldSettings = self::ReadPythonConfig("$conf$suffix.bak");
|
||||
}
|
||||
|
||||
$settings = array_keys($newSettings);
|
||||
|
||||
foreach($settings as $section) {
|
||||
if(isset($oldSettings[$section])) {
|
||||
if(is_array($oldSettings[$section])) {
|
||||
$sectionKeys = array_keys($newSettings[$section]);
|
||||
foreach($sectionKeys as $sectionKey) {
|
||||
// skip airtim_dir as we want to use new value
|
||||
if($sectionKey != "airtime_dir"){
|
||||
if(isset($oldSettings[$section][$sectionKey])) {
|
||||
self::UpdateIniValue($conf, $sectionKey, $oldSettings[$section][$sectionKey]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
self::UpdateIniValue($conf, $section, $oldSettings[$section]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static function ReadPythonConfig($p_filename)
|
||||
{
|
||||
$values = array();
|
||||
|
||||
$fh = fopen($p_filename, 'r');
|
||||
|
||||
while(!feof($fh)){
|
||||
$line = fgets($fh);
|
||||
if(substr(trim($line), 0, 1) == '#' || trim($line) == ""){
|
||||
continue;
|
||||
}else{
|
||||
$info = explode('=', $line, 2);
|
||||
$values[trim($info[0])] = trim($info[1]);
|
||||
}
|
||||
}
|
||||
|
||||
return $values;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function updates an INI style config file.
|
||||
*
|
||||
* A property and the value the property should be changed to are
|
||||
* supplied. If the property is not found, then no changes are made.
|
||||
*
|
||||
* @param string $p_filename
|
||||
* The path the to the file.
|
||||
* @param string $p_property
|
||||
* The property to look for in order to change its value.
|
||||
* @param string $p_value
|
||||
* The value the property should be changed to.
|
||||
*
|
||||
*/
|
||||
private static function UpdateIniValue($p_filename, $p_property, $p_value)
|
||||
{
|
||||
$lines = file($p_filename);
|
||||
$n=count($lines);
|
||||
foreach ($lines as &$line) {
|
||||
if ($line[0] != "#"){
|
||||
$key_value = explode("=", $line);
|
||||
$key = trim($key_value[0]);
|
||||
|
||||
if ($key == $p_property){
|
||||
$line = "$p_property = $p_value".PHP_EOL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$fp=fopen($p_filename, 'w');
|
||||
for($i=0; $i<$n; $i++){
|
||||
fwrite($fp, $lines[$i]);
|
||||
}
|
||||
fclose($fp);
|
||||
}
|
||||
|
||||
public static function queryDb($p_sql){
|
||||
global $CC_DBC;
|
||||
|
||||
$result = $CC_DBC->getRow($p_sql, $fetchmode=DB_FETCHMODE_ASSOC);
|
||||
if (PEAR::isError($result)) {
|
||||
echo "Error executing $sql. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
set daemon 10 # Poll at 10 second intervals
|
||||
#set logfile syslog facility log_daemon
|
||||
set logfile /var/log/monit.log
|
||||
|
||||
set httpd port 2812 and use address 127.0.0.1
|
||||
allow localhost
|
||||
allow admin:monit
|
||||
|
||||
check process airtime-playout
|
||||
with pidfile "/var/run/airtime-playout.pid"
|
||||
start program = "/etc/init.d/airtime-playout monit-restart" with timeout 5 seconds
|
||||
stop program = "/etc/init.d/airtime-playout stop"
|
||||
check process airtime-liquidsoap
|
||||
with pidfile "/var/run/airtime-liquidsoap.pid"
|
||||
start program = "/etc/init.d/airtime-playout monit-restart" with timeout 5 seconds
|
||||
stop program = "/etc/init.d/airtime-playout stop"
|
||||
check process airtime-media-monitor
|
||||
with pidfile "/var/run/airtime-media-monitor.pid"
|
||||
start program = "/etc/init.d/airtime-media-monitor start" with timeout 10 seconds
|
||||
stop program = "/etc/init.d/airtime-media-monitor stop"
|
||||
check process airtime-show-recorder
|
||||
with pidfile "/var/run/airtime-show-recorder.pid"
|
||||
start program = "/etc/init.d/airtime-show-recorder start" with timeout 10 seconds
|
||||
stop program = "/etc/init.d/airtime-show-recorder stop"
|
|
@ -0,0 +1,586 @@
|
|||
<?php
|
||||
/**
|
||||
* @package Airtime
|
||||
* @subpackage StorageServer
|
||||
* @copyright 2010 Sourcefabric O.P.S.
|
||||
* @license http://www.gnu.org/licenses/gpl.txt
|
||||
*/
|
||||
|
||||
set_include_path(__DIR__.'/../../../airtime_mvc/library' . PATH_SEPARATOR . get_include_path());
|
||||
set_include_path(__DIR__.'/../../../airtime_mvc/library/pear' . PATH_SEPARATOR . get_include_path());
|
||||
set_include_path(__DIR__.'/../../../airtime_mvc/application/models' . PATH_SEPARATOR . get_include_path());
|
||||
set_include_path(__DIR__.'/../../../airtime_mvc/application/configs' . PATH_SEPARATOR . get_include_path());
|
||||
require_once 'conf.php';
|
||||
require_once 'DB.php';
|
||||
|
||||
require_once 'propel/runtime/lib/Propel.php';
|
||||
Propel::init(__DIR__."/../../../airtime_mvc/application/configs/airtime-conf.php");
|
||||
|
||||
class AirtimeInstall{
|
||||
const CONF_DIR_BINARIES = "/usr/lib/airtime";
|
||||
|
||||
public static function SetDefaultTimezone()
|
||||
{
|
||||
global $CC_DBC;
|
||||
|
||||
$defaultTimezone = date_default_timezone_get();
|
||||
|
||||
$sql = "INSERT INTO cc_pref (keystr, valstr) VALUES ('timezone', '$defaultTimezone')";
|
||||
$result = $CC_DBC->query($sql);
|
||||
if (PEAR::isError($result)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static function GetUtilsSrcDir()
|
||||
{
|
||||
return __DIR__."/../../../utils";
|
||||
}
|
||||
|
||||
public static function InstallBinaries()
|
||||
{
|
||||
echo "* Installing binaries to ".AirtimeInstall::CONF_DIR_BINARIES.PHP_EOL;
|
||||
exec("mkdir -p ".AirtimeInstall::CONF_DIR_BINARIES);
|
||||
exec("cp -R ".AirtimeInstall::GetUtilsSrcDir()." ".AirtimeInstall::CONF_DIR_BINARIES);
|
||||
}
|
||||
|
||||
public static function CreateSymlinksToUtils()
|
||||
{
|
||||
echo "* Installing airtime-log".PHP_EOL;
|
||||
$dir = AirtimeInstall::CONF_DIR_BINARIES."/utils/airtime-log";
|
||||
copy(AirtimeInstall::GetUtilsSrcDir()."/airtime-log.php", AirtimeInstall::CONF_DIR_BINARIES."/utils/airtime-log.php");
|
||||
|
||||
exec("ln -s $dir /usr/bin/airtime-log");
|
||||
}
|
||||
|
||||
public static function SetDefaultStreamSetting()
|
||||
{
|
||||
global $CC_DBC;
|
||||
|
||||
echo "* Setting up default stream setting".PHP_EOL;
|
||||
$sql = "INSERT INTO cc_pref(keystr, valstr) VALUES('stream_type', 'ogg, mp3');
|
||||
INSERT INTO cc_pref(keystr, valstr) VALUES('stream_bitrate', '24, 32, 48, 64, 96, 128, 160, 192, 224, 256, 320');
|
||||
INSERT INTO cc_pref(keystr, valstr) VALUES('num_of_streams', '3');
|
||||
INSERT INTO cc_pref(keystr, valstr) VALUES('max_bitrate', '128');
|
||||
INSERT INTO cc_pref(keystr, valstr) VALUES('plan_level', 'disabled');
|
||||
|
||||
INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('output_sound_device', 'false', 'boolean');
|
||||
INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('icecast_vorbis_metadata', 'false', 'boolean');
|
||||
|
||||
INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s1_output', 'icecast', 'string');
|
||||
INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s1_type', 'ogg', 'string');
|
||||
INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s1_bitrate', '128', 'integer');
|
||||
INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s1_host', '127.0.0.1', 'string');
|
||||
INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s1_port', '8000', 'integer');
|
||||
INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s1_user', '', 'string');
|
||||
INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s1_pass', 'hackme', 'string');
|
||||
INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s1_mount', 'airtime_128', 'string');
|
||||
INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s1_url', 'http://airtime.sourcefabric.org', 'string');
|
||||
INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s1_description', 'Airtime Radio! Stream #1', 'string');
|
||||
INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s1_genre', 'genre', 'string');
|
||||
|
||||
INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s2_output', 'disabled', 'string');
|
||||
INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s2_type', '', 'string');
|
||||
INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s2_bitrate', '', 'integer');
|
||||
INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s2_host', '', 'string');
|
||||
INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s2_port', '', 'integer');
|
||||
INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s2_user', '', 'string');
|
||||
INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s2_pass', '', 'string');
|
||||
INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s2_mount', '', 'string');
|
||||
INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s2_url', '', 'string');
|
||||
INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s2_description', '', 'string');
|
||||
INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s2_genre', '', 'string');
|
||||
|
||||
INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s3_output', 'disabled', 'string');
|
||||
INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s3_type', '', 'string');
|
||||
INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s3_bitrate', '', 'integer');
|
||||
INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s3_host', '', 'string');
|
||||
INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s3_port', '', 'integer');
|
||||
INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s3_user', '', 'string');
|
||||
INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s3_pass', '', 'string');
|
||||
INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s3_mount', '', 'string');
|
||||
INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s3_url', '', 'string');
|
||||
INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s3_description', '', 'string');
|
||||
INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s3_genre', '', 'string');";
|
||||
$result = $CC_DBC->query($sql);
|
||||
if (PEAR::isError($result)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static function BypassMigrations($dir, $version)
|
||||
{
|
||||
$appDir = AirtimeInstall::GetAirtimeSrcDir();
|
||||
$command = "php $appDir/library/doctrine/migrations/doctrine-migrations.phar ".
|
||||
"--configuration=$dir/../../DoctrineMigrations/migrations.xml ".
|
||||
"--db-configuration=$appDir/library/doctrine/migrations/migrations-db.php ".
|
||||
"--no-interaction --add migrations:version $version";
|
||||
system($command);
|
||||
}
|
||||
|
||||
public static function MigrateTablesToVersion($dir, $version)
|
||||
{
|
||||
$appDir = AirtimeInstall::GetAirtimeSrcDir();
|
||||
$command = "php $appDir/library/doctrine/migrations/doctrine-migrations.phar ".
|
||||
"--configuration=$dir/../../DoctrineMigrations/migrations.xml ".
|
||||
"--db-configuration=$appDir/library/doctrine/migrations/migrations-db.php ".
|
||||
"--no-interaction migrations:migrate $version";
|
||||
system($command);
|
||||
}
|
||||
|
||||
public static function GetAirtimeSrcDir()
|
||||
{
|
||||
return __DIR__."/../../../airtime_mvc";
|
||||
}
|
||||
|
||||
public static function DbTableExists($p_name)
|
||||
{
|
||||
global $CC_DBC;
|
||||
$sql = "SELECT * FROM ".$p_name;
|
||||
$result = $CC_DBC->GetOne($sql);
|
||||
if (PEAR::isError($result)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public static function GetOldLiquidsoapCfgAndUpdate(){
|
||||
global $CC_DBC;
|
||||
echo "* Retrieving old liquidsoap configuration".PHP_EOL;
|
||||
$map = array();
|
||||
$fh = fopen("/etc/airtime/liquidsoap.cfg", 'r');
|
||||
$newConfigMap = array();
|
||||
|
||||
while(!feof($fh)){
|
||||
$line = fgets($fh);
|
||||
if(substr(trim($line), 0, 1) == '#' || trim($line) == ""){
|
||||
continue;
|
||||
}else{
|
||||
$info = explode('=', $line, 2);
|
||||
$map[trim($info[0])] = trim($info[1]);
|
||||
}
|
||||
}
|
||||
$newConfigMap['output_sound_device'] = $map['output_sound_device'];
|
||||
$newConfigMap['icecast_vorbis_metadata'] = $map['output_icecast_vorbis_metadata'];
|
||||
$newConfigMap['log_file'] = $map['log_file'];
|
||||
|
||||
$count = 1;
|
||||
if( $map['output_icecast_vorbis'] == 'true'){
|
||||
$newConfigMap['s'.$count.'_output'] = 'icecast';
|
||||
$newConfigMap['s'.$count.'_host'] = $map['icecast_host'];
|
||||
$newConfigMap['s'.$count.'_port'] = $map['icecast_port'];
|
||||
$newConfigMap['s'.$count.'_pass'] = $map['icecast_pass'];
|
||||
$newConfigMap['s'.$count.'_mount'] = $map['mount_point_vorbis'];
|
||||
$newConfigMap['s'.$count.'_url'] = $map['icecast_url'];
|
||||
$newConfigMap['s'.$count.'_description'] = $map['icecast_description'];
|
||||
$newConfigMap['s'.$count.'_genre'] = $map['icecast_genre'];
|
||||
$newConfigMap['s'.$count.'_type'] = "ogg";
|
||||
$newConfigMap['s'.$count.'_bitrate'] = "128";
|
||||
$count++;
|
||||
}
|
||||
if($map['output_icecast_mp3'] == 'true'){
|
||||
$newConfigMap['s'.$count.'_output'] = 'icecast';
|
||||
$newConfigMap['s'.$count.'_host'] = $map['icecast_host'];
|
||||
$newConfigMap['s'.$count.'_port'] = $map['icecast_port'];
|
||||
$newConfigMap['s'.$count.'_pass'] = $map['icecast_pass'];
|
||||
$newConfigMap['s'.$count.'_mount'] = $map['mount_point_mp3'];
|
||||
$newConfigMap['s'.$count.'_url'] = $map['icecast_url'];
|
||||
$newConfigMap['s'.$count.'_description'] = $map['icecast_description'];
|
||||
$newConfigMap['s'.$count.'_genre'] = $map['icecast_genre'];
|
||||
$newConfigMap['s'.$count.'_type'] = "mp3";
|
||||
$newConfigMap['s'.$count.'_bitrate'] = "128";
|
||||
$count++;
|
||||
}
|
||||
if($map['output_shoutcast'] == 'true'){
|
||||
$newConfigMap['s'.$count.'_output'] = 'shoutcast';
|
||||
$newConfigMap['s'.$count.'_host'] = $map['shoutcast_host'];
|
||||
$newConfigMap['s'.$count.'_port'] = $map['shoutcast_port'];
|
||||
$newConfigMap['s'.$count.'_pass'] = $map['shoutcast_pass'];
|
||||
$newConfigMap['s'.$count.'_url'] = $map['shoutcast_url'];
|
||||
$newConfigMap['s'.$count.'_genre'] = $map['shoutcast_genre'];
|
||||
$newConfigMap['s'.$count.'_type'] = "mp3";
|
||||
$newConfigMap['s'.$count.'_bitrate'] = "128";
|
||||
$count++;
|
||||
}
|
||||
|
||||
$sql = "";
|
||||
foreach( $newConfigMap as $key=>$val){
|
||||
if(substr($val, 0, 1) == '"' && substr($val, strlen($val)-1,1)){
|
||||
$val = ltrim($val, '"');
|
||||
$val = rtrim($val, '"');
|
||||
}
|
||||
$sql .= "UPDATE cc_stream_setting SET value='$val' WHERE keyname='$key';";
|
||||
}
|
||||
$result = $CC_DBC->query($sql);
|
||||
if (PEAR::isError($result)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
class Airtime200Upgrade{
|
||||
|
||||
public static function connectToDatabase(){
|
||||
global $CC_DBC, $CC_CONFIG;
|
||||
|
||||
$values = parse_ini_file('/etc/airtime/airtime.conf', true);
|
||||
|
||||
// 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_DBC = DB::connect($CC_CONFIG['dsn'], FALSE);
|
||||
}
|
||||
|
||||
public static function InstallAirtimePhpServerCode($phpDir)
|
||||
{
|
||||
|
||||
$AIRTIME_SRC = realpath(__DIR__.'/../../../airtime_mvc');
|
||||
|
||||
// delete old files
|
||||
exec("rm -rf ".$phpDir);
|
||||
echo "* Installing PHP code to ".$phpDir.PHP_EOL;
|
||||
exec("mkdir -p ".$phpDir);
|
||||
exec("cp -R ".$AIRTIME_SRC."/* ".$phpDir);
|
||||
}
|
||||
|
||||
public static function RemoveOldMonitFile(){
|
||||
unlink("/etc/monit/conf.d/airtime-monit.cfg");
|
||||
}
|
||||
}
|
||||
|
||||
class ConvertToUtc{
|
||||
|
||||
public static function setPhpDefaultTimeZoneToSystemTimezone(){
|
||||
//we can get the default system timezone on debian/ubuntu by reading "/etc/timezone"
|
||||
$filename = "/etc/timezone";
|
||||
$handle = fopen($filename, "r");
|
||||
$contents = trim(fread($handle, filesize($filename)));
|
||||
echo "System timezone detected as: $contents".PHP_EOL;
|
||||
fclose($handle);
|
||||
|
||||
date_default_timezone_set($contents);
|
||||
}
|
||||
|
||||
public static function convert_cc_playlist(){
|
||||
/* cc_playlist has a field that keeps track of when the playlist was last modified. */
|
||||
$playlists = CcPlaylistQuery::create()->find();
|
||||
|
||||
foreach ($playlists as $pl){
|
||||
$dt = new DateTime($pl->getDbMtime(), new DateTimeZone(date_default_timezone_get()));
|
||||
$dt->setTimezone(new DateTimeZone("UTC"));
|
||||
$pl->setDbMtime($dt);
|
||||
|
||||
$pl->save();
|
||||
}
|
||||
}
|
||||
|
||||
public static function convert_cc_schedule(){
|
||||
/* cc_schedule has start and end fields that need to be changed to UTC. */
|
||||
$schedules = CcScheduleQuery::create()->find();
|
||||
|
||||
foreach ($schedules as $s){
|
||||
$dt = new DateTime($s->getDbStarts(), new DateTimeZone(date_default_timezone_get()));
|
||||
$dt->setTimezone(new DateTimeZone("UTC"));
|
||||
$s->setDbStarts($dt);
|
||||
|
||||
$dt = new DateTime($s->getDbEnds(), new DateTimeZone(date_default_timezone_get()));
|
||||
$dt->setTimezone(new DateTimeZone("UTC"));
|
||||
$s->setDbEnds($dt);
|
||||
|
||||
$s->save();
|
||||
}
|
||||
}
|
||||
|
||||
public static function convert_cc_show_days(){
|
||||
/* cc_show_days has first_show, last_show and start_time fields that need to be changed to UTC. */
|
||||
$showDays = CcShowDaysQuery::create()->find();
|
||||
|
||||
foreach ($showDays as $sd){
|
||||
$dt = new DateTime($sd->getDbFirstShow()." ".$sd->getDbStartTime(), new DateTimeZone(date_default_timezone_get()));
|
||||
$dt->setTimezone(new DateTimeZone("UTC"));
|
||||
$sd->setDbFirstShow($dt->format("Y-m-d"));
|
||||
$sd->setDbStartTime($dt->format("H:i:s"));
|
||||
|
||||
$dt = new DateTime($sd->getDbLastShow()." ".$sd->getDbStartTime(), new DateTimeZone(date_default_timezone_get()));
|
||||
$dt->setTimezone(new DateTimeZone("UTC"));
|
||||
$sd->setDbLastShow($dt->format("Y-m-d"));
|
||||
|
||||
$sd->save();
|
||||
}
|
||||
}
|
||||
|
||||
public static function convert_cc_show_instances(){
|
||||
/* convert_cc_show_instances has starts and ends fields that need to be changed to UTC. */
|
||||
$showInstances = CcShowInstancesQuery::create()->find();
|
||||
|
||||
foreach ($showInstances as $si){
|
||||
$dt = new DateTime($si->getDbStarts(), new DateTimeZone(date_default_timezone_get()));
|
||||
$dt->setTimezone(new DateTimeZone("UTC"));
|
||||
$si->setDbStarts($dt);
|
||||
|
||||
$dt = new DateTime($si->getDbEnds(), new DateTimeZone(date_default_timezone_get()));
|
||||
$dt->setTimezone(new DateTimeZone("UTC"));
|
||||
$si->setDbEnds($dt);
|
||||
|
||||
$si->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class AirtimeIni200{
|
||||
|
||||
const CONF_FILE_AIRTIME = "/etc/airtime/airtime.conf";
|
||||
const CONF_FILE_PYPO = "/etc/airtime/pypo.cfg";
|
||||
const CONF_FILE_RECORDER = "/etc/airtime/recorder.cfg";
|
||||
const CONF_FILE_LIQUIDSOAP = "/etc/airtime/liquidsoap.cfg";
|
||||
const CONF_FILE_MEDIAMONITOR = "/etc/airtime/media-monitor.cfg";
|
||||
const CONF_FILE_API_CLIENT = "/etc/airtime/api_client.cfg";
|
||||
|
||||
const CONF_PYPO_GRP = "pypo";
|
||||
const CONF_WWW_DATA_GRP = "www-data";
|
||||
|
||||
/**
|
||||
* This function updates an INI style config file.
|
||||
*
|
||||
* A property and the value the property should be changed to are
|
||||
* supplied. If the property is not found, then no changes are made.
|
||||
*
|
||||
* @param string $p_filename
|
||||
* The path the to the file.
|
||||
* @param string $p_property
|
||||
* The property to look for in order to change its value.
|
||||
* @param string $p_value
|
||||
* The value the property should be changed to.
|
||||
*
|
||||
*/
|
||||
public static function UpdateIniValue($p_filename, $p_property, $p_value)
|
||||
{
|
||||
$lines = file($p_filename);
|
||||
$n=count($lines);
|
||||
foreach ($lines as &$line) {
|
||||
if ($line[0] != "#"){
|
||||
$key_value = explode("=", $line);
|
||||
$key = trim($key_value[0]);
|
||||
|
||||
if ($key == $p_property){
|
||||
$line = "$p_property = $p_value".PHP_EOL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$fp=fopen($p_filename, 'w');
|
||||
for($i=0; $i<$n; $i++){
|
||||
fwrite($fp, $lines[$i]);
|
||||
}
|
||||
fclose($fp);
|
||||
}
|
||||
|
||||
public static function ReadPythonConfig($p_filename)
|
||||
{
|
||||
$values = array();
|
||||
|
||||
$fh = fopen($p_filename, 'r');
|
||||
|
||||
while(!feof($fh)){
|
||||
$line = fgets($fh);
|
||||
if(substr(trim($line), 0, 1) == '#' || trim($line) == ""){
|
||||
continue;
|
||||
}else{
|
||||
$info = explode('=', $line, 2);
|
||||
$values[trim($info[0])] = trim($info[1]);
|
||||
}
|
||||
}
|
||||
|
||||
return $values;
|
||||
}
|
||||
|
||||
public static function MergeConfigFiles($configFiles, $suffix) {
|
||||
foreach ($configFiles as $conf) {
|
||||
// we want to use new liquidsoap.cfg so don't merge
|
||||
// also for monit
|
||||
if( $conf == AirtimeIni200::CONF_FILE_LIQUIDSOAP){
|
||||
continue;
|
||||
}
|
||||
if (file_exists("$conf$suffix.bak")) {
|
||||
|
||||
if($conf === AirtimeIni200::CONF_FILE_AIRTIME) {
|
||||
// Parse with sections
|
||||
$newSettings = parse_ini_file($conf, true);
|
||||
$oldSettings = parse_ini_file("$conf$suffix.bak", true);
|
||||
}
|
||||
else {
|
||||
$newSettings = AirtimeIni200::ReadPythonConfig($conf);
|
||||
$oldSettings = AirtimeIni200::ReadPythonConfig("$conf$suffix.bak");
|
||||
}
|
||||
|
||||
$settings = array_keys($newSettings);
|
||||
|
||||
foreach($settings as $section) {
|
||||
if(isset($oldSettings[$section])) {
|
||||
if(is_array($oldSettings[$section])) {
|
||||
$sectionKeys = array_keys($newSettings[$section]);
|
||||
foreach($sectionKeys as $sectionKey) {
|
||||
// skip airtim_dir as we want to use new value
|
||||
if($sectionKey != "airtime_dir"){
|
||||
if(isset($oldSettings[$section][$sectionKey])) {
|
||||
AirtimeIni200::UpdateIniValue($conf, $sectionKey, $oldSettings[$section][$sectionKey]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
AirtimeIni200::UpdateIniValue($conf, $section, $oldSettings[$section]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Re: http://dev.sourcefabric.org/browse/CC-2797
|
||||
* We don't want config files to be world-readable so we
|
||||
* set the strictest permissions possible. */
|
||||
public static function changeConfigFilePermissions(){
|
||||
if (!self::ChangeFileOwnerGroupMod(AirtimeIni200::CONF_FILE_AIRTIME, self::CONF_WWW_DATA_GRP)){
|
||||
echo "Could not set ownership of api_client.cfg to 'pypo'. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
if (!self::ChangeFileOwnerGroupMod(AirtimeIni200::CONF_FILE_API_CLIENT, self::CONF_PYPO_GRP)){
|
||||
echo "Could not set ownership of api_client.cfg to 'pypo'. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
if (!self::ChangeFileOwnerGroupMod(AirtimeIni200::CONF_FILE_PYPO, self::CONF_PYPO_GRP)){
|
||||
echo "Could not set ownership of pypo.cfg to 'pypo'. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
if (!self::ChangeFileOwnerGroupMod(AirtimeIni200::CONF_FILE_RECORDER, self::CONF_PYPO_GRP)){
|
||||
echo "Could not set ownership of recorder.cfg to 'pypo'. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
if (!self::ChangeFileOwnerGroupMod(AirtimeIni200::CONF_FILE_LIQUIDSOAP, self::CONF_PYPO_GRP)){
|
||||
echo "Could not set ownership of liquidsoap.cfg to 'pypo'. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
if (!self::ChangeFileOwnerGroupMod(AirtimeIni200::CONF_FILE_MEDIAMONITOR, self::CONF_PYPO_GRP)){
|
||||
echo "Could not set ownership of media-monitor.cfg to 'pypo'. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
public static function ChangeFileOwnerGroupMod($filename, $user){
|
||||
return (chown($filename, $user) &&
|
||||
chgrp($filename, $user) &&
|
||||
chmod($filename, 0640));
|
||||
}
|
||||
|
||||
public static function upgradeConfigFiles(){
|
||||
|
||||
$configFiles = array(AirtimeIni200::CONF_FILE_AIRTIME,
|
||||
AirtimeIni200::CONF_FILE_PYPO,
|
||||
AirtimeIni200::CONF_FILE_RECORDER,
|
||||
AirtimeIni200::CONF_FILE_LIQUIDSOAP,
|
||||
AirtimeIni200::CONF_FILE_MEDIAMONITOR,
|
||||
AirtimeIni200::CONF_FILE_API_CLIENT);
|
||||
|
||||
// Backup the config files
|
||||
$suffix = date("Ymdhis")."-2.0.0";
|
||||
foreach ($configFiles as $conf) {
|
||||
// do not back up monit cfg
|
||||
if (file_exists($conf)) {
|
||||
echo "Backing up $conf to $conf$suffix.bak".PHP_EOL;
|
||||
//copy($conf, $conf.$suffix.".bak");
|
||||
exec("cp -p $conf $conf$suffix.bak"); //use cli version to preserve file attributes
|
||||
}
|
||||
}
|
||||
|
||||
$default_suffix = "200";
|
||||
AirtimeIni200::CreateIniFiles($default_suffix);
|
||||
AirtimeIni200::MergeConfigFiles($configFiles, $suffix);
|
||||
}
|
||||
|
||||
/**
|
||||
* This function creates the /etc/airtime configuration folder
|
||||
* and copies the default config files to it.
|
||||
*/
|
||||
public static function CreateIniFiles($suffix)
|
||||
{
|
||||
if (!file_exists("/etc/airtime/")){
|
||||
if (!mkdir("/etc/airtime/", 0755, true)){
|
||||
echo "Could not create /etc/airtime/ directory. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (!copy(__DIR__."/airtime.conf.$suffix", AirtimeIni200::CONF_FILE_AIRTIME)){
|
||||
echo "Could not copy airtime.conf to /etc/airtime/. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
if (!copy(__DIR__."/pypo.cfg.$suffix", AirtimeIni200::CONF_FILE_PYPO)){
|
||||
echo "Could not copy pypo.cfg to /etc/airtime/. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
if (!copy(__DIR__."/recorder.cfg.$suffix", AirtimeIni200::CONF_FILE_RECORDER)){
|
||||
echo "Could not copy recorder.cfg to /etc/airtime/. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
/*if (!copy(__DIR__."/liquidsoap.cfg.$suffix", AirtimeIni200::CONF_FILE_LIQUIDSOAP)){
|
||||
echo "Could not copy liquidsoap.cfg to /etc/airtime/. Exiting.";
|
||||
exit(1);
|
||||
}*/
|
||||
if (!copy(__DIR__."/api_client.cfg.$suffix", AirtimeIni200::CONF_FILE_API_CLIENT)){
|
||||
echo "Could not copy airtime-monit.cfg to /etc/monit/conf.d/. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Airtime200Upgrade::connectToDatabase();
|
||||
AirtimeInstall::SetDefaultTimezone();
|
||||
|
||||
AirtimeInstall::InstallBinaries();
|
||||
AirtimeInstall::CreateSymlinksToUtils();
|
||||
|
||||
/* Airtime 2.0.0 starts interpreting all database times in UTC format. Prior to this, all the times
|
||||
* were stored using the local time zone. Let's convert to UTC time. */
|
||||
ConvertToUtc::setPhpDefaultTimeZoneToSystemTimezone();
|
||||
ConvertToUtc::convert_cc_playlist();
|
||||
ConvertToUtc::convert_cc_schedule();
|
||||
ConvertToUtc::convert_cc_show_days();
|
||||
ConvertToUtc::convert_cc_show_instances();
|
||||
|
||||
// merging/updating config files
|
||||
echo "* Updating configFiles\n";
|
||||
AirtimeIni200::changeConfigFilePermissions();
|
||||
AirtimeIni200::upgradeConfigFiles();
|
||||
|
||||
$values = parse_ini_file(AirtimeIni200::CONF_FILE_AIRTIME, true);
|
||||
$phpDir = $values['general']['airtime_dir'];
|
||||
Airtime200Upgrade::InstallAirtimePhpServerCode($phpDir);
|
||||
|
||||
if(AirtimeInstall::DbTableExists('doctrine_migration_versions') === false) {
|
||||
$migrations = array('20110312121200', '20110331111708', '20110402164819', '20110406182005', '20110629143017', '20110711161043', '20110713161043');
|
||||
foreach($migrations as $migration) {
|
||||
AirtimeInstall::BypassMigrations(__DIR__, $migration);
|
||||
}
|
||||
}
|
||||
|
||||
AirtimeInstall::MigrateTablesToVersion(__DIR__, '20110925171256');
|
||||
|
||||
AirtimeInstall::SetDefaultStreamSetting();
|
||||
|
||||
AirtimeInstall::GetOldLiquidsoapCfgAndUpdate();
|
||||
|
||||
AirtimeUpgrade::RemoveOldMonitFile();
|
||||
|
||||
// restart monit
|
||||
exec("service monit restart");
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
<?php
|
||||
/**
|
||||
* @package Airtime
|
||||
* @subpackage StorageServer
|
||||
* @copyright 2010 Sourcefabric O.P.S.
|
||||
* @license http://www.gnu.org/licenses/gpl.txt
|
||||
*/
|
||||
|
||||
/*
|
||||
* In the future, most Airtime upgrades will involve just mutating the
|
||||
* data that is stored on the system. For example, The only data
|
||||
* we need to preserve between versions is the database, /etc/airtime, and
|
||||
* /srv/airtime. Everything else is just binary files that can be removed/replaced
|
||||
* with the new version of Airtime. Of course, the data may need to be in a new
|
||||
* format, and that's what this upgrade script will be for.
|
||||
*/
|
||||
|
||||
set_include_path(__DIR__.'/../../../airtime_mvc/library' . PATH_SEPARATOR . get_include_path());
|
||||
set_include_path(__DIR__.'/../../../airtime_mvc/application/models' . PATH_SEPARATOR . get_include_path());
|
||||
set_include_path(__DIR__.'/../../../airtime_mvc/application/configs' . PATH_SEPARATOR . get_include_path());
|
||||
require_once 'conf.php';
|
||||
require_once 'propel/runtime/lib/Propel.php';
|
||||
Propel::init(__DIR__."/propel/airtime-conf.php");
|
||||
|
||||
require_once 'UpgradeCommon.php';
|
||||
|
||||
class AirtimeStorWatchedDirsUpgrade{
|
||||
|
||||
public static function start(){
|
||||
}
|
||||
}
|
||||
|
||||
/* This class deals with any modifications to config files in /etc/airtime
|
||||
* as well as backups. All functions other than start() should be marked
|
||||
* as private. */
|
||||
class AirtimeConfigFileUpgrade{
|
||||
|
||||
public static function start(){
|
||||
echo "* Updating configFiles\n";
|
||||
self::changeConfigFilePermissions();
|
||||
UpgradeCommon::upgradeConfigFiles();
|
||||
}
|
||||
|
||||
/* Re: http://dev.sourcefabric.org/browse/CC-2797
|
||||
* We don't want config files to be world-readable so we
|
||||
* set the strictest permissions possible. */
|
||||
private static function changeConfigFilePermissions(){
|
||||
if (!self::ChangeFileOwnerGroupMod(UpgradeCommon::CONF_FILE_AIRTIME, UpgradeCommon::CONF_WWW_DATA_GRP)){
|
||||
echo "Could not set ownership of api_client.cfg to 'pypo'. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
if (!self::ChangeFileOwnerGroupMod(UpgradeCommon::CONF_FILE_API_CLIENT, UpgradeCommon::CONF_PYPO_GRP)){
|
||||
echo "Could not set ownership of api_client.cfg to 'pypo'. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
if (!self::ChangeFileOwnerGroupMod(UpgradeCommon::CONF_FILE_PYPO, UpgradeCommon::CONF_PYPO_GRP)){
|
||||
echo "Could not set ownership of pypo.cfg to 'pypo'. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
if (!self::ChangeFileOwnerGroupMod(UpgradeCommon::CONF_FILE_LIQUIDSOAP, UpgradeCommon::CONF_PYPO_GRP)){
|
||||
echo "Could not set ownership of liquidsoap.cfg to 'pypo'. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
if (!self::ChangeFileOwnerGroupMod(UpgradeCommon::CONF_FILE_MEDIAMONITOR, UpgradeCommon::CONF_PYPO_GRP)){
|
||||
echo "Could not set ownership of media-monitor.cfg to 'pypo'. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
private static function ChangeFileOwnerGroupMod($filename, $user){
|
||||
return (chown($filename, $user) &&
|
||||
chgrp($filename, $user) &&
|
||||
chmod($filename, 0640));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
UpgradeCommon::connectToDatabase();
|
||||
UpgradeCommon::SetDefaultTimezone();
|
||||
AirtimeConfigFileUpgrade::start();
|
|
@ -0,0 +1,23 @@
|
|||
[database]
|
||||
host = localhost
|
||||
dbname = airtime
|
||||
dbuser = airtime
|
||||
dbpass = airtime
|
||||
|
||||
[rabbitmq]
|
||||
host = 127.0.0.1
|
||||
port = 5672
|
||||
user = guest
|
||||
password = guest
|
||||
vhost = /
|
||||
|
||||
[general]
|
||||
api_key = AAA
|
||||
web_server_user = www-data
|
||||
airtime_dir = /usr/share/airtime/
|
||||
base_url = localhost
|
||||
base_port = 80
|
||||
|
||||
[soundcloud]
|
||||
connection_retries = 3
|
||||
time_between_retries = 60
|
|
@ -0,0 +1,117 @@
|
|||
bin_dir = "/usr/lib/airtime/api_clients"
|
||||
|
||||
#############################
|
||||
## Common
|
||||
#############################
|
||||
|
||||
# Value needed to access the API
|
||||
api_key = 'AAA'
|
||||
|
||||
# Path to the base of the API
|
||||
api_base = 'api'
|
||||
|
||||
# URL to get the version number of the server API
|
||||
version_url = 'version/api_key/%%api_key%%'
|
||||
|
||||
#URL to register a components IP Address with the central web server
|
||||
register_component = 'register-component/format/json/api_key/%%api_key%%/component/%%component%%'
|
||||
|
||||
# Hostname
|
||||
base_url = 'localhost'
|
||||
base_port = 80
|
||||
|
||||
#############################
|
||||
## Config for Media Monitor
|
||||
#############################
|
||||
|
||||
# URL to setup the media monitor
|
||||
media_setup_url = 'media-monitor-setup/format/json/api_key/%%api_key%%'
|
||||
|
||||
# Tell Airtime the file id associated with a show instance.
|
||||
upload_recorded = 'upload-recorded/format/json/api_key/%%api_key%%/fileid/%%fileid%%/showinstanceid/%%showinstanceid%%'
|
||||
|
||||
# URL to tell Airtime to update file's meta data
|
||||
update_media_url = 'reload-metadata/format/json/api_key/%%api_key%%/mode/%%mode%%'
|
||||
|
||||
# URL to tell Airtime we want a listing of all files it knows about
|
||||
list_all_db_files = 'list-all-files/format/json/api_key/%%api_key%%/dir_id/%%dir_id%%'
|
||||
|
||||
# URL to tell Airtime we want a listing of all dirs its watching (including the stor dir)
|
||||
list_all_watched_dirs = 'list-all-watched-dirs/format/json/api_key/%%api_key%%'
|
||||
|
||||
# URL to tell Airtime we want to add watched directory
|
||||
add_watched_dir = 'add-watched-dir/format/json/api_key/%%api_key%%/path/%%path%%'
|
||||
|
||||
# URL to tell Airtime we want to add watched directory
|
||||
remove_watched_dir = 'remove-watched-dir/format/json/api_key/%%api_key%%/path/%%path%%'
|
||||
|
||||
# URL to tell Airtime we want to add watched directory
|
||||
set_storage_dir = 'set-storage-dir/format/json/api_key/%%api_key%%/path/%%path%%'
|
||||
|
||||
#############################
|
||||
## Config for Recorder
|
||||
#############################
|
||||
|
||||
# URL to get the schedule of shows set to record
|
||||
show_schedule_url = 'recorded-shows/format/json/api_key/%%api_key%%'
|
||||
|
||||
# URL to upload the recorded show's file to Airtime
|
||||
upload_file_url = 'upload-file/format/json/api_key/%%api_key%%'
|
||||
|
||||
#number of retries to upload file if connection problem
|
||||
upload_retries = 3
|
||||
|
||||
#time to wait between attempts to upload file if connection problem (in seconds)
|
||||
upload_wait = 60
|
||||
|
||||
################################################################################
|
||||
# Uncomment *one of the sets* of values from the API clients below, and comment
|
||||
# out all the others.
|
||||
################################################################################
|
||||
|
||||
#############################
|
||||
## Config for Pypo
|
||||
#############################
|
||||
|
||||
# Schedule export path.
|
||||
# %%from%% - starting date/time in the form YYYY-MM-DD-hh-mm
|
||||
# %%to%% - starting date/time in the form YYYY-MM-DD-hh-mm
|
||||
export_url = 'schedule/api_key/%%api_key%%'
|
||||
|
||||
get_media_url = 'get-media/file/%%file%%/api_key/%%api_key%%'
|
||||
|
||||
# Update whether a schedule group has begun playing.
|
||||
update_item_url = 'notify-schedule-group-play/api_key/%%api_key%%/schedule_id/%%schedule_id%%'
|
||||
|
||||
# Update whether an audio clip is currently playing.
|
||||
update_start_playing_url = 'notify-media-item-start-play/api_key/%%api_key%%/media_id/%%media_id%%/schedule_id/%%schedule_id%%'
|
||||
|
||||
# ???
|
||||
generate_range_url = 'generate_range_dp.php'
|
||||
|
||||
# URL to tell Airtime we want to get stream setting
|
||||
get_stream_setting = 'get-stream-setting/format/json/api_key/%%api_key%%/'
|
||||
|
||||
#URL to update liquidsoap status
|
||||
update_liquidsoap_status = 'update-liquidsoap-status/format/json/api_key/%%api_key%%/msg/%%msg%%/stream_id/%%stream_id%%/boot_time/%%boot_time%%'
|
||||
|
||||
##############
|
||||
# OBP config #
|
||||
##############
|
||||
|
||||
# URL to get the version number of the server API
|
||||
#version_url = 'api/pypo/status/json'
|
||||
|
||||
# Schedule export path.
|
||||
# %%from%% - starting date/time in the form YYYY-MM-DD-hh-mm
|
||||
# %%to%% - starting date/time in the form YYYY-MM-DD-hh-mm
|
||||
|
||||
# Update whether an item has been played.
|
||||
#update_item_url = 'api/pypo/update_shedueled_item/$$item_id%%?played=%%played%%'
|
||||
|
||||
# Update whether an item is currently playing.
|
||||
#update_start_playing_url = 'api/pypo/mod/medialibrary/?playlist_type=%%playlist_type%%&export_source=%%export_source%%&media_id=%%media_id%%&playlist_id=%%playlist_id%%&transmission_id=%%transmission_id%%'
|
||||
|
||||
# ???
|
||||
#generate_range_url = 'api/pypo/generate_range_dp/'
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
###########################################
|
||||
# Liquidsoap config file #
|
||||
###########################################
|
||||
|
||||
###########################################
|
||||
# Output settings #
|
||||
###########################################
|
||||
output_sound_device = false
|
||||
output_sound_device_type = "ALSA"
|
||||
s1_output = "icecast"
|
||||
s2_output = "icecast"
|
||||
s3_output = "icecast"
|
||||
|
||||
s1_enable = true
|
||||
s2_enable = false
|
||||
s3_enable = false
|
||||
|
||||
s1_type = "ogg"
|
||||
s2_type = "ogg"
|
||||
s3_type = "mp3"
|
||||
|
||||
s1_bitrate = 128
|
||||
s2_bitrate = 128
|
||||
s3_bitrate = 160
|
||||
|
||||
###########################################
|
||||
# Logging settings #
|
||||
###########################################
|
||||
log_file = "/var/log/airtime/pypo-liquidsoap/<script>.log"
|
||||
#log_level = 3
|
||||
|
||||
###########################################
|
||||
# Icecast Stream settings #
|
||||
###########################################
|
||||
s1_host = "127.0.0.1"
|
||||
s2_host = "127.0.0.1"
|
||||
s3_host = "127.0.0.1"
|
||||
s1_port = 8000
|
||||
s2_port = 8000
|
||||
s3_port = 8000
|
||||
s1_user = ""
|
||||
s2_user = ""
|
||||
s3_user = ""
|
||||
s1_pass = "hackme"
|
||||
s2_pass = "hackme"
|
||||
s3_pass = "hackme"
|
||||
|
||||
# Icecast mountpoint names
|
||||
s1_mount = "airtime_128.ogg"
|
||||
s2_mount = "airtime_128.ogg"
|
||||
s3_mount = "airtime_160.mp3"
|
||||
|
||||
# Webstream metadata settings
|
||||
s1_url = "http://airtime.sourcefabric.org"
|
||||
s2_url = "http://airtime.sourcefabric.org"
|
||||
s3_url = "http://airtime.sourcefabric.org"
|
||||
s1_description = "Airtime Radio! stream1"
|
||||
s2_description = "Airtime Radio! stream2"
|
||||
s3_description = "Airtime Radio! stream3"
|
||||
s1_genre = "genre"
|
||||
s2_genre = "genre"
|
||||
s3_genre = "genre"
|
||||
|
||||
# Audio stream metadata for vorbis/ogg is disabled by default
|
||||
# due to a number of client media players that disconnect
|
||||
# when the metadata changes to a new track. Some versions of
|
||||
# mplayer and VLC have this problem. Enable this option at your
|
||||
# own risk!
|
||||
icecast_vorbis_metadata = false
|
|
@ -0,0 +1,22 @@
|
|||
api_client = "airtime"
|
||||
|
||||
# where the binary files live
|
||||
bin_dir = '/usr/lib/airtime/media-monitor'
|
||||
|
||||
# where the logging files live
|
||||
log_dir = '/var/log/airtime/media-monitor'
|
||||
|
||||
|
||||
############################################
|
||||
# RabbitMQ settings #
|
||||
############################################
|
||||
rabbitmq_host = 'localhost'
|
||||
rabbitmq_user = 'guest'
|
||||
rabbitmq_password = 'guest'
|
||||
rabbitmq_vhost = '/'
|
||||
|
||||
############################################
|
||||
# Media-Monitor preferences #
|
||||
############################################
|
||||
check_filesystem_events = 5 #how long to queue up events performed on the files themselves.
|
||||
check_airtime_events = 30 #how long to queue metadata input from airtime.
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
// This file generated by Propel 1.5.2 convert-conf target - with modifications by Martin
|
||||
// from XML runtime conf file /home/naomiaro/dev-campcaster/campcaster/build/runtime-conf.xml
|
||||
|
||||
$ini = parse_ini_file('/etc/airtime/airtime.conf', true);
|
||||
|
||||
$dbhost = $ini['database']['host'];
|
||||
$dbname = $ini['database']['dbname'];
|
||||
$dbuser = $ini['database']['dbuser'];
|
||||
$dbpass = $ini['database']['dbpass'];
|
||||
|
||||
$conf = array (
|
||||
'datasources' =>
|
||||
array (
|
||||
'airtime' =>
|
||||
array (
|
||||
'adapter' => 'pgsql',
|
||||
'connection' =>
|
||||
array (
|
||||
'dsn' => "pgsql:host=$dbhost;port=5432;dbname=$dbname;user=$dbuser;password=$dbpass",
|
||||
),
|
||||
),
|
||||
'default' => 'airtime',
|
||||
),
|
||||
'generator_version' => '1.5.2',
|
||||
);
|
||||
$conf['classmap'] = include(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'classmap-airtime-conf.php');
|
||||
return $conf;
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'cc_access' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcAccess extends BaseCcAccess {
|
||||
|
||||
} // CcAccess
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_access' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcAccessPeer extends BaseCcAccessPeer {
|
||||
|
||||
} // CcAccessPeer
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_access' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcAccessQuery extends BaseCcAccessQuery {
|
||||
|
||||
} // CcAccessQuery
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'cc_backup' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcBackup extends BaseCcBackup {
|
||||
|
||||
} // CcBackup
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_backup' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcBackupPeer extends BaseCcBackupPeer {
|
||||
|
||||
} // CcBackupPeer
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_backup' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcBackupQuery extends BaseCcBackupQuery {
|
||||
|
||||
} // CcBackupQuery
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'cc_country' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcCountry extends BaseCcCountry {
|
||||
|
||||
} // CcCountry
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_country' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcCountryPeer extends BaseCcCountryPeer {
|
||||
|
||||
} // CcCountryPeer
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_country' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcCountryQuery extends BaseCcCountryQuery {
|
||||
|
||||
} // CcCountryQuery
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
require_once('Common.php');
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'cc_files' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.campcaster
|
||||
*/
|
||||
class CcFiles extends BaseCcFiles {
|
||||
|
||||
public function getDbLength()
|
||||
{
|
||||
return $this->length;
|
||||
}
|
||||
|
||||
public function setDbLength($time)
|
||||
{
|
||||
$this->length = $time;
|
||||
//$this->modifiedColumns[] = CcPlaylistcontentsPeer::LENGTH;
|
||||
return Common::setTimeInSub($this, 'LENGTH', $time);
|
||||
}
|
||||
|
||||
|
||||
} // CcFiles
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_files' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcFilesPeer extends BaseCcFilesPeer {
|
||||
|
||||
} // CcFilesPeer
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_files' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcFilesQuery extends BaseCcFilesQuery {
|
||||
|
||||
} // CcFilesQuery
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'cc_login_attempts' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcLoginAttempts extends BaseCcLoginAttempts {
|
||||
|
||||
} // CcLoginAttempts
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_login_attempts' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcLoginAttemptsPeer extends BaseCcLoginAttemptsPeer {
|
||||
|
||||
} // CcLoginAttemptsPeer
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_login_attempts' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcLoginAttemptsQuery extends BaseCcLoginAttemptsQuery {
|
||||
|
||||
} // CcLoginAttemptsQuery
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'cc_music_dirs' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcMusicDirs extends BaseCcMusicDirs {
|
||||
|
||||
} // CcMusicDirs
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_music_dirs' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcMusicDirsPeer extends BaseCcMusicDirsPeer {
|
||||
|
||||
} // CcMusicDirsPeer
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_music_dirs' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcMusicDirsQuery extends BaseCcMusicDirsQuery {
|
||||
|
||||
} // CcMusicDirsQuery
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'cc_perms' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcPerms extends BaseCcPerms {
|
||||
|
||||
} // CcPerms
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_perms' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcPermsPeer extends BaseCcPermsPeer {
|
||||
|
||||
} // CcPermsPeer
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_perms' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcPermsQuery extends BaseCcPermsQuery {
|
||||
|
||||
} // CcPermsQuery
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'cc_playlist' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.campcaster
|
||||
*/
|
||||
class CcPlaylist extends BaseCcPlaylist {
|
||||
|
||||
|
||||
public function computeLastPosition()
|
||||
{
|
||||
$con = Propel::getConnection(CcPlaylistPeer::DATABASE_NAME);
|
||||
|
||||
$sql = 'SELECT MAX('.CcPlaylistcontentsPeer::POSITION.') AS pos'
|
||||
. ' FROM ' .CcPlaylistcontentsPeer::TABLE_NAME
|
||||
. ' WHERE ' .CcPlaylistcontentsPeer::PLAYLIST_ID. ' = :p1';
|
||||
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p1', $this->getDbId());
|
||||
$stmt->execute();
|
||||
return $stmt->fetchColumn();
|
||||
}
|
||||
|
||||
public function computeLength()
|
||||
{
|
||||
$con = Propel::getConnection(CcPlaylistPeer::DATABASE_NAME);
|
||||
|
||||
$sql = 'SELECT SUM('.CcPlaylistcontentsPeer::CLIPLENGTH.') AS length'
|
||||
. ' FROM ' .CcPlaylistcontentsPeer::TABLE_NAME
|
||||
. ' WHERE ' .CcPlaylistcontentsPeer::PLAYLIST_ID. ' = :p1';
|
||||
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p1', $this->getDbId());
|
||||
$stmt->execute();
|
||||
return $stmt->fetchColumn();
|
||||
}
|
||||
|
||||
|
||||
} // CcPlaylist
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_playlist' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcPlaylistPeer extends BaseCcPlaylistPeer {
|
||||
|
||||
} // CcPlaylistPeer
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_playlist' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcPlaylistQuery extends BaseCcPlaylistQuery {
|
||||
|
||||
} // CcPlaylistQuery
|
|
@ -0,0 +1,81 @@
|
|||
<?php
|
||||
|
||||
require_once('Common.php');
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'cc_playlistcontents' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.campcaster
|
||||
*/
|
||||
class CcPlaylistcontents extends BaseCcPlaylistcontents {
|
||||
|
||||
public function getDbFadein()
|
||||
{
|
||||
return $this->fadein;
|
||||
}
|
||||
|
||||
public function setDbFadein($time)
|
||||
{
|
||||
$this->fadein = $time;
|
||||
//$this->modifiedColumns[] = CcPlaylistcontentsPeer::FADEIN;
|
||||
Common::setTimeInSub($this, 'FADEIN', $time);
|
||||
}
|
||||
|
||||
public function getDbFadeout()
|
||||
{
|
||||
return $this->fadeout;
|
||||
}
|
||||
|
||||
public function setDbFadeout($time)
|
||||
{
|
||||
$this->fadeout = $time;
|
||||
//$this->modifiedColumns[] = CcPlaylistcontentsPeer::FADEOUT;
|
||||
Common::setTimeInSub($this, 'FADEOUT', $time);
|
||||
}
|
||||
|
||||
public function getDbCuein()
|
||||
{
|
||||
return $this->cuein;
|
||||
}
|
||||
|
||||
public function setDbCuein($time)
|
||||
{
|
||||
$this->cuein = $time;
|
||||
//$this->modifiedColumns[] = CcPlaylistcontentsPeer::CUEIN;
|
||||
Common::setTimeInSub($this, 'CUEIN', $time);
|
||||
}
|
||||
|
||||
public function getDbCueout()
|
||||
{
|
||||
return $this->cueout;
|
||||
}
|
||||
|
||||
public function setDbCueout($time)
|
||||
{
|
||||
$this->cueout = $time;
|
||||
//$this->modifiedColumns[] = CcPlaylistcontentsPeer::CUEOUT;
|
||||
Common::setTimeInSub($this, 'CUEOUT', $time);
|
||||
}
|
||||
|
||||
public function getDbCliplength()
|
||||
{
|
||||
return $this->cliplength;
|
||||
}
|
||||
|
||||
public function setDbCliplength($time)
|
||||
{
|
||||
$this->cliplength = $time;
|
||||
//$this->modifiedColumns[] = CcPlaylistcontentsPeer::CLIPLENGTH;
|
||||
Common::setTimeInSub($this, 'CLIPLENGTH', $time);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
} // CcPlaylistcontents
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_playlistcontents' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcPlaylistcontentsPeer extends BaseCcPlaylistcontentsPeer {
|
||||
|
||||
} // CcPlaylistcontentsPeer
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_playlistcontents' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcPlaylistcontentsQuery extends BaseCcPlaylistcontentsQuery {
|
||||
|
||||
} // CcPlaylistcontentsQuery
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'cc_pref' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcPref extends BaseCcPref {
|
||||
|
||||
} // CcPref
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_pref' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcPrefPeer extends BaseCcPrefPeer {
|
||||
|
||||
} // CcPrefPeer
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_pref' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcPrefQuery extends BaseCcPrefQuery {
|
||||
|
||||
} // CcPrefQuery
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'cc_schedule' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcSchedule extends BaseCcSchedule {
|
||||
|
||||
} // CcSchedule
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_schedule' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcSchedulePeer extends BaseCcSchedulePeer {
|
||||
|
||||
} // CcSchedulePeer
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_schedule' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcScheduleQuery extends BaseCcScheduleQuery {
|
||||
|
||||
} // CcScheduleQuery
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'cc_service_register' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcServiceRegister extends BaseCcServiceRegister {
|
||||
|
||||
} // CcServiceRegister
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_service_register' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcServiceRegisterPeer extends BaseCcServiceRegisterPeer {
|
||||
|
||||
} // CcServiceRegisterPeer
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_service_register' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcServiceRegisterQuery extends BaseCcServiceRegisterQuery {
|
||||
|
||||
} // CcServiceRegisterQuery
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'cc_sess' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcSess extends BaseCcSess {
|
||||
|
||||
} // CcSess
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_sess' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcSessPeer extends BaseCcSessPeer {
|
||||
|
||||
} // CcSessPeer
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_sess' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcSessQuery extends BaseCcSessQuery {
|
||||
|
||||
} // CcSessQuery
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'cc_show' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcShow extends BaseCcShow {
|
||||
|
||||
} // CcShow
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'cc_show_days' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcShowDays extends BaseCcShowDays {
|
||||
|
||||
} // CcShowDays
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_show_days' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcShowDaysPeer extends BaseCcShowDaysPeer {
|
||||
|
||||
} // CcShowDaysPeer
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_show_days' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcShowDaysQuery extends BaseCcShowDaysQuery {
|
||||
|
||||
} // CcShowDaysQuery
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'cc_show_hosts' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcShowHosts extends BaseCcShowHosts {
|
||||
|
||||
} // CcShowHosts
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_show_hosts' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcShowHostsPeer extends BaseCcShowHostsPeer {
|
||||
|
||||
} // CcShowHostsPeer
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_show_hosts' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcShowHostsQuery extends BaseCcShowHostsQuery {
|
||||
|
||||
} // CcShowHostsQuery
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'cc_show_instances' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcShowInstances extends BaseCcShowInstances {
|
||||
|
||||
} // CcShowInstances
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_show_instances' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcShowInstancesPeer extends BaseCcShowInstancesPeer {
|
||||
|
||||
} // CcShowInstancesPeer
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_show_instances' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcShowInstancesQuery extends BaseCcShowInstancesQuery {
|
||||
|
||||
} // CcShowInstancesQuery
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_show' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcShowPeer extends BaseCcShowPeer {
|
||||
|
||||
} // CcShowPeer
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_show' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcShowQuery extends BaseCcShowQuery {
|
||||
|
||||
} // CcShowQuery
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'cc_show_rebroadcast' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcShowRebroadcast extends BaseCcShowRebroadcast {
|
||||
|
||||
} // CcShowRebroadcast
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_show_rebroadcast' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcShowRebroadcastPeer extends BaseCcShowRebroadcastPeer {
|
||||
|
||||
} // CcShowRebroadcastPeer
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_show_rebroadcast' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcShowRebroadcastQuery extends BaseCcShowRebroadcastQuery {
|
||||
|
||||
} // CcShowRebroadcastQuery
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'cc_show_schedule' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcShowSchedule extends BaseCcShowSchedule {
|
||||
|
||||
} // CcShowSchedule
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_show_schedule' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcShowSchedulePeer extends BaseCcShowSchedulePeer {
|
||||
|
||||
} // CcShowSchedulePeer
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_show_schedule' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcShowScheduleQuery extends BaseCcShowScheduleQuery {
|
||||
|
||||
} // CcShowScheduleQuery
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'cc_smemb' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcSmemb extends BaseCcSmemb {
|
||||
|
||||
} // CcSmemb
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_smemb' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcSmembPeer extends BaseCcSmembPeer {
|
||||
|
||||
} // CcSmembPeer
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_smemb' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcSmembQuery extends BaseCcSmembQuery {
|
||||
|
||||
} // CcSmembQuery
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'cc_stream_setting' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcStreamSetting extends BaseCcStreamSetting {
|
||||
|
||||
} // CcStreamSetting
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_stream_setting' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcStreamSettingPeer extends BaseCcStreamSettingPeer {
|
||||
|
||||
} // CcStreamSettingPeer
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_stream_setting' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcStreamSettingQuery extends BaseCcStreamSettingQuery {
|
||||
|
||||
} // CcStreamSettingQuery
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'cc_subjs' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcSubjs extends BaseCcSubjs {
|
||||
|
||||
} // CcSubjs
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_subjs' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcSubjsPeer extends BaseCcSubjsPeer {
|
||||
|
||||
} // CcSubjsPeer
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_subjs' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcSubjsQuery extends BaseCcSubjsQuery {
|
||||
|
||||
} // CcSubjsQuery
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'cc_trans' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcTrans extends BaseCcTrans {
|
||||
|
||||
} // CcTrans
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_trans' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcTransPeer extends BaseCcTransPeer {
|
||||
|
||||
} // CcTransPeer
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_trans' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcTransQuery extends BaseCcTransQuery {
|
||||
|
||||
} // CcTransQuery
|
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
class Common {
|
||||
|
||||
public static function setTimeInSub($row, $col, $time)
|
||||
{
|
||||
$class = get_class($row).'Peer';
|
||||
|
||||
$con = Propel::getConnection($class::DATABASE_NAME);
|
||||
|
||||
$sql = 'UPDATE '.$class::TABLE_NAME
|
||||
. ' SET '.$col.' = :f1'
|
||||
. ' WHERE ' .$class::ID. ' = :p1';
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':f1', $time);
|
||||
$stmt->bindValue(':p1', $row->getDbId());
|
||||
$stmt->execute();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This class defines the structure of the 'cc_access' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* This map class is used by Propel to do runtime db structure discovery.
|
||||
* For example, the createSelectSql() method checks the type of a given column used in an
|
||||
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
|
||||
* (i.e. if it's a text column type).
|
||||
*
|
||||
* @package propel.generator.airtime.map
|
||||
*/
|
||||
class CcAccessTableMap extends TableMap {
|
||||
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'airtime.map.CcAccessTableMap';
|
||||
|
||||
/**
|
||||
* Initialize the table attributes, columns and validators
|
||||
* Relations are not initialized by this method since they are lazy loaded
|
||||
*
|
||||
* @return void
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function initialize()
|
||||
{
|
||||
// attributes
|
||||
$this->setName('cc_access');
|
||||
$this->setPhpName('CcAccess');
|
||||
$this->setClassname('CcAccess');
|
||||
$this->setPackage('airtime');
|
||||
$this->setUseIdGenerator(true);
|
||||
$this->setPrimaryKeyMethodInfo('cc_access_id_seq');
|
||||
// columns
|
||||
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
|
||||
$this->addColumn('GUNID', 'Gunid', 'CHAR', false, 32, null);
|
||||
$this->addColumn('TOKEN', 'Token', 'BIGINT', false, null, null);
|
||||
$this->addColumn('CHSUM', 'Chsum', 'CHAR', true, 32, '');
|
||||
$this->addColumn('EXT', 'Ext', 'VARCHAR', true, 128, '');
|
||||
$this->addColumn('TYPE', 'Type', 'VARCHAR', true, 20, '');
|
||||
$this->addColumn('PARENT', 'Parent', 'BIGINT', false, null, null);
|
||||
$this->addForeignKey('OWNER', 'Owner', 'INTEGER', 'cc_subjs', 'ID', false, null, null);
|
||||
$this->addColumn('TS', 'Ts', 'TIMESTAMP', false, null, null);
|
||||
// validators
|
||||
} // initialize()
|
||||
|
||||
/**
|
||||
* Build the RelationMap objects for this table relationships
|
||||
*/
|
||||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('owner' => 'id', ), null, null);
|
||||
} // buildRelations()
|
||||
|
||||
} // CcAccessTableMap
|
|
@ -0,0 +1,55 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This class defines the structure of the 'cc_backup' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* This map class is used by Propel to do runtime db structure discovery.
|
||||
* For example, the createSelectSql() method checks the type of a given column used in an
|
||||
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
|
||||
* (i.e. if it's a text column type).
|
||||
*
|
||||
* @package propel.generator.airtime.map
|
||||
*/
|
||||
class CcBackupTableMap extends TableMap {
|
||||
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'airtime.map.CcBackupTableMap';
|
||||
|
||||
/**
|
||||
* Initialize the table attributes, columns and validators
|
||||
* Relations are not initialized by this method since they are lazy loaded
|
||||
*
|
||||
* @return void
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function initialize()
|
||||
{
|
||||
// attributes
|
||||
$this->setName('cc_backup');
|
||||
$this->setPhpName('CcBackup');
|
||||
$this->setClassname('CcBackup');
|
||||
$this->setPackage('airtime');
|
||||
$this->setUseIdGenerator(false);
|
||||
// columns
|
||||
$this->addPrimaryKey('TOKEN', 'Token', 'VARCHAR', true, 64, null);
|
||||
$this->addColumn('SESSIONID', 'Sessionid', 'VARCHAR', true, 64, null);
|
||||
$this->addColumn('STATUS', 'Status', 'VARCHAR', true, 32, null);
|
||||
$this->addColumn('FROMTIME', 'Fromtime', 'TIMESTAMP', true, null, null);
|
||||
$this->addColumn('TOTIME', 'Totime', 'TIMESTAMP', true, null, null);
|
||||
// validators
|
||||
} // initialize()
|
||||
|
||||
/**
|
||||
* Build the RelationMap objects for this table relationships
|
||||
*/
|
||||
public function buildRelations()
|
||||
{
|
||||
} // buildRelations()
|
||||
|
||||
} // CcBackupTableMap
|
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This class defines the structure of the 'cc_country' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* This map class is used by Propel to do runtime db structure discovery.
|
||||
* For example, the createSelectSql() method checks the type of a given column used in an
|
||||
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
|
||||
* (i.e. if it's a text column type).
|
||||
*
|
||||
* @package propel.generator.airtime.map
|
||||
*/
|
||||
class CcCountryTableMap extends TableMap {
|
||||
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'airtime.map.CcCountryTableMap';
|
||||
|
||||
/**
|
||||
* Initialize the table attributes, columns and validators
|
||||
* Relations are not initialized by this method since they are lazy loaded
|
||||
*
|
||||
* @return void
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function initialize()
|
||||
{
|
||||
// attributes
|
||||
$this->setName('cc_country');
|
||||
$this->setPhpName('CcCountry');
|
||||
$this->setClassname('CcCountry');
|
||||
$this->setPackage('airtime');
|
||||
$this->setUseIdGenerator(false);
|
||||
// columns
|
||||
$this->addPrimaryKey('ISOCODE', 'DbIsoCode', 'CHAR', true, 3, null);
|
||||
$this->addColumn('NAME', 'DbName', 'VARCHAR', true, 255, null);
|
||||
// validators
|
||||
} // initialize()
|
||||
|
||||
/**
|
||||
* Build the RelationMap objects for this table relationships
|
||||
*/
|
||||
public function buildRelations()
|
||||
{
|
||||
} // buildRelations()
|
||||
|
||||
} // CcCountryTableMap
|
|
@ -0,0 +1,115 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This class defines the structure of the 'cc_files' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* This map class is used by Propel to do runtime db structure discovery.
|
||||
* For example, the createSelectSql() method checks the type of a given column used in an
|
||||
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
|
||||
* (i.e. if it's a text column type).
|
||||
*
|
||||
* @package propel.generator.airtime.map
|
||||
*/
|
||||
class CcFilesTableMap extends TableMap {
|
||||
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'airtime.map.CcFilesTableMap';
|
||||
|
||||
/**
|
||||
* Initialize the table attributes, columns and validators
|
||||
* Relations are not initialized by this method since they are lazy loaded
|
||||
*
|
||||
* @return void
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function initialize()
|
||||
{
|
||||
// attributes
|
||||
$this->setName('cc_files');
|
||||
$this->setPhpName('CcFiles');
|
||||
$this->setClassname('CcFiles');
|
||||
$this->setPackage('airtime');
|
||||
$this->setUseIdGenerator(true);
|
||||
$this->setPrimaryKeyMethodInfo('cc_files_id_seq');
|
||||
// columns
|
||||
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
|
||||
$this->addColumn('GUNID', 'DbGunid', 'CHAR', true, 32, null);
|
||||
$this->addColumn('NAME', 'DbName', 'VARCHAR', true, 255, '');
|
||||
$this->addColumn('MIME', 'DbMime', 'VARCHAR', true, 255, '');
|
||||
$this->addColumn('FTYPE', 'DbFtype', 'VARCHAR', true, 128, '');
|
||||
$this->addForeignKey('DIRECTORY', 'DbDirectory', 'INTEGER', 'cc_music_dirs', 'ID', false, null, null);
|
||||
$this->addColumn('FILEPATH', 'DbFilepath', 'LONGVARCHAR', false, null, '');
|
||||
$this->addColumn('STATE', 'DbState', 'VARCHAR', true, 128, 'empty');
|
||||
$this->addColumn('CURRENTLYACCESSING', 'DbCurrentlyaccessing', 'INTEGER', true, null, 0);
|
||||
$this->addForeignKey('EDITEDBY', 'DbEditedby', 'INTEGER', 'cc_subjs', 'ID', false, null, null);
|
||||
$this->addColumn('MTIME', 'DbMtime', 'TIMESTAMP', false, 6, null);
|
||||
$this->addColumn('MD5', 'DbMd5', 'CHAR', false, 32, null);
|
||||
$this->addColumn('TRACK_TITLE', 'DbTrackTitle', 'VARCHAR', false, 512, null);
|
||||
$this->addColumn('ARTIST_NAME', 'DbArtistName', 'VARCHAR', false, 512, null);
|
||||
$this->addColumn('BIT_RATE', 'DbBitRate', 'VARCHAR', false, 32, null);
|
||||
$this->addColumn('SAMPLE_RATE', 'DbSampleRate', 'VARCHAR', false, 32, null);
|
||||
$this->addColumn('FORMAT', 'DbFormat', 'VARCHAR', false, 128, null);
|
||||
$this->addColumn('LENGTH', 'DbLength', 'TIME', false, null, null);
|
||||
$this->addColumn('ALBUM_TITLE', 'DbAlbumTitle', 'VARCHAR', false, 512, null);
|
||||
$this->addColumn('GENRE', 'DbGenre', 'VARCHAR', false, 64, null);
|
||||
$this->addColumn('COMMENTS', 'DbComments', 'LONGVARCHAR', false, null, null);
|
||||
$this->addColumn('YEAR', 'DbYear', 'VARCHAR', false, 16, null);
|
||||
$this->addColumn('TRACK_NUMBER', 'DbTrackNumber', 'INTEGER', false, null, null);
|
||||
$this->addColumn('CHANNELS', 'DbChannels', 'INTEGER', false, null, null);
|
||||
$this->addColumn('URL', 'DbUrl', 'VARCHAR', false, 1024, null);
|
||||
$this->addColumn('BPM', 'DbBpm', 'VARCHAR', false, 8, null);
|
||||
$this->addColumn('RATING', 'DbRating', 'VARCHAR', false, 8, null);
|
||||
$this->addColumn('ENCODED_BY', 'DbEncodedBy', 'VARCHAR', false, 255, null);
|
||||
$this->addColumn('DISC_NUMBER', 'DbDiscNumber', 'VARCHAR', false, 8, null);
|
||||
$this->addColumn('MOOD', 'DbMood', 'VARCHAR', false, 64, null);
|
||||
$this->addColumn('LABEL', 'DbLabel', 'VARCHAR', false, 512, null);
|
||||
$this->addColumn('COMPOSER', 'DbComposer', 'VARCHAR', false, 512, null);
|
||||
$this->addColumn('ENCODER', 'DbEncoder', 'VARCHAR', false, 64, null);
|
||||
$this->addColumn('CHECKSUM', 'DbChecksum', 'VARCHAR', false, 256, null);
|
||||
$this->addColumn('LYRICS', 'DbLyrics', 'LONGVARCHAR', false, null, null);
|
||||
$this->addColumn('ORCHESTRA', 'DbOrchestra', 'VARCHAR', false, 512, null);
|
||||
$this->addColumn('CONDUCTOR', 'DbConductor', 'VARCHAR', false, 512, null);
|
||||
$this->addColumn('LYRICIST', 'DbLyricist', 'VARCHAR', false, 512, null);
|
||||
$this->addColumn('ORIGINAL_LYRICIST', 'DbOriginalLyricist', 'VARCHAR', false, 512, null);
|
||||
$this->addColumn('RADIO_STATION_NAME', 'DbRadioStationName', 'VARCHAR', false, 512, null);
|
||||
$this->addColumn('INFO_URL', 'DbInfoUrl', 'VARCHAR', false, 512, null);
|
||||
$this->addColumn('ARTIST_URL', 'DbArtistUrl', 'VARCHAR', false, 512, null);
|
||||
$this->addColumn('AUDIO_SOURCE_URL', 'DbAudioSourceUrl', 'VARCHAR', false, 512, null);
|
||||
$this->addColumn('RADIO_STATION_URL', 'DbRadioStationUrl', 'VARCHAR', false, 512, null);
|
||||
$this->addColumn('BUY_THIS_URL', 'DbBuyThisUrl', 'VARCHAR', false, 512, null);
|
||||
$this->addColumn('ISRC_NUMBER', 'DbIsrcNumber', 'VARCHAR', false, 512, null);
|
||||
$this->addColumn('CATALOG_NUMBER', 'DbCatalogNumber', 'VARCHAR', false, 512, null);
|
||||
$this->addColumn('ORIGINAL_ARTIST', 'DbOriginalArtist', 'VARCHAR', false, 512, null);
|
||||
$this->addColumn('COPYRIGHT', 'DbCopyright', 'VARCHAR', false, 512, null);
|
||||
$this->addColumn('REPORT_DATETIME', 'DbReportDatetime', 'VARCHAR', false, 32, null);
|
||||
$this->addColumn('REPORT_LOCATION', 'DbReportLocation', 'VARCHAR', false, 512, null);
|
||||
$this->addColumn('REPORT_ORGANIZATION', 'DbReportOrganization', 'VARCHAR', false, 512, null);
|
||||
$this->addColumn('SUBJECT', 'DbSubject', 'VARCHAR', false, 512, null);
|
||||
$this->addColumn('CONTRIBUTOR', 'DbContributor', 'VARCHAR', false, 512, null);
|
||||
$this->addColumn('LANGUAGE', 'DbLanguage', 'VARCHAR', false, 512, null);
|
||||
$this->addColumn('SOUNDCLOUD_ID', 'DbSoundcloudId', 'INTEGER', false, null, null);
|
||||
$this->addColumn('SOUNDCLOUD_ERROR_CODE', 'DbSoundcloudErrorCode', 'INTEGER', false, null, null);
|
||||
$this->addColumn('SOUNDCLOUD_ERROR_MSG', 'DbSoundcloudErrorMsg', 'VARCHAR', false, 512, null);
|
||||
$this->addColumn('SOUNDCLOUD_LINK_TO_FILE', 'DbSoundcloudLinkToFile', 'VARCHAR', false, 4096, null);
|
||||
// validators
|
||||
} // initialize()
|
||||
|
||||
/**
|
||||
* Build the RelationMap objects for this table relationships
|
||||
*/
|
||||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('editedby' => 'id', ), null, null);
|
||||
$this->addRelation('CcMusicDirs', 'CcMusicDirs', RelationMap::MANY_TO_ONE, array('directory' => 'id', ), 'CASCADE', null);
|
||||
$this->addRelation('CcShowInstances', 'CcShowInstances', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null);
|
||||
$this->addRelation('CcPlaylistcontents', 'CcPlaylistcontents', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null);
|
||||
$this->addRelation('CcSchedule', 'CcSchedule', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null);
|
||||
} // buildRelations()
|
||||
|
||||
} // CcFilesTableMap
|
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This class defines the structure of the 'cc_login_attempts' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* This map class is used by Propel to do runtime db structure discovery.
|
||||
* For example, the createSelectSql() method checks the type of a given column used in an
|
||||
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
|
||||
* (i.e. if it's a text column type).
|
||||
*
|
||||
* @package propel.generator.airtime.map
|
||||
*/
|
||||
class CcLoginAttemptsTableMap extends TableMap {
|
||||
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'airtime.map.CcLoginAttemptsTableMap';
|
||||
|
||||
/**
|
||||
* Initialize the table attributes, columns and validators
|
||||
* Relations are not initialized by this method since they are lazy loaded
|
||||
*
|
||||
* @return void
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function initialize()
|
||||
{
|
||||
// attributes
|
||||
$this->setName('cc_login_attempts');
|
||||
$this->setPhpName('CcLoginAttempts');
|
||||
$this->setClassname('CcLoginAttempts');
|
||||
$this->setPackage('airtime');
|
||||
$this->setUseIdGenerator(false);
|
||||
// columns
|
||||
$this->addPrimaryKey('IP', 'DbIP', 'VARCHAR', true, 32, null);
|
||||
$this->addColumn('ATTEMPTS', 'DbAttempts', 'INTEGER', false, null, 0);
|
||||
// validators
|
||||
} // initialize()
|
||||
|
||||
/**
|
||||
* Build the RelationMap objects for this table relationships
|
||||
*/
|
||||
public function buildRelations()
|
||||
{
|
||||
} // buildRelations()
|
||||
|
||||
} // CcLoginAttemptsTableMap
|
|
@ -0,0 +1,55 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This class defines the structure of the 'cc_music_dirs' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* This map class is used by Propel to do runtime db structure discovery.
|
||||
* For example, the createSelectSql() method checks the type of a given column used in an
|
||||
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
|
||||
* (i.e. if it's a text column type).
|
||||
*
|
||||
* @package propel.generator.airtime.map
|
||||
*/
|
||||
class CcMusicDirsTableMap extends TableMap {
|
||||
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'airtime.map.CcMusicDirsTableMap';
|
||||
|
||||
/**
|
||||
* Initialize the table attributes, columns and validators
|
||||
* Relations are not initialized by this method since they are lazy loaded
|
||||
*
|
||||
* @return void
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function initialize()
|
||||
{
|
||||
// attributes
|
||||
$this->setName('cc_music_dirs');
|
||||
$this->setPhpName('CcMusicDirs');
|
||||
$this->setClassname('CcMusicDirs');
|
||||
$this->setPackage('airtime');
|
||||
$this->setUseIdGenerator(true);
|
||||
$this->setPrimaryKeyMethodInfo('cc_music_dirs_id_seq');
|
||||
// columns
|
||||
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
|
||||
$this->addColumn('DIRECTORY', 'Directory', 'LONGVARCHAR', false, null, null);
|
||||
$this->addColumn('TYPE', 'Type', 'VARCHAR', false, 255, null);
|
||||
// validators
|
||||
} // initialize()
|
||||
|
||||
/**
|
||||
* Build the RelationMap objects for this table relationships
|
||||
*/
|
||||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('CcFiles', 'CcFiles', RelationMap::ONE_TO_MANY, array('id' => 'directory', ), 'CASCADE', null);
|
||||
} // buildRelations()
|
||||
|
||||
} // CcMusicDirsTableMap
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This class defines the structure of the 'cc_perms' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* This map class is used by Propel to do runtime db structure discovery.
|
||||
* For example, the createSelectSql() method checks the type of a given column used in an
|
||||
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
|
||||
* (i.e. if it's a text column type).
|
||||
*
|
||||
* @package propel.generator.airtime.map
|
||||
*/
|
||||
class CcPermsTableMap extends TableMap {
|
||||
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'airtime.map.CcPermsTableMap';
|
||||
|
||||
/**
|
||||
* Initialize the table attributes, columns and validators
|
||||
* Relations are not initialized by this method since they are lazy loaded
|
||||
*
|
||||
* @return void
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function initialize()
|
||||
{
|
||||
// attributes
|
||||
$this->setName('cc_perms');
|
||||
$this->setPhpName('CcPerms');
|
||||
$this->setClassname('CcPerms');
|
||||
$this->setPackage('airtime');
|
||||
$this->setUseIdGenerator(false);
|
||||
// columns
|
||||
$this->addPrimaryKey('PERMID', 'Permid', 'INTEGER', true, null, null);
|
||||
$this->addForeignKey('SUBJ', 'Subj', 'INTEGER', 'cc_subjs', 'ID', false, null, null);
|
||||
$this->addColumn('ACTION', 'Action', 'VARCHAR', false, 20, null);
|
||||
$this->addColumn('OBJ', 'Obj', 'INTEGER', false, null, null);
|
||||
$this->addColumn('TYPE', 'Type', 'CHAR', false, 1, null);
|
||||
// validators
|
||||
} // initialize()
|
||||
|
||||
/**
|
||||
* Build the RelationMap objects for this table relationships
|
||||
*/
|
||||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('subj' => 'id', ), 'CASCADE', null);
|
||||
} // buildRelations()
|
||||
|
||||
} // CcPermsTableMap
|
|
@ -0,0 +1,61 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This class defines the structure of the 'cc_playlist' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* This map class is used by Propel to do runtime db structure discovery.
|
||||
* For example, the createSelectSql() method checks the type of a given column used in an
|
||||
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
|
||||
* (i.e. if it's a text column type).
|
||||
*
|
||||
* @package propel.generator.airtime.map
|
||||
*/
|
||||
class CcPlaylistTableMap extends TableMap {
|
||||
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'airtime.map.CcPlaylistTableMap';
|
||||
|
||||
/**
|
||||
* Initialize the table attributes, columns and validators
|
||||
* Relations are not initialized by this method since they are lazy loaded
|
||||
*
|
||||
* @return void
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function initialize()
|
||||
{
|
||||
// attributes
|
||||
$this->setName('cc_playlist');
|
||||
$this->setPhpName('CcPlaylist');
|
||||
$this->setClassname('CcPlaylist');
|
||||
$this->setPackage('airtime');
|
||||
$this->setUseIdGenerator(true);
|
||||
$this->setPrimaryKeyMethodInfo('cc_playlist_id_seq');
|
||||
// columns
|
||||
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
|
||||
$this->addColumn('NAME', 'DbName', 'VARCHAR', true, 255, '');
|
||||
$this->addColumn('STATE', 'DbState', 'VARCHAR', true, 128, 'empty');
|
||||
$this->addColumn('CURRENTLYACCESSING', 'DbCurrentlyaccessing', 'INTEGER', true, null, 0);
|
||||
$this->addForeignKey('EDITEDBY', 'DbEditedby', 'INTEGER', 'cc_subjs', 'ID', false, null, null);
|
||||
$this->addColumn('MTIME', 'DbMtime', 'TIMESTAMP', false, 6, null);
|
||||
$this->addColumn('CREATOR', 'DbCreator', 'VARCHAR', false, 32, null);
|
||||
$this->addColumn('DESCRIPTION', 'DbDescription', 'VARCHAR', false, 512, null);
|
||||
// validators
|
||||
} // initialize()
|
||||
|
||||
/**
|
||||
* Build the RelationMap objects for this table relationships
|
||||
*/
|
||||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('editedby' => 'id', ), null, null);
|
||||
$this->addRelation('CcPlaylistcontents', 'CcPlaylistcontents', RelationMap::ONE_TO_MANY, array('id' => 'playlist_id', ), 'CASCADE', null);
|
||||
} // buildRelations()
|
||||
|
||||
} // CcPlaylistTableMap
|
|
@ -0,0 +1,62 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This class defines the structure of the 'cc_playlistcontents' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* This map class is used by Propel to do runtime db structure discovery.
|
||||
* For example, the createSelectSql() method checks the type of a given column used in an
|
||||
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
|
||||
* (i.e. if it's a text column type).
|
||||
*
|
||||
* @package propel.generator.airtime.map
|
||||
*/
|
||||
class CcPlaylistcontentsTableMap extends TableMap {
|
||||
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'airtime.map.CcPlaylistcontentsTableMap';
|
||||
|
||||
/**
|
||||
* Initialize the table attributes, columns and validators
|
||||
* Relations are not initialized by this method since they are lazy loaded
|
||||
*
|
||||
* @return void
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function initialize()
|
||||
{
|
||||
// attributes
|
||||
$this->setName('cc_playlistcontents');
|
||||
$this->setPhpName('CcPlaylistcontents');
|
||||
$this->setClassname('CcPlaylistcontents');
|
||||
$this->setPackage('airtime');
|
||||
$this->setUseIdGenerator(true);
|
||||
$this->setPrimaryKeyMethodInfo('cc_playlistcontents_id_seq');
|
||||
// columns
|
||||
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
|
||||
$this->addForeignKey('PLAYLIST_ID', 'DbPlaylistId', 'INTEGER', 'cc_playlist', 'ID', false, null, null);
|
||||
$this->addForeignKey('FILE_ID', 'DbFileId', 'INTEGER', 'cc_files', 'ID', false, null, null);
|
||||
$this->addColumn('POSITION', 'DbPosition', 'INTEGER', false, null, null);
|
||||
$this->addColumn('CLIPLENGTH', 'DbCliplength', 'TIME', false, null, '00:00:00');
|
||||
$this->addColumn('CUEIN', 'DbCuein', 'TIME', false, null, '00:00:00');
|
||||
$this->addColumn('CUEOUT', 'DbCueout', 'TIME', false, null, '00:00:00');
|
||||
$this->addColumn('FADEIN', 'DbFadein', 'TIME', false, null, '00:00:00');
|
||||
$this->addColumn('FADEOUT', 'DbFadeout', 'TIME', false, null, '00:00:00');
|
||||
// validators
|
||||
} // initialize()
|
||||
|
||||
/**
|
||||
* Build the RelationMap objects for this table relationships
|
||||
*/
|
||||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('CcFiles', 'CcFiles', RelationMap::MANY_TO_ONE, array('file_id' => 'id', ), 'CASCADE', null);
|
||||
$this->addRelation('CcPlaylist', 'CcPlaylist', RelationMap::MANY_TO_ONE, array('playlist_id' => 'id', ), 'CASCADE', null);
|
||||
} // buildRelations()
|
||||
|
||||
} // CcPlaylistcontentsTableMap
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This class defines the structure of the 'cc_pref' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* This map class is used by Propel to do runtime db structure discovery.
|
||||
* For example, the createSelectSql() method checks the type of a given column used in an
|
||||
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
|
||||
* (i.e. if it's a text column type).
|
||||
*
|
||||
* @package propel.generator.airtime.map
|
||||
*/
|
||||
class CcPrefTableMap extends TableMap {
|
||||
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'airtime.map.CcPrefTableMap';
|
||||
|
||||
/**
|
||||
* Initialize the table attributes, columns and validators
|
||||
* Relations are not initialized by this method since they are lazy loaded
|
||||
*
|
||||
* @return void
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function initialize()
|
||||
{
|
||||
// attributes
|
||||
$this->setName('cc_pref');
|
||||
$this->setPhpName('CcPref');
|
||||
$this->setClassname('CcPref');
|
||||
$this->setPackage('airtime');
|
||||
$this->setUseIdGenerator(true);
|
||||
$this->setPrimaryKeyMethodInfo('cc_pref_id_seq');
|
||||
// columns
|
||||
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
|
||||
$this->addForeignKey('SUBJID', 'Subjid', 'INTEGER', 'cc_subjs', 'ID', false, null, null);
|
||||
$this->addColumn('KEYSTR', 'Keystr', 'VARCHAR', false, 255, null);
|
||||
$this->addColumn('VALSTR', 'Valstr', 'LONGVARCHAR', false, null, null);
|
||||
// validators
|
||||
} // initialize()
|
||||
|
||||
/**
|
||||
* Build the RelationMap objects for this table relationships
|
||||
*/
|
||||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('subjid' => 'id', ), 'CASCADE', null);
|
||||
} // buildRelations()
|
||||
|
||||
} // CcPrefTableMap
|
|
@ -0,0 +1,80 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This class defines the structure of the 'cc_schedule' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* This map class is used by Propel to do runtime db structure discovery.
|
||||
* For example, the createSelectSql() method checks the type of a given column used in an
|
||||
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
|
||||
* (i.e. if it's a text column type).
|
||||
*
|
||||
* @package propel.generator.airtime.map
|
||||
*/
|
||||
class CcScheduleTableMap extends TableMap {
|
||||
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'airtime.map.CcScheduleTableMap';
|
||||
|
||||
/**
|
||||
* Initialize the table attributes, columns and validators
|
||||
* Relations are not initialized by this method since they are lazy loaded
|
||||
*
|
||||
* @return void
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function initialize()
|
||||
{
|
||||
// attributes
|
||||
$this->setName('cc_schedule');
|
||||
$this->setPhpName('CcSchedule');
|
||||
$this->setClassname('CcSchedule');
|
||||
$this->setPackage('airtime');
|
||||
$this->setUseIdGenerator(true);
|
||||
$this->setPrimaryKeyMethodInfo('cc_schedule_id_seq');
|
||||
// columns
|
||||
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
|
||||
$this->addColumn('PLAYLIST_ID', 'DbPlaylistId', 'INTEGER', false, null, null);
|
||||
$this->addColumn('STARTS', 'DbStarts', 'TIMESTAMP', true, null, null);
|
||||
$this->addColumn('ENDS', 'DbEnds', 'TIMESTAMP', true, null, null);
|
||||
$this->addColumn('GROUP_ID', 'DbGroupId', 'INTEGER', false, null, null);
|
||||
$this->addForeignKey('FILE_ID', 'DbFileId', 'INTEGER', 'cc_files', 'ID', false, null, null);
|
||||
$this->addColumn('CLIP_LENGTH', 'DbClipLength', 'TIME', false, null, '00:00:00');
|
||||
$this->addColumn('FADE_IN', 'DbFadeIn', 'TIME', false, null, '00:00:00');
|
||||
$this->addColumn('FADE_OUT', 'DbFadeOut', 'TIME', false, null, '00:00:00');
|
||||
$this->addColumn('CUE_IN', 'DbCueIn', 'TIME', false, null, '00:00:00');
|
||||
$this->addColumn('CUE_OUT', 'DbCueOut', 'TIME', false, null, '00:00:00');
|
||||
$this->addColumn('SCHEDULE_GROUP_PLAYED', 'DbScheduleGroupPlayed', 'BOOLEAN', false, null, false);
|
||||
$this->addColumn('MEDIA_ITEM_PLAYED', 'DbMediaItemPlayed', 'BOOLEAN', false, null, false);
|
||||
$this->addForeignKey('INSTANCE_ID', 'DbInstanceId', 'INTEGER', 'cc_show_instances', 'ID', true, null, null);
|
||||
// validators
|
||||
} // initialize()
|
||||
|
||||
/**
|
||||
* Build the RelationMap objects for this table relationships
|
||||
*/
|
||||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('CcShowInstances', 'CcShowInstances', RelationMap::MANY_TO_ONE, array('instance_id' => 'id', ), 'CASCADE', null);
|
||||
$this->addRelation('CcFiles', 'CcFiles', RelationMap::MANY_TO_ONE, array('file_id' => 'id', ), 'CASCADE', null);
|
||||
} // buildRelations()
|
||||
|
||||
/**
|
||||
*
|
||||
* Gets the list of behaviors registered for this table
|
||||
*
|
||||
* @return array Associative array (name => parameters) of behaviors
|
||||
*/
|
||||
public function getBehaviors()
|
||||
{
|
||||
return array(
|
||||
'aggregate_column_relation' => array('foreign_table' => 'cc_show_instances', 'update_method' => 'updateDbTimeFilled', ),
|
||||
);
|
||||
} // getBehaviors()
|
||||
|
||||
} // CcScheduleTableMap
|
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This class defines the structure of the 'cc_service_register' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* This map class is used by Propel to do runtime db structure discovery.
|
||||
* For example, the createSelectSql() method checks the type of a given column used in an
|
||||
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
|
||||
* (i.e. if it's a text column type).
|
||||
*
|
||||
* @package propel.generator.airtime.map
|
||||
*/
|
||||
class CcServiceRegisterTableMap extends TableMap {
|
||||
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'airtime.map.CcServiceRegisterTableMap';
|
||||
|
||||
/**
|
||||
* Initialize the table attributes, columns and validators
|
||||
* Relations are not initialized by this method since they are lazy loaded
|
||||
*
|
||||
* @return void
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function initialize()
|
||||
{
|
||||
// attributes
|
||||
$this->setName('cc_service_register');
|
||||
$this->setPhpName('CcServiceRegister');
|
||||
$this->setClassname('CcServiceRegister');
|
||||
$this->setPackage('airtime');
|
||||
$this->setUseIdGenerator(false);
|
||||
// columns
|
||||
$this->addPrimaryKey('NAME', 'DbName', 'VARCHAR', true, 32, null);
|
||||
$this->addColumn('IP', 'DbIp', 'VARCHAR', true, 18, null);
|
||||
// validators
|
||||
} // initialize()
|
||||
|
||||
/**
|
||||
* Build the RelationMap objects for this table relationships
|
||||
*/
|
||||
public function buildRelations()
|
||||
{
|
||||
} // buildRelations()
|
||||
|
||||
} // CcServiceRegisterTableMap
|
|
@ -0,0 +1,55 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This class defines the structure of the 'cc_sess' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* This map class is used by Propel to do runtime db structure discovery.
|
||||
* For example, the createSelectSql() method checks the type of a given column used in an
|
||||
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
|
||||
* (i.e. if it's a text column type).
|
||||
*
|
||||
* @package propel.generator.airtime.map
|
||||
*/
|
||||
class CcSessTableMap extends TableMap {
|
||||
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'airtime.map.CcSessTableMap';
|
||||
|
||||
/**
|
||||
* Initialize the table attributes, columns and validators
|
||||
* Relations are not initialized by this method since they are lazy loaded
|
||||
*
|
||||
* @return void
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function initialize()
|
||||
{
|
||||
// attributes
|
||||
$this->setName('cc_sess');
|
||||
$this->setPhpName('CcSess');
|
||||
$this->setClassname('CcSess');
|
||||
$this->setPackage('airtime');
|
||||
$this->setUseIdGenerator(false);
|
||||
// columns
|
||||
$this->addPrimaryKey('SESSID', 'Sessid', 'CHAR', true, 32, null);
|
||||
$this->addForeignKey('USERID', 'Userid', 'INTEGER', 'cc_subjs', 'ID', false, null, null);
|
||||
$this->addColumn('LOGIN', 'Login', 'VARCHAR', false, 255, null);
|
||||
$this->addColumn('TS', 'Ts', 'TIMESTAMP', false, null, null);
|
||||
// validators
|
||||
} // initialize()
|
||||
|
||||
/**
|
||||
* Build the RelationMap objects for this table relationships
|
||||
*/
|
||||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('userid' => 'id', ), 'CASCADE', null);
|
||||
} // buildRelations()
|
||||
|
||||
} // CcSessTableMap
|
|
@ -0,0 +1,63 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This class defines the structure of the 'cc_show_days' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* This map class is used by Propel to do runtime db structure discovery.
|
||||
* For example, the createSelectSql() method checks the type of a given column used in an
|
||||
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
|
||||
* (i.e. if it's a text column type).
|
||||
*
|
||||
* @package propel.generator.airtime.map
|
||||
*/
|
||||
class CcShowDaysTableMap extends TableMap {
|
||||
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'airtime.map.CcShowDaysTableMap';
|
||||
|
||||
/**
|
||||
* Initialize the table attributes, columns and validators
|
||||
* Relations are not initialized by this method since they are lazy loaded
|
||||
*
|
||||
* @return void
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function initialize()
|
||||
{
|
||||
// attributes
|
||||
$this->setName('cc_show_days');
|
||||
$this->setPhpName('CcShowDays');
|
||||
$this->setClassname('CcShowDays');
|
||||
$this->setPackage('airtime');
|
||||
$this->setUseIdGenerator(true);
|
||||
$this->setPrimaryKeyMethodInfo('cc_show_days_id_seq');
|
||||
// columns
|
||||
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
|
||||
$this->addColumn('FIRST_SHOW', 'DbFirstShow', 'DATE', true, null, null);
|
||||
$this->addColumn('LAST_SHOW', 'DbLastShow', 'DATE', false, null, null);
|
||||
$this->addColumn('START_TIME', 'DbStartTime', 'TIME', true, null, null);
|
||||
$this->addColumn('TIMEZONE', 'DbTimezone', 'VARCHAR', true, 255, null);
|
||||
$this->addColumn('DURATION', 'DbDuration', 'VARCHAR', true, 255, null);
|
||||
$this->addColumn('DAY', 'DbDay', 'TINYINT', false, null, null);
|
||||
$this->addColumn('REPEAT_TYPE', 'DbRepeatType', 'TINYINT', true, null, null);
|
||||
$this->addColumn('NEXT_POP_DATE', 'DbNextPopDate', 'DATE', false, null, null);
|
||||
$this->addForeignKey('SHOW_ID', 'DbShowId', 'INTEGER', 'cc_show', 'ID', true, null, null);
|
||||
$this->addColumn('RECORD', 'DbRecord', 'TINYINT', false, null, 0);
|
||||
// validators
|
||||
} // initialize()
|
||||
|
||||
/**
|
||||
* Build the RelationMap objects for this table relationships
|
||||
*/
|
||||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('CcShow', 'CcShow', RelationMap::MANY_TO_ONE, array('show_id' => 'id', ), 'CASCADE', null);
|
||||
} // buildRelations()
|
||||
|
||||
} // CcShowDaysTableMap
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This class defines the structure of the 'cc_show_hosts' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* This map class is used by Propel to do runtime db structure discovery.
|
||||
* For example, the createSelectSql() method checks the type of a given column used in an
|
||||
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
|
||||
* (i.e. if it's a text column type).
|
||||
*
|
||||
* @package propel.generator.airtime.map
|
||||
*/
|
||||
class CcShowHostsTableMap extends TableMap {
|
||||
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'airtime.map.CcShowHostsTableMap';
|
||||
|
||||
/**
|
||||
* Initialize the table attributes, columns and validators
|
||||
* Relations are not initialized by this method since they are lazy loaded
|
||||
*
|
||||
* @return void
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function initialize()
|
||||
{
|
||||
// attributes
|
||||
$this->setName('cc_show_hosts');
|
||||
$this->setPhpName('CcShowHosts');
|
||||
$this->setClassname('CcShowHosts');
|
||||
$this->setPackage('airtime');
|
||||
$this->setUseIdGenerator(true);
|
||||
$this->setPrimaryKeyMethodInfo('cc_show_hosts_id_seq');
|
||||
// columns
|
||||
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
|
||||
$this->addForeignKey('SHOW_ID', 'DbShow', 'INTEGER', 'cc_show', 'ID', true, null, null);
|
||||
$this->addForeignKey('SUBJS_ID', 'DbHost', 'INTEGER', 'cc_subjs', 'ID', true, null, null);
|
||||
// validators
|
||||
} // initialize()
|
||||
|
||||
/**
|
||||
* Build the RelationMap objects for this table relationships
|
||||
*/
|
||||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('CcShow', 'CcShow', RelationMap::MANY_TO_ONE, array('show_id' => 'id', ), 'CASCADE', null);
|
||||
$this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('subjs_id' => 'id', ), 'CASCADE', null);
|
||||
} // buildRelations()
|
||||
|
||||
} // CcShowHostsTableMap
|
|
@ -0,0 +1,79 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This class defines the structure of the 'cc_show_instances' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* This map class is used by Propel to do runtime db structure discovery.
|
||||
* For example, the createSelectSql() method checks the type of a given column used in an
|
||||
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
|
||||
* (i.e. if it's a text column type).
|
||||
*
|
||||
* @package propel.generator.airtime.map
|
||||
*/
|
||||
class CcShowInstancesTableMap extends TableMap {
|
||||
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'airtime.map.CcShowInstancesTableMap';
|
||||
|
||||
/**
|
||||
* Initialize the table attributes, columns and validators
|
||||
* Relations are not initialized by this method since they are lazy loaded
|
||||
*
|
||||
* @return void
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function initialize()
|
||||
{
|
||||
// attributes
|
||||
$this->setName('cc_show_instances');
|
||||
$this->setPhpName('CcShowInstances');
|
||||
$this->setClassname('CcShowInstances');
|
||||
$this->setPackage('airtime');
|
||||
$this->setUseIdGenerator(true);
|
||||
$this->setPrimaryKeyMethodInfo('cc_show_instances_id_seq');
|
||||
// columns
|
||||
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
|
||||
$this->addColumn('STARTS', 'DbStarts', 'TIMESTAMP', true, null, null);
|
||||
$this->addColumn('ENDS', 'DbEnds', 'TIMESTAMP', true, null, null);
|
||||
$this->addForeignKey('SHOW_ID', 'DbShowId', 'INTEGER', 'cc_show', 'ID', true, null, null);
|
||||
$this->addColumn('RECORD', 'DbRecord', 'TINYINT', false, null, 0);
|
||||
$this->addColumn('REBROADCAST', 'DbRebroadcast', 'TINYINT', false, null, 0);
|
||||
$this->addForeignKey('INSTANCE_ID', 'DbOriginalShow', 'INTEGER', 'cc_show_instances', 'ID', false, null, null);
|
||||
$this->addForeignKey('FILE_ID', 'DbRecordedFile', 'INTEGER', 'cc_files', 'ID', false, null, null);
|
||||
$this->addColumn('TIME_FILLED', 'DbTimeFilled', 'TIME', false, null, null);
|
||||
$this->addColumn('MODIFIED_INSTANCE', 'DbModifiedInstance', 'BOOLEAN', true, null, false);
|
||||
// validators
|
||||
} // initialize()
|
||||
|
||||
/**
|
||||
* Build the RelationMap objects for this table relationships
|
||||
*/
|
||||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('CcShow', 'CcShow', RelationMap::MANY_TO_ONE, array('show_id' => 'id', ), 'CASCADE', null);
|
||||
$this->addRelation('CcShowInstancesRelatedByDbOriginalShow', 'CcShowInstances', RelationMap::MANY_TO_ONE, array('instance_id' => 'id', ), 'CASCADE', null);
|
||||
$this->addRelation('CcFiles', 'CcFiles', RelationMap::MANY_TO_ONE, array('file_id' => 'id', ), 'CASCADE', null);
|
||||
$this->addRelation('CcShowInstancesRelatedByDbId', 'CcShowInstances', RelationMap::ONE_TO_MANY, array('id' => 'instance_id', ), 'CASCADE', null);
|
||||
$this->addRelation('CcSchedule', 'CcSchedule', RelationMap::ONE_TO_MANY, array('id' => 'instance_id', ), 'CASCADE', null);
|
||||
} // buildRelations()
|
||||
|
||||
/**
|
||||
*
|
||||
* Gets the list of behaviors registered for this table
|
||||
*
|
||||
* @return array Associative array (name => parameters) of behaviors
|
||||
*/
|
||||
public function getBehaviors()
|
||||
{
|
||||
return array(
|
||||
'aggregate_column' => array('name' => 'time_filled', 'expression' => 'SUM(clip_length)', 'foreign_table' => 'cc_schedule', ),
|
||||
);
|
||||
} // getBehaviors()
|
||||
|
||||
} // CcShowInstancesTableMap
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This class defines the structure of the 'cc_show_rebroadcast' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* This map class is used by Propel to do runtime db structure discovery.
|
||||
* For example, the createSelectSql() method checks the type of a given column used in an
|
||||
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
|
||||
* (i.e. if it's a text column type).
|
||||
*
|
||||
* @package propel.generator.airtime.map
|
||||
*/
|
||||
class CcShowRebroadcastTableMap extends TableMap {
|
||||
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'airtime.map.CcShowRebroadcastTableMap';
|
||||
|
||||
/**
|
||||
* Initialize the table attributes, columns and validators
|
||||
* Relations are not initialized by this method since they are lazy loaded
|
||||
*
|
||||
* @return void
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function initialize()
|
||||
{
|
||||
// attributes
|
||||
$this->setName('cc_show_rebroadcast');
|
||||
$this->setPhpName('CcShowRebroadcast');
|
||||
$this->setClassname('CcShowRebroadcast');
|
||||
$this->setPackage('airtime');
|
||||
$this->setUseIdGenerator(true);
|
||||
$this->setPrimaryKeyMethodInfo('cc_show_rebroadcast_id_seq');
|
||||
// columns
|
||||
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
|
||||
$this->addColumn('DAY_OFFSET', 'DbDayOffset', 'VARCHAR', true, 255, null);
|
||||
$this->addColumn('START_TIME', 'DbStartTime', 'TIME', true, null, null);
|
||||
$this->addForeignKey('SHOW_ID', 'DbShowId', 'INTEGER', 'cc_show', 'ID', true, null, null);
|
||||
// validators
|
||||
} // initialize()
|
||||
|
||||
/**
|
||||
* Build the RelationMap objects for this table relationships
|
||||
*/
|
||||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('CcShow', 'CcShow', RelationMap::MANY_TO_ONE, array('show_id' => 'id', ), 'CASCADE', null);
|
||||
} // buildRelations()
|
||||
|
||||
} // CcShowRebroadcastTableMap
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue