Merge branch 'devel' of dev.sourcefabric.org:airtime into devel

Conflicts:
	airtime_mvc/public/js/airtime/showbuilder/builder.js
This commit is contained in:
Daniel 2012-03-15 18:12:15 -04:00
commit 5b953443c6
63 changed files with 2816 additions and 781 deletions

View file

@ -60,10 +60,10 @@ class Application_Model_Preference
public static function GetValue($key, $isUserValue = false){
global $CC_CONFIG, $CC_DBC;
//Check if key already exists
$sql = "SELECT COUNT(*) FROM cc_pref"
." WHERE keystr = '$key'";
//For user specific preference, check if id matches as well
if($isUserValue) {
$auth = Zend_Auth::getInstance();
@ -72,7 +72,6 @@ class Application_Model_Preference
$sql .= " AND subjid = '$id'";
}
}
$result = $CC_DBC->GetOne($sql);
if ($result == 0)
@ -700,6 +699,63 @@ class Application_Model_Preference
return $val;
}
public static function SetLiveSteamMasterUsername($value){
self::SetValue("live_stream_master_username", $value, false);
}
public static function GetLiveSteamMasterUsername(){
return self::GetValue("live_stream_master_username");
}
public static function SetLiveSteamMasterPassword($value){
self::SetValue("live_stream_master_password", $value, false);
}
public static function GetLiveSteamMasterPassword(){
return self::GetValue("live_stream_master_password");
}
public static function SetSourceStatus($sourcename, $status){
self::SetValue($sourcename, $status, false);
}
public static function GetSourceStatus($sourcename){
$value = self::GetValue($sourcename);
if($value == null || $value == "false"){
return false;
}else{
return true;
}
}
public static function SetSourceSwitchStatus($sourcename, $status){
self::SetValue($sourcename."_switch", $status, false);
}
public static function GetSourceSwitchStatus($sourcename){
$value = self::GetValue($sourcename."_switch");
if($value == null || $value == "off"){
return "off";
}else{
return "on";
}
}
public static function SetMasterDJSourceConnectionURL($value){
self::SetValue("master_dj_source_connection_url", $value, false);
}
public static function GetMasterDJSourceConnectionURL(){
return self::GetValue("master_dj_source_connection_url");
}
public static function SetLiveDJSourceConnectionURL($value){
self::SetValue("live_dj_source_connection_url", $value, false);
}
public static function GetLiveDJSourceConnectionURL(){
return self::GetValue("live_dj_source_connection_url");
}
/* User specific preferences end */
}

View file

@ -742,22 +742,25 @@ class Application_Model_Schedule {
$isSaas = Application_Model_Preference::GetPlanLevel() == 'disabled'?false:true;
$formWhat = new Application_Form_AddShowWhat();
$formWho = new Application_Form_AddShowWho();
$formWhen = new Application_Form_AddShowWhen();
$formRepeats = new Application_Form_AddShowRepeats();
$formStyle = new Application_Form_AddShowStyle();
$formWho = new Application_Form_AddShowWho();
$formWhen = new Application_Form_AddShowWhen();
$formRepeats = new Application_Form_AddShowRepeats();
$formStyle = new Application_Form_AddShowStyle();
$formLive = new Application_Form_AddShowLiveStream();
$formWhat->removeDecorator('DtDdWrapper');
$formWho->removeDecorator('DtDdWrapper');
$formWhen->removeDecorator('DtDdWrapper');
$formRepeats->removeDecorator('DtDdWrapper');
$formStyle->removeDecorator('DtDdWrapper');
$formWhat->removeDecorator('DtDdWrapper');
$formWho->removeDecorator('DtDdWrapper');
$formWhen->removeDecorator('DtDdWrapper');
$formRepeats->removeDecorator('DtDdWrapper');
$formStyle->removeDecorator('DtDdWrapper');
$formLive->removeDecorator('DtDdWrapper');
$p_view->what = $formWhat;
$p_view->when = $formWhen;
$p_view->repeats = $formRepeats;
$p_view->who = $formWho;
$p_view->style = $formStyle;
$p_view->live = $formLive;
$formWhat->populate(array('add_show_id' => '-1'));
$formWhen->populate(array('add_show_start_date' => date("Y-m-d"),

View file

@ -104,6 +104,19 @@ class Application_Model_Show {
return $res;
}
public function getHostsIds()
{
global $CC_DBC;
$sql = "SELECT subjs_id
FROM cc_show_hosts
WHERE show_id = {$this->_showId}";
$hosts = $CC_DBC->GetAll($sql);
return $hosts;
}
//remove everything about this show.
public function delete()
@ -771,6 +784,24 @@ class Application_Model_Show {
return $showInstance;
}
/**
* returns info about live stream override info
*/
public function getLiveStreamInfo(){
$info = array();
if($this->_showId == null){
return $info;
}else{
$ccShow = CcShowQuery::create()->findPK($this->_showId);
$info['custom_username'] = $ccShow->getDbLiveStreamUser();
$info['cb_airtime_auth'] = $ccShow->getDbLiveStreamUsingAirtimeAuth();
$info['cb_custom_auth'] = $ccShow->getDbLiveStreamUsingCustomAuth();
$info['custom_username'] = $ccShow->getDbLiveStreamUser();
$info['custom_password'] = $ccShow->getDbLiveStreamPass();
return $info;
}
}
/* Only used for shows that are repeating. Note that this will return
* true even for dates that only have a "modified" show instance (does not
@ -959,6 +990,10 @@ class Application_Model_Show {
$ccShow->setDbGenre($data['add_show_genre']);
$ccShow->setDbColor($data['add_show_color']);
$ccShow->setDbBackgroundColor($data['add_show_background_color']);
$ccShow->setDbLiveStreamUsingAirtimeAuth($data['cb_airtime_auth'] == 1?true:false);
$ccShow->setDbLiveStreamUsingCustomAuth($data['cb_custom_auth'] == 1?true:false);
$ccShow->setDbLiveStreamUser($data['custom_username']);
$ccShow->setDbLiveStreamPass($data['custom_password']);
$ccShow->save();
$showId = $ccShow->getDbId();
@ -1676,9 +1711,13 @@ class Application_Model_Show {
* @param String $timeNow - current time (in UTC)
* @return array - show being played right now
*/
public static function GetCurrentShow($timeNow)
public static function GetCurrentShow($timeNow=null)
{
global $CC_CONFIG, $CC_DBC;
if($timeNow == null){
$date = new Application_Model_DateHelper;
$timeNow = $date->getUtcTimestamp();
}
//TODO, returning starts + ends twice (once with an alias). Unify this after the 2.0 release. --Martin
$sql = "SELECT si.starts as start_timestamp, si.ends as end_timestamp, s.name, s.id, si.id as instance_id, si.record, s.url, starts, ends"
." FROM $CC_CONFIG[showInstances] si, $CC_CONFIG[showTable] s"

View file

@ -1,5 +1,48 @@
<?php
class Application_Model_StreamSetting {
public static function SetValue($key, $value, $type){
global $CC_CONFIG, $CC_DBC;
$key = pg_escape_string($key);
$value = pg_escape_string($value);
//Check if key already exists
$sql = "SELECT COUNT(*) FROM cc_stream_setting"
." WHERE keyname = '$key'";
$result = $CC_DBC->GetOne($sql);
if($result == 1) {
$sql = "UPDATE cc_stream_setting"
." SET value = '$value', type='$type'"
." WHERE keyname = '$key'";
} else {
$sql = "INSERT INTO cc_stream_setting (keyname, value, type)"
." VALUES ('$key', '$value', '$type')";
}
return $CC_DBC->query($sql);
}
public static function GetValue($key){
global $CC_CONFIG, $CC_DBC;
//Check if key already exists
$sql = "SELECT COUNT(*) FROM cc_stream_setting"
." WHERE keyname = '$key'";
$result = $CC_DBC->GetOne($sql);
if ($result == 0)
return "";
else {
$sql = "SELECT value FROM cc_stream_setting"
." WHERE keyname = '$key'";
$result = $CC_DBC->GetOne($sql);
return $result;
}
}
/* Returns the id's of all streams that are enabled in an array. An
* example of the array returned in JSON notation is ["s1", "s2", "s3"] */
@ -63,6 +106,33 @@ class Application_Model_StreamSetting {
." WHERE keyname not like '%_error'";
$rows = $CC_DBC->getAll($sql);
$exists = array();
foreach($rows as $r){
if($r['keyname'] == 'master_live_stream_port'){
$exists['master_live_stream_port'] = true;
}elseif($r['keyname'] == 'master_live_stream_mp'){
$exists['master_live_stream_mp'] = true;
}elseif($r['keyname'] == 'dj_live_stream_port'){
$exists['dj_live_stream_port'] = true;
}elseif($r['keyname'] == 'dj_live_stream_mp'){
$exists['dj_live_stream_mp'] = true;
}
}
if(!isset($exists["master_live_stream_port"])){
$rows[] = (array("keyname" =>"master_live_stream_port", "value"=>self::GetMasterLiveSteamPort(), "type"=>"integer"));
}
if(!isset($exists["master_live_stream_mp"])){
$rows[] = (array("keyname" =>"master_live_stream_mp", "value"=>self::GetMasterLiveSteamMountPoint(), "type"=>"string"));
}
if(!isset($exists["dj_live_stream_port"])){
$rows[] = (array("keyname" =>"dj_live_stream_port", "value"=>self::GetDJLiveSteamPort(), "type"=>"integer"));
}
if(!isset($exists["dj_live_stream_mp"])){
$rows[] = (array("keyname" =>"dj_live_stream_mp", "value"=>self::GetDJLiveSteamMountPoint(), "type"=>"string"));
}
return $rows;
}
@ -197,4 +267,36 @@ class Application_Model_StreamSetting {
}
return $out;
}
public static function SetMasterLiveSteamPort($value){
self::SetValue("master_live_stream_port", $value, "integer");
}
public static function GetMasterLiveSteamPort(){
return self::GetValue("master_live_stream_port");
}
public static function SetMasterLiveSteamMountPoint($value){
self::SetValue("master_live_stream_mp", $value, "string");
}
public static function GetMasterLiveSteamMountPoint(){
return self::GetValue("master_live_stream_mp");
}
public static function SetDJLiveSteamPort($value){
self::SetValue("dj_live_stream_port", $value, "integer");
}
public static function GetDJLiveSteamPort(){
return self::GetValue("dj_live_stream_port");
}
public static function SetDJLiveSteamMountPoint($value){
self::SetValue("dj_live_stream_mp", $value, "string");
}
public static function GetDJLiveSteamMountPoint(){
return self::GetValue("dj_live_stream_mp");
}
}

View file

@ -30,6 +30,10 @@ class Application_Model_User {
public function isHost($showId) {
return $this->isUserType(UTYPE_HOST, $showId);
}
public function isPM() {
return $this->isUserType(UTYPE_PROGRAM_MANAGER);
}
public function isAdmin() {
return $this->isUserType(UTYPE_ADMIN);

View file

@ -45,6 +45,10 @@ class CcShowTableMap extends TableMap {
$this->addColumn('DESCRIPTION', 'DbDescription', 'VARCHAR', false, 512, null);
$this->addColumn('COLOR', 'DbColor', 'VARCHAR', false, 6, null);
$this->addColumn('BACKGROUND_COLOR', 'DbBackgroundColor', 'VARCHAR', false, 6, null);
$this->addColumn('LIVE_STREAM_USING_AIRTIME_AUTH', 'DbLiveStreamUsingAirtimeAuth', 'BOOLEAN', false, null, null);
$this->addColumn('LIVE_STREAM_USING_CUSTOM_AUTH', 'DbLiveStreamUsingCustomAuth', 'BOOLEAN', false, null, null);
$this->addColumn('LIVE_STREAM_USER', 'DbLiveStreamUser', 'VARCHAR', false, 255, null);
$this->addColumn('LIVE_STREAM_PASS', 'DbLiveStreamPass', 'VARCHAR', false, 255, null);
// validators
} // initialize()

View file

@ -69,6 +69,30 @@ abstract class BaseCcShow extends BaseObject implements Persistent
*/
protected $background_color;
/**
* The value for the live_stream_using_airtime_auth field.
* @var boolean
*/
protected $live_stream_using_airtime_auth;
/**
* The value for the live_stream_using_custom_auth field.
* @var boolean
*/
protected $live_stream_using_custom_auth;
/**
* The value for the live_stream_user field.
* @var string
*/
protected $live_stream_user;
/**
* The value for the live_stream_pass field.
* @var string
*/
protected $live_stream_pass;
/**
* @var array CcShowInstances[] Collection to store aggregation of CcShowInstances objects.
*/
@ -196,6 +220,46 @@ abstract class BaseCcShow extends BaseObject implements Persistent
return $this->background_color;
}
/**
* Get the [live_stream_using_airtime_auth] column value.
*
* @return boolean
*/
public function getDbLiveStreamUsingAirtimeAuth()
{
return $this->live_stream_using_airtime_auth;
}
/**
* Get the [live_stream_using_custom_auth] column value.
*
* @return boolean
*/
public function getDbLiveStreamUsingCustomAuth()
{
return $this->live_stream_using_custom_auth;
}
/**
* Get the [live_stream_user] column value.
*
* @return string
*/
public function getDbLiveStreamUser()
{
return $this->live_stream_user;
}
/**
* Get the [live_stream_pass] column value.
*
* @return string
*/
public function getDbLiveStreamPass()
{
return $this->live_stream_pass;
}
/**
* Set the value of [id] column.
*
@ -336,6 +400,86 @@ abstract class BaseCcShow extends BaseObject implements Persistent
return $this;
} // setDbBackgroundColor()
/**
* Set the value of [live_stream_using_airtime_auth] column.
*
* @param boolean $v new value
* @return CcShow The current object (for fluent API support)
*/
public function setDbLiveStreamUsingAirtimeAuth($v)
{
if ($v !== null) {
$v = (boolean) $v;
}
if ($this->live_stream_using_airtime_auth !== $v) {
$this->live_stream_using_airtime_auth = $v;
$this->modifiedColumns[] = CcShowPeer::LIVE_STREAM_USING_AIRTIME_AUTH;
}
return $this;
} // setDbLiveStreamUsingAirtimeAuth()
/**
* Set the value of [live_stream_using_custom_auth] column.
*
* @param boolean $v new value
* @return CcShow The current object (for fluent API support)
*/
public function setDbLiveStreamUsingCustomAuth($v)
{
if ($v !== null) {
$v = (boolean) $v;
}
if ($this->live_stream_using_custom_auth !== $v) {
$this->live_stream_using_custom_auth = $v;
$this->modifiedColumns[] = CcShowPeer::LIVE_STREAM_USING_CUSTOM_AUTH;
}
return $this;
} // setDbLiveStreamUsingCustomAuth()
/**
* Set the value of [live_stream_user] column.
*
* @param string $v new value
* @return CcShow The current object (for fluent API support)
*/
public function setDbLiveStreamUser($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->live_stream_user !== $v) {
$this->live_stream_user = $v;
$this->modifiedColumns[] = CcShowPeer::LIVE_STREAM_USER;
}
return $this;
} // setDbLiveStreamUser()
/**
* Set the value of [live_stream_pass] column.
*
* @param string $v new value
* @return CcShow The current object (for fluent API support)
*/
public function setDbLiveStreamPass($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->live_stream_pass !== $v) {
$this->live_stream_pass = $v;
$this->modifiedColumns[] = CcShowPeer::LIVE_STREAM_PASS;
}
return $this;
} // setDbLiveStreamPass()
/**
* Indicates whether the columns in this object are only set to default values.
*
@ -387,6 +531,10 @@ abstract class BaseCcShow extends BaseObject implements Persistent
$this->description = ($row[$startcol + 4] !== null) ? (string) $row[$startcol + 4] : null;
$this->color = ($row[$startcol + 5] !== null) ? (string) $row[$startcol + 5] : null;
$this->background_color = ($row[$startcol + 6] !== null) ? (string) $row[$startcol + 6] : null;
$this->live_stream_using_airtime_auth = ($row[$startcol + 7] !== null) ? (boolean) $row[$startcol + 7] : null;
$this->live_stream_using_custom_auth = ($row[$startcol + 8] !== null) ? (boolean) $row[$startcol + 8] : null;
$this->live_stream_user = ($row[$startcol + 9] !== null) ? (string) $row[$startcol + 9] : null;
$this->live_stream_pass = ($row[$startcol + 10] !== null) ? (string) $row[$startcol + 10] : null;
$this->resetModified();
$this->setNew(false);
@ -395,7 +543,7 @@ abstract class BaseCcShow extends BaseObject implements Persistent
$this->ensureConsistency();
}
return $startcol + 7; // 7 = CcShowPeer::NUM_COLUMNS - CcShowPeer::NUM_LAZY_LOAD_COLUMNS).
return $startcol + 11; // 11 = CcShowPeer::NUM_COLUMNS - CcShowPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating CcShow object", $e);
@ -787,6 +935,18 @@ abstract class BaseCcShow extends BaseObject implements Persistent
case 6:
return $this->getDbBackgroundColor();
break;
case 7:
return $this->getDbLiveStreamUsingAirtimeAuth();
break;
case 8:
return $this->getDbLiveStreamUsingCustomAuth();
break;
case 9:
return $this->getDbLiveStreamUser();
break;
case 10:
return $this->getDbLiveStreamPass();
break;
default:
return null;
break;
@ -817,6 +977,10 @@ abstract class BaseCcShow extends BaseObject implements Persistent
$keys[4] => $this->getDbDescription(),
$keys[5] => $this->getDbColor(),
$keys[6] => $this->getDbBackgroundColor(),
$keys[7] => $this->getDbLiveStreamUsingAirtimeAuth(),
$keys[8] => $this->getDbLiveStreamUsingCustomAuth(),
$keys[9] => $this->getDbLiveStreamUser(),
$keys[10] => $this->getDbLiveStreamPass(),
);
return $result;
}
@ -869,6 +1033,18 @@ abstract class BaseCcShow extends BaseObject implements Persistent
case 6:
$this->setDbBackgroundColor($value);
break;
case 7:
$this->setDbLiveStreamUsingAirtimeAuth($value);
break;
case 8:
$this->setDbLiveStreamUsingCustomAuth($value);
break;
case 9:
$this->setDbLiveStreamUser($value);
break;
case 10:
$this->setDbLiveStreamPass($value);
break;
} // switch()
}
@ -900,6 +1076,10 @@ abstract class BaseCcShow extends BaseObject implements Persistent
if (array_key_exists($keys[4], $arr)) $this->setDbDescription($arr[$keys[4]]);
if (array_key_exists($keys[5], $arr)) $this->setDbColor($arr[$keys[5]]);
if (array_key_exists($keys[6], $arr)) $this->setDbBackgroundColor($arr[$keys[6]]);
if (array_key_exists($keys[7], $arr)) $this->setDbLiveStreamUsingAirtimeAuth($arr[$keys[7]]);
if (array_key_exists($keys[8], $arr)) $this->setDbLiveStreamUsingCustomAuth($arr[$keys[8]]);
if (array_key_exists($keys[9], $arr)) $this->setDbLiveStreamUser($arr[$keys[9]]);
if (array_key_exists($keys[10], $arr)) $this->setDbLiveStreamPass($arr[$keys[10]]);
}
/**
@ -918,6 +1098,10 @@ abstract class BaseCcShow extends BaseObject implements Persistent
if ($this->isColumnModified(CcShowPeer::DESCRIPTION)) $criteria->add(CcShowPeer::DESCRIPTION, $this->description);
if ($this->isColumnModified(CcShowPeer::COLOR)) $criteria->add(CcShowPeer::COLOR, $this->color);
if ($this->isColumnModified(CcShowPeer::BACKGROUND_COLOR)) $criteria->add(CcShowPeer::BACKGROUND_COLOR, $this->background_color);
if ($this->isColumnModified(CcShowPeer::LIVE_STREAM_USING_AIRTIME_AUTH)) $criteria->add(CcShowPeer::LIVE_STREAM_USING_AIRTIME_AUTH, $this->live_stream_using_airtime_auth);
if ($this->isColumnModified(CcShowPeer::LIVE_STREAM_USING_CUSTOM_AUTH)) $criteria->add(CcShowPeer::LIVE_STREAM_USING_CUSTOM_AUTH, $this->live_stream_using_custom_auth);
if ($this->isColumnModified(CcShowPeer::LIVE_STREAM_USER)) $criteria->add(CcShowPeer::LIVE_STREAM_USER, $this->live_stream_user);
if ($this->isColumnModified(CcShowPeer::LIVE_STREAM_PASS)) $criteria->add(CcShowPeer::LIVE_STREAM_PASS, $this->live_stream_pass);
return $criteria;
}
@ -985,6 +1169,10 @@ abstract class BaseCcShow extends BaseObject implements Persistent
$copyObj->setDbDescription($this->description);
$copyObj->setDbColor($this->color);
$copyObj->setDbBackgroundColor($this->background_color);
$copyObj->setDbLiveStreamUsingAirtimeAuth($this->live_stream_using_airtime_auth);
$copyObj->setDbLiveStreamUsingCustomAuth($this->live_stream_using_custom_auth);
$copyObj->setDbLiveStreamUser($this->live_stream_user);
$copyObj->setDbLiveStreamPass($this->live_stream_pass);
if ($deepCopy) {
// important: temporarily setNew(false) because this affects the behavior of
@ -1583,6 +1771,10 @@ abstract class BaseCcShow extends BaseObject implements Persistent
$this->description = null;
$this->color = null;
$this->background_color = null;
$this->live_stream_using_airtime_auth = null;
$this->live_stream_using_custom_auth = null;
$this->live_stream_user = null;
$this->live_stream_pass = null;
$this->alreadyInSave = false;
$this->alreadyInValidation = false;
$this->clearAllReferences();

View file

@ -26,7 +26,7 @@ abstract class BaseCcShowPeer {
const TM_CLASS = 'CcShowTableMap';
/** The total number of columns. */
const NUM_COLUMNS = 7;
const NUM_COLUMNS = 11;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
@ -52,6 +52,18 @@ abstract class BaseCcShowPeer {
/** the column name for the BACKGROUND_COLOR field */
const BACKGROUND_COLOR = 'cc_show.BACKGROUND_COLOR';
/** the column name for the LIVE_STREAM_USING_AIRTIME_AUTH field */
const LIVE_STREAM_USING_AIRTIME_AUTH = 'cc_show.LIVE_STREAM_USING_AIRTIME_AUTH';
/** the column name for the LIVE_STREAM_USING_CUSTOM_AUTH field */
const LIVE_STREAM_USING_CUSTOM_AUTH = 'cc_show.LIVE_STREAM_USING_CUSTOM_AUTH';
/** the column name for the LIVE_STREAM_USER field */
const LIVE_STREAM_USER = 'cc_show.LIVE_STREAM_USER';
/** the column name for the LIVE_STREAM_PASS field */
const LIVE_STREAM_PASS = 'cc_show.LIVE_STREAM_PASS';
/**
* An identiy map to hold any loaded instances of CcShow objects.
* This must be public so that other peer classes can access this when hydrating from JOIN
@ -68,12 +80,12 @@ abstract class BaseCcShowPeer {
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbName', 'DbUrl', 'DbGenre', 'DbDescription', 'DbColor', 'DbBackgroundColor', ),
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbName', 'dbUrl', 'dbGenre', 'dbDescription', 'dbColor', 'dbBackgroundColor', ),
BasePeer::TYPE_COLNAME => array (self::ID, self::NAME, self::URL, self::GENRE, self::DESCRIPTION, self::COLOR, self::BACKGROUND_COLOR, ),
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'NAME', 'URL', 'GENRE', 'DESCRIPTION', 'COLOR', 'BACKGROUND_COLOR', ),
BasePeer::TYPE_FIELDNAME => array ('id', 'name', 'url', 'genre', 'description', 'color', 'background_color', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, )
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbName', 'DbUrl', 'DbGenre', 'DbDescription', 'DbColor', 'DbBackgroundColor', 'DbLiveStreamUsingAirtimeAuth', 'DbLiveStreamUsingCustomAuth', 'DbLiveStreamUser', 'DbLiveStreamPass', ),
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbName', 'dbUrl', 'dbGenre', 'dbDescription', 'dbColor', 'dbBackgroundColor', 'dbLiveStreamUsingAirtimeAuth', 'dbLiveStreamUsingCustomAuth', 'dbLiveStreamUser', 'dbLiveStreamPass', ),
BasePeer::TYPE_COLNAME => array (self::ID, self::NAME, self::URL, self::GENRE, self::DESCRIPTION, self::COLOR, self::BACKGROUND_COLOR, self::LIVE_STREAM_USING_AIRTIME_AUTH, self::LIVE_STREAM_USING_CUSTOM_AUTH, self::LIVE_STREAM_USER, self::LIVE_STREAM_PASS, ),
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'NAME', 'URL', 'GENRE', 'DESCRIPTION', 'COLOR', 'BACKGROUND_COLOR', 'LIVE_STREAM_USING_AIRTIME_AUTH', 'LIVE_STREAM_USING_CUSTOM_AUTH', 'LIVE_STREAM_USER', 'LIVE_STREAM_PASS', ),
BasePeer::TYPE_FIELDNAME => array ('id', 'name', 'url', 'genre', 'description', 'color', 'background_color', 'live_stream_using_airtime_auth', 'live_stream_using_custom_auth', 'live_stream_user', 'live_stream_pass', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, )
);
/**
@ -83,12 +95,12 @@ abstract class BaseCcShowPeer {
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbName' => 1, 'DbUrl' => 2, 'DbGenre' => 3, 'DbDescription' => 4, 'DbColor' => 5, 'DbBackgroundColor' => 6, ),
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbName' => 1, 'dbUrl' => 2, 'dbGenre' => 3, 'dbDescription' => 4, 'dbColor' => 5, 'dbBackgroundColor' => 6, ),
BasePeer::TYPE_COLNAME => array (self::ID => 0, self::NAME => 1, self::URL => 2, self::GENRE => 3, self::DESCRIPTION => 4, self::COLOR => 5, self::BACKGROUND_COLOR => 6, ),
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'NAME' => 1, 'URL' => 2, 'GENRE' => 3, 'DESCRIPTION' => 4, 'COLOR' => 5, 'BACKGROUND_COLOR' => 6, ),
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'name' => 1, 'url' => 2, 'genre' => 3, 'description' => 4, 'color' => 5, 'background_color' => 6, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, )
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbName' => 1, 'DbUrl' => 2, 'DbGenre' => 3, 'DbDescription' => 4, 'DbColor' => 5, 'DbBackgroundColor' => 6, 'DbLiveStreamUsingAirtimeAuth' => 7, 'DbLiveStreamUsingCustomAuth' => 8, 'DbLiveStreamUser' => 9, 'DbLiveStreamPass' => 10, ),
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbName' => 1, 'dbUrl' => 2, 'dbGenre' => 3, 'dbDescription' => 4, 'dbColor' => 5, 'dbBackgroundColor' => 6, 'dbLiveStreamUsingAirtimeAuth' => 7, 'dbLiveStreamUsingCustomAuth' => 8, 'dbLiveStreamUser' => 9, 'dbLiveStreamPass' => 10, ),
BasePeer::TYPE_COLNAME => array (self::ID => 0, self::NAME => 1, self::URL => 2, self::GENRE => 3, self::DESCRIPTION => 4, self::COLOR => 5, self::BACKGROUND_COLOR => 6, self::LIVE_STREAM_USING_AIRTIME_AUTH => 7, self::LIVE_STREAM_USING_CUSTOM_AUTH => 8, self::LIVE_STREAM_USER => 9, self::LIVE_STREAM_PASS => 10, ),
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'NAME' => 1, 'URL' => 2, 'GENRE' => 3, 'DESCRIPTION' => 4, 'COLOR' => 5, 'BACKGROUND_COLOR' => 6, 'LIVE_STREAM_USING_AIRTIME_AUTH' => 7, 'LIVE_STREAM_USING_CUSTOM_AUTH' => 8, 'LIVE_STREAM_USER' => 9, 'LIVE_STREAM_PASS' => 10, ),
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'name' => 1, 'url' => 2, 'genre' => 3, 'description' => 4, 'color' => 5, 'background_color' => 6, 'live_stream_using_airtime_auth' => 7, 'live_stream_using_custom_auth' => 8, 'live_stream_user' => 9, 'live_stream_pass' => 10, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, )
);
/**
@ -167,6 +179,10 @@ abstract class BaseCcShowPeer {
$criteria->addSelectColumn(CcShowPeer::DESCRIPTION);
$criteria->addSelectColumn(CcShowPeer::COLOR);
$criteria->addSelectColumn(CcShowPeer::BACKGROUND_COLOR);
$criteria->addSelectColumn(CcShowPeer::LIVE_STREAM_USING_AIRTIME_AUTH);
$criteria->addSelectColumn(CcShowPeer::LIVE_STREAM_USING_CUSTOM_AUTH);
$criteria->addSelectColumn(CcShowPeer::LIVE_STREAM_USER);
$criteria->addSelectColumn(CcShowPeer::LIVE_STREAM_PASS);
} else {
$criteria->addSelectColumn($alias . '.ID');
$criteria->addSelectColumn($alias . '.NAME');
@ -175,6 +191,10 @@ abstract class BaseCcShowPeer {
$criteria->addSelectColumn($alias . '.DESCRIPTION');
$criteria->addSelectColumn($alias . '.COLOR');
$criteria->addSelectColumn($alias . '.BACKGROUND_COLOR');
$criteria->addSelectColumn($alias . '.LIVE_STREAM_USING_AIRTIME_AUTH');
$criteria->addSelectColumn($alias . '.LIVE_STREAM_USING_CUSTOM_AUTH');
$criteria->addSelectColumn($alias . '.LIVE_STREAM_USER');
$criteria->addSelectColumn($alias . '.LIVE_STREAM_PASS');
}
}

View file

@ -13,6 +13,10 @@
* @method CcShowQuery orderByDbDescription($order = Criteria::ASC) Order by the description column
* @method CcShowQuery orderByDbColor($order = Criteria::ASC) Order by the color column
* @method CcShowQuery orderByDbBackgroundColor($order = Criteria::ASC) Order by the background_color column
* @method CcShowQuery orderByDbLiveStreamUsingAirtimeAuth($order = Criteria::ASC) Order by the live_stream_using_airtime_auth column
* @method CcShowQuery orderByDbLiveStreamUsingCustomAuth($order = Criteria::ASC) Order by the live_stream_using_custom_auth column
* @method CcShowQuery orderByDbLiveStreamUser($order = Criteria::ASC) Order by the live_stream_user column
* @method CcShowQuery orderByDbLiveStreamPass($order = Criteria::ASC) Order by the live_stream_pass column
*
* @method CcShowQuery groupByDbId() Group by the id column
* @method CcShowQuery groupByDbName() Group by the name column
@ -21,6 +25,10 @@
* @method CcShowQuery groupByDbDescription() Group by the description column
* @method CcShowQuery groupByDbColor() Group by the color column
* @method CcShowQuery groupByDbBackgroundColor() Group by the background_color column
* @method CcShowQuery groupByDbLiveStreamUsingAirtimeAuth() Group by the live_stream_using_airtime_auth column
* @method CcShowQuery groupByDbLiveStreamUsingCustomAuth() Group by the live_stream_using_custom_auth column
* @method CcShowQuery groupByDbLiveStreamUser() Group by the live_stream_user column
* @method CcShowQuery groupByDbLiveStreamPass() Group by the live_stream_pass column
*
* @method CcShowQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcShowQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
@ -52,6 +60,10 @@
* @method CcShow findOneByDbDescription(string $description) Return the first CcShow filtered by the description column
* @method CcShow findOneByDbColor(string $color) Return the first CcShow filtered by the color column
* @method CcShow findOneByDbBackgroundColor(string $background_color) Return the first CcShow filtered by the background_color column
* @method CcShow findOneByDbLiveStreamUsingAirtimeAuth(boolean $live_stream_using_airtime_auth) Return the first CcShow filtered by the live_stream_using_airtime_auth column
* @method CcShow findOneByDbLiveStreamUsingCustomAuth(boolean $live_stream_using_custom_auth) Return the first CcShow filtered by the live_stream_using_custom_auth column
* @method CcShow findOneByDbLiveStreamUser(string $live_stream_user) Return the first CcShow filtered by the live_stream_user column
* @method CcShow findOneByDbLiveStreamPass(string $live_stream_pass) Return the first CcShow filtered by the live_stream_pass column
*
* @method array findByDbId(int $id) Return CcShow objects filtered by the id column
* @method array findByDbName(string $name) Return CcShow objects filtered by the name column
@ -60,6 +72,10 @@
* @method array findByDbDescription(string $description) Return CcShow objects filtered by the description column
* @method array findByDbColor(string $color) Return CcShow objects filtered by the color column
* @method array findByDbBackgroundColor(string $background_color) Return CcShow objects filtered by the background_color column
* @method array findByDbLiveStreamUsingAirtimeAuth(boolean $live_stream_using_airtime_auth) Return CcShow objects filtered by the live_stream_using_airtime_auth column
* @method array findByDbLiveStreamUsingCustomAuth(boolean $live_stream_using_custom_auth) Return CcShow objects filtered by the live_stream_using_custom_auth column
* @method array findByDbLiveStreamUser(string $live_stream_user) Return CcShow objects filtered by the live_stream_user column
* @method array findByDbLiveStreamPass(string $live_stream_pass) Return CcShow objects filtered by the live_stream_pass column
*
* @package propel.generator.airtime.om
*/
@ -318,6 +334,84 @@ abstract class BaseCcShowQuery extends ModelCriteria
return $this->addUsingAlias(CcShowPeer::BACKGROUND_COLOR, $dbBackgroundColor, $comparison);
}
/**
* Filter the query on the live_stream_using_airtime_auth column
*
* @param boolean|string $dbLiveStreamUsingAirtimeAuth The value to use as filter.
* Accepts strings ('false', 'off', '-', 'no', 'n', and '0' are false, the rest is true)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcShowQuery The current query, for fluid interface
*/
public function filterByDbLiveStreamUsingAirtimeAuth($dbLiveStreamUsingAirtimeAuth = null, $comparison = null)
{
if (is_string($dbLiveStreamUsingAirtimeAuth)) {
$live_stream_using_airtime_auth = in_array(strtolower($dbLiveStreamUsingAirtimeAuth), array('false', 'off', '-', 'no', 'n', '0')) ? false : true;
}
return $this->addUsingAlias(CcShowPeer::LIVE_STREAM_USING_AIRTIME_AUTH, $dbLiveStreamUsingAirtimeAuth, $comparison);
}
/**
* Filter the query on the live_stream_using_custom_auth column
*
* @param boolean|string $dbLiveStreamUsingCustomAuth The value to use as filter.
* Accepts strings ('false', 'off', '-', 'no', 'n', and '0' are false, the rest is true)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcShowQuery The current query, for fluid interface
*/
public function filterByDbLiveStreamUsingCustomAuth($dbLiveStreamUsingCustomAuth = null, $comparison = null)
{
if (is_string($dbLiveStreamUsingCustomAuth)) {
$live_stream_using_custom_auth = in_array(strtolower($dbLiveStreamUsingCustomAuth), array('false', 'off', '-', 'no', 'n', '0')) ? false : true;
}
return $this->addUsingAlias(CcShowPeer::LIVE_STREAM_USING_CUSTOM_AUTH, $dbLiveStreamUsingCustomAuth, $comparison);
}
/**
* Filter the query on the live_stream_user column
*
* @param string $dbLiveStreamUser The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcShowQuery The current query, for fluid interface
*/
public function filterByDbLiveStreamUser($dbLiveStreamUser = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbLiveStreamUser)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbLiveStreamUser)) {
$dbLiveStreamUser = str_replace('*', '%', $dbLiveStreamUser);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcShowPeer::LIVE_STREAM_USER, $dbLiveStreamUser, $comparison);
}
/**
* Filter the query on the live_stream_pass column
*
* @param string $dbLiveStreamPass The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcShowQuery The current query, for fluid interface
*/
public function filterByDbLiveStreamPass($dbLiveStreamPass = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbLiveStreamPass)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbLiveStreamPass)) {
$dbLiveStreamPass = str_replace('*', '%', $dbLiveStreamPass);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcShowPeer::LIVE_STREAM_PASS, $dbLiveStreamPass, $comparison);
}
/**
* Filter the query by a related CcShowInstances object
*