Merge branch '2.5.x' of github.com:sourcefabric/Airtime into 2.5.x
This commit is contained in:
commit
0919915c6b
6 changed files with 57 additions and 22 deletions
|
@ -128,15 +128,20 @@ class Application_Service_CalendarService
|
||||||
|
|
||||||
$excludeIds = $this->ccShow->getEditedRepeatingInstanceIds();
|
$excludeIds = $this->ccShow->getEditedRepeatingInstanceIds();
|
||||||
|
|
||||||
$isRepeating = true;
|
$isRepeating = $this->ccShow->isRepeating();
|
||||||
$populateInstance = false;
|
$populateInstance = false;
|
||||||
if (in_array($this->ccShowInstance->getDbId(), $excludeIds)) {
|
if ($isRepeating && in_array($this->ccShowInstance->getDbId(), $excludeIds)) {
|
||||||
$populateInstance = true;
|
$populateInstance = true;
|
||||||
$isRepeating = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$this->ccShowInstance->isRebroadcast() && $isAdminOrPM) {
|
if (!$this->ccShowInstance->isRebroadcast() && $isAdminOrPM) {
|
||||||
if ($isRepeating) {
|
if ($isRepeating) {
|
||||||
|
if ($populateInstance) {
|
||||||
|
$menu["edit"] = array(
|
||||||
|
"name" => _("Edit Show"),
|
||||||
|
"icon" => "edit",
|
||||||
|
"url" => $baseUrl."Schedule/populate-repeating-show-instance-form");
|
||||||
|
} else {
|
||||||
$menu["edit"] = array(
|
$menu["edit"] = array(
|
||||||
"name" => _("Edit"),
|
"name" => _("Edit"),
|
||||||
"icon" => "edit",
|
"icon" => "edit",
|
||||||
|
@ -151,11 +156,7 @@ class Application_Service_CalendarService
|
||||||
"name" => _("Edit This Instance"),
|
"name" => _("Edit This Instance"),
|
||||||
"icon" => "edit",
|
"icon" => "edit",
|
||||||
"url" => $baseUrl."Schedule/populate-repeating-show-instance-form");
|
"url" => $baseUrl."Schedule/populate-repeating-show-instance-form");
|
||||||
} elseif ($populateInstance) {
|
}
|
||||||
$menu["edit"] = array(
|
|
||||||
"name" => _("Edit Show"),
|
|
||||||
"icon" => "edit",
|
|
||||||
"url" => $baseUrl."Schedule/populate-repeating-show-instance-form");
|
|
||||||
} else {
|
} else {
|
||||||
$menu["edit"] = array(
|
$menu["edit"] = array(
|
||||||
"name"=> _("Edit Show"),
|
"name"=> _("Edit Show"),
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
define('AIRTIME_VERSION', '2.5.0');
|
define('AIRTIME_VERSION', '2.5.1');
|
||||||
|
|
24
install_minimal/upgrades/airtime-2.5.1/DbUpgrade.php
Normal file
24
install_minimal/upgrades/airtime-2.5.1/DbUpgrade.php
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/* All functions other than start() should be marked as
|
||||||
|
* private.
|
||||||
|
*/
|
||||||
|
class AirtimeDatabaseUpgrade{
|
||||||
|
|
||||||
|
public static function start($p_dbValues){
|
||||||
|
echo "* Updating Database".PHP_EOL;
|
||||||
|
self::task0($p_dbValues);
|
||||||
|
echo " * Complete".PHP_EOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static function task0($p_dbValues){
|
||||||
|
|
||||||
|
$username = $p_dbValues['database']['dbuser'];
|
||||||
|
$password = $p_dbValues['database']['dbpass'];
|
||||||
|
$host = $p_dbValues['database']['host'];
|
||||||
|
$database = $p_dbValues['database']['dbname'];
|
||||||
|
$dir = __DIR__;
|
||||||
|
|
||||||
|
passthru("export PGPASSWORD=$password && psql -h $host -U $username -q -f $dir/data/upgrade.sql $database 2>&1 | grep -v \"will create implicit index\"");
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require_once 'DbUpgrade.php';
|
||||||
|
|
||||||
|
$filename = "/etc/airtime/airtime.conf";
|
||||||
|
$values = parse_ini_file($filename, true);
|
||||||
|
|
||||||
|
AirtimeDatabaseUpgrade::start($values);
|
2
install_minimal/upgrades/airtime-2.5.1/data/upgrade.sql
Normal file
2
install_minimal/upgrades/airtime-2.5.1/data/upgrade.sql
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
DELETE FROM cc_pref WHERE keystr = 'system_version';
|
||||||
|
INSERT INTO cc_pref (keystr, valstr) VALUES ('system_version', '2.5.1');
|
|
@ -16,7 +16,7 @@ import base64
|
||||||
import traceback
|
import traceback
|
||||||
from configobj import ConfigObj
|
from configobj import ConfigObj
|
||||||
|
|
||||||
AIRTIME_VERSION = "2.5.0"
|
AIRTIME_VERSION = "2.5.1"
|
||||||
|
|
||||||
|
|
||||||
# TODO : Place these functions in some common module. Right now, media
|
# TODO : Place these functions in some common module. Right now, media
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue