Little corrections.
This commit is contained in:
parent
72d8984500
commit
83a6d5e452
8 changed files with 26 additions and 21 deletions
|
@ -20,7 +20,7 @@
|
|||
#
|
||||
#
|
||||
# Author : $Author: tomas $
|
||||
# Version : $Revision: 1.1 $
|
||||
# Version : $Revision: 1.2 $
|
||||
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/Attic/Makefile,v $
|
||||
#
|
||||
# @configure_input@
|
||||
|
@ -62,7 +62,7 @@ USR_LIB_DIR = ${USR_DIR}/lib
|
|||
|
||||
DOXYGEN_CONFIG = ${ETC_DIR}/doxygen.config
|
||||
|
||||
HTTP_GROUP = nobody
|
||||
HTTP_GROUP = apache
|
||||
|
||||
PHP_DIR = ${BASE_DIR}/var
|
||||
INSTALL_DIR = ${PHP_DIR}/install
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
|
||||
Author : $Author: tomas $
|
||||
Version : $Revision: 1.1 $
|
||||
Version : $Revision: 1.2 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/GreenBox.php,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -47,7 +47,7 @@ require_once '../StoredFile.php';
|
|||
* LiveSupport file storage module
|
||||
*
|
||||
* @author $Author: tomas $
|
||||
* @version $Revision: 1.1 $
|
||||
* @version $Revision: 1.2 $
|
||||
* @see Alib
|
||||
*/
|
||||
class GreenBox extends Alib{
|
||||
|
@ -923,7 +923,8 @@ class GreenBox extends Alib{
|
|||
$this->dbc->query("CREATE INDEX {$this->accessTable}_acc_idx
|
||||
ON {$this->accessTable} (tmpLink, sessid)");
|
||||
if(!file_exists("{$this->storageDir}/buffer")){
|
||||
mkdir("{$this->storageDir}/buffer", 0775);
|
||||
mkdir("{$this->storageDir}/buffer", 02775);
|
||||
chmod("{$this->storageDir}/buffer", 02775);
|
||||
}
|
||||
$this->initData();
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
|
||||
Author : $Author: tomas $
|
||||
Version : $Revision: 1.1 $
|
||||
Version : $Revision: 1.2 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/MetaData.php,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -157,9 +157,9 @@ class MetaData{
|
|||
$xml = domxml_open_mem($mdata);
|
||||
}
|
||||
$root = $xml->document_element();
|
||||
// $res = $this->dbTransaction($root, NULL, $mode);
|
||||
// $root, $parid=NULL, $mode='insert'
|
||||
// if(PEAR::isError($res)) return $res;
|
||||
if(!is_object($root)) return PEAR::raiseError(
|
||||
"MetaData::storeXMLDoc: metadata parser failed (".gettype($root).")"
|
||||
);
|
||||
$this->dbc->query("BEGIN");
|
||||
if($mode == 'update') $this->nameSpaces = $this->readNamespaces();
|
||||
$res = $this->storeXMLNode($root, NULL, $mode);
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
|
||||
Author : $Author: tomas $
|
||||
Version : $Revision: 1.1 $
|
||||
Version : $Revision: 1.2 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/RawMediaData.php,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -62,7 +62,7 @@ class RawMediaData{
|
|||
function insert($mediaFileLP)
|
||||
{
|
||||
if($this->exists) return FALSE;
|
||||
@umask(0002);
|
||||
umask(0002);
|
||||
if(@copy($mediaFileLP, $this->fname)){
|
||||
// @chmod($this->fname, 0775);
|
||||
$this->exists = TRUE;
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
|
||||
Author : $Author: tomas $
|
||||
Version : $Revision: 1.1 $
|
||||
Version : $Revision: 1.2 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/StoredFile.php,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -478,7 +478,7 @@ class StoredFile{
|
|||
function _getResDir()
|
||||
{
|
||||
$resDir="{$this->gb->storageDir}/".substr($this->gunid, 0, 3);
|
||||
if(!file_exists($resDir)){ mkdir($resDir, 02775); }
|
||||
if(!file_exists($resDir)){ mkdir($resDir, 02775); chmod($resDir, 02775); }
|
||||
return $resDir;
|
||||
}
|
||||
/**
|
||||
|
|
|
@ -98,17 +98,17 @@ $tpldata['showMenu']=true;
|
|||
'</form>';
|
||||
}
|
||||
function fmove(id, relPath){
|
||||
var newPath=prompt('Destination folder:', relPath);
|
||||
var newPath=prompt('Destination folder (relative path):', relPath);
|
||||
if(newPath==null) return;
|
||||
location.href='gbHttp.php?id='+id+'&act=move&newPath='+newPath;
|
||||
}
|
||||
function fcopy(id, relPath){
|
||||
var newPath=prompt('Destination folder:', relPath);
|
||||
var newPath=prompt('Destination folder (relative path):', relPath);
|
||||
if(newPath==null) return;
|
||||
location.href='gbHttp.php?id='+id+'&act=copy&newPath='+newPath;
|
||||
}
|
||||
function freplicate(name, id){
|
||||
var np=prompt('Destination folder:', id);
|
||||
var np=prompt('Destination folder (relative path):', id);
|
||||
if(np==null) return;
|
||||
location.href='gbHttp.php?id='+id+'&act=repl&newparid='+np;
|
||||
}
|
||||
|
@ -165,11 +165,11 @@ $tpldata['showMenu']=true;
|
|||
</td><td>
|
||||
<?$a=array('Folder'=>'D', 'File'=>'F', 'Replica'=>'R'); echo$a[$o['type']]?>
|
||||
<a href="javascript:frename('<?=$o['name']?>', '<?=$o['id']?>')" class="button">rename</a>
|
||||
<?/**/?>
|
||||
<a href="javascript:fmove('<?=$o['id']?>', '.')" class="button">move</a>
|
||||
<a href="javascript:fcopy('<?=$o['id']?>', '.')" class="button">copy</a>
|
||||
<?/*?>
|
||||
<a href="javascript:freplicate('<?=$o['name']?>', '<?=$o['id']?>')" class="button">replicate</a>
|
||||
<?/**/?>
|
||||
<?*/?>
|
||||
<a href="gbHtmlPerms.php?id=<?=$o['id']?>" class="button">permissions</a>
|
||||
<a href="gbHttp.php?act=delete&id=<?=$o['id']?>" class="button"
|
||||
onClick="return confirm('Delete object "<?=$o['name']?>"?')">DEL</a>
|
||||
|
|
|
@ -72,7 +72,6 @@ switch($_REQUEST['act']){
|
|||
if(PEAR::isError($r)) $_SESSION['alertMsg'] = $r->getMessage();
|
||||
$redirUrl = BROWSER."?id=$parid";
|
||||
break;
|
||||
/* NOT WORKING - sorry */
|
||||
case"move":
|
||||
$newPath = urlencode($_REQUEST['newPath']);
|
||||
$did = $gb->getObjIdFromRelPath($id, $newPath);
|
||||
|
@ -96,13 +95,14 @@ switch($_REQUEST['act']){
|
|||
}
|
||||
else $redirUrl = BROWSER."?id=$did";
|
||||
break;
|
||||
/* NOT WORKING - sorry
|
||||
case"repl":
|
||||
$unewpath = urlencode($_REQUEST['newpath']);
|
||||
$r = $gb->createReplica($id, $_REQUEST['newpath'], '', $sessid);
|
||||
if(PEAR::isError($r)) $_SESSION['alertMsg'] = $r->getMessage();
|
||||
$redirUrl = BROWSER."?id=$newparid";
|
||||
break;
|
||||
/* */
|
||||
*/
|
||||
case"delete":
|
||||
$parid = $gb->getparent($id);
|
||||
$r = $gb->deleteFile($id, $sessid);
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
|
||||
Author : $Author: tomas $
|
||||
Version : $Revision: 1.1 $
|
||||
Version : $Revision: 1.2 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/install/install.php,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -53,6 +53,10 @@ if(PEAR::isError($dbc)){
|
|||
$dbc->setFetchMode(DB_FETCHMODE_ASSOC);
|
||||
$gb = &new GreenBox(&$dbc, $config);
|
||||
|
||||
echo "\nIMPORTANT settings:\n";
|
||||
echo " Makefile: HTTP_GROUP - group of running http daemon\n";
|
||||
echo " var/xmlrpc/testRunner.sh: XMLRPC - URL of XMLRPC server\n\n";
|
||||
|
||||
echo "Storage: Install ...\n";
|
||||
$dbc->setErrorHandling(PEAR_ERROR_RETURN);
|
||||
$gb->uninstall();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue