Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
aa3bf3941b
4 changed files with 94 additions and 83 deletions
|
@ -42,7 +42,7 @@ class Application_Model_ShowBuilder
|
||||||
"fadeout" => "",
|
"fadeout" => "",
|
||||||
"image" => false,
|
"image" => false,
|
||||||
"color" => "", //in hex without the '#' sign.
|
"color" => "", //in hex without the '#' sign.
|
||||||
"backgroundColor"=> "", //in hex without the '#' sign.
|
"backgroundColor" => "", //in hex without the '#' sign.
|
||||||
);
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -129,6 +129,7 @@ class Application_Model_ShowBuilder
|
||||||
* 0 = past
|
* 0 = past
|
||||||
* 1 = current
|
* 1 = current
|
||||||
* 2 = future
|
* 2 = future
|
||||||
|
* TODO : change all of the above to real constants -- RG
|
||||||
*/
|
*/
|
||||||
private function getScheduledStatus($p_epochItemStart, $p_epochItemEnd, &$row)
|
private function getScheduledStatus($p_epochItemStart, $p_epochItemEnd, &$row)
|
||||||
{
|
{
|
||||||
|
@ -157,6 +158,14 @@ class Application_Model_ShowBuilder
|
||||||
//item is in the future.
|
//item is in the future.
|
||||||
else if ($this->epoch_now < $p_epochItemStart) {
|
else if ($this->epoch_now < $p_epochItemStart) {
|
||||||
$row["scheduled"] = 2;
|
$row["scheduled"] = 2;
|
||||||
|
} else {
|
||||||
|
Logging::warn("No-op? is this what should happen...printing
|
||||||
|
debug just in case");
|
||||||
|
$d = array(
|
||||||
|
'$p_epochItemStart' => $p_epochItemStart,
|
||||||
|
'$p_epochItemEnd' => $p_epochItemEnd,
|
||||||
|
'$row' => $row);
|
||||||
|
Logging::warn($d);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -335,6 +344,10 @@ class Application_Model_ShowBuilder
|
||||||
$this->getScheduledStatus($startsEpoch, $endsEpoch, $row);
|
$this->getScheduledStatus($startsEpoch, $endsEpoch, $row);
|
||||||
$this->isAllowed($p_item, $row);
|
$this->isAllowed($p_item, $row);
|
||||||
|
|
||||||
|
if (intval($p_item["si_record"]) === 1) {
|
||||||
|
$row["record"] = true;
|
||||||
|
}
|
||||||
|
|
||||||
return $row;
|
return $row;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -112,12 +112,21 @@ var AIRTIME = (function(AIRTIME){
|
||||||
};
|
};
|
||||||
|
|
||||||
mod.checkCancelButton = function() {
|
mod.checkCancelButton = function() {
|
||||||
var $current = $sbTable.find(".sb-current-show.sb-allowed"),
|
|
||||||
|
var $current = $sbTable.find(".sb-current-show"),
|
||||||
//this user type should be refactored into a separate users module later
|
//this user type should be refactored into a separate users module later
|
||||||
//when there's more time and more JS will need to know user data.
|
//when there's more time and more JS will need to know user data.
|
||||||
userType = localStorage.getItem('user-type');
|
userType = localStorage.getItem('user-type'),
|
||||||
|
canCancel = false;
|
||||||
|
|
||||||
if ($current.length !== 0 && (userType === 'A' || userType === 'P')) {
|
if ($current.length !== 0 && $current.hasClass("sb-allowed")) {
|
||||||
|
canCancel = true;
|
||||||
|
}
|
||||||
|
else if ($current.length !== 0 && (userType === 'A' || userType === 'P')) {
|
||||||
|
canCancel = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canCancel === true) {
|
||||||
AIRTIME.button.enableButton("icon-ban-circle", true);
|
AIRTIME.button.enableButton("icon-ban-circle", true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -112,6 +112,7 @@ CREATE TABLE cc_webstream (
|
||||||
creator_id integer NOT NULL,
|
creator_id integer NOT NULL,
|
||||||
mtime timestamp(6) without time zone NOT NULL,
|
mtime timestamp(6) without time zone NOT NULL,
|
||||||
utime timestamp(6) without time zone NOT NULL,
|
utime timestamp(6) without time zone NOT NULL,
|
||||||
|
lptime timestamp(6) without time zone,
|
||||||
mime character varying(255)
|
mime character varying(255)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -124,10 +125,13 @@ CREATE TABLE cc_webstream_metadata (
|
||||||
|
|
||||||
ALTER TABLE cc_files
|
ALTER TABLE cc_files
|
||||||
DROP COLUMN gunid,
|
DROP COLUMN gunid,
|
||||||
ADD COLUMN replay_gain character varying(16),
|
ADD COLUMN replay_gain numeric,
|
||||||
ADD COLUMN owner_id integer,
|
ADD COLUMN owner_id integer,
|
||||||
ALTER COLUMN bpm TYPE integer using airtime_to_int(bpm) /* TYPE change - table: cc_files original: character varying(8) new: integer */;
|
ALTER COLUMN bpm TYPE integer using airtime_to_int(bpm) /* TYPE change - table: cc_files original: character varying(8) new: integer */;
|
||||||
|
|
||||||
|
ALTER TABLE cc_files
|
||||||
|
ADD CONSTRAINT cc_files_owner_fkey FOREIGN KEY (owner_id) REFERENCES cc_subjs(id);
|
||||||
|
|
||||||
ALTER TABLE cc_playlistcontents
|
ALTER TABLE cc_playlistcontents
|
||||||
ADD COLUMN block_id integer,
|
ADD COLUMN block_id integer,
|
||||||
ADD COLUMN stream_id integer,
|
ADD COLUMN stream_id integer,
|
||||||
|
|
|
@ -35,23 +35,21 @@ get_include_path(),
|
||||||
realpath($CC_CONFIG['phpDir'] . '/library')
|
realpath($CC_CONFIG['phpDir'] . '/library')
|
||||||
)));
|
)));
|
||||||
|
|
||||||
function __autoload($classname){
|
function my_autoload($classname){
|
||||||
global $CC_CONFIG;
|
global $CC_CONFIG;
|
||||||
$info = explode('_', $classname);
|
$info = explode('_', $classname);
|
||||||
if (isset($info[2])) {
|
if (isset($info[1]) && isset($info[2])) {
|
||||||
$filename = $info[2].".php";
|
$filename = $info[2].".php";
|
||||||
require_once($CC_CONFIG['phpDir'].'/application/models/'.$filename);
|
if ($info[1] == "Model") {
|
||||||
|
$folderName = "models";
|
||||||
|
} else if ($info[1] == "Common") {
|
||||||
|
$folderName = "common";
|
||||||
|
}
|
||||||
|
require_once($CC_CONFIG['phpDir'].'/application/'.$folderName.'/'.$filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
require_once($CC_CONFIG['phpDir'].'/application/models/User.php');
|
|
||||||
require_once($CC_CONFIG['phpDir'].'/application/models/StoredFile.php');
|
spl_autoload_register('my_autoload');
|
||||||
require_once($CC_CONFIG['phpDir'].'/application/models/Playlist.php');
|
|
||||||
require_once($CC_CONFIG['phpDir'].'/application/models/Schedule.php');
|
|
||||||
require_once($CC_CONFIG['phpDir'].'/application/models/Show.php');
|
|
||||||
require_once($CC_CONFIG['phpDir'].'/application/models/ShowInstance.php');
|
|
||||||
require_once($CC_CONFIG['phpDir'].'/application/models/Preference.php');
|
|
||||||
require_once($CC_CONFIG['phpDir'].'/application/models/StreamSetting.php');
|
|
||||||
require_once($CC_CONFIG['phpDir'].'/application/models/LiveLog.php');
|
|
||||||
|
|
||||||
require_once 'propel/runtime/lib/Propel.php';
|
require_once 'propel/runtime/lib/Propel.php';
|
||||||
Propel::init($CC_CONFIG['phpDir']."/application/configs/airtime-conf-production.php");
|
Propel::init($CC_CONFIG['phpDir']."/application/configs/airtime-conf-production.php");
|
||||||
|
@ -64,20 +62,7 @@ if (file_exists('/usr/share/php/libzend-framework-php')){
|
||||||
require_once('Zend/Loader/Autoloader.php');
|
require_once('Zend/Loader/Autoloader.php');
|
||||||
$autoloader = Zend_Loader_Autoloader::getInstance();
|
$autoloader = Zend_Loader_Autoloader::getInstance();
|
||||||
|
|
||||||
try {
|
$infoArray = Application_Model_Preference::GetSystemInfo(true);
|
||||||
$opts = new Zend_Console_Getopt(
|
|
||||||
array(
|
|
||||||
'test|t' => "Keep broadcast log data\n"
|
|
||||||
)
|
|
||||||
);
|
|
||||||
$opts->parse();
|
|
||||||
}
|
|
||||||
catch (Zend_Console_Getopt_Exception $e) {
|
|
||||||
print $e->getMessage() .PHP_EOL;
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
$infoArray = Application_Model_Preference::GetSystemInfo(true, isset($opts->t));
|
|
||||||
|
|
||||||
if(Application_Model_Preference::GetSupportFeedback() == '1'){
|
if(Application_Model_Preference::GetSupportFeedback() == '1'){
|
||||||
$url = 'http://stat.sourcefabric.org/index.php?p=airtime';
|
$url = 'http://stat.sourcefabric.org/index.php?p=airtime';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue