Remove "?>" from the end of pure-PHP files to prevent "HEADERS ALREADY SENT"
This commit is contained in:
paul.baranowski 2011-02-22 18:22:31 +01:00
parent b44de03c71
commit 15153727c1
64 changed files with 113 additions and 194 deletions

View file

@ -181,4 +181,3 @@ class AccessRecur {
}
} // class AccessRecur
?>

View file

@ -619,4 +619,3 @@ class Alib {
} // fn test
} // class Alib
?>

View file

@ -484,4 +484,3 @@ class Backup
}
} // classs Backup
?>

View file

@ -2182,5 +2182,5 @@ class BasicStor {
fclose($fp);
}
} // class BasicStor
?>
} // class BasicStor

View file

@ -1723,4 +1723,3 @@ class GreenBox extends BasicStor {
} // fn removePerm
} // class GreenBox
?>

View file

@ -1746,4 +1746,3 @@ class LocStor extends BasicStor {
/* ==================================================== auxiliary methods */
} // class LocStor
?>

View file

@ -349,4 +349,3 @@ class M3uPlaylistAnimateElement {
}
}
?>

View file

@ -172,7 +172,7 @@ class Playlist {
$storedPlaylist->currentlyaccessing = $pl->getDbCurrentlyaccessing();
$storedPlaylist->editedby = $pl->getDbEditedby();
$storedPlaylist->mtime = $pl->getDbMtime();
return $storedPlaylist;
}
@ -931,17 +931,17 @@ class Playlist {
if(is_null($fadeIn)) {
if($defaultFade != "")
$fadeIn = $defaultFade;
$fadeIn = $defaultFade;
else
$fadeIn = '00:00:00.000';
}
if(is_null($fadeOut)) {
if($defaultFade != "")
$fadeOut = $defaultFade;
$fadeOut = $defaultFade;
else
$fadeOut = '00:00:00.000';
}
$row = new CcPlaylistcontents();
$row->setDbPlaylistId($plId);
$row->setDbFileId($fileId);
@ -1386,4 +1386,3 @@ class PlaylistMetadataExport
}
}
?>

View file

@ -439,4 +439,4 @@ class Prefs {
}
} // class Prefs
?>

View file

@ -287,4 +287,3 @@ class Renderer
} // class Renderer
?>

View file

@ -433,4 +433,4 @@ class Restore {
}
} // class Restore
?>

View file

