minor fixes

This commit is contained in:
tomas 2005-06-16 02:28:38 +00:00
parent 01ab98afaa
commit c66e01f4ba

View file

@ -23,7 +23,7 @@
Author : $Author: tomas $ Author : $Author: tomas $
Version : $Revision: 1.53 $ Version : $Revision: 1.54 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/BasicStor.php,v $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/BasicStor.php,v $
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
@ -53,7 +53,7 @@ require_once "Transport.php";
* Core of LiveSupport file storage module * Core of LiveSupport file storage module
* *
* @author $Author: tomas $ * @author $Author: tomas $
* @version $Revision: 1.53 $ * @version $Revision: 1.54 $
* @see Alib * @see Alib
*/ */
class BasicStor extends Alib{ class BasicStor extends Alib{
@ -1194,7 +1194,14 @@ class BasicStor extends Alib{
{ {
$exid = $this->getObjId($name, $parid); $exid = $this->getObjId($name, $parid);
if($this->dbc->isError($exid)) return $exid; if($this->dbc->isError($exid)) return $exid;
if(!is_null($exid)){ $this->removeObj($exid); } //if(!is_null($exid)){ $this->removeObj($exid); }
$name2 = $name;
for( ;
$xid = $this->getObjId($name2, $parid),
!is_null($xid) && !$this->dbc->isError($xid);
$name2 .= "_"
);
if(!is_null($exid)){ $r = $this->renameObj($exid, $name2); }
return parent::addObj($name, $type, $parid, $aftid, $param); return parent::addObj($name, $type, $parid, $aftid, $param);
} }
@ -1244,9 +1251,9 @@ class BasicStor extends Alib{
/** /**
* Reset storageServer for debugging. * Reset storageServer for debugging.
* *
* @param input string * @param loadSampleData boolean - allows deny sample data loading
*/ */
function resetStorage($input='') function resetStorage($loadSampleData=TRUE)
{ {
$this->deleteData(); $this->deleteData();
if(!$this->config['isArchive']){ if(!$this->config['isArchive']){