Documentation tags for doxugen added.
This commit is contained in:
parent
88df4ba4fc
commit
3490c97746
|
@ -23,13 +23,19 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: tomas $
|
Author : $Author: tomas $
|
||||||
Version : $Revision: 1.5 $
|
Version : $Revision: 1.6 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/conf.php,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/conf.php,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \file conf.php
|
||||||
|
* storageServer configuration file
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* configuration structure:
|
* configuration structure:
|
||||||
|
*
|
||||||
* <dl>
|
* <dl>
|
||||||
* <dt>dsn<dd> datasource setting
|
* <dt>dsn<dd> datasource setting
|
||||||
* <dt>tblNamePrefix <dd>prefix for table names in the database
|
* <dt>tblNamePrefix <dd>prefix for table names in the database
|
||||||
|
|
|
@ -23,10 +23,38 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: tomas $
|
Author : $Author: tomas $
|
||||||
Version : $Revision: 1.1 $
|
Version : $Revision: 1.2 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/xmlrpc/put.php,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/xmlrpc/put.php,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \file put.php
|
||||||
|
* Store PUT data as temporary file.
|
||||||
|
*
|
||||||
|
* put.php is remote callable script through HTTP PUT method.
|
||||||
|
* Requires token returned by appropriate storageServer XMLRPC call.
|
||||||
|
* Appropriate closing XMLRPC call should follow.
|
||||||
|
*
|
||||||
|
* This script accepts following HTTP GET parameter:
|
||||||
|
* <ul>
|
||||||
|
* <li>token : string, put token returned by appropriate
|
||||||
|
* XMLRPC call</li>
|
||||||
|
* </ul>
|
||||||
|
*
|
||||||
|
* On success, returns HTTP return code 200.
|
||||||
|
*
|
||||||
|
* On errors, returns HTTP return code >200
|
||||||
|
* The possible error codes are:
|
||||||
|
* <ul>
|
||||||
|
* <li> 400 - Incorrect parameters passed to method</li>
|
||||||
|
* <li> 403 - Access denied</li>
|
||||||
|
* <li> 500 - Application error</li>
|
||||||
|
* </ul>
|
||||||
|
*
|
||||||
|
* @see XR_LocStor
|
||||||
|
*/
|
||||||
|
|
||||||
require_once '../conf.php';
|
require_once '../conf.php';
|
||||||
require_once 'DB.php';
|
require_once 'DB.php';
|
||||||
require_once '../LocStor.php';
|
require_once '../LocStor.php';
|
||||||
|
@ -36,8 +64,6 @@ $dbc = DB::connect($config['dsn'], TRUE);
|
||||||
$dbc->setFetchMode(DB_FETCHMODE_ASSOC);
|
$dbc->setFetchMode(DB_FETCHMODE_ASSOC);
|
||||||
$gb = &new GreenBox(&$dbc, $config);
|
$gb = &new GreenBox(&$dbc, $config);
|
||||||
|
|
||||||
$token = $_REQUEST['token'];
|
|
||||||
|
|
||||||
function http_error($code, $err){
|
function http_error($code, $err){
|
||||||
header("HTTP/1.1 $code");
|
header("HTTP/1.1 $code");
|
||||||
header("Content-type: text/plain; charset=UTF-8");
|
header("Content-type: text/plain; charset=UTF-8");
|
||||||
|
@ -45,9 +71,15 @@ function http_error($code, $err){
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(preg_match("|^[0-9a-f]{32}$|", $_REQUEST['token'])){
|
||||||
|
$token = $_REQUEST['token'];
|
||||||
|
}else{
|
||||||
|
http_error(400, "Error on token parameter. ({$_REQUEST['token']})");
|
||||||
|
}
|
||||||
|
|
||||||
$tc = $gb->bsCheckToken($token, 'put');
|
$tc = $gb->bsCheckToken($token, 'put');
|
||||||
if(PEAR::isError($tc)){ echo "ERR".$tc->getMessage()."\n"; exit; }
|
if(PEAR::isError($tc)){ http_error(500, $ex->getMessage()); }
|
||||||
if(!$tc){ http_error(410, "Token not valid."); }
|
if(!$tc){ http_error(403, "Token not valid."); }
|
||||||
#var_dump($tc); exit;
|
#var_dump($tc); exit;
|
||||||
|
|
||||||
header("Content-type: text/plain");
|
header("Content-type: text/plain");
|
||||||
|
|
|
@ -23,15 +23,17 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: tomas $
|
Author : $Author: tomas $
|
||||||
Version : $Revision: 1.3 $
|
Version : $Revision: 1.4 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/xmlrpc/simpleGet.php,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/xmlrpc/simpleGet.php,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* simpleGet.php is remote callable script through HTTP GET method.
|
* \file simpleGet.php
|
||||||
* Returns stored media file identified by global unique ID.
|
* Returns stored media file identified by global unique ID.
|
||||||
* Requires valid session ID and read permission for requested file.
|
*
|
||||||
|
* simpleGet.php is remote callable script through HTTP GET method.
|
||||||
|
* Requires valid session ID with read permission for requested file.
|
||||||
*
|
*
|
||||||
* This script accepts following HTTP GET parameters:
|
* This script accepts following HTTP GET parameters:
|
||||||
* <ul>
|
* <ul>
|
||||||
|
|
Loading…
Reference in New Issue