@ -175,7 +175,7 @@ class ScheduleGroup {
// Get the end time for the given entry
$sql = "SELECT MAX(ends) FROM ".$CC_CONFIG["scheduleTable"]
." WHERE group_id=$p_groupId";
$startTime = $CC_DBC->GetOne($sql);
return $this->add($show_instance, $startTime, null, $p_playlistId);
}
@ -281,8 +281,8 @@ class Schedule {
public static function getTimeUnScheduledInRange($s_datetime, $e_datetime) {
global $CC_CONFIG, $CC_DBC;
$sql = "SELECT SUM(clip_length) FROM ".$CC_CONFIG["scheduleTable"]."
WHERE (starts >= '{$s_datetime}')
$sql = "SELECT SUM(clip_length) FROM ".$CC_CONFIG["scheduleTable"]."
WHERE (starts >= '{$s_datetime}')
AND (ends <= '{$e_datetime}')";
$time = $CC_DBC->GetOne($sql);
@ -302,12 +302,12 @@ class Schedule {
public static function getTimeScheduledInRange($s_datetime, $e_datetime) {
global $CC_CONFIG, $CC_DBC;
$sql = "SELECT SUM(clip_length) FROM ".$CC_CONFIG["scheduleTable"]."
WHERE (starts >= '{$s_datetime}')
$sql = "SELECT SUM(clip_length) FROM ".$CC_CONFIG["scheduleTable"]."
WHERE (starts >= '{$s_datetime}')
AND (ends <= '{$e_datetime}')";
$res = $CC_DBC->GetOne($sql);
if(is_null($res))
return 0;
@ -315,9 +315,9 @@ class Schedule {
}
public static function getPercentScheduledInRange($s_datetime, $e_datetime) {
$time = Schedule::getTimeScheduledInRange($s_datetime, $e_datetime);
$con = Propel::getConnection(CcSchedulePeer::DATABASE_NAME);
$sql = "SELECT EXTRACT(EPOCH FROM TIMESTAMP WITH TIME ZONE '{$s_datetime}')";
@ -333,11 +333,11 @@ class Schedule {
$i_epoch = $r->fetchColumn(0);
$percent = ceil(($i_epoch / ($e_epoch - $s_epoch)) * 100);
return $percent;
}
/**
* Return TRUE if file is going to be played in the future.
*
@ -444,58 +444,58 @@ class Schedule {
"timezone"=> date("T"),
"timezoneOffset"=> date("Z"));
}
/**
* Builds an SQL Query for accessing scheduled item information from
* the database.
* the database.
*
* @param int $timeNow
* @param int $timePeriod
* @param int $count
* @param String $interval
* @return date
*
* $timeNow is the the currentTime in the format "Y-m-d H:i:s".
*
* $timeNow is the the currentTime in the format "Y-m-d H:i:s".
* For example: 2011-02-02 22:00:54
*
*
* $timePeriod can be either negative, zero or positive. This is used
* to indicate whether we want items from the past, present or future.
*
*
* $count indicates how many results we want to limit ourselves to.
*
*
* $interval is used to indicate how far into the past or future we
* want to search the database. For example "5 days", "18 hours", "60 minutes",
* "30 seconds" etc.
*/
public static function Get_Scheduled_Item_Data($timeStamp, $timePeriod=0, $count = 0, $interval="0 hours"){
global $CC_CONFIG, $CC_DBC;
$sql = "SELECT DISTINCT pt.name, ft.track_title, ft.artist_name, ft.album_title, st.starts, st.ends, st.clip_length, st.group_id, show.name as show_name, st.instance_id"
." FROM $CC_CONFIG[scheduleTable] st, $CC_CONFIG[filesTable] ft, $CC_CONFIG[playListTable] pt, $CC_CONFIG[showInstances] si, $CC_CONFIG[showTable] show"
." WHERE st.playlist_id = pt.id"
." AND st.file_id = ft.id"
." AND st.instance_id = si.id"
." AND si.show_id = show.id";
if ($timePeriod < 0){
$sql .= " AND st.ends < TIMESTAMP '$timeStamp'"
." AND st.ends > (TIMESTAMP '$timeStamp' - INTERVAL '$interval')"
." ORDER BY st.starts DESC"
." LIMIT $count";
." LIMIT $count";
} else if ($timePeriod == 0){
$sql .= " AND st.starts <= TIMESTAMP '$timeStamp'"
." AND st.ends >= TIMESTAMP '$timeStamp'";
." AND st.ends >= TIMESTAMP '$timeStamp'";
} else if ($timePeriod > 0){
$sql .= " AND st.starts > TIMESTAMP '$timeStamp'"
." AND st.starts < (TIMESTAMP '$timeStamp' + INTERVAL '$interval')"
." AND st.starts < (TIMESTAMP '$timeStamp' + INTERVAL '$interval')"
." ORDER BY st.starts"
." LIMIT $count";
." LIMIT $count";
}
$rows = $CC_DBC->GetAll($sql);
return $rows;
}
/**
* Convert a time string in the format "YYYY-MM-DD HH:mm:SS"
@ -701,4 +701,3 @@ class Schedule {
}
?>

View file

@ -310,4 +310,3 @@ class SmilPlaylistAnimateElement {
}
} // class SmilPlaylistAnimateElement
?>

View file

@ -492,9 +492,9 @@ class StoredFile {
$escapedValue = pg_escape_string($this->gunid);
$sql = "SELECT * FROM ".$CC_CONFIG["filesTable"]
." WHERE gunid='$escapedValue'";
$this->md = $CC_DBC->getRow($sql);
if (PEAR::isError($this->md)) {
$error = $this->md;
$this->md = null;
@ -511,7 +511,7 @@ class StoredFile {
$compatibilityData[$xmlName] = $value;
}
}
//$this->md = array_merge($this->md, $compatibilityData);
$this->md = $compatibilityData;
}
@ -706,7 +706,7 @@ class StoredFile {
$sql = "SELECT *"
." FROM ".$CC_CONFIG['filesTable']
." WHERE $cond";
$row = $CC_DBC->getRow($sql);
if (PEAR::isError($row) || is_null($row)) {
return $row;
@ -1784,7 +1784,7 @@ class StoredFile {
(".$fileSelect."id FROM ".$CC_CONFIG["filesTable"]." AS FILES)) AS RESULTS";
return StoredFile::searchFiles($fromTable, $datatables);
}
public static function searchPlaylistsForSchedule($p_length, $datatables) {
@ -1793,9 +1793,9 @@ class StoredFile {
$datatables["optWhere"][] = "plt.length <= INTERVAL '{$p_length}'";
$datatables["optWhere"][] = "plt.length > INTERVAL '00:00:00'";
return StoredFile::searchFiles($fromTable, $datatables);
}
}
public static function searchFiles($fromTable, $data)
{
@ -1814,8 +1814,8 @@ class StoredFile {
// Where clause
if(isset($data["optWhere"])) {
$where[] = join(" AND ", $data["optWhere"]);
$where[] = join(" AND ", $data["optWhere"]);
}
if(isset($searchTerms)) {
@ -1823,7 +1823,7 @@ class StoredFile {
$searchCols = array();
for($i=0; $i<$data["iColumns"]; $i++) {
if($data["bSearchable_".$i] == "true") {
$searchCols[] = $columnsDisplayed[$i];
}
@ -1832,14 +1832,14 @@ class StoredFile {
$outerCond = array();
foreach($searchTerms as $term) {
$innerCond = array();
foreach($searchCols as $col) {
$innerCond[] = "{$col}::text ILIKE '%{$term}%'";
$innerCond[] = "{$col}::text ILIKE '%{$term}%'";
}
$outerCond[] = "(".join(" OR ", $innerCond).")";
$outerCond[] = "(".join(" OR ", $innerCond).")";
}
$where[] = "(".join(" AND ", $outerCond).")";
}
@ -1869,12 +1869,12 @@ class StoredFile {
else {
$sql = $selectorRows." FROM ".$fromTable." ORDER BY ".$orderby." OFFSET ".$data["iDisplayStart"]." LIMIT ".$data["iDisplayLength"];
}
$results = $CC_DBC->getAll($sql);
//echo $results;
//echo $sql;
//put back to default fetch mode.
//put back to default fetch mode.
$CC_DBC->setFetchMode(DB_FETCHMODE_ASSOC);
if(!isset($totalDisplayRows)) {
@ -1883,8 +1883,8 @@ class StoredFile {
return array("sEcho" => intval($data["sEcho"]), "iTotalDisplayRecords" => $totalDisplayRows, "iTotalRecords" => $totalRows, "aaData" => $results);
/*
@ -1921,7 +1921,7 @@ class StoredFile {
$and_cond[] = $string;
}
if(count($and_cond) > 0) {
$or_cond[] = "(".join(" ".$inner." ", $and_cond).")";
}
@ -1958,4 +1958,4 @@ class StoredFile {
}
}
?>

View file

@ -680,4 +680,4 @@ class Subjects {
} // fn test
} // class Subjects
?>

View file

@ -1830,4 +1830,4 @@ class Transport
}
?>

View file

@ -416,4 +416,4 @@ class TransportRecord
}
} // class TransportRecord
?>

View file

@ -382,4 +382,4 @@ class Validator {
} // class Validator
?>

View file

@ -395,4 +395,4 @@ class XmlParser {
}
}
?>

View file

@ -324,5 +324,3 @@ $audioClipFormat = array(
// 'regexp'=>'^\d{4}(-\d{2}(-\d{2}(T\d{2}:\d{2}(:\d{2}\.\d+)?(Z)|([\+\-]?\d{2}:\d{2}))?)?)?$',
),
);
?>

View file

@ -211,4 +211,4 @@ class Cron {
return $this->cronfile.' "'.str_replace('"','\"',serialize($this->params)).'"';
}
}
?>

View file

@ -14,4 +14,4 @@ class CronJob
{
}
}
?>

View file

@ -281,4 +281,4 @@ class Crontab
return $returnar;
}
}
?>

View file

@ -1,4 +1,4 @@
#!/usr/bin/php
#!/usr/bin/php
<?php
chdir(dirname(__FILE__));
$p = unserialize($argv[1]);
@ -6,4 +6,3 @@ require_once (dirname(__FILE__).'/'.$p['class'].'.php');
$cronjob = new $p['class']();
$ret = $cronjob->execute($p['params']);
exit(0);
?>

View file

@ -18,4 +18,3 @@ if (!$r) {
}
exit(0);
?>

View file

@ -39,4 +39,3 @@ if (TR_LOG_LEVEL>1) {
$tr->trLog("transportCronJob($pid) end ($trtok)");
}
exit(0);
?>

View file

@ -1,17 +1,3 @@
<?php
header ("location: html/");
exit;
/*
?>
<html><head>
<title>StorageServer module</title>
</head><body>
<h3>StorageServer module</h3>
<br>
<a href="../html/" accesskey="H"><b>H</b>TML client</a><br>
<a href="../xmlrpc/" accesskey="X"><b>X</b>mlRpc test</a><br>
<a href="../tests/" accesskey="T"><b>T</b>est</a><br>
</body></html>
<?
*/
?>

View file

@ -110,8 +110,3 @@ $playlistFormat = array(
*/
);
/*
?
ls:filename Text auto
*/
?>

View file

@ -21,4 +21,4 @@ $result = PHPUnit::run($suite);
echo $result->toString();
?>

View file

@ -178,4 +178,4 @@ class PlaylistTests extends PHPUnit_TestCase {
}
}
?>

View file

@ -39,4 +39,3 @@ class SchedulerExportTests extends PHPUnit_TestCase {
}
}
?>

View file

@ -125,4 +125,3 @@ class SchedulerTests extends PHPUnit_TestCase {
}
}
?>

View file

@ -84,4 +84,3 @@ class StoredFileTest extends PHPUnit_TestCase {
}
}
?>

View file

@ -22,4 +22,3 @@ if (is_array($r)) {
print_r($r);
}
echo"\n";
?>

View file

@ -1,4 +1,3 @@
<?php
header ("location: ../");
exit;
?>

View file

@ -22,4 +22,4 @@ $sql3 = "SELECT TIMESTAMP '2011-01-01 00:00:00.000' + INTERVAL '01:00:00.123456'
$result3 = $con->query($sql3);
var_dump($result3->fetchAll());
?>

View file

@ -140,4 +140,3 @@ $comm = "ls -l ".$CC_CONFIG['storageDir']."/a23"; echo `$comm`;
if(file_exists("../trans/log")) echo `tail -n 25 ../trans/log`;
echo "#Transport test: OK.\n\n";
*/
?>

View file

@ -59,4 +59,3 @@ echo "$r\n";
echo "#storeWebstream test: OK.\n\n"
*/
?>

View file

@ -338,8 +338,3 @@ $webstreamFormat = array(
*/
);
/*
?
ls:filename Text auto
*/
?>

View file

@ -3830,4 +3830,4 @@ class XR_LocStor extends LocStor {
} // class XR_LocStor
?>

View file

@ -1,4 +1,3 @@
<?php
header ("location: xrLocStor.php");
exit;
?>

View file

@ -96,4 +96,4 @@ fclose($fp);
fclose($putdata);
header("HTTP/1.1 200");
?>

View file

@ -508,4 +508,3 @@ $r = $spc->DisplayScheduleMethod($this->Base->sessid, '20040101T00:00:00', '2005
#$r = $spc->GetSchedulerTimeMethod(); var_dump($r);
================= */
?>

View file

@ -125,4 +125,3 @@ switch ($ftype) {
// var_dump($ftype);
http_error(500, "500 Unknown ftype ($ftype)");
}
?>

View file

@ -169,4 +169,4 @@ foreach ($methods as $method => $description) {
$s = new XML_RPC_Server($defs);
?>

View file

@ -365,4 +365,3 @@ if (isset($infos[$method]['r'])) {
}
}
?>