fix errors reported by Facebook's scheck
This commit is contained in:
parent
73a908055a
commit
4ed7c4ccd3
|
@ -4,6 +4,7 @@ class Application_Model_Datatables
|
|||
{
|
||||
private static function buildWhereClauseForAdvancedSearch($dbname2searchTerm)
|
||||
{
|
||||
$where = array();
|
||||
$where['clause'] = array();
|
||||
$where['params'] = array();
|
||||
foreach ($dbname2searchTerm as $dbname=>$term) {
|
||||
|
|
|
@ -1075,8 +1075,7 @@ SQL;
|
|||
$sql .= "END WHERE position IN ($currentPos) and playlist_id=:p1";
|
||||
|
||||
Application_Common_Database::prepareAndExecute($sql, array("p1"=>$this->id));
|
||||
$result['result'] = 0;
|
||||
return $result;
|
||||
return array('result' => 0);
|
||||
}
|
||||
|
||||
public static function getAllPlaylistFiles()
|
||||
|
|
|
@ -85,6 +85,9 @@ class Application_Model_Scheduler
|
|||
|
||||
$nowEpoch = floatval($this->nowDT->format("U.u"));
|
||||
|
||||
$schedInfo = array();
|
||||
$instanceInfo = array();
|
||||
|
||||
for ($i = 0; $i < count($items); $i++) {
|
||||
$id = $items[$i]["id"];
|
||||
|
||||
|
@ -103,7 +106,7 @@ class Application_Model_Scheduler
|
|||
}
|
||||
|
||||
$schedIds = array();
|
||||
if (isset($schedInfo)) {
|
||||
if (count($schedInfo) > 0) {
|
||||
$schedIds = array_keys($schedInfo);
|
||||
}
|
||||
$schedItems = CcScheduleQuery::create()->findPKs($schedIds, $this->con);
|
||||
|
|
|
@ -388,6 +388,7 @@ class Application_Model_ShowBuilder
|
|||
$outdated = false;
|
||||
$shows = Application_Model_Show::getShows($this->startDT, $this->endDT);
|
||||
|
||||
$include = array();
|
||||
if ($this->opts["showFilter"] !== 0) {
|
||||
$include[] = $this->opts["showFilter"];
|
||||
} elseif ($this->opts["myShows"] === 1) {
|
||||
|
|
|
@ -352,10 +352,10 @@ SQL;
|
|||
);
|
||||
|
||||
//only need to check overlap if show increased in size.
|
||||
if (strtotime($new_ends) > strtotime($ends)) {
|
||||
if (strtotime($now_ends) > strtotime($ends)) {
|
||||
|
||||
$utcStartDateTime = new DateTime($ends, new DateTimeZone("UTC"));
|
||||
$utcEndDateTime = new DateTime($new_ends, new DateTimeZone("UTC"));
|
||||
$utcEndDateTime = new DateTime($now_ends, new DateTimeZone("UTC"));
|
||||
|
||||
$overlap = Application_Model_Show::getShows($utcStartDateTime, $utcEndDateTime);
|
||||
|
||||
|
@ -381,7 +381,7 @@ SQL;
|
|||
|
||||
}
|
||||
|
||||
$this->setShowEnd($new_ends);
|
||||
$this->setShowEnd($now_ends);
|
||||
Application_Model_RabbitMq::PushSchedule();
|
||||
}
|
||||
|
||||
|
|
|
@ -893,7 +893,7 @@ SQL;
|
|||
$in = fopen($_FILES['file']['tmp_name'], "rb");
|
||||
|
||||
if ($in) {
|
||||
while ($buff = fread($in, 4096))
|
||||
while (($buff = fread($in, 4096)))
|
||||
fwrite($out, $buff);
|
||||
} else
|
||||
die('{"jsonrpc" : "2.0", "error" : {"code": 101, "message": _("Failed to open input stream.")}, "id" : "id"}');
|
||||
|
@ -912,7 +912,7 @@ SQL;
|
|||
$in = fopen("php://input", "rb");
|
||||
|
||||
if ($in) {
|
||||
while ($buff = fread($in, 4096))
|
||||
while (($buff = fread($in, 4096)))
|
||||
fwrite($out, $buff);
|
||||
} else
|
||||
die('{"jsonrpc" : "2.0", "error" : {"code": 101, "message": _("Failed to open input stream.")}, "id" : "id"}');
|
||||
|
@ -961,6 +961,7 @@ SQL;
|
|||
// Check if we have enough space before copying
|
||||
if (!self::isEnoughDiskSpaceToCopy($stor, $audio_file)) {
|
||||
$freeSpace = disk_free_space($stor);
|
||||
$fileSize = filesize($audio_file);
|
||||
|
||||
return array("code" => 107,
|
||||
"message" => sprintf(_("The file was not uploaded, there is "
|
||||
|
|
|
@ -125,6 +125,7 @@ class Application_Model_Systemstatus
|
|||
public static function GetPlatformInfo()
|
||||
{
|
||||
$keys = array("release", "machine", "memory", "swap");
|
||||
$data = array();
|
||||
foreach ($keys as $key) {
|
||||
$data[$key] = "UNKNOWN";
|
||||
}
|
||||
|
@ -212,7 +213,7 @@ class Application_Model_Systemstatus
|
|||
|
||||
public static function GetDiskInfo()
|
||||
{
|
||||
$partions = array();
|
||||
$partitions = array();
|
||||
|
||||
/* First lets get all the watched directories. Then we can group them
|
||||
* into the same partitions by comparing the partition sizes. */
|
||||
|
|
|
@ -226,7 +226,7 @@ class Application_Model_User
|
|||
public function deleteAllFiles()
|
||||
{
|
||||
$my_files = $this->getOwnedFiles();
|
||||
foreach ($files as $file) {
|
||||
foreach ($my_files as $file) {
|
||||
$file->delete();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue