diff --git a/livesupport/modules/storageServer/Makefile b/livesupport/modules/storageServer/Makefile index 52c126d29..4b5817317 100644 --- a/livesupport/modules/storageServer/Makefile +++ b/livesupport/modules/storageServer/Makefile @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------- -# Storage - file storage component +# StorageServer - file storage component # Copyright (c) 2004 Media Development Loan Fund # # This file is part of the LiveSupport project. @@ -20,7 +20,7 @@ # # # Author : $Author: tomas $ -# Version : $Revision: 1.2 $ +# Version : $Revision: 1.3 $ # Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/Attic/Makefile,v $ # # @configure_input@ @@ -63,6 +63,7 @@ USR_LIB_DIR = ${USR_DIR}/lib DOXYGEN_CONFIG = ${ETC_DIR}/doxygen.config HTTP_GROUP = apache +#HTTP_GROUP = nobody PHP_DIR = ${BASE_DIR}/var INSTALL_DIR = ${PHP_DIR}/install @@ -90,7 +91,8 @@ TEST_RUNNER = ${PHP_DIR}/xmlrpc/testRunner.sh #------------------------------------------------------------------------------- # Targets #------------------------------------------------------------------------------- -.PHONY: all dir_setup doc clean docclean depclean distclean dist db_init db_clean +.PHONY: all dir_setup doc clean docclean depclean distclean dist \ + db_init db_clean transtest all: dir_setup db_init @@ -117,6 +119,10 @@ check: all ${TEST_RUNNER} #------------------------------------------------------------------------------- # Specific targets #------------------------------------------------------------------------------- +transtest: + @echo "Transfer module test (needs ArchiveServer installed):" + cd var/tests; php -q transTest.php + db_init: cd var/install; php -q install.php @@ -130,6 +136,8 @@ ${DOXYGEN_DIR}: ${MKDIR} ${DOXYGEN_DIR} ${STOR_DIR}: + @echo "Http daemon group have set in Makefile: ${HTTP_GROUP}" + @echo "You should be in this group for easy testing" ${MKDIR} ${STOR_DIR} chown .${HTTP_GROUP} ${STOR_DIR} chmod g+ws ${STOR_DIR} diff --git a/livesupport/modules/storageServer/etc/doxygen.config b/livesupport/modules/storageServer/etc/doxygen.config index b7ab0713a..3646db426 100644 --- a/livesupport/modules/storageServer/etc/doxygen.config +++ b/livesupport/modules/storageServer/etc/doxygen.config @@ -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/etc/doxygen.config,v $ #------------------------------------------------------------------------------- @@ -43,7 +43,7 @@ # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. -PROJECT_NAME = LiveSupport +PROJECT_NAME = LiveSupport - storageServer module # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or diff --git a/livesupport/modules/storageServer/var/GreenBox.php b/livesupport/modules/storageServer/var/GreenBox.php index 93bc998f6..36e6ea595 100644 --- a/livesupport/modules/storageServer/var/GreenBox.php +++ b/livesupport/modules/storageServer/var/GreenBox.php @@ -1,4 +1,4 @@ -sessid; $o[] = $this->addSubj('test1', 'a'); $o[] = $this->addSubj('test2', 'a'); diff --git a/livesupport/modules/storageServer/var/LocStor.php b/livesupport/modules/storageServer/var/LocStor.php index 39ff4bd9e..f8ecc0347 100644 --- a/livesupport/modules/storageServer/var/LocStor.php +++ b/livesupport/modules/storageServer/var/LocStor.php @@ -1,4 +1,4 @@ -addObj($tmpid , 'File', $parid); if(PEAR::isError($oid)) return $oid; $ac =& StoredFile::insert( - &$this, $oid, '', $mediaFileLP, $mdataFileLP + &$this, $oid, '', $mediaFileLP, $mdataFileLP, $gunid ); if(PEAR::isError($ac)) return $ac; $res = $this->renameFile($oid, $ac->gunid, $sessid); diff --git a/livesupport/modules/storageServer/var/StoredFile.php b/livesupport/modules/storageServer/var/StoredFile.php index dab9915df..d565ccabc 100644 --- a/livesupport/modules/storageServer/var/StoredFile.php +++ b/livesupport/modules/storageServer/var/StoredFile.php @@ -23,13 +23,13 @@ Author : $Author: tomas $ - Version : $Revision: 1.2 $ + Version : $Revision: 1.3 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/StoredFile.php,v $ ------------------------------------------------------------------------------*/ -require_once '../RawMediaData.php'; -require_once '../MetaData.php'; -require_once '../../../getid3/var/getid3.php'; +require_once "RawMediaData.php"; +require_once "MetaData.php"; +require_once "../../../getid3/var/getid3.php"; /** * StoredFile class @@ -77,11 +77,12 @@ class StoredFile{ * @param name string, name of new file * @param mediaFileLP string, local path to media file * @param mdataFileLP string, local path to metadata XML file + * @param gunid global unique id (optional) - for insert file with gunid * @return instace of StoredFile object */ - function insert(&$gb, $oid, $name, $mediaFileLP='', $mdataFileLP='') + function insert(&$gb, $oid, $name, $mediaFileLP='', $mdataFileLP='', $gunid=NULL) { - $ac =& new StoredFile(&$gb); + $ac =& new StoredFile(&$gb, ($gunid ? $gunid : NULL)); $ac->name = $name; $ac->id = $oid; $ac->type = "unKnown"; @@ -136,7 +137,9 @@ class StoredFile{ if(PEAR::isError($row)) return $row; if(is_null($row)){ return PEAR::raiseError( - "StoredFile::recall: fileobj not exist", GBERR_FOBJNEX); + "StoredFile::recall: fileobj not exist ($oid/$gunid)", + GBERR_FOBJNEX + ); } $ac =& new StoredFile(&$gb, $row['gunid']); $ac->type = $row['type']; @@ -157,7 +160,7 @@ class StoredFile{ WHERE tmpLink='$tmpLink' AND sessid='$sessid'"); if(PEAR::isError($gunid)) return $gunid; if(is_null($gunid)) return PEAR::raiseError( - "StoredFile::recallFromLink: accessobj not exist", GBERR_AOBJNEX); + "StoredFile::recallFromLink: accessobj not exist ($tmpLink)", GBERR_AOBJNEX); return StoredFile::recall(&$gb, '', $gunid); } /** diff --git a/livesupport/modules/storageServer/var/conf.php b/livesupport/modules/storageServer/var/conf.php index eb407008b..3bb89b167 100644 --- a/livesupport/modules/storageServer/var/conf.php +++ b/livesupport/modules/storageServer/var/conf.php @@ -1,4 +1,4 @@ - 'pgsql', 'database' => 'LiveSupport-test', ), - 'tblNamePrefix' => 'gb_', - 'authCookieName'=> 'gbsid', + 'tblNamePrefix' => 'ls_', + 'authCookieName'=> 'lssid', 'RootNode' => 'RootNode', 'tmpRootPass' => 'q', 'objtypes' => array( diff --git a/livesupport/modules/storageServer/var/html/gbHtmlBrowse.php b/livesupport/modules/storageServer/var/html/gbHtmlBrowse.php index 0d2cbc54e..d0c40e0f0 100644 --- a/livesupport/modules/storageServer/var/html/gbHtmlBrowse.php +++ b/livesupport/modules/storageServer/var/html/gbHtmlBrowse.php @@ -1,4 +1,4 @@ -\n"; print_r($_FILES); print_r($_REQUEST); print_r($_SERVER); exit; require_once"gbHtml_h.php"; require_once"gbHtmlTestAuth.php"; @@ -115,7 +115,7 @@ $tpldata['showMenu']=true; function newFolder(){ var nn=prompt('New folder name:'); if(nn==null) return; - location.href='gbHttp.php?id=&act=newFolder&newname='+nn; + location.href='gbHttp.php?id=&act=newFolder&newname='+nn; } --> @@ -123,117 +123,117 @@ $tpldata['showMenu']=true;
Logged as:
logout
- Permission editor
+ Permission editor
User/Group editor
- +

Home directory - Upload new file + Upload new file Create new folder - Search + Search

- + - +

- Tree   - - - / - : + Tree   + + + / + : - permissions + permissions

- + - - - - + + + +
- - + + - + - + - +
- href="gbHtmlBrowse.php?id=">href="gbHtmlBrowse.php?id="> - 'D', 'File'=>'F', 'Replica'=>'R'); echo$a[$o['type']]?> -  rename -  move -  copy - -  replicate - -  permissions -  DEL - -  Access -  Analyze -  MetaData - - -   (->) - + 'D', 'File'=>'F', 'Replica'=>'R'); echo$a[$o['type']]?> +  rename +  move +  copy + +  replicate + +  permissions +  DEL + +  Access +  Analyze +  MetaData + + +   (->) +
No objects
- + - +
-?> +?> - + - + +
File name:
Media file:
Metadata file:
- + + $descr){?> + + -
- +
- + - +
Search string:
- +
- + - + - +