Refactored Alib to reveal its true nature: a bunch of static functions inside of classes. This makes it much easier to understand what is going on, and removes 4 layers of class heirarchies (now only 4 left). There are now two important global variables: CC_DBC, the database connection, and CC_CONFIG, the config variables. These used to be passed around to all classes, but since they are always the same they should be global. Refactored the StorageServer install scripts to live outside of the classes. They now live in the storageServer install scripts. A lot of functions in the StorageServer have become static as well, but there are definitely more that I didnt get to. Lots of code cleanup as well. This is a big update.

This commit is contained in:
paul 2006-12-16 06:36:22 +00:00
parent 2ae9d1ff2e
commit 4733682a62
102 changed files with 4061 additions and 3326 deletions

View file

@ -102,7 +102,7 @@ class Playlist extends StoredFile {
public function &create(&$gb, $plid, $fname=NULL, $parid=NULL)
{
$tmpFname = uniqid('');
$oid = $gb->addObj($tmpFname , 'playlist', $parid);
$oid = BasicStor::AddObj($tmpFname , 'playlist', $parid);
if (PEAR::isError($oid)) {
return $oid;
}
@ -154,7 +154,7 @@ class Playlist extends StoredFile {
'Playlist::lock: playlist already locked'
);
}
$r = $gb->_setEditFlag($this->gunid, $val, NULL, $subjid);
$r = $gb->setEditFlag($this->gunid, $val, NULL, $subjid);
return $r;
}
@ -248,7 +248,7 @@ class Playlist extends StoredFile {
} else {
$acTit = $acGunid;
}
$elType = $this->gb->getObjType($acId);
$elType = BasicStor::GetObjType($acId);
$trTbl = array('audioclip'=>'audioClip', 'webstream'=>'audioClip',
'playlist'=>'playlist');
$elType = $trTbl[$elType];
@ -381,7 +381,7 @@ class Playlist extends StoredFile {
$plElId = $r;
// create and insert gunid (id attribute)
if (is_null($plElGunid)) {
$plElGunid = StoredFile::_createGunid();
$plElGunid = StoredFile::CreateGunid();
}
$r = $this->md->insertMetadataEl($plElId, 'id', $plElGunid, 'A');
if (PEAR::isError($r)) {
@ -420,7 +420,7 @@ class Playlist extends StoredFile {
return $r;
}
$fiId = $r;
$fiGunid = StoredFile::_createGunid();
$fiGunid = StoredFile::CreateGunid();
$r = $this->md->insertMetadataEl($fiId, 'id', $fiGunid, 'A');
if (PEAR::isError($r)) {
return $r;
@ -687,7 +687,7 @@ class Playlist extends StoredFile {
if (PEAR::isError($fiMid)) {
return $fiMid;
}
$fiGunid = StoredFile::_createGunid();
$fiGunid = StoredFile::CreateGunid();
$r = $this->_getMidOrInsert('id', $fiMid, $fiGunid, 'A');
if (PEAR::isError($r)) {
return $r;
@ -773,7 +773,7 @@ class Playlist extends StoredFile {
);
}
}
$acId = $this->gb->idFromGunid($acGunid);
$acId = BasicStor::IdFromGunid($acGunid);
if (PEAR::isError($acId)) {
return $acId;
}