CC-4961: Show linking
Refactoring
This commit is contained in:
parent
7347be35b1
commit
c721b81a13
5 changed files with 32 additions and 19 deletions
|
@ -10,8 +10,14 @@ class Application_Service_ShowService
|
|||
* @param $ccShow
|
||||
* @param $showData
|
||||
*/
|
||||
public function setShow($ccShow, $showData)
|
||||
public function setShow($showData, $isNewShow)
|
||||
{
|
||||
if ($isNewShow) {
|
||||
$ccShow = new CcShow();
|
||||
} else {
|
||||
$ccShow = CcShowQuery::create()->findPk($showData["add_show_id"]);
|
||||
}
|
||||
|
||||
$ccShow->setDbName($showData['add_show_name']);
|
||||
$ccShow->setDbDescription($showData['add_show_description']);
|
||||
$ccShow->setDbUrl($showData['add_show_url']);
|
||||
|
@ -35,7 +41,7 @@ class Application_Service_ShowService
|
|||
* @param $repeatType
|
||||
* @param $isRecorded
|
||||
*/
|
||||
public function createShowRebroadcasts($showData, $showId, $repeatType, $isRecorded)
|
||||
public function setShowRebroadcasts($showData, $showId, $repeatType, $isRecorded)
|
||||
{
|
||||
if (($isRecorded && $showData['add_show_rebroadcast']) && ($repeatType != -1)) {
|
||||
for ($i=1; $i<=self::MAX_REBROADCAST_DATES; $i++) {
|
||||
|
@ -70,7 +76,7 @@ class Application_Service_ShowService
|
|||
* @param $showData
|
||||
* @param $showId
|
||||
*/
|
||||
public function createShowHosts($showData, $showId)
|
||||
public function setShowHosts($showData, $showId)
|
||||
{
|
||||
if (is_array($showData['add_show_hosts'])) {
|
||||
foreach ($showData['add_show_hosts'] as $host) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue