diff --git a/livesupport/modules/alib/var/alib.php b/livesupport/modules/alib/var/alib.php index e8517a2aa..c6d72d5f8 100644 --- a/livesupport/modules/alib/var/alib.php +++ b/livesupport/modules/alib/var/alib.php @@ -23,7 +23,7 @@ Author : $Author: tomas $ - Version : $Revision: 1.8 $ + Version : $Revision: 1.9 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/alib/var/alib.php,v $ ------------------------------------------------------------------------------*/ @@ -37,7 +37,7 @@ define('ALIBERR_NOTEXISTS', 31); * authentication/authorization class * * @author $Author: tomas $ - * @version $Revision: 1.8 $ + * @version $Revision: 1.9 $ * @see Subjects * @see GreenBox */ @@ -56,7 +56,7 @@ class Alib extends Subjects{ */ function Alib(&$dbc, $config) { - parent::Subjects(&$dbc, $config); + parent::Subjects($dbc, $config); $this->permTable = $config['tblNamePrefix'].'perms'; $this->sessTable = $config['tblNamePrefix'].'sess'; } diff --git a/livesupport/modules/alib/var/class.php b/livesupport/modules/alib/var/class.php index cf2ff4cc6..cad24d107 100644 --- a/livesupport/modules/alib/var/class.php +++ b/livesupport/modules/alib/var/class.php @@ -23,7 +23,7 @@ Author : $Author: tomas $ - Version : $Revision: 1.3 $ + Version : $Revision: 1.4 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/alib/var/class.php,v $ ------------------------------------------------------------------------------*/ @@ -35,7 +35,7 @@ require_once "mtree.php"; * class for 'object classes' handling - i.e. groups of object in tree * * @author $Author: tomas $ - * @version $Revision: 1.3 $ + * @version $Revision: 1.4 $ * @see Mtree * @see Subj */ @@ -51,7 +51,7 @@ class ObjClasses extends Mtree{ */ function ObjClasses(&$dbc, $config) { - parent::MTree(&$dbc, $config); + parent::MTree($dbc, $config); $this->classTable = $config['tblNamePrefix'].'classes'; $this->cmembTable = $config['tblNamePrefix'].'cmemb'; } diff --git a/livesupport/modules/alib/var/subj.php b/livesupport/modules/alib/var/subj.php index ccc891657..c365df2d3 100644 --- a/livesupport/modules/alib/var/subj.php +++ b/livesupport/modules/alib/var/subj.php @@ -23,7 +23,7 @@ Author : $Author: tomas $ - Version : $Revision: 1.4 $ + Version : $Revision: 1.5 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/alib/var/subj.php,v $ ------------------------------------------------------------------------------*/ @@ -39,7 +39,7 @@ define('ALIBERR_BADSMEMB', 21); * (allow adding users to groups or groups to groups) * * @author $Author: tomas $ - * @version $Revision: 1.4 $ + * @version $Revision: 1.5 $ * @see ObjClasses * @see Alib */ @@ -55,7 +55,7 @@ class Subjects extends ObjClasses{ */ function Subjects(&$dbc, $config) { - parent::ObjClasses(&$dbc, $config); + parent::ObjClasses($dbc, $config); $this->subjTable = $config['tblNamePrefix'].'subjs'; $this->smembTable = $config['tblNamePrefix'].'smemb'; } diff --git a/livesupport/modules/archiveServer/var/conf.php b/livesupport/modules/archiveServer/var/conf.php index cbd4bf93a..c90756a16 100644 --- a/livesupport/modules/archiveServer/var/conf.php +++ b/livesupport/modules/archiveServer/var/conf.php @@ -23,7 +23,7 @@ Author : $Author: tomas $ - Version : $Revision: 1.5 $ + Version : $Revision: 1.6 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/archiveServer/var/conf.php,v $ ------------------------------------------------------------------------------*/ @@ -58,6 +58,7 @@ $config = array( ), 'tblNamePrefix' => 'as_', 'authCookieName'=> 'assid', + 'StationPrefsGr'=> '', 'storageDir' => dirname(getcwd()).'/stor', 'bufferDir' => dirname(getcwd()).'/stor/buffer', 'transDir' => dirname(getcwd()).'/trans', diff --git a/livesupport/modules/archiveServer/var/html/gbHtml_h.php b/livesupport/modules/archiveServer/var/html/gbHtml_h.php index e6630f8d8..6815c3f93 100644 --- a/livesupport/modules/archiveServer/var/html/gbHtml_h.php +++ b/livesupport/modules/archiveServer/var/html/gbHtml_h.php @@ -20,6 +20,6 @@ function errCallBack($err) $dbc = DB::connect($config['dsn'], TRUE); $dbc->setFetchMode(DB_FETCHMODE_ASSOC); -$gb = &new GreenBox(&$dbc, $config); +$gb = &new GreenBox($dbc, $config); ?> \ No newline at end of file diff --git a/livesupport/modules/archiveServer/var/install/install.php b/livesupport/modules/archiveServer/var/install/install.php index 95ab3c794..ef442912c 100644 --- a/livesupport/modules/archiveServer/var/install/install.php +++ b/livesupport/modules/archiveServer/var/install/install.php @@ -23,7 +23,7 @@ Author : $Author: tomas $ - Version : $Revision: 1.4 $ + Version : $Revision: 1.5 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/archiveServer/var/install/install.php,v $ ------------------------------------------------------------------------------*/ @@ -57,7 +57,7 @@ if(PEAR::isError($dbc)){ } $dbc->setFetchMode(DB_FETCHMODE_ASSOC); -$gb = &new Archive(&$dbc, $config); +$gb = &new Archive($dbc, $config); echo "# archiveServer step 2:\n# trying uninstall ...\n"; $dbc->setErrorHandling(PEAR_ERROR_RETURN); diff --git a/livesupport/modules/archiveServer/var/install/uninstall.php b/livesupport/modules/archiveServer/var/install/uninstall.php index d08e063b4..9f720a1bb 100644 --- a/livesupport/modules/archiveServer/var/install/uninstall.php +++ b/livesupport/modules/archiveServer/var/install/uninstall.php @@ -23,7 +23,7 @@ Author : $Author: tomas $ - Version : $Revision: 1.3 $ + Version : $Revision: 1.4 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/archiveServer/var/install/uninstall.php,v $ ------------------------------------------------------------------------------*/ @@ -54,7 +54,7 @@ if(PEAR::isError($dbc)){ echo "#ArchiveServer uninstall:\n"; $dbc->setFetchMode(DB_FETCHMODE_ASSOC); -$gb = &new Archive(&$dbc, $config); +$gb = &new Archive($dbc, $config); $dbc->setErrorHandling(PEAR_ERROR_RETURN); diff --git a/livesupport/modules/archiveServer/var/xmlrpc/put.php b/livesupport/modules/archiveServer/var/xmlrpc/put.php index 53990160f..69a5ec4ba 100644 --- a/livesupport/modules/archiveServer/var/xmlrpc/put.php +++ b/livesupport/modules/archiveServer/var/xmlrpc/put.php @@ -23,7 +23,7 @@ Author : $Author: tomas $ - Version : $Revision: 1.1 $ + Version : $Revision: 1.2 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/archiveServer/var/xmlrpc/put.php,v $ ------------------------------------------------------------------------------*/ @@ -62,7 +62,7 @@ require_once '../Archive.php'; PEAR::setErrorHandling(PEAR_ERROR_RETURN); $dbc = DB::connect($config['dsn'], TRUE); $dbc->setFetchMode(DB_FETCHMODE_ASSOC); -$gb = &new Archive(&$dbc, $config); +$gb = &new Archive($dbc, $config); function http_error($code, $err){ header("HTTP/1.1 $code"); diff --git a/livesupport/modules/archiveServer/var/xmlrpc/xrArchive.php b/livesupport/modules/archiveServer/var/xmlrpc/xrArchive.php index fc9135bb3..86bf0302b 100644 --- a/livesupport/modules/archiveServer/var/xmlrpc/xrArchive.php +++ b/livesupport/modules/archiveServer/var/xmlrpc/xrArchive.php @@ -23,7 +23,7 @@ Author : $Author: tomas $ - Version : $Revision: 1.3 $ + Version : $Revision: 1.4 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/archiveServer/var/xmlrpc/xrArchive.php,v $ ------------------------------------------------------------------------------*/ @@ -72,7 +72,7 @@ PEAR::setErrorHandling(PEAR_ERROR_RETURN); $dbc = DB::connect($config['dsn'], TRUE); $dbc->setFetchMode(DB_FETCHMODE_ASSOC); -$archive = &new XR_Archive(&$dbc, $config); +$archive = &new XR_Archive($dbc, $config); $methods = array( 'test' => 'Tests toupper and checks sessid, params: '. diff --git a/livesupport/modules/storageServer/var/BasicStor.php b/livesupport/modules/storageServer/var/BasicStor.php index afc99d0c1..e850c5ba3 100644 --- a/livesupport/modules/storageServer/var/BasicStor.php +++ b/livesupport/modules/storageServer/var/BasicStor.php @@ -23,7 +23,7 @@ Author : $Author: tomas $ - Version : $Revision: 1.24 $ + Version : $Revision: 1.25 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/BasicStor.php,v $ ------------------------------------------------------------------------------*/ @@ -52,7 +52,7 @@ require_once "Transport.php"; * Core of LiveSupport file storage module * * @author $Author: tomas $ - * @version $Revision: 1.24 $ + * @version $Revision: 1.25 $ * @see Alib */ class BasicStor extends Alib{ @@ -75,7 +75,7 @@ class BasicStor extends Alib{ */ function BasicStor(&$dbc, $config) { - parent::Alib(&$dbc, $config); + parent::Alib($dbc, $config); $this->config = $config; $this->filesTable = $config['tblNamePrefix'].'files'; $this->mdataTable = $config['tblNamePrefix'].'mdata'; @@ -123,7 +123,7 @@ class BasicStor extends Alib{ $name = "$fileName"; $id = $this->addObj($name , 'File', $parid); $ac =& StoredFile::insert( - &$this, $id, $name, $mediaFileLP, $mdataFileLP, $mdataLoc, + $this, $id, $name, $mediaFileLP, $mdataFileLP, $mdataLoc, $gunid, $ftype ); if(PEAR::isError($ac)){ @@ -147,7 +147,7 @@ class BasicStor extends Alib{ switch($this->getObjType($id)){ case"audioclip": case"playlist": - $ac =& StoredFile::recall(&$this, $id); + $ac =& StoredFile::recall($this, $id); if(PEAR::isError($ac)){ // catch nonerror exception: //if($ac->getCode() != GBERR_FOBJNEX) @@ -362,7 +362,7 @@ class BasicStor extends Alib{ */ function bsOpenDownload($id, $part='media') { - $ac =& StoredFile::recall(&$this, $id); + $ac =& StoredFile::recall($this, $id); if(PEAR::isError($ac)) return $ac; $gunid = $ac->gunid; switch($part){ @@ -579,7 +579,7 @@ class BasicStor extends Alib{ */ function bsReplaceMetadata($id, $mdata, $mdataLoc='file') { - $ac =& StoredFile::recall(&$this, $id); + $ac =& StoredFile::recall($this, $id); if(PEAR::isError($ac)) return $ac; return $ac->replaceMetaData($mdata, $mdataLoc); } @@ -592,7 +592,7 @@ class BasicStor extends Alib{ */ function bsGetMetadata($id) { - $ac =& StoredFile::recall(&$this, $id); + $ac =& StoredFile::recall($this, $id); if(PEAR::isError($ac)) return $ac; return $ac->getMetaData(); } @@ -607,7 +607,7 @@ class BasicStor extends Alib{ function bsGetMetadataValue($id, $category) { require_once "DataEngine.php"; - $de =& new DataEngine(&$this); + $de =& new DataEngine($this); return $de->getMetadataValue($id, $category); } @@ -645,7 +645,7 @@ class BasicStor extends Alib{ function bsLocalSearch($criteria, $limit=0, $offset=0) { require_once "DataEngine.php"; - $de =& new DataEngine(&$this); + $de =& new DataEngine($this); return $de->localSearch($criteria, $limit, $offset); } @@ -665,7 +665,7 @@ class BasicStor extends Alib{ function bsBrowseCategory($category, $limit=0, $offset=0, $criteria=NULL) { require_once "DataEngine.php"; - $de =& new DataEngine(&$this); + $de =& new DataEngine($this); return $de->browseCategory($category, $limit, $offset, $criteria); } @@ -705,7 +705,7 @@ class BasicStor extends Alib{ */ function bsAnalyzeFile($id) { - $ac =& StoredFile::recall(&$this, $id); + $ac =& StoredFile::recall($this, $id); if(PEAR::isError($ac)) return $ac; $ia = $ac->analyzeMediaFile(); return $ia; @@ -916,9 +916,9 @@ class BasicStor extends Alib{ switch($this->getObjType($id)){ case"audioclip": case"playlist": - $ac =& StoredFile::recall(&$this, $id); + $ac =& StoredFile::recall($this, $id); if(PEAR::isError($ac)){ return $ac; } - $ac2 =& StoredFile::copyOf(&$ac, $nid); + $ac2 =& StoredFile::copyOf($ac, $nid); $ac2->rename($this->getObjName($nid)); break; case"File": @@ -953,7 +953,7 @@ class BasicStor extends Alib{ switch($ot = $this->getObjType($id)){ case"audioclip": case"playlist": - $ac =& StoredFile::recall(&$this, $id); + $ac =& StoredFile::recall($this, $id); if(PEAR::isError($ac)) return $ac; if($ac->isEdited() && !$forced){ return PEAR::raiseError( @@ -1063,6 +1063,7 @@ class BasicStor extends Alib{ */ function test() { + $this->test_log = ''; // if(PEAR::isError($p = parent::test())) return $p; $this->deleteData(); $this->testData(); diff --git a/livesupport/modules/storageServer/var/LocStor.php b/livesupport/modules/storageServer/var/LocStor.php index 58b78b855..9c2bebe4e 100644 --- a/livesupport/modules/storageServer/var/LocStor.php +++ b/livesupport/modules/storageServer/var/LocStor.php @@ -23,7 +23,7 @@ Author : $Author: tomas $ - Version : $Revision: 1.25 $ + Version : $Revision: 1.26 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/LocStor.php,v $ ------------------------------------------------------------------------------*/ @@ -59,7 +59,7 @@ class LocStor extends BasicStor{ "LocStor.php: storeAudioClipOpen: Wrong gunid ($gunid)" ); } - $ac =& StoredFile::recallByGunid(&$this, $gunid); + $ac =& StoredFile::recallByGunid($this, $gunid); if(!PEAR::isError($ac)){ // gunid exists - do replace $oid = $ac->getId(); @@ -85,7 +85,7 @@ class LocStor extends BasicStor{ $oid = $this->addObj($tmpFname , 'File', $parid); if(PEAR::isError($oid)) return $oid; $ac =& StoredFile::insert( - &$this, $oid, '', '', $metadata, 'string', + $this, $oid, '', '', $metadata, 'string', $gunid, $ftype ); if(PEAR::isError($ac)){ @@ -113,7 +113,7 @@ class LocStor extends BasicStor{ */ function storeAudioClipClose($sessid, $token) { - $ac =& StoredFile::recallByToken(&$this, $token); + $ac =& StoredFile::recallByToken($this, $token); if(PEAR::isError($ac)){ return $ac; } $tmpFname = $this->bsClosePut($token); if(PEAR::isError($tmpFname)){ $ac->delete(); return $tmpFname; } @@ -146,7 +146,7 @@ class LocStor extends BasicStor{ */ function accessRawAudioData($sessid, $gunid) { - $ac =& StoredFile::recallByGunid(&$this, $gunid); + $ac =& StoredFile::recallByGunid($this, $gunid); if(PEAR::isError($ac)) return $ac; if(($res = $this->_authorize('read', $ac->getId(), $sessid)) !== TRUE) return $res; @@ -162,7 +162,7 @@ class LocStor extends BasicStor{ */ function releaseRawAudioData($sessid, $token) { - $ac =& StoredFile::recallByToken(&$this, $token); + $ac =& StoredFile::recallByToken($this, $token); if(PEAR::isError($ac)) return $ac; return $ac->releaseRawMediaData($token); } @@ -248,7 +248,7 @@ class LocStor extends BasicStor{ */ function getAudioClip($sessid, $gunid) { - $ac =& StoredFile::recallByGunid(&$this, $gunid); + $ac =& StoredFile::recallByGunid($this, $gunid); if(PEAR::isError($ac)) return $ac; if(($res = $this->_authorize('read', $ac->getId(), $sessid)) !== TRUE) return $res; @@ -369,7 +369,7 @@ class LocStor extends BasicStor{ { $ex = $this->existsFile($sessid, $gunid, 'audioclip'); if(!$ex) return FALSE; - $ac =& StoredFile::recallByGunid(&$this, $gunid); + $ac =& StoredFile::recallByGunid($this, $gunid); if(PEAR::isError($ac)){ return $ac; } return $ac->exists(); } @@ -385,7 +385,7 @@ class LocStor extends BasicStor{ */ function existsFile($sessid, $gunid, $ftype=NULL) { - $ac =& StoredFile::recallByGunid(&$this, $gunid); + $ac =& StoredFile::recallByGunid($this, $gunid); if(PEAR::isError($ac)){ // catch some exceptions switch($ac->getCode()){ @@ -411,7 +411,7 @@ class LocStor extends BasicStor{ */ function deleteAudioClip($sessid, $gunid) { - $ac =& StoredFile::recallByGunid(&$this, $gunid); + $ac =& StoredFile::recallByGunid($this, $gunid); if(PEAR::isError($ac)) return $ac; if(($res = $this->_authorize('write', $ac->getId(), $sessid)) !== TRUE) return $res; @@ -430,7 +430,7 @@ class LocStor extends BasicStor{ */ function updateAudioClipMetadata($sessid, $gunid, $metadata) { - $ac =& StoredFile::recallByGunid(&$this, $gunid); + $ac =& StoredFile::recallByGunid($this, $gunid); if(PEAR::isError($ac)) return $ac; if(($res = $this->_authorize('write', $ac->getId(), $sessid)) !== TRUE) return $res; @@ -507,7 +507,7 @@ class LocStor extends BasicStor{ return $res; $oid = $this->addObj($tmpFname , 'File', $parid); if(PEAR::isError($oid)) return $oid; - $ac =& StoredFile::insert(&$this, $oid, '', '', + $ac =& StoredFile::insert($this, $oid, '', '', '', 'string', $playlistId, 'playlist' ); @@ -550,7 +550,7 @@ class LocStor extends BasicStor{ 'LocStor.php: editPlaylist: playlist already edited' ); } - $ac =& StoredFile::recallByGunid(&$this, $playlistId); + $ac =& StoredFile::recallByGunid($this, $playlistId); if(PEAR::isError($ac)){ return $ac; } $id = $ac->getId(); $res = $this->bsOpenDownload($id, 'metadata'); @@ -571,7 +571,7 @@ class LocStor extends BasicStor{ function savePlaylist($sessid, $playlistToken, $newPlaylist) { $playlistId = $this->bsCloseDownload($playlistToken, $part='metadata'); - $ac =& StoredFile::recallByGunid(&$this, $playlistId); + $ac =& StoredFile::recallByGunid($this, $playlistId); if(PEAR::isError($ac)){ return $ac; } $res = $ac->replaceMetaData($newPlaylist, $mdataLoc='string'); if(PEAR::isError($res)){ return $res; } @@ -595,7 +595,7 @@ class LocStor extends BasicStor{ 'LocStor.php: deletePlaylist: playlist not exists' ); } - $ac =& StoredFile::recallByGunid(&$this, $playlistId); + $ac =& StoredFile::recallByGunid($this, $playlistId); if(PEAR::isError($ac)) return $ac; if(($res = $this->_authorize('write', $ac->getId(), $sessid)) !== TRUE) return $res; @@ -684,7 +684,7 @@ class LocStor extends BasicStor{ */ function _isEdited($playlistId) { - $ac =& StoredFile::recallByGunid(&$this, $playlistId); + $ac =& StoredFile::recallByGunid($this, $playlistId); return $ac->isEdited($playlistId); } @@ -697,7 +697,7 @@ class LocStor extends BasicStor{ */ function _setEditFlag($playlistId, $val=TRUE) { - $ac =& StoredFile::recallByGunid(&$this, $playlistId); + $ac =& StoredFile::recallByGunid($this, $playlistId); $state = $ac->_getState(); if($val){ $ac->setState('edited'); } else{ $ac->setState('ready'); } diff --git a/livesupport/modules/storageServer/var/MetaData.php b/livesupport/modules/storageServer/var/MetaData.php index 4176fa1f8..aa892d3a7 100644 --- a/livesupport/modules/storageServer/var/MetaData.php +++ b/livesupport/modules/storageServer/var/MetaData.php @@ -23,7 +23,7 @@ Author : $Author: tomas $ - Version : $Revision: 1.13 $ + Version : $Revision: 1.14 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/MetaData.php,v $ ------------------------------------------------------------------------------*/ @@ -416,6 +416,7 @@ class MetaData{ $objns_sql = (is_null($objns) ? "NULL" : "'$objns'" ); $object_sql = (is_null($object)? "NULL" : "'$object'"); $predicate = strtolower($predicate); + $id = NULL; if($mode == 'update'){ $cond = "gunid = x'{$this->gunid}'::bigint AND predns=$predns_sql AND predicate='$predicate'"; @@ -477,9 +478,9 @@ class MetaData{ // "MetaData::genXMLDoc: not exists ({$this->gunid})" // ); $nxn =& $domd->create_element('metadata'); - $domd->append_child(&$nxn); + $domd->append_child($nxn); }else{ - $rr = $this->genXMLNode(&$domd, &$domd, $row); + $rr = $this->genXMLNode($domd, $domd, $row); if(PEAR::isError($rr)) return $rr; } //return preg_replace("|]*)>|", "\n", $domd->dump_mem())."\n"; @@ -501,7 +502,7 @@ class MetaData{ }else{ $nxn =& $domd->create_attribute($row['predicate'], ''); } - $xn->append_child(&$nxn); + $xn->append_child($nxn); $uri = $this->dbc->getOne(" SELECT object FROM {$this->mdataTable} WHERE gunid=x'{$this->gunid}'::bigint AND predicate='_namespace' @@ -515,9 +516,9 @@ class MetaData{ } if($row['object'] != 'NULL'){ $tn =& $domd->create_text_node($row['object']); - $nxn->append_child(&$tn); + $nxn->append_child($tn); } - $this->genXMLTree(&$domd, &$nxn, $row['id']); + $this->genXMLTree($domd, $nxn, $row['id']); } /** @@ -538,7 +539,7 @@ class MetaData{ "); if(PEAR::isError($qh)) return $qh; while($row = $qh->fetchRow()){ - $this->genXMLNode(&$domd, &$xn, $row); + $this->genXMLNode($domd, $xn, $row); } $qh->free(); } diff --git a/livesupport/modules/storageServer/var/StoredFile.php b/livesupport/modules/storageServer/var/StoredFile.php index a6fdcd764..d1941ca8b 100644 --- a/livesupport/modules/storageServer/var/StoredFile.php +++ b/livesupport/modules/storageServer/var/StoredFile.php @@ -23,7 +23,7 @@ Author : $Author: tomas $ - Version : $Revision: 1.18 $ + Version : $Revision: 1.19 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/StoredFile.php,v $ ------------------------------------------------------------------------------*/ @@ -65,7 +65,7 @@ class StoredFile{ $this->resDir = $this->_getResDir($this->gunid); $this->accessDir = $this->gb->accessDir; $this->rmd =& new RawMediaData($this->gunid, $this->resDir); - $this->md =& new MetaData(&$gb, $this->gunid, $this->resDir); + $this->md =& new MetaData($gb, $this->gunid, $this->resDir); return $this->gunid; } @@ -87,7 +87,7 @@ class StoredFile{ $mediaFileLP='', $metadata='', $mdataLoc='file', $gunid=NULL, $ftype=NULL) { - $ac =& new StoredFile(&$gb, ($gunid ? $gunid : NULL)); + $ac =& new StoredFile($gb, ($gunid ? $gunid : NULL)); $ac->name = $name; $ac->id = $oid; $ac->mime = "unKnown"; @@ -172,7 +172,7 @@ class StoredFile{ ); } $gunid = StoredFile::_normalizeGunid($row['gunid']); - $ac =& new StoredFile(&$gb, $gunid); + $ac =& new StoredFile($gb, $gunid); $ac->mime = $row['mime']; $ac->name = $row['name']; $ac->id = $row['id']; @@ -189,7 +189,7 @@ class StoredFile{ */ function recallByGunid(&$gb, $gunid='') { - return StoredFile::recall(&$gb, '', $gunid); + return StoredFile::recall($gb, '', $gunid); } /** @@ -211,7 +211,7 @@ class StoredFile{ if(is_null($gunid)) return PEAR::raiseError( "StoredFile::recallByToken: invalid token ($token)", GBERR_AOBJNEX); $gunid = StoredFile::_normalizeGunid($gunid); - return StoredFile::recall(&$gb, '', $gunid); + return StoredFile::recall($gb, '', $gunid); } /** @@ -223,7 +223,7 @@ class StoredFile{ function copyOf(&$src, $nid) { $ac =& StoredFile::insert( - &$src->gb, $nid, $src->name, $src->_getRealRADFname(), + $src->gb, $nid, $src->name, $src->_getRealRADFname(), '', '', NULL, $src->gb->_getType($src->gunid) ); if(PEAR::isError($ac)) return $ac; @@ -470,7 +470,7 @@ class StoredFile{ */ function isEdited($playlistId=NULL) { - if(is_null($playlistId)) $playlistId = $this->playlistId; + if(is_null($playlistId)) $playlistId = $this->gunid; $state = $this->_getState($playlistId); if($state == 'edited'){ return TRUE; } return FALSE; @@ -506,8 +506,9 @@ class StoredFile{ */ function _createGunid() { + $ip = (isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : ''); $initString = - microtime().$_SERVER['SERVER_ADDR'].rand()."org.mdlf.livesupport"; + microtime().$ip.rand()."org.mdlf.livesupport"; $hash = md5($initString); // non-negative int8 $hsd = substr($hash, 0, 1); diff --git a/livesupport/modules/storageServer/var/Transport.php b/livesupport/modules/storageServer/var/Transport.php index 6edae93dd..23254ff36 100644 --- a/livesupport/modules/storageServer/var/Transport.php +++ b/livesupport/modules/storageServer/var/Transport.php @@ -23,7 +23,7 @@ Author : $Author: tomas $ - Version : $Revision: 1.5 $ + Version : $Revision: 1.6 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/Transport.php,v $ ------------------------------------------------------------------------------*/ @@ -223,7 +223,7 @@ class Transport{ $this->trLog("INIT UP id={$row['id']}, trtok={$row['trtok']}"); switch($row['trtype']){ case"audioclip": - $ac =& StoredFile::recallByGunid(&$this->gb, $row['gunid']); + $ac =& StoredFile::recallByGunid($this->gb, $row['gunid']); if(PEAR::isError($ac)) return $ac; $fpath = $ac->_getRealRADFname(); $fname = $ac->_getFileName(); @@ -261,7 +261,7 @@ class Transport{ ); break; case"playlist": - $ac =& StoredFile::recallByGunid(&$this->gb, $row['gunid']); + $ac =& StoredFile::recallByGunid($this->gb, $row['gunid']); if(PEAR::isError($ac)) return $ac; $fname = $ac->_getFileName(); $size = filesize($fpath); @@ -671,7 +671,7 @@ class Transport{ $name = $row['fname']; $this->trLog("FIN1 DOWN id={$row['id']}, trtok={$row['trtok']}". "\n ".serialize($row)); - $ac =& StoredFile::recallByGunid(&$this->gb, $row['gunid']); + $ac =& StoredFile::recallByGunid($this->gb, $row['gunid']); if(!PEAR::isError($ac)){ // gunid exists - do replace $id = $ac->getId(); @@ -684,7 +684,7 @@ class Transport{ $id = $this->gb->addObj($name , 'File', $row['parid']); if(PEAR::isError($id)) return $id; $ac =& StoredFile::insert( - &$this->gb, $id, $name, $row['localfile'], $mdata, 'string', + $this->gb, $id, $name, $row['localfile'], $mdata, 'string', $row['gunid'], 'audioclip' ); if(PEAR::isError($ac)) return $ac; @@ -806,8 +806,9 @@ class Transport{ */ function _createTrtok() { + $ip = (isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : ''); $initString = - microtime().$_SERVER['SERVER_ADDR'].rand()."org.mdlf.livesupport"; + microtime().$ip.rand()."org.mdlf.livesupport"; $hash = md5($initString); $res = substr($hash, 0, 16); return $res; diff --git a/livesupport/modules/storageServer/var/cron/transportCron.php b/livesupport/modules/storageServer/var/cron/transportCron.php index 57679657a..f3af65a5b 100755 --- a/livesupport/modules/storageServer/var/cron/transportCron.php +++ b/livesupport/modules/storageServer/var/cron/transportCron.php @@ -9,8 +9,8 @@ PEAR::setErrorHandling(PEAR_ERROR_RETURN); $dbc = DB::connect($config['dsn'], TRUE); $dbc->setFetchMode(DB_FETCHMODE_ASSOC); -$gb = &new LocStor(&$dbc, $config); -$tr =& new Transport(&$dbc, &$gb, $config); +$gb = &new LocStor($dbc, $config); +$tr =& new Transport($dbc, $gb, $config); $cnt = 1; #$res = $gb->cronJob(); diff --git a/livesupport/modules/storageServer/var/install/install.php b/livesupport/modules/storageServer/var/install/install.php index eeb3b51e3..f538d2168 100644 --- a/livesupport/modules/storageServer/var/install/install.php +++ b/livesupport/modules/storageServer/var/install/install.php @@ -23,7 +23,7 @@ Author : $Author: tomas $ - Version : $Revision: 1.10 $ + Version : $Revision: 1.11 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/install/install.php,v $ ------------------------------------------------------------------------------*/ @@ -59,9 +59,9 @@ if(PEAR::isError($dbc)){ } $dbc->setFetchMode(DB_FETCHMODE_ASSOC); -$gb =& new GreenBox(&$dbc, $config); -$tr =& new Transport(&$dbc, &$gb, $config); -$pr =& new Prefs(&$gb); +$gb =& new GreenBox($dbc, $config); +$tr =& new Transport($dbc, $gb, $config); +$pr =& new Prefs($gb); echo "#StorageServer step 2:\n# trying uninstall ...\n"; $dbc->setErrorHandling(PEAR_ERROR_RETURN); diff --git a/livesupport/modules/storageServer/var/install/uninstall.php b/livesupport/modules/storageServer/var/install/uninstall.php index 40c3b701d..1e08260c2 100644 --- a/livesupport/modules/storageServer/var/install/uninstall.php +++ b/livesupport/modules/storageServer/var/install/uninstall.php @@ -23,7 +23,7 @@ Author : $Author: tomas $ - Version : $Revision: 1.8 $ + Version : $Revision: 1.9 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/install/uninstall.php,v $ ------------------------------------------------------------------------------*/ @@ -56,9 +56,9 @@ if(PEAR::isError($dbc)){ echo "#StorageServer uninstall:\n"; $dbc->setFetchMode(DB_FETCHMODE_ASSOC); -$gb = &new GreenBox(&$dbc, $config); -$tr =& new Transport(&$dbc, &$gb, $config); -$pr =& new Prefs(&$gb); +$gb = &new GreenBox($dbc, $config); +$tr =& new Transport($dbc, $gb, $config); +$pr =& new Prefs($gb); $dbc->setErrorHandling(PEAR_ERROR_RETURN); echo "# Uninstall Prefs submodule"; diff --git a/livesupport/modules/storageServer/var/tests/transTest.php b/livesupport/modules/storageServer/var/tests/transTest.php index 25e289d2a..b80b9d3bf 100644 --- a/livesupport/modules/storageServer/var/tests/transTest.php +++ b/livesupport/modules/storageServer/var/tests/transTest.php @@ -23,7 +23,7 @@ Author : $Author: tomas $ - Version : $Revision: 1.4 $ + Version : $Revision: 1.5 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/tests/transTest.php,v $ ------------------------------------------------------------------------------*/ @@ -38,8 +38,8 @@ require_once '../LocStor.php'; PEAR::setErrorHandling(PEAR_ERROR_RETURN); $dbc = DB::connect($config['dsn'], TRUE); $dbc->setFetchMode(DB_FETCHMODE_ASSOC); -$gb = &new LocStor(&$dbc, $config); -$tr = &new Transport(&$gb->dbc, &$gb, $gb->config); +$gb = &new LocStor($dbc, $config); +$tr = &new Transport($gb->dbc, $gb, $gb->config); @unlink("{$tr->transDir}/log"); $gunid = 'a23456789abcdefa'; diff --git a/livesupport/modules/storageServer/var/xmlrpc/XR_LocStor.php b/livesupport/modules/storageServer/var/xmlrpc/XR_LocStor.php index da9103fd6..6215083f4 100644 --- a/livesupport/modules/storageServer/var/xmlrpc/XR_LocStor.php +++ b/livesupport/modules/storageServer/var/xmlrpc/XR_LocStor.php @@ -23,7 +23,7 @@ Author : $Author: tomas $ - Version : $Revision: 1.12 $ + Version : $Revision: 1.13 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/xmlrpc/XR_LocStor.php,v $ ------------------------------------------------------------------------------*/ @@ -1317,7 +1317,7 @@ class XR_LocStor extends LocStor{ list($ok, $r) = $this->_xr_getPars($input); if(!$ok) return $r; require_once '../../../storageServer/var/Prefs.php'; - $pr =& new Prefs(&$this); + $pr =& new Prefs($this); $res = $pr->loadPref($r['sessid'], $r['key']); if(PEAR::isError($res)){ $ec0 = intval($res->getCode()); @@ -1368,7 +1368,7 @@ class XR_LocStor extends LocStor{ list($ok, $r) = $this->_xr_getPars($input); if(!$ok) return $r; require_once '../../../storageServer/var/Prefs.php'; - $pr =& new Prefs(&$this); + $pr =& new Prefs($this); $res = $pr->savePref($r['sessid'], $r['key'], $r['value']); if(PEAR::isError($res)){ $ec0 = intval($res->getCode()); @@ -1418,7 +1418,7 @@ class XR_LocStor extends LocStor{ list($ok, $r) = $this->_xr_getPars($input); if(!$ok) return $r; require_once '../../../storageServer/var/Prefs.php'; - $pr =& new Prefs(&$this); + $pr =& new Prefs($this); $res = $pr->delPref($r['sessid'], $r['key']); if(PEAR::isError($res)){ $ec0 = intval($res->getCode()); @@ -1470,7 +1470,7 @@ class XR_LocStor extends LocStor{ list($ok, $r) = $this->_xr_getPars($input); if(!$ok) return $r; require_once '../../../storageServer/var/Prefs.php'; - $pr =& new Prefs(&$this); + $pr =& new Prefs($this); $res = $pr->loadGroupPref($r['sessid'], $r['group'], $r['key']); if(PEAR::isError($res)){ $ec0 = intval($res->getCode()); @@ -1526,7 +1526,7 @@ class XR_LocStor extends LocStor{ list($ok, $r) = $this->_xr_getPars($input); if(!$ok) return $r; require_once '../../../storageServer/var/Prefs.php'; - $pr =& new Prefs(&$this); + $pr =& new Prefs($this); $res = $pr->saveGroupPref($r['sessid'], $r['group'], $r['key'], $r['value']); if(PEAR::isError($res)){ $ec0 = intval($res->getCode()); @@ -1576,7 +1576,7 @@ class XR_LocStor extends LocStor{ list($ok, $r) = $this->_xr_getPars($input); if(!$ok) return $r; require_once '../../../storageServer/var/Transport.php'; - $tr =& new Transport(&$this->dbc, &$this, $this->config); + $tr =& new Transport($this->dbc, $this, $this->config); $res = $tr->uploadToArchive($r['gunid'], $r['sessid']); if(PEAR::isError($res)){ $ec0 = intval($res->getCode()); @@ -1625,7 +1625,7 @@ class XR_LocStor extends LocStor{ list($ok, $r) = $this->_xr_getPars($input); if(!$ok) return $r; require_once '../../../storageServer/var/Transport.php'; - $tr =& new Transport(&$this->dbc, &$this, $this->config); + $tr =& new Transport($this->dbc, $this, $this->config); $res = $tr->downloadFromArchive($r['gunid'], $r['sessid']); if(PEAR::isError($res)){ $ec0 = intval($res->getCode()); @@ -1682,7 +1682,7 @@ class XR_LocStor extends LocStor{ list($ok, $r) = $this->_xr_getPars($input); if(!$ok) return $r; require_once '../../../storageServer/var/Transport.php'; - $tr =& new Transport(&$this->dbc, &$this, $this->config); + $tr =& new Transport($this->dbc, $this, $this->config); $res = $tr->getTransportInfo($r['trtok'], $r['sessid']); if(PEAR::isError($res)){ $ec0 = intval($res->getCode()); diff --git a/livesupport/modules/storageServer/var/xmlrpc/put.php b/livesupport/modules/storageServer/var/xmlrpc/put.php index 5cb371cf4..20349ced0 100644 --- a/livesupport/modules/storageServer/var/xmlrpc/put.php +++ b/livesupport/modules/storageServer/var/xmlrpc/put.php @@ -23,7 +23,7 @@ Author : $Author: tomas $ - Version : $Revision: 1.5 $ + Version : $Revision: 1.6 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/xmlrpc/put.php,v $ ------------------------------------------------------------------------------*/ @@ -62,7 +62,7 @@ require_once '../LocStor.php'; PEAR::setErrorHandling(PEAR_ERROR_RETURN); $dbc = DB::connect($config['dsn'], TRUE); $dbc->setFetchMode(DB_FETCHMODE_ASSOC); -$gb = &new LocStor(&$dbc, $config); +$gb = &new LocStor($dbc, $config); function http_error($code, $err){ header("HTTP/1.1 $code"); diff --git a/livesupport/modules/storageServer/var/xmlrpc/simpleGet.php b/livesupport/modules/storageServer/var/xmlrpc/simpleGet.php index 201a27c71..de20f46a1 100644 --- a/livesupport/modules/storageServer/var/xmlrpc/simpleGet.php +++ b/livesupport/modules/storageServer/var/xmlrpc/simpleGet.php @@ -23,7 +23,7 @@ Author : $Author: tomas $ - Version : $Revision: 1.7 $ + Version : $Revision: 1.8 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/xmlrpc/simpleGet.php,v $ ------------------------------------------------------------------------------*/ @@ -62,7 +62,7 @@ PEAR::setErrorHandling(PEAR_ERROR_RETURN); $dbc = DB::connect($config['dsn'], TRUE); $dbc->setFetchMode(DB_FETCHMODE_ASSOC); -$locStor = &new LocStor(&$dbc, $config); +$locStor = &new LocStor($dbc, $config); function http_error($code, $err){ header("HTTP/1.1 $code"); @@ -95,7 +95,7 @@ if(PEAR::isError($ex_pl)){ }else{ http_error(500, $ex_pl->getMessage()); } } if(!$ex_ac && !$ex_pl){ http_error(404, "404 File not found"); } -$ac =& StoredFile::recallByGunid(&$locStor, $gunid); +$ac =& StoredFile::recallByGunid($locStor, $gunid); if(PEAR::isError($ac)){ http_error(500, $ac->getMessage()); } if($ex_ac){ $realFname = $ac->_getRealRADFname(); diff --git a/livesupport/modules/storageServer/var/xmlrpc/testRunner.sh b/livesupport/modules/storageServer/var/xmlrpc/testRunner.sh index e9a037881..a29ccc3f5 100755 --- a/livesupport/modules/storageServer/var/xmlrpc/testRunner.sh +++ b/livesupport/modules/storageServer/var/xmlrpc/testRunner.sh @@ -23,7 +23,7 @@ # # # Author : $Author: tomas $ -# Version : $Revision: 1.19 $ +# Version : $Revision: 1.20 $ # Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/xmlrpc/testRunner.sh,v $ #------------------------------------------------------------------------------- @@ -293,6 +293,7 @@ logout() { } searchTest() { + echo "#XMLRPC search test" login storeAudioClip GUNID=$RGUNID @@ -310,6 +311,8 @@ searchTest() { fi deleteAudioClip logout + echo "#XMLRPC: search: OK." + echo "" } preferenceTest(){ diff --git a/livesupport/modules/storageServer/var/xmlrpc/xrLocStor.php b/livesupport/modules/storageServer/var/xmlrpc/xrLocStor.php index d2f34a638..e283fa117 100644 --- a/livesupport/modules/storageServer/var/xmlrpc/xrLocStor.php +++ b/livesupport/modules/storageServer/var/xmlrpc/xrLocStor.php @@ -23,7 +23,7 @@ Author : $Author: tomas $ - Version : $Revision: 1.20 $ + Version : $Revision: 1.21 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/xmlrpc/xrLocStor.php,v $ ------------------------------------------------------------------------------*/ @@ -73,7 +73,7 @@ PEAR::setErrorHandling(PEAR_ERROR_RETURN); $dbc = DB::connect($config['dsn'], TRUE); $dbc->setFetchMode(DB_FETCHMODE_ASSOC); -$locStor = &new XR_LocStor(&$dbc, $config); +$locStor = &new XR_LocStor($dbc, $config); $methods = array( 'test' => 'Tests toupper and checks sessid, params: '.