minor change (#590)

This commit is contained in:
tomas 2005-02-22 14:44:12 +00:00
parent 81180dcd10
commit 4ce979d077
3 changed files with 26 additions and 21 deletions

View File

@ -22,7 +22,7 @@ define('ALIBERR_MTREE', 10);
* );
* </code></pre>
* @author $Author: tomas $
* @version $Revision: 1.2 $
* @version $Revision: 1.3 $
* @see ObjClasses
* Original author Tom Hlava
*/
@ -414,7 +414,7 @@ class M2tree{
$r = array();
if($withRoot){
$r[] = $re = $this->getObjLevel($oid, 'id, name, level', $rootId);
}
}else $re=NULL;
if($this->dbc->isError($re)) return $re;
$dirarr = $this->getDir($oid, 'id, level');
if($this->dbc->isError($dirarr)) return $dirarr;

View File

@ -23,7 +23,7 @@
Author : $Author: tomas $
Version : $Revision: 1.7 $
Version : $Revision: 1.8 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/archiveServer/var/conf.php,v $
------------------------------------------------------------------------------*/
@ -66,6 +66,7 @@ $config = array(
'tblNamePrefix' => 'as_',
'authCookieName'=> 'assid',
'StationPrefsGr'=> '',
'AllGr' => '',
'storageDir' => dirname(getcwd()).'/stor',
'bufferDir' => dirname(getcwd()).'/stor/buffer',
'transDir' => dirname(getcwd()).'/trans',

View File

@ -23,7 +23,7 @@
Author : $Author: tomas $
Version : $Revision: 1.34 $
Version : $Revision: 1.35 $
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.34 $
* @version $Revision: 1.35 $
* @see Alib
*/
class BasicStor extends Alib{
@ -864,18 +864,20 @@ class BasicStor extends Alib{
if($this->dbc->isError($fid)) return $fid;
$res = $this->addPerm($uid, '_all', $fid, 'A');
if($this->dbc->isError($res)) return $res;
$res =$this->addSubj2Gr($login, $this->config['StationPrefsGr']);
if($this->dbc->isError($res)) return $res;
$res =$this->addSubj2Gr($login, $this->config['AllGr']);
if($this->dbc->isError($res)) return $res;
$pfid = $this->bsCreateFolder($fid, 'public');
if($this->dbc->isError($pfid)) return $pfid;
$res = $this->addPerm($uid, '_all', $pfid, 'A');
if($this->dbc->isError($res)) return $res;
$allGrId = $this->getSubjId($this->config['AllGr']);
if($this->dbc->isError($allGrId)) return $allGrId;
$res = $this->addPerm($allGrId, 'read', $pfid, 'A');
if($this->dbc->isError($res)) return $res;
if(!$this->config['isArchive']){
$res =$this->addSubj2Gr($login, $this->config['StationPrefsGr']);
if($this->dbc->isError($res)) return $res;
$res =$this->addSubj2Gr($login, $this->config['AllGr']);
if($this->dbc->isError($res)) return $res;
$pfid = $this->bsCreateFolder($fid, 'public');
if($this->dbc->isError($pfid)) return $pfid;
$res = $this->addPerm($uid, '_all', $pfid, 'A');
if($this->dbc->isError($res)) return $res;
$allGrId = $this->getSubjId($this->config['AllGr']);
if($this->dbc->isError($allGrId)) return $allGrId;
$res = $this->addPerm($allGrId, 'read', $pfid, 'A');
if($this->dbc->isError($res)) return $res;
}
}
return $uid;
}
@ -1320,10 +1322,12 @@ class BasicStor extends Alib{
$rootUid = parent::addSubj('root', $this->config['tmpRootPass']);
$res = $this->addPerm($rootUid, '_all', $this->rootId, 'A');
$fid = $this->bsCreateFolder($this->storId, 'root');
$stPrefGr = parent::addSubj($this->config['StationPrefsGr']);
$this->addSubj2Gr('root', $this->config['StationPrefsGr']);
$stPrefGr = parent::addSubj($this->config['AllGr']);
$this->addSubj2Gr('root', $this->config['AllGr']);
if(!$this->config['isArchive']){
$stPrefGr = parent::addSubj($this->config['StationPrefsGr']);
$this->addSubj2Gr('root', $this->config['StationPrefsGr']);
$stPrefGr = parent::addSubj($this->config['AllGr']);
$this->addSubj2Gr('root', $this->config['AllGr']);
}
}
/**
* install - create tables