CC-1695 Remove Campcaster Studio and make install easier
Fixed references to files for new directory structure for the backend stuff.
This commit is contained in:
parent
fe724b7814
commit
2ece374513
319 changed files with 75 additions and 357 deletions
|
@ -57,6 +57,7 @@ define('GBERR_NOTIMPL', 69);
|
|||
require_once(dirname(__FILE__)."/Alib.php");
|
||||
require_once(dirname(__FILE__)."/StoredFile.php");
|
||||
require_once(dirname(__FILE__)."/Transport.php");
|
||||
require_once(dirname(__FILE__)."/Playlist.php");
|
||||
|
||||
$g_metadata_xml_to_db_mapping = array(
|
||||
"dc:format" => "format",
|
||||
|
@ -910,7 +911,6 @@ class BasicStor {
|
|||
private static function NormalizeExtent($v)
|
||||
{
|
||||
if (!preg_match("|^\d{2}:\d{2}:\d{2}.\d{6}$|", $v)) {
|
||||
require_once("Playlist.php");
|
||||
$s = Playlist::playlistTimeToSeconds($v);
|
||||
$t = Playlist::secondsToPlaylistTime($s);
|
||||
return $t;
|
||||
|
@ -1138,12 +1138,12 @@ class BasicStor {
|
|||
}
|
||||
|
||||
// Final query
|
||||
|
||||
|
||||
//"dcterms:extent" => "length",
|
||||
//"dc:title" => "track_title",
|
||||
//"dc:creator" => "artist_name",
|
||||
//dc:description
|
||||
|
||||
|
||||
global $g_metadata_xml_to_db_mapping;
|
||||
$plSelect = "SELECT ";
|
||||
$fileSelect = "SELECT ";
|
||||
|
@ -1169,25 +1169,25 @@ class BasicStor {
|
|||
else {
|
||||
$plSelect .= "NULL AS ".$val.", ";
|
||||
$fileSelect .= $val.", ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$sql = "SELECT * FROM ((".$plSelect."PL.id, 'playlist' AS ftype
|
||||
|
||||
$sql = "SELECT * FROM ((".$plSelect."PL.id, 'playlist' AS ftype
|
||||
FROM ".$CC_CONFIG["playListTable"]." AS PL
|
||||
LEFT JOIN ".$CC_CONFIG['playListTimeView']." PLT ON PL.id = PLT.id)
|
||||
|
||||
UNION
|
||||
|
||||
LEFT JOIN ".$CC_CONFIG['playListTimeView']." PLT ON PL.id = PLT.id)
|
||||
|
||||
UNION
|
||||
|
||||
(".$fileSelect."id, ftype FROM ".$CC_CONFIG["filesTable"]." AS FILES)) AS RESULTS ";
|
||||
|
||||
|
||||
$sql .= $whereClause;
|
||||
|
||||
|
||||
if ($orderby) {
|
||||
$sql .= " ORDER BY ".join(",", $orderBySql);
|
||||
}
|
||||
|
||||
//$_SESSION["br"] = $sql;
|
||||
|
||||
|
||||
$res = $CC_DBC->getAll($sql);
|
||||
if (PEAR::isError($res)) {
|
||||
return $res;
|
||||
|
@ -1195,12 +1195,12 @@ class BasicStor {
|
|||
if (!is_array($res)) {
|
||||
$res = array();
|
||||
}
|
||||
|
||||
|
||||
$count = count($res);
|
||||
$_SESSION["br"] .= " COUNT: ".$count;
|
||||
|
||||
|
||||
$res = array_slice($res, $offset != 0 ? $offset : 0, $limit != 0 ? $limit : 10);
|
||||
|
||||
|
||||
$eres = array();
|
||||
foreach ($res as $it) {
|
||||
$eres[] = array(
|
||||
|
@ -1236,14 +1236,14 @@ class BasicStor {
|
|||
public function bsBrowseCategory($category, $limit=0, $offset=0, $criteria=NULL)
|
||||
{
|
||||
global $CC_CONFIG, $CC_DBC;
|
||||
|
||||
|
||||
$pl_cat = array(
|
||||
"dcterms:extent" => "length",
|
||||
"dc:title" => "name",
|
||||
"dc:creator" => "creator",
|
||||
"dc:description" => "description"
|
||||
);
|
||||
|
||||
|
||||
$category = strtolower($category);
|
||||
$columnName = BasicStor::xmlCategoryToDbColumn($category);
|
||||
if (is_null($columnName)) {
|
||||
|
@ -1266,15 +1266,15 @@ class BasicStor {
|
|||
if (!is_array($res)) {
|
||||
$res = array();
|
||||
}
|
||||
|
||||
|
||||
if (array_key_exists($category, $pl_cat) && $category !== "dcterms:extent") {
|
||||
$columnName = $pl_cat[$category];
|
||||
|
||||
|
||||
$sql = "SELECT DISTINCT $columnName FROM ".$CC_CONFIG["playListTable"];
|
||||
$limitPart = ($limit != 0 ? " LIMIT $limit" : '' ).
|
||||
($offset != 0 ? " OFFSET $offset" : '' );
|
||||
$countRowsSql = "SELECT COUNT(DISTINCT $columnName) FROM ".$CC_CONFIG["playListTable"];
|
||||
|
||||
|
||||
$pl_cnt = $CC_DBC->GetOne($countRowsSql);
|
||||
if (PEAR::isError($cnt)) {
|
||||
return $cnt;
|
||||
|
@ -1285,7 +1285,7 @@ class BasicStor {
|
|||
}
|
||||
if (!is_array($pl_res)) {
|
||||
$pl_res = array();
|
||||
}
|
||||
}
|
||||
|
||||
$res = array_merge($res, $pl_res);
|
||||
$res = array_slice($res, 0, $limit);
|
||||
|
@ -1293,14 +1293,14 @@ class BasicStor {
|
|||
}
|
||||
else if ($category === "dcterms:extent") {
|
||||
$columnName = $pl_cat[$category];
|
||||
|
||||
|
||||
$limitPart = ($limit != 0 ? " LIMIT $limit" : '' ).
|
||||
($offset != 0 ? " OFFSET $offset" : '' );
|
||||
|
||||
|
||||
$sql = "SELECT DISTINCT length AS $columnName FROM ".$CC_CONFIG["playListTimeView"];
|
||||
|
||||
|
||||
$countRowsSql = "SELECT COUNT(DISTINCT length) FROM ".$CC_CONFIG["playListTimeView"];
|
||||
|
||||
|
||||
$pl_cnt = $CC_DBC->GetOne($countRowsSql);
|
||||
if (PEAR::isError($cnt)) {
|
||||
return $cnt;
|
||||
|
@ -1311,13 +1311,13 @@ class BasicStor {
|
|||
}
|
||||
if (!is_array($pl_res)) {
|
||||
$pl_res = array();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$res = array_merge($res, $pl_res);
|
||||
$res = array_slice($res, 0, $limit);
|
||||
$cnt = $cnt + $pl_cnt;
|
||||
}
|
||||
|
||||
|
||||
return array('results'=>$res, 'cnt'=>$cnt);
|
||||
}
|
||||
|
||||
|
@ -1342,7 +1342,6 @@ class BasicStor {
|
|||
public function bsExportPlaylistOpen($plids, $type='lspl', $withContent=TRUE)
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
require_once("Playlist.php");
|
||||
if (!is_array($plids)) {
|
||||
$plids = array($plids);
|
||||
}
|
||||
|
@ -1388,7 +1387,6 @@ class BasicStor {
|
|||
if (file_exists($MDfname)) {
|
||||
switch ($it['type']) {
|
||||
case "playlist":
|
||||
require_once("Playlist.php");
|
||||
$storedFile = $r = StoredFile::RecallByGunid($it['gunid']);
|
||||
switch ($type) {
|
||||
case "smil":
|
||||
|
@ -1616,7 +1614,6 @@ class BasicStor {
|
|||
}
|
||||
}
|
||||
// playlists:
|
||||
require_once("Playlist.php");
|
||||
$d = @dir($tmpdp);
|
||||
if ($d !== false) {
|
||||
while ((!PEAR::isError($res)) && false !== ($entry = $d->read())) {
|
||||
|
|
|
@ -9,9 +9,9 @@ if (isset($arr["DOCUMENT_ROOT"]) && ($arr["DOCUMENT_ROOT"] != "") ) {
|
|||
exit(1);
|
||||
}
|
||||
|
||||
require_once('conf.php');
|
||||
require_once('../conf.php');
|
||||
require_once('DB.php');
|
||||
require_once('install/installInit.php');
|
||||
require_once('../install/installInit.php');
|
||||
require_once ('StoredFile.php');
|
||||
|
||||
function printUsage() {
|
||||
|
|
|
@ -7,7 +7,12 @@ require_once("LocStor.php");
|
|||
if (isset($WHITE_SCREEN_OF_DEATH) && $WHITE_SCREEN_OF_DEATH) {
|
||||
echo __FILE__.':line '.__LINE__.": Loaded LocStor<br>";
|
||||
}
|
||||
require_once("Playlist.php");
|
||||
require_once("Renderer.php");
|
||||
require_once('Prefs.php');
|
||||
require_once("Backup.php");
|
||||
require_once('Restore.php');
|
||||
require_once("Transport.php");
|
||||
|
||||
/**
|
||||
* GreenBox class
|
||||
|
@ -749,7 +754,6 @@ class GreenBox extends BasicStor {
|
|||
public function displayPlaylistClipAtOffset($sessid, $plid, $offset, $distance=0,
|
||||
$lang=NULL, $deflang=NULL)
|
||||
{
|
||||
require_once("Playlist.php");
|
||||
$pl = StoredFile::RecallByGunid($plid);
|
||||
if (is_null($pl) || PEAR::isError($pl)) {
|
||||
return $pl;
|
||||
|
@ -924,7 +928,6 @@ class GreenBox extends BasicStor {
|
|||
*/
|
||||
public function playlistTimeToSeconds($plt)
|
||||
{
|
||||
require_once("Playlist.php");
|
||||
return Playlist::playlistTimeToSeconds($plt);
|
||||
}
|
||||
|
||||
|
@ -939,7 +942,6 @@ class GreenBox extends BasicStor {
|
|||
*/
|
||||
public static function secondsToPlaylistTime($s0)
|
||||
{
|
||||
require_once("Playlist.php");
|
||||
return Playlist::secondsToPlaylistTime($s0);
|
||||
} // fn secondsToPlaylistTime
|
||||
|
||||
|
@ -957,7 +959,6 @@ class GreenBox extends BasicStor {
|
|||
*/
|
||||
public function renderPlaylistToFileOpen($sessid, $plid)
|
||||
{
|
||||
require_once("Renderer.php");
|
||||
$r = Renderer::rnRender2FileOpen($this, $plid);
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
|
@ -977,7 +978,6 @@ class GreenBox extends BasicStor {
|
|||
*/
|
||||
public function renderPlaylistToFileCheck($token)
|
||||
{
|
||||
require_once("Renderer.php");
|
||||
$r = Renderer::rnRender2FileCheck($this, $token);
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
|
@ -998,7 +998,6 @@ class GreenBox extends BasicStor {
|
|||
*/
|
||||
public function renderPlaylistToFileList($status='')
|
||||
{
|
||||
require_once("Renderer.php");
|
||||
return Renderer::rnRender2FileList($this, $status);
|
||||
} // fn renderPlaylistToFileList
|
||||
|
||||
|
@ -1013,7 +1012,6 @@ class GreenBox extends BasicStor {
|
|||
*/
|
||||
public function renderPlaylistToFileClose($token)
|
||||
{
|
||||
require_once("Renderer.php");
|
||||
$r = Renderer::rnRender2FileClose($this, $token);
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
|
@ -1034,7 +1032,6 @@ class GreenBox extends BasicStor {
|
|||
*/
|
||||
public function renderPlaylistToStorageOpen($sessid, $plid)
|
||||
{
|
||||
require_once("Renderer.php");
|
||||
$owner = GreenBox::getSessUserId($sessid);
|
||||
if (PEAR::isError($owner)) {
|
||||
return $owner;
|
||||
|
@ -1058,7 +1055,6 @@ class GreenBox extends BasicStor {
|
|||
*/
|
||||
public function renderPlaylistToStorageCheck($token)
|
||||
{
|
||||
require_once("Renderer.php");
|
||||
$r = Renderer::rnRender2StorageCheck($this, $token);
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
|
@ -1164,7 +1160,6 @@ class GreenBox extends BasicStor {
|
|||
*/
|
||||
public function createBackupOpen($sessid, $criteria='')
|
||||
{
|
||||
require_once("Backup.php");
|
||||
$bu = new Backup($this);
|
||||
if (PEAR::isError($bu)) {
|
||||
return $bu;
|
||||
|
@ -1186,7 +1181,6 @@ class GreenBox extends BasicStor {
|
|||
*/
|
||||
public function createBackupCheck($token)
|
||||
{
|
||||
require_once("Backup.php");
|
||||
$bu = new Backup($this);
|
||||
if (PEAR::isError($bu)) {
|
||||
return $bu;
|
||||
|
@ -1209,7 +1203,6 @@ class GreenBox extends BasicStor {
|
|||
*/
|
||||
public function createBackupList($sessid, $stat='')
|
||||
{
|
||||
require_once("Backup.php");
|
||||
$bu = new Backup($this);
|
||||
if (PEAR::isError($bu)) {
|
||||
return $bu;
|
||||
|
@ -1228,7 +1221,6 @@ class GreenBox extends BasicStor {
|
|||
*/
|
||||
public function createBackupClose($token)
|
||||
{
|
||||
require_once("Backup.php");
|
||||
$bu = new Backup($this);
|
||||
if (PEAR::isError($bu)) {
|
||||
return $bu;
|
||||
|
@ -1250,7 +1242,6 @@ class GreenBox extends BasicStor {
|
|||
*/
|
||||
public function backupRestoreOpen($sessid, $filename)
|
||||
{
|
||||
require_once('Restore.php');
|
||||
$rs = new Restore($this);
|
||||
if (PEAR::isError($rs)) {
|
||||
return $rs;
|
||||
|
@ -1272,7 +1263,6 @@ class GreenBox extends BasicStor {
|
|||
*/
|
||||
public function backupRestoreCheck($token)
|
||||
{
|
||||
require_once('Restore.php');
|
||||
$rs = new Restore($this);
|
||||
if (PEAR::isError($rs)) {
|
||||
return $rs;
|
||||
|
@ -1290,7 +1280,6 @@ class GreenBox extends BasicStor {
|
|||
* is success
|
||||
*/
|
||||
public function backupRestoreClose($token) {
|
||||
require_once('Restore.php');
|
||||
$rs = new Restore($this);
|
||||
if (PEAR::isError($rs)) {
|
||||
return $rs;
|
||||
|
@ -1433,7 +1422,6 @@ class GreenBox extends BasicStor {
|
|||
*/
|
||||
public function getTransportInfo($trtok)
|
||||
{
|
||||
require_once("Transport.php");
|
||||
$tr = new Transport($this);
|
||||
return $tr->getTransportInfo($trtok);
|
||||
} // fn getTransportInfo
|
||||
|
@ -1451,7 +1439,6 @@ class GreenBox extends BasicStor {
|
|||
*/
|
||||
public function turnOnOffTransports($sessid, $onOff=NULL)
|
||||
{
|
||||
require_once("Transport.php");
|
||||
$tr = new Transport($this);
|
||||
return $tr->turnOnOffTransports($sessid, $onOff);
|
||||
} // fn turnOnOffTransports
|
||||
|
@ -1469,7 +1456,6 @@ class GreenBox extends BasicStor {
|
|||
*/
|
||||
public function doTransportAction($trtok, $action)
|
||||
{
|
||||
require_once("Transport.php");
|
||||
$tr = new Transport($this);
|
||||
$res = $tr->doTransportAction($trtok, $action);
|
||||
return $res;
|
||||
|
@ -1488,7 +1474,6 @@ class GreenBox extends BasicStor {
|
|||
*/
|
||||
public function uploadFile2Hub($filePath)
|
||||
{
|
||||
require_once("Transport.php");
|
||||
$tr = new Transport($this);
|
||||
return $tr->uploadFile2Hub($filePath);
|
||||
} // fn uploadFile2Hub
|
||||
|
@ -1503,7 +1488,6 @@ class GreenBox extends BasicStor {
|
|||
*/
|
||||
public function getHubInitiatedTransfers()
|
||||
{
|
||||
require_once("Transport.php");
|
||||
$tr = new Transport($this);
|
||||
return $tr->getHubInitiatedTransfers();
|
||||
} // fn getHubInitiatedTransfers
|
||||
|
@ -1520,7 +1504,6 @@ class GreenBox extends BasicStor {
|
|||
*/
|
||||
public function startHubInitiatedTransfer($trtok)
|
||||
{
|
||||
require_once("Transport.php");
|
||||
$tr = new Transport($this);
|
||||
return $tr->startHubInitiatedTransfer($trtok);
|
||||
} // fn startHubInitiatedTransfer
|
||||
|
@ -1542,7 +1525,6 @@ class GreenBox extends BasicStor {
|
|||
*/
|
||||
public function upload2Hub($gunid, $withContent=FALSE)
|
||||
{
|
||||
require_once("Transport.php");
|
||||
$tr = new Transport($this);
|
||||
return $tr->upload2Hub($gunid, $withContent);
|
||||
} // fn upload2Hub
|
||||
|
@ -1566,7 +1548,6 @@ class GreenBox extends BasicStor {
|
|||
if (PEAR::isError($uid)) {
|
||||
return $uid;
|
||||
}
|
||||
require_once("Transport.php");
|
||||
$tr = new Transport($this);
|
||||
return $tr->downloadFromHub($uid, $gunid, $withContent);
|
||||
} // fn downloadFromHub
|
||||
|
@ -1583,7 +1564,6 @@ class GreenBox extends BasicStor {
|
|||
*/
|
||||
public function globalSearch($criteria)
|
||||
{
|
||||
require_once("Transport.php");
|
||||
$tr = new Transport($this);
|
||||
//return $tr->globalSearch($criteria);
|
||||
return $tr->remoteSearch($criteria);
|
||||
|
@ -1602,7 +1582,6 @@ class GreenBox extends BasicStor {
|
|||
*/
|
||||
// public function getSearchResults($trtok, $andClose=TRUE)
|
||||
// {
|
||||
// require_once("Transport.php");
|
||||
// $tr = new Transport($this);
|
||||
// return $tr->getSearchResults($trtok, $andClose);
|
||||
// } // fn getSearchResults
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?php
|
||||
//require_once("MetaData.php");
|
||||
require_once("Playlist.php");
|
||||
require_once(dirname(__FILE__)."/../../getid3/var/getid3.php");
|
||||
require_once(dirname(__FILE__)."/../3rd_party/getid3/var/getid3.php");
|
||||
|
||||
/**
|
||||
* Track numbers in metadata tags can come in many formats:
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
//require_once("ObjClasses.php");
|
||||
define('ALIBERR_NOTGR', 20);
|
||||
define('ALIBERR_BADSMEMB', 21);
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/php
|
||||
<?php
|
||||
require_once(dirname(__FILE__).'/../conf.php');
|
||||
require_once(dirname(__FILE__).'/../../conf.php');
|
||||
require_once('DB.php');
|
||||
require_once(dirname(__FILE__).'/../LocStor.php');
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
require_once(dirname(__FILE__).'/../conf.php');
|
||||
require_once(dirname(__FILE__).'/../../conf.php');
|
||||
require_once('DB.php');
|
||||
require_once('PHPUnit.php');
|
||||
require_once 'BasicStorTests.php';
|
||||
|
|
|
@ -7,7 +7,7 @@ echo "TEST\n";
|
|||
$gunid = $argv[1];
|
||||
echo "GUNID: $gunid\n";
|
||||
|
||||
require_once('../conf.php');
|
||||
require_once('../../conf.php');
|
||||
require_once('DB.php');
|
||||
require_once('../GreenBox.php');
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/*
|
||||
header("Content-type: text/plain");
|
||||
|
||||
require_once('../conf.php');
|
||||
require_once('../../conf.php');
|
||||
require_once('DB.php');
|
||||
require_once('../GreenBox.php');
|
||||
require_once('../LocStor.php');
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
header("Content-type: text/plain");
|
||||
echo "\n#StorageServer storeWebstream test:\n";
|
||||
|
||||
require_once('../conf.php');
|
||||
require_once('../../conf.php');
|
||||
require_once('DB.php');
|
||||
require_once('../GreenBox.php');
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
define('USE_FLOCK', TRUE);
|
||||
|
||||
require_once(dirname(__FILE__).'/../conf.php');
|
||||
require_once(dirname(__FILE__).'/../../conf.php');
|
||||
require_once('DB.php');
|
||||
require_once(dirname(__FILE__).'/../LocStor.php');
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
require_once(dirname(__FILE__).'/../conf.php');
|
||||
require_once(dirname(__FILE__).'/../../conf.php');
|
||||
require_once('DB.php');
|
||||
require_once(dirname(__FILE__).'/../LocStor.php');
|
||||
require_once(dirname(__FILE__).'/../MetaData.php');
|
||||
|
|
|
@ -23,7 +23,7 @@ ini_set("error_append_string", "</string></value>
|
|||
header("Content-type: text/xml");
|
||||
|
||||
/* ================================================================= includes */
|
||||
require_once(dirname(__FILE__).'/../conf.php');
|
||||
require_once(dirname(__FILE__).'/../../conf.php');
|
||||
require_once('DB.php');
|
||||
require_once("XML/RPC/Server.php");
|
||||
require_once('XR_LocStor.php');
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
require_once(dirname(__FILE__).'/../conf.php');
|
||||
require_once(dirname(__FILE__).'/../../conf.php');
|
||||
include_once("XML/RPC.php");
|
||||
include_once("Console/Getopt.php");
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
require_once(dirname(__FILE__).'/../conf.php');
|
||||
require_once(dirname(__FILE__).'/../../conf.php');
|
||||
include_once("XML/RPC.php");
|
||||
|
||||
session_start();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue