CC-2956: Undefined variable: endDateTime in

/usr/share/airtime/application/models/Show.php on line 807,
referer: http://localhost/Schedule

- fixed
This commit is contained in:
James 2011-10-11 16:36:01 -04:00
parent 42d2393bdd
commit 20e9002310
4 changed files with 14 additions and 6 deletions

View File

@ -75,7 +75,7 @@ class Application_Model_RabbitMq
$channel->exchange_declare($EXCHANGE, 'direct', false, true);
$now = new DateTime("@".time());
$end_timestamp = new DateTime("@".time() + 3600*2);
$end_timestamp = new DateTime("@".(time() + 3600*2));
$temp['event_type'] = $event_type;
$temp['server_timezone'] = Application_Model_Preference::GetTimezone();

View File

@ -804,7 +804,7 @@ class Application_Model_Show {
$utcStartDateTime->add(new DateInterval("P".$daysAdd."D"));
}
if (is_null($endDateTime) || $utcStartDateTime->getTimestamp() <= $endDateTime->getTimestamp()) {
if (is_null($endDate) || $utcStartDateTime->getTimestamp() <= $endDateTime->getTimestamp()) {
$showDay = new CcShowDays();
$showDay->setDbFirstShow($utcStartDateTime->format("Y-m-d"));
$showDay->setDbLastShow($endDate);

View File

@ -83,7 +83,6 @@ class Application_Model_StreamSetting {
$sql = "SELECT COUNT(*) FROM cc_stream_setting"
." WHERE keyname = '$keyname'";
$result = $CC_DBC->GetOne($sql);
Logging::log("setError");
if ($result == 1){
$sql = "UPDATE cc_stream_setting"
." SET value = '$msg'"
@ -92,9 +91,7 @@ class Application_Model_StreamSetting {
$sql = "INSERT INTO cc_stream_setting (keyname, value, type)"
." VALUES ('$keyname', '$msg', 'string')";
}
Logging::log($sql);
$res = $CC_DBC->query($sql);
Logging::log($res);
}
public static function getLiquidsoapError($stream_id){

View File

@ -48,6 +48,17 @@ function removeAddShowButton(){
span.remove();
}
function pad(number, length) {
var str = '' + number;
while (str.length < length) {
str = '0' + str;
}
return str;
}
function makeTimeStamp(date){
var sy, sm, sd, h, m, s, timestamp;
sy = date.getFullYear();
@ -57,7 +68,7 @@ function makeTimeStamp(date){
m = date.getMinutes();
s = date.getSeconds();
timestamp = sy+"-"+ sm +"-"+ sd +" "+ h +":"+ m +":"+ s;
timestamp = sy+"-"+ pad(sm, 2) +"-"+ pad(sd, 2) +" "+ pad(h, 2) +":"+ pad(m, 2) +":"+ pad(s, 2);
return timestamp;
}