diff --git a/airtime_mvc/application/controllers/ApiController.php b/airtime_mvc/application/controllers/ApiController.php index 576b6cbee..a9e233050 100644 --- a/airtime_mvc/application/controllers/ApiController.php +++ b/airtime_mvc/application/controllers/ApiController.php @@ -1022,6 +1022,7 @@ class ApiController extends Zend_Controller_Action }elseif($djtype == "dj"){ //check against show dj auth $showInfo = Application_Model_Show::GetCurrentShow(); + // there is current playing show if(isset($showInfo[0]['id'])){ $current_show_id = $showInfo[0]['id']; $CcShow = CcShowQuery::create()->findPK($current_show_id); @@ -1035,21 +1036,28 @@ class ApiController extends Zend_Controller_Action $hosts_ids = $show->getHostsIds(); // check against hosts auth - foreach( $hosts_ids as $host){ - $h = new Application_Model_User($host['subjs_id']); - if($username == $h->getLogin() && md5($password) == $h->getPassword()){ - $this->view->msg = true; - return; + if($CcShow->getDbLiveStreamUsingAirtimeAuth()){ + foreach( $hosts_ids as $host){ + $h = new Application_Model_User($host['subjs_id']); + if($username == $h->getLogin() && md5($password) == $h->getPassword()){ + $this->view->msg = true; + return; + } } } - // check against custom auth - if($username == $custom_user && $password == $custom_pass){ - $this->view->msg = true; - }else{ + if($CcShow->getDbLiveStreamUsingCustomAuth()){ + if($username == $custom_user && $password == $custom_pass){ + $this->view->msg = true; + }else{ + $this->view->msg = false; + } + } + else{ $this->view->msg = false; } }else{ + // no show is currently playing $this->view->msg = false; } } diff --git a/airtime_mvc/application/controllers/PreferenceController.php b/airtime_mvc/application/controllers/PreferenceController.php index 1192c3775..20e6c8a69 100644 --- a/airtime_mvc/application/controllers/PreferenceController.php +++ b/airtime_mvc/application/controllers/PreferenceController.php @@ -208,7 +208,6 @@ class PreferenceController extends Zend_Controller_Action // this goes into cc_pref table Application_Model_Preference::SetStreamLabelFormat($values['streamFormat']); - Application_Model_Preference::SetLiveSteamAutoEnable($values["auto_enable_live_stream"]); Application_Model_Preference::SetLiveSteamMasterUsername($values["master_username"]); Application_Model_Preference::SetLiveSteamMasterPassword($values["master_password"]); diff --git a/airtime_mvc/application/forms/AddShowLiveStream.php b/airtime_mvc/application/forms/AddShowLiveStream.php index bebd88cd4..56d6bd4b2 100644 --- a/airtime_mvc/application/forms/AddShowLiveStream.php +++ b/airtime_mvc/application/forms/AddShowLiveStream.php @@ -6,12 +6,6 @@ class Application_Form_AddShowLiveStream extends Zend_Form_SubForm public function init() { - $allow_live_stream = new Zend_Form_Element_Checkbox("allow_live_stream_override"); - $allow_live_stream->setLabel("Allow Live Stream Override") - ->setRequired(false) - ->setDecorators(array('ViewHelper')); - $this->addElement($allow_live_stream); - $description1 = "This follows the same security pattern for the shows: if no users are explicitly set for the show, then anyone with a valid airtime login can connect to the stream, otherwise if there are users assigned to the show, then only those users can connect."; $cb_airtime_auth = new Zend_Form_Element_Checkbox("cb_airtime_auth"); $cb_airtime_auth->setLabel("Connect using Airtime username & password") diff --git a/airtime_mvc/application/forms/LiveStreamingPreferences.php b/airtime_mvc/application/forms/LiveStreamingPreferences.php index a9e4847ba..721e7af07 100644 --- a/airtime_mvc/application/forms/LiveStreamingPreferences.php +++ b/airtime_mvc/application/forms/LiveStreamingPreferences.php @@ -9,14 +9,6 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm array('ViewScript', array('viewScript' => 'form/preferences_livestream.phtml')) )); - //enable Auto-enable for all shows - $auto_enable = new Zend_Form_Element_Checkbox('auto_enable_live_stream'); - $auto_enable->setLabel('Auto-enable for all shows') - ->setRequired(false) - ->setValue(Application_Model_Preference::GetLiveSteamAutoEnable()) - ->setDecorators(array('ViewHelper')); - $this->addElement($auto_enable); - //Master username $master_username = new Zend_Form_Element_Text('master_username'); $master_username->setAttrib('autocomplete', 'off') diff --git a/airtime_mvc/application/models/Preference.php b/airtime_mvc/application/models/Preference.php index 8f6da6215..38b220aac 100644 --- a/airtime_mvc/application/models/Preference.php +++ b/airtime_mvc/application/models/Preference.php @@ -699,20 +699,6 @@ class Application_Model_Preference return $val; } - /* - * $value should be 1 or 0 - */ - public static function SetLiveSteamAutoEnable($value){ - self::SetValue("live_stream_auto_enable", $value, false); - } - - public static function GetLiveSteamAutoEnable(){ - if(self::GetValue("live_stream_auto_enable") == Null){ - return 0; - } - return self::GetValue("live_stream_auto_enable"); - } - public static function SetLiveSteamMasterUsername($value){ self::SetValue("live_stream_master_username", $value, false); } diff --git a/airtime_mvc/application/models/Show.php b/airtime_mvc/application/models/Show.php index 0159b4487..afd9255b7 100644 --- a/airtime_mvc/application/models/Show.php +++ b/airtime_mvc/application/models/Show.php @@ -795,7 +795,6 @@ class Application_Model_Show { }else{ $ccShow = CcShowQuery::create()->findPK($this->_showId); $info['custom_username'] = $ccShow->getDbLiveStreamUser(); - $info['allow_live_stream_override'] = $ccShow->getDbAllowLiveStream(); $info['cb_airtime_auth'] = $ccShow->getDbLiveStreamUsingAirtimeAuth(); $info['cb_custom_auth'] = $ccShow->getDbLiveStreamUsingCustomAuth(); $info['custom_username'] = $ccShow->getDbLiveStreamUser(); @@ -991,7 +990,6 @@ class Application_Model_Show { $ccShow->setDbGenre($data['add_show_genre']); $ccShow->setDbColor($data['add_show_color']); $ccShow->setDbBackgroundColor($data['add_show_background_color']); - $ccShow->setDbAllowLiveStream($data['allow_live_stream_override'] == 1?true:false); $ccShow->setDbLiveStreamUsingAirtimeAuth($data['cb_airtime_auth'] == 1?true:false); $ccShow->setDbLiveStreamUsingCustomAuth($data['cb_custom_auth'] == 1?true:false); $ccShow->setDbLiveStreamUser($data['custom_username']); diff --git a/airtime_mvc/application/models/airtime/map/CcShowTableMap.php b/airtime_mvc/application/models/airtime/map/CcShowTableMap.php index 7ca5b8cc2..f0d7c84c3 100644 --- a/airtime_mvc/application/models/airtime/map/CcShowTableMap.php +++ b/airtime_mvc/application/models/airtime/map/CcShowTableMap.php @@ -45,7 +45,6 @@ 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('ALLOW_LIVE_STREAM', 'DbAllowLiveStream', 'BOOLEAN', false, null, 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); diff --git a/airtime_mvc/application/models/airtime/om/BaseCcShow.php b/airtime_mvc/application/models/airtime/om/BaseCcShow.php index 26b6b1d1c..78722b5ba 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcShow.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcShow.php @@ -69,12 +69,6 @@ abstract class BaseCcShow extends BaseObject implements Persistent */ protected $background_color; - /** - * The value for the allow_live_stream field. - * @var boolean - */ - protected $allow_live_stream; - /** * The value for the live_stream_using_airtime_auth field. * @var boolean @@ -226,16 +220,6 @@ abstract class BaseCcShow extends BaseObject implements Persistent return $this->background_color; } - /** - * Get the [allow_live_stream] column value. - * - * @return boolean - */ - public function getDbAllowLiveStream() - { - return $this->allow_live_stream; - } - /** * Get the [live_stream_using_airtime_auth] column value. * @@ -416,26 +400,6 @@ abstract class BaseCcShow extends BaseObject implements Persistent return $this; } // setDbBackgroundColor() - /** - * Set the value of [allow_live_stream] column. - * - * @param boolean $v new value - * @return CcShow The current object (for fluent API support) - */ - public function setDbAllowLiveStream($v) - { - if ($v !== null) { - $v = (boolean) $v; - } - - if ($this->allow_live_stream !== $v) { - $this->allow_live_stream = $v; - $this->modifiedColumns[] = CcShowPeer::ALLOW_LIVE_STREAM; - } - - return $this; - } // setDbAllowLiveStream() - /** * Set the value of [live_stream_using_airtime_auth] column. * @@ -567,11 +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->allow_live_stream = ($row[$startcol + 7] !== null) ? (boolean) $row[$startcol + 7] : null; - $this->live_stream_using_airtime_auth = ($row[$startcol + 8] !== null) ? (boolean) $row[$startcol + 8] : null; - $this->live_stream_using_custom_auth = ($row[$startcol + 9] !== null) ? (boolean) $row[$startcol + 9] : null; - $this->live_stream_user = ($row[$startcol + 10] !== null) ? (string) $row[$startcol + 10] : null; - $this->live_stream_pass = ($row[$startcol + 11] !== null) ? (string) $row[$startcol + 11] : 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); @@ -580,7 +543,7 @@ abstract class BaseCcShow extends BaseObject implements Persistent $this->ensureConsistency(); } - return $startcol + 12; // 12 = 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); @@ -973,18 +936,15 @@ abstract class BaseCcShow extends BaseObject implements Persistent return $this->getDbBackgroundColor(); break; case 7: - return $this->getDbAllowLiveStream(); - break; - case 8: return $this->getDbLiveStreamUsingAirtimeAuth(); break; - case 9: + case 8: return $this->getDbLiveStreamUsingCustomAuth(); break; - case 10: + case 9: return $this->getDbLiveStreamUser(); break; - case 11: + case 10: return $this->getDbLiveStreamPass(); break; default: @@ -1017,11 +977,10 @@ abstract class BaseCcShow extends BaseObject implements Persistent $keys[4] => $this->getDbDescription(), $keys[5] => $this->getDbColor(), $keys[6] => $this->getDbBackgroundColor(), - $keys[7] => $this->getDbAllowLiveStream(), - $keys[8] => $this->getDbLiveStreamUsingAirtimeAuth(), - $keys[9] => $this->getDbLiveStreamUsingCustomAuth(), - $keys[10] => $this->getDbLiveStreamUser(), - $keys[11] => $this->getDbLiveStreamPass(), + $keys[7] => $this->getDbLiveStreamUsingAirtimeAuth(), + $keys[8] => $this->getDbLiveStreamUsingCustomAuth(), + $keys[9] => $this->getDbLiveStreamUser(), + $keys[10] => $this->getDbLiveStreamPass(), ); return $result; } @@ -1075,18 +1034,15 @@ abstract class BaseCcShow extends BaseObject implements Persistent $this->setDbBackgroundColor($value); break; case 7: - $this->setDbAllowLiveStream($value); - break; - case 8: $this->setDbLiveStreamUsingAirtimeAuth($value); break; - case 9: + case 8: $this->setDbLiveStreamUsingCustomAuth($value); break; - case 10: + case 9: $this->setDbLiveStreamUser($value); break; - case 11: + case 10: $this->setDbLiveStreamPass($value); break; } // switch() @@ -1120,11 +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->setDbAllowLiveStream($arr[$keys[7]]); - if (array_key_exists($keys[8], $arr)) $this->setDbLiveStreamUsingAirtimeAuth($arr[$keys[8]]); - if (array_key_exists($keys[9], $arr)) $this->setDbLiveStreamUsingCustomAuth($arr[$keys[9]]); - if (array_key_exists($keys[10], $arr)) $this->setDbLiveStreamUser($arr[$keys[10]]); - if (array_key_exists($keys[11], $arr)) $this->setDbLiveStreamPass($arr[$keys[11]]); + 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]]); } /** @@ -1143,7 +1098,6 @@ 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::ALLOW_LIVE_STREAM)) $criteria->add(CcShowPeer::ALLOW_LIVE_STREAM, $this->allow_live_stream); 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); @@ -1215,7 +1169,6 @@ abstract class BaseCcShow extends BaseObject implements Persistent $copyObj->setDbDescription($this->description); $copyObj->setDbColor($this->color); $copyObj->setDbBackgroundColor($this->background_color); - $copyObj->setDbAllowLiveStream($this->allow_live_stream); $copyObj->setDbLiveStreamUsingAirtimeAuth($this->live_stream_using_airtime_auth); $copyObj->setDbLiveStreamUsingCustomAuth($this->live_stream_using_custom_auth); $copyObj->setDbLiveStreamUser($this->live_stream_user); @@ -1818,7 +1771,6 @@ abstract class BaseCcShow extends BaseObject implements Persistent $this->description = null; $this->color = null; $this->background_color = null; - $this->allow_live_stream = null; $this->live_stream_using_airtime_auth = null; $this->live_stream_using_custom_auth = null; $this->live_stream_user = null; diff --git a/airtime_mvc/application/models/airtime/om/BaseCcShowPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcShowPeer.php index e6b4e75e3..e559e0d1a 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcShowPeer.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcShowPeer.php @@ -26,7 +26,7 @@ abstract class BaseCcShowPeer { const TM_CLASS = 'CcShowTableMap'; /** The total number of columns. */ - const NUM_COLUMNS = 12; + const NUM_COLUMNS = 11; /** The number of lazy-loaded columns. */ const NUM_LAZY_LOAD_COLUMNS = 0; @@ -52,9 +52,6 @@ abstract class BaseCcShowPeer { /** the column name for the BACKGROUND_COLOR field */ const BACKGROUND_COLOR = 'cc_show.BACKGROUND_COLOR'; - /** the column name for the ALLOW_LIVE_STREAM field */ - const ALLOW_LIVE_STREAM = 'cc_show.ALLOW_LIVE_STREAM'; - /** the column name for the LIVE_STREAM_USING_AIRTIME_AUTH field */ const LIVE_STREAM_USING_AIRTIME_AUTH = 'cc_show.LIVE_STREAM_USING_AIRTIME_AUTH'; @@ -83,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', 'DbAllowLiveStream', 'DbLiveStreamUsingAirtimeAuth', 'DbLiveStreamUsingCustomAuth', 'DbLiveStreamUser', 'DbLiveStreamPass', ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbName', 'dbUrl', 'dbGenre', 'dbDescription', 'dbColor', 'dbBackgroundColor', 'dbAllowLiveStream', 'dbLiveStreamUsingAirtimeAuth', 'dbLiveStreamUsingCustomAuth', 'dbLiveStreamUser', 'dbLiveStreamPass', ), - BasePeer::TYPE_COLNAME => array (self::ID, self::NAME, self::URL, self::GENRE, self::DESCRIPTION, self::COLOR, self::BACKGROUND_COLOR, self::ALLOW_LIVE_STREAM, 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', 'ALLOW_LIVE_STREAM', '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', 'allow_live_stream', '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, 11, ) + 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, ) ); /** @@ -98,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, 'DbAllowLiveStream' => 7, 'DbLiveStreamUsingAirtimeAuth' => 8, 'DbLiveStreamUsingCustomAuth' => 9, 'DbLiveStreamUser' => 10, 'DbLiveStreamPass' => 11, ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbName' => 1, 'dbUrl' => 2, 'dbGenre' => 3, 'dbDescription' => 4, 'dbColor' => 5, 'dbBackgroundColor' => 6, 'dbAllowLiveStream' => 7, 'dbLiveStreamUsingAirtimeAuth' => 8, 'dbLiveStreamUsingCustomAuth' => 9, 'dbLiveStreamUser' => 10, 'dbLiveStreamPass' => 11, ), - 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::ALLOW_LIVE_STREAM => 7, self::LIVE_STREAM_USING_AIRTIME_AUTH => 8, self::LIVE_STREAM_USING_CUSTOM_AUTH => 9, self::LIVE_STREAM_USER => 10, self::LIVE_STREAM_PASS => 11, ), - BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'NAME' => 1, 'URL' => 2, 'GENRE' => 3, 'DESCRIPTION' => 4, 'COLOR' => 5, 'BACKGROUND_COLOR' => 6, 'ALLOW_LIVE_STREAM' => 7, 'LIVE_STREAM_USING_AIRTIME_AUTH' => 8, 'LIVE_STREAM_USING_CUSTOM_AUTH' => 9, 'LIVE_STREAM_USER' => 10, 'LIVE_STREAM_PASS' => 11, ), - BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'name' => 1, 'url' => 2, 'genre' => 3, 'description' => 4, 'color' => 5, 'background_color' => 6, 'allow_live_stream' => 7, 'live_stream_using_airtime_auth' => 8, 'live_stream_using_custom_auth' => 9, 'live_stream_user' => 10, 'live_stream_pass' => 11, ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ) + 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, ) ); /** @@ -182,7 +179,6 @@ abstract class BaseCcShowPeer { $criteria->addSelectColumn(CcShowPeer::DESCRIPTION); $criteria->addSelectColumn(CcShowPeer::COLOR); $criteria->addSelectColumn(CcShowPeer::BACKGROUND_COLOR); - $criteria->addSelectColumn(CcShowPeer::ALLOW_LIVE_STREAM); $criteria->addSelectColumn(CcShowPeer::LIVE_STREAM_USING_AIRTIME_AUTH); $criteria->addSelectColumn(CcShowPeer::LIVE_STREAM_USING_CUSTOM_AUTH); $criteria->addSelectColumn(CcShowPeer::LIVE_STREAM_USER); @@ -195,7 +191,6 @@ abstract class BaseCcShowPeer { $criteria->addSelectColumn($alias . '.DESCRIPTION'); $criteria->addSelectColumn($alias . '.COLOR'); $criteria->addSelectColumn($alias . '.BACKGROUND_COLOR'); - $criteria->addSelectColumn($alias . '.ALLOW_LIVE_STREAM'); $criteria->addSelectColumn($alias . '.LIVE_STREAM_USING_AIRTIME_AUTH'); $criteria->addSelectColumn($alias . '.LIVE_STREAM_USING_CUSTOM_AUTH'); $criteria->addSelectColumn($alias . '.LIVE_STREAM_USER'); diff --git a/airtime_mvc/application/models/airtime/om/BaseCcShowQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcShowQuery.php index ed0b7faba..580a7b1ad 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcShowQuery.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcShowQuery.php @@ -13,7 +13,6 @@ * @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 orderByDbAllowLiveStream($order = Criteria::ASC) Order by the allow_live_stream 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 @@ -26,7 +25,6 @@ * @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 groupByDbAllowLiveStream() Group by the allow_live_stream 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 @@ -62,7 +60,6 @@ * @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 findOneByDbAllowLiveStream(boolean $allow_live_stream) Return the first CcShow filtered by the allow_live_stream 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 @@ -75,7 +72,6 @@ * @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 findByDbAllowLiveStream(boolean $allow_live_stream) Return CcShow objects filtered by the allow_live_stream 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 @@ -338,23 +334,6 @@ abstract class BaseCcShowQuery extends ModelCriteria return $this->addUsingAlias(CcShowPeer::BACKGROUND_COLOR, $dbBackgroundColor, $comparison); } - /** - * Filter the query on the allow_live_stream column - * - * @param boolean|string $dbAllowLiveStream 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 filterByDbAllowLiveStream($dbAllowLiveStream = null, $comparison = null) - { - if (is_string($dbAllowLiveStream)) { - $allow_live_stream = in_array(strtolower($dbAllowLiveStream), array('false', 'off', '-', 'no', 'n', '0')) ? false : true; - } - return $this->addUsingAlias(CcShowPeer::ALLOW_LIVE_STREAM, $dbAllowLiveStream, $comparison); - } - /** * Filter the query on the live_stream_using_airtime_auth column * diff --git a/airtime_mvc/application/views/scripts/form/add-show-live-stream.phtml b/airtime_mvc/application/views/scripts/form/add-show-live-stream.phtml index ba96cecf8..aed91716d 100644 --- a/airtime_mvc/application/views/scripts/form/add-show-live-stream.phtml +++ b/airtime_mvc/application/views/scripts/form/add-show-live-stream.phtml @@ -1,13 +1,5 @@