Merge branch '2.5.x' of https://github.com/sourcefabric/Airtime into 2.5.x
This commit is contained in:
commit
86ce4673ab
|
@ -1112,35 +1112,36 @@ class Application_Model_Scheduler
|
||||||
|
|
||||||
$removedItems = CcScheduleQuery::create()->findPks($scheduledIds);
|
$removedItems = CcScheduleQuery::create()->findPks($scheduledIds);
|
||||||
|
|
||||||
//check to make sure all items selected are up to date
|
// This array is used to keep track of every show instance that was
|
||||||
foreach ($removedItems as $removedItem) {
|
// effected by the track deletion. It will be used later on to
|
||||||
|
// remove gaps in the schedule and adjust crossfade times.
|
||||||
|
$effectedInstanceIds = array();
|
||||||
|
|
||||||
|
foreach ($removedItems as $removedItem) {
|
||||||
$instance = $removedItem->getCcShowInstances($this->con);
|
$instance = $removedItem->getCcShowInstances($this->con);
|
||||||
|
$effectedInstanceIds[] = $instance->getDbId();
|
||||||
|
|
||||||
//check if instance is linked and if so get the schedule items
|
//check if instance is linked and if so get the schedule items
|
||||||
//for all linked instances so we can delete them too
|
//for all linked instances so we can delete them too
|
||||||
if (!$cancelShow && $instance->getCcShow()->isLinked()) {
|
if (!$cancelShow && $instance->getCcShow()->isLinked()) {
|
||||||
//returns all linked instances if linked
|
//returns all linked instances if linked
|
||||||
$ccShowInstances = $this->getInstances($instance->getDbId());
|
$ccShowInstances = $this->getInstances($instance->getDbId());
|
||||||
|
|
||||||
$instanceIds = array();
|
$instanceIds = array();
|
||||||
foreach ($ccShowInstances as $ccShowInstance) {
|
foreach ($ccShowInstances as $ccShowInstance) {
|
||||||
$instanceIds[] = $ccShowInstance->getDbId();
|
$instanceIds[] = $ccShowInstance->getDbId();
|
||||||
}
|
}
|
||||||
/*
|
$effectedInstanceIds = array_merge($effectedInstanceIds, $instanceIds);
|
||||||
* Find all the schedule items that are in the same position
|
|
||||||
* as the selected item by the user.
|
// Delete the same track, represented by $removedItem, in
|
||||||
* The position of each track is the same across each linked instance
|
// each linked show instance.
|
||||||
*/
|
|
||||||
$itemsToDelete = CcScheduleQuery::create()
|
$itemsToDelete = CcScheduleQuery::create()
|
||||||
->filterByDbPosition($removedItem->getDbPosition())
|
->filterByDbPosition($removedItem->getDbPosition())
|
||||||
->filterByDbInstanceId($instanceIds, Criteria::IN)
|
->filterByDbInstanceId($instanceIds, Criteria::IN)
|
||||||
->find();
|
->filterByDbId($removedItem->getDbId(), Criteria::NOT_EQUAL)
|
||||||
foreach ($itemsToDelete as $item) {
|
->delete($this->con);
|
||||||
if (!$removedItems->contains($item)) {
|
|
||||||
$removedItems->append($item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//check to truncate the currently playing item instead of deleting it.
|
//check to truncate the currently playing item instead of deleting it.
|
||||||
if ($removedItem->isCurrentItem($this->epochNow)) {
|
if ($removedItem->isCurrentItem($this->epochNow)) {
|
||||||
|
@ -1165,29 +1166,11 @@ class Application_Model_Scheduler
|
||||||
} else {
|
} else {
|
||||||
$removedItem->delete($this->con);
|
$removedItem->delete($this->con);
|
||||||
}
|
}
|
||||||
|
|
||||||
// update is_scheduled in cc_files but only if
|
|
||||||
// the file is not scheduled somewhere else
|
|
||||||
$fileId = $removedItem->getDbFileId();
|
|
||||||
// check if the removed item is scheduled somewhere else
|
|
||||||
$futureScheduledFiles = Application_Model_Schedule::getAllFutureScheduledFiles();
|
|
||||||
if (!is_null($fileId) && !in_array($fileId, $futureScheduledFiles)) {
|
|
||||||
$db_file = CcFilesQuery::create()->findPk($fileId, $this->con);
|
|
||||||
$db_file->setDbIsScheduled(false)->save($this->con);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Application_Model_StoredFile::updatePastFilesIsScheduled();
|
||||||
|
|
||||||
if ($adjustSched === true) {
|
if ($adjustSched === true) {
|
||||||
//get the show instances of the shows we must adjust times for.
|
foreach ($effectedInstanceIds as $instance) {
|
||||||
foreach ($removedItems as $item) {
|
|
||||||
|
|
||||||
$instance = $item->getDBInstanceId();
|
|
||||||
if (!in_array($instance, $showInstances)) {
|
|
||||||
$showInstances[] = $instance;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($showInstances as $instance) {
|
|
||||||
$this->removeGaps($instance);
|
$this->removeGaps($instance);
|
||||||
$this->calculateCrossfades($instance);
|
$this->calculateCrossfades($instance);
|
||||||
}
|
}
|
||||||
|
@ -1195,7 +1178,7 @@ class Application_Model_Scheduler
|
||||||
|
|
||||||
//update the status flag in cc_schedule.
|
//update the status flag in cc_schedule.
|
||||||
$instances = CcShowInstancesQuery::create()
|
$instances = CcShowInstancesQuery::create()
|
||||||
->filterByPrimaryKeys($showInstances)
|
->filterByPrimaryKeys($effectedInstanceIds)
|
||||||
->find($this->con);
|
->find($this->con);
|
||||||
|
|
||||||
foreach ($instances as $instance) {
|
foreach ($instances as $instance) {
|
||||||
|
|
|
@ -1,196 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
||||||
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
||||||
<link rel="selenium.base" href="http://bananas.airtime.pro/" />
|
|
||||||
<title>Account Plans</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<table cellpadding="1" cellspacing="1" border="1">
|
|
||||||
<thead>
|
|
||||||
<tr><td rowspan="1" colspan="3">Account Plans</td></tr>
|
|
||||||
</thead><tbody>
|
|
||||||
<tr>
|
|
||||||
<td>open</td>
|
|
||||||
<td>/billing/upgrade</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>clickAndWait</td>
|
|
||||||
<td>link=Account Plans</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=hobbyist_grid_price</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=starter_grid_price</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=plus_grid_price</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=premium_grid_price</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyText</td>
|
|
||||||
<td>id=hobbyist_grid_price</td>
|
|
||||||
<td>$9.95 / month</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyText</td>
|
|
||||||
<td>id=starter_grid_price</td>
|
|
||||||
<td>$39.95 / month</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyText</td>
|
|
||||||
<td>id=plus_grid_price</td>
|
|
||||||
<td>$64.95 / month</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyText</td>
|
|
||||||
<td>id=premium_grid_price</td>
|
|
||||||
<td>$99.95 / month</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=current_plan</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=newproductbillingcycle-monthly</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=newproductbillingcycle-annually</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=newproductid-25</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=newproductid-26</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=newproductid-27</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=newproductid-28</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>css=span.subtotal</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=firstname</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=lastname</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=companyname</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=email</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=address1</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=address2</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=city</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=state</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=postcode</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=country</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=phonenumber</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=securityqid</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=securityqans</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=customfields-7</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=customfields-71</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=paymentmethod-paypal</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>//div[@id='total_box']/b[2]</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>css=input[type="submit"]</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
</tbody></table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -3,7 +3,7 @@
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
<link rel="selenium.base" href="http://bananas.airtime.pro/" />
|
|
||||||
<title>Add Media Skeleton Present</title>
|
<title>Add Media Skeleton Present</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
<link rel="selenium.base" href="http://bananas.airtime.pro/" />
|
|
||||||
<title>Calendar Add Show Skeleton</title>
|
<title>Calendar Add Show Skeleton</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
<link rel="selenium.base" href="http://bananas.airtime.pro/" />
|
|
||||||
<title>Calendar Day Week Month Views</title>
|
<title>Calendar Day Week Month Views</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
<link rel="selenium.base" href="http://bananas.airtime.pro/" />
|
|
||||||
<title>Calendar Skeleton Present</title>
|
<title>Calendar Skeleton Present</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
<link rel="selenium.base" href="http://bananas.airtime.pro/" />
|
|
||||||
<title>Library Skeleton Present</title>
|
<title>Library Skeleton Present</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
<link rel="selenium.base" href="http://bananas.airtime.pro/" />
|
|
||||||
<title>Listen Button Skeleton</title>
|
<title>Listen Button Skeleton</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
<link rel="selenium.base" href="http://bananas.airtime.pro/" />
|
|
||||||
<title>Login and Logout</title>
|
<title>Login and Logout</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
<link rel="selenium.base" href="http://bananas.airtime.pro/" />
|
|
||||||
<title>Login</title>
|
<title>Login</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
<link rel="selenium.base" href="http://bananas.airtime.pro/" />
|
|
||||||
<title>Preferences Skeletons</title>
|
<title>Preferences Skeletons</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
<link rel="selenium.base" href="http://bananas.airtime.pro/" />
|
|
||||||
<title>System Menu Contents</title>
|
<title>System Menu Contents</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
Loading…
Reference in New Issue