Group preferences added.
This commit is contained in:
parent
997d80d406
commit
771a443d1f
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
|
|
||||||
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/Prefs.php,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/Prefs.php,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -52,6 +52,7 @@ class Prefs{
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ======================================================= public methods */
|
/* ======================================================= public methods */
|
||||||
|
/* ----------------------------------------------------- user preferences */
|
||||||
/**
|
/**
|
||||||
* Read preference record by session id
|
* Read preference record by session id
|
||||||
*
|
*
|
||||||
|
@ -125,11 +126,75 @@ class Prefs{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ---------------------------------------------------- group preferences */
|
||||||
|
/**
|
||||||
|
* Read group preference record
|
||||||
|
*
|
||||||
|
* @param sessid string, session id
|
||||||
|
* @param grname string, group name
|
||||||
|
* @param key string, preference key
|
||||||
|
* @return string, preference value
|
||||||
|
*/
|
||||||
|
function loadGroupPref($sessid, $grname, $key)
|
||||||
|
{
|
||||||
|
$subjid = $this->gb->getSubjId($grname);
|
||||||
|
if(PEAR::isError($subjid)) return $subjid;
|
||||||
|
if(is_null($subjid)){
|
||||||
|
return PEAR::raiseError(
|
||||||
|
"Prefs::loadGroupPref: invalid group name", ALIBERR_NOTGR);
|
||||||
|
}
|
||||||
|
$val = $this->readVal($subjid, $key);
|
||||||
|
if(PEAR::isError($val)) return $val;
|
||||||
|
if($val === FALSE){
|
||||||
|
return PEAR::raiseError(
|
||||||
|
"Prefs::loadGroupPref: invalid preference key", GBERR_PREF);
|
||||||
|
}
|
||||||
|
return $val;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Save group preference record
|
||||||
|
*
|
||||||
|
* @param sessid string, session id
|
||||||
|
* @param grname string, group name
|
||||||
|
* @param key string, preference key
|
||||||
|
* @param value string, preference value
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
function saveGroupPref($sessid, $grname, $key, $value)
|
||||||
|
{
|
||||||
|
$uid = $this->gb->getSessUserId($sessid);
|
||||||
|
if(PEAR::isError($uid)) return $uid;
|
||||||
|
if(is_null($uid)){
|
||||||
|
return PEAR::raiseError(
|
||||||
|
"Prefs::loadGroupPref: invalid session id", GBERR_SESS);
|
||||||
|
}
|
||||||
|
$gid = $this->gb->getSubjId($grname);
|
||||||
|
if(PEAR::isError($gid)) return $gid;
|
||||||
|
if(is_null($gid)){
|
||||||
|
return PEAR::raiseError(
|
||||||
|
"Prefs::saveGroupPref: invalid group name", GBERR_SESS);
|
||||||
|
}
|
||||||
|
$memb = $this->gb->isMemberOf($uid, $gid);
|
||||||
|
if(PEAR::isError($memb)) return $memb;
|
||||||
|
if(!$memb){
|
||||||
|
return PEAR::raiseError(
|
||||||
|
"Prefs::saveGroupPref: access denied", GBERR_DENY);
|
||||||
|
}
|
||||||
|
$r = $this->update($gid, $key, $value);
|
||||||
|
if(PEAR::isError($r)) return $r;
|
||||||
|
if($r === FALSE){
|
||||||
|
$r = $this->insert($gid, $key, $value);
|
||||||
|
if(PEAR::isError($r)) return $r;
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/* ===================================================== gb level methods */
|
/* ===================================================== gb level methods */
|
||||||
/**
|
/**
|
||||||
* Insert of new preference record
|
* Insert of new preference record
|
||||||
*
|
*
|
||||||
* @param subjid int, local user id
|
* @param subjid int, local user/group id
|
||||||
* @param keystr string, preference key
|
* @param keystr string, preference key
|
||||||
* @param valstr string, preference value
|
* @param valstr string, preference value
|
||||||
* @return int, local user id
|
* @return int, local user id
|
||||||
|
@ -151,7 +216,7 @@ class Prefs{
|
||||||
/**
|
/**
|
||||||
* Read value of preference record
|
* Read value of preference record
|
||||||
*
|
*
|
||||||
* @param subjid int, local user id
|
* @param subjid int, local user/group id
|
||||||
* @param keystr string, preference key
|
* @param keystr string, preference key
|
||||||
* @return string, preference value
|
* @return string, preference value
|
||||||
*/
|
*/
|
||||||
|
@ -169,7 +234,7 @@ class Prefs{
|
||||||
/**
|
/**
|
||||||
* Update value of preference record
|
* Update value of preference record
|
||||||
*
|
*
|
||||||
* @param subjid int, local user id
|
* @param subjid int, local user/group id
|
||||||
* @param keystr string, preference key
|
* @param keystr string, preference key
|
||||||
* @param newvalstr string, new preference value
|
* @param newvalstr string, new preference value
|
||||||
* @return boolean
|
* @return boolean
|
||||||
|
@ -189,7 +254,7 @@ class Prefs{
|
||||||
/**
|
/**
|
||||||
* Delete preference record
|
* Delete preference record
|
||||||
*
|
*
|
||||||
* @param subjid int, local user id
|
* @param subjid int, local user/group id
|
||||||
* @param keystr string, preference key
|
* @param keystr string, preference key
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
|
@ -252,6 +317,9 @@ class Prefs{
|
||||||
ON {$this->prefTable} (subjid, keystr)");
|
ON {$this->prefTable} (subjid, keystr)");
|
||||||
$this->dbc->query("CREATE INDEX {$this->prefTable}_subjid_idx
|
$this->dbc->query("CREATE INDEX {$this->prefTable}_subjid_idx
|
||||||
ON {$this->prefTable} (subjid)");
|
ON {$this->prefTable} (subjid)");
|
||||||
|
$stPrefGr = $this->gb->getSubjId('StationPrefs');
|
||||||
|
$r = $this->insert($stPrefGr, 'stationName', "Radio Station 1");
|
||||||
|
if(PEAR::isError($r)) echo $r->getMessage()."\n";
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: tomas $
|
Author : $Author: tomas $
|
||||||
Version : $Revision: 1.7 $
|
Version : $Revision: 1.8 $
|
||||||
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 $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -63,6 +63,7 @@ $config = array(
|
||||||
),
|
),
|
||||||
'tblNamePrefix' => 'ls_',
|
'tblNamePrefix' => 'ls_',
|
||||||
'authCookieName'=> 'lssid',
|
'authCookieName'=> 'lssid',
|
||||||
|
'StationPrefsGr'=> 'StationPrefs',
|
||||||
'storageDir' => dirname(getcwd()).'/stor',
|
'storageDir' => dirname(getcwd()).'/stor',
|
||||||
'bufferDir' => dirname(getcwd()).'/stor/buffer',
|
'bufferDir' => dirname(getcwd()).'/stor/buffer',
|
||||||
'transDir' => dirname(getcwd()).'/trans',
|
'transDir' => dirname(getcwd()).'/trans',
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: tomas $
|
Author : $Author: tomas $
|
||||||
Version : $Revision: 1.9 $
|
Version : $Revision: 1.10 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/xmlrpc/XR_LocStor.php,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/xmlrpc/XR_LocStor.php,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -1166,9 +1166,14 @@ class XR_LocStor extends LocStor{
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>audioClipResults : array with gunid strings
|
* <li>audioClipResults : array with gunid strings
|
||||||
* of audioClips have been found</li>
|
* of audioClips have been found</li>
|
||||||
|
* <li>audioClipCnt : int - number of audioClips matching
|
||||||
|
* the criteria</li>
|
||||||
* <li>playlistResults : array with gunid strings
|
* <li>playlistResults : array with gunid strings
|
||||||
* of playlists have been found</li>
|
* of playlists have been found</li>
|
||||||
|
* <li>playlistCnt : int - number of playlists matching
|
||||||
|
* the criteria</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
|
* (cnt values may be greater than size of arrays - see limit param)
|
||||||
*
|
*
|
||||||
* On errors, returns an XML-RPC error response.
|
* On errors, returns an XML-RPC error response.
|
||||||
* The possible error codes and error message are:
|
* The possible error codes and error message are:
|
||||||
|
@ -1196,7 +1201,23 @@ class XR_LocStor extends LocStor{
|
||||||
" ".$res->getUserInfo()
|
" ".$res->getUserInfo()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return new XML_RPC_Response(XML_RPC_encode($res));
|
# return new XML_RPC_Response(XML_RPC_encode($res));
|
||||||
|
$xv = new XML_RPC_Value;
|
||||||
|
$xv->addStruct(array(
|
||||||
|
'audioClipCnt' => XML_RPC_encode($res['audioClipCnt']),
|
||||||
|
'playlistCnt' => XML_RPC_encode($res['playlistCnt']),
|
||||||
|
'audioClipResults' =>
|
||||||
|
(count($res['audioClipResults'])==0
|
||||||
|
? new XML_RPC_Value(array(), 'array')
|
||||||
|
: XML_RPC_encode($res['audioClipResults'])
|
||||||
|
),
|
||||||
|
'playlistResults' =>
|
||||||
|
(count($res['playlistResults'])==0
|
||||||
|
? new XML_RPC_Value(array(), 'array')
|
||||||
|
: XML_RPC_encode($res['playlistResults'])
|
||||||
|
),
|
||||||
|
));
|
||||||
|
return $xv;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------- methods for preferences */
|
/* ---------------------------------------------- methods for preferences */
|
||||||
|
@ -1351,6 +1372,114 @@ class XR_LocStor extends LocStor{
|
||||||
return new XML_RPC_Response(XML_RPC_encode(array('status'=>$res)));
|
return new XML_RPC_Response(XML_RPC_encode(array('status'=>$res)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Read group preference record
|
||||||
|
*
|
||||||
|
* The XML-RPC name of this method is "locstor.loadGroupPref".
|
||||||
|
*
|
||||||
|
* The input parameters are an XML-RPC struct with the following
|
||||||
|
* fields:
|
||||||
|
* <ul>
|
||||||
|
* <li> sessid : string - session id </li>
|
||||||
|
* <li> group : string - group name </li>
|
||||||
|
* <li> key : string - preference key </li>
|
||||||
|
* </ul>
|
||||||
|
*
|
||||||
|
* On success, returns a XML-RPC struct with single field:
|
||||||
|
* <ul>
|
||||||
|
* <li> value : string - preference value </li>
|
||||||
|
* </ul>
|
||||||
|
*
|
||||||
|
* On errors, returns an XML-RPC error response.
|
||||||
|
* The possible error codes and error message are:
|
||||||
|
* <ul>
|
||||||
|
* <li> 3 - Incorrect parameters passed to method:
|
||||||
|
* Wanted ... , got ... at param </li>
|
||||||
|
* <li> 801 - wrong 1st parameter, struct expected.</li>
|
||||||
|
* <li> 805 - xr_loadGroupPref:
|
||||||
|
* <message from lower layer> </li>
|
||||||
|
* <li> 820 - invalid group name.</li>
|
||||||
|
* <li> 848 - invalid session id.</li>
|
||||||
|
* <li> 849 - invalid preference key.</li>
|
||||||
|
* </ul>
|
||||||
|
*
|
||||||
|
* @param input XMLRPC struct
|
||||||
|
* @return XMLRPC struct
|
||||||
|
* @see Pref::loadGroupPref
|
||||||
|
*/
|
||||||
|
function xr_loadGroupPref($input)
|
||||||
|
{
|
||||||
|
list($ok, $r) = $this->_xr_getPars($input);
|
||||||
|
if(!$ok) return $r;
|
||||||
|
require_once '../../../storageServer/var/Prefs.php';
|
||||||
|
$pr =& new Prefs(&$this);
|
||||||
|
$res = $pr->loadGroupPref($r['sessid'], $r['group'], $r['key']);
|
||||||
|
if(PEAR::isError($res)){
|
||||||
|
$ec0 = intval($res->getCode());
|
||||||
|
$ec = (
|
||||||
|
$ec0 == GBERR_SESS || $ec0 == GBERR_PREF || $ec0==ALIBERR_NOTGR
|
||||||
|
? 800+$ec0 : 805
|
||||||
|
);
|
||||||
|
return new XML_RPC_Response(0, $ec,
|
||||||
|
"xr_getAudioClip: ".$res->getMessage()." ".$res->getUserInfo()
|
||||||
|
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return new XML_RPC_Response(XML_RPC_encode(array('value'=>$res)));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Save group preference record
|
||||||
|
*
|
||||||
|
* The XML-RPC name of this method is "locstor.saveGroupPref".
|
||||||
|
*
|
||||||
|
* The input parameters are an XML-RPC struct with the following
|
||||||
|
* fields:
|
||||||
|
* <ul>
|
||||||
|
* <li> sessid : string - session id </li>
|
||||||
|
* <li> group : string - group name </li>
|
||||||
|
* <li> key : string - preference key </li>
|
||||||
|
* <li> value : string - preference value </li>
|
||||||
|
* </ul>
|
||||||
|
*
|
||||||
|
* On success, returns a XML-RPC struct with single field:
|
||||||
|
* <ul>
|
||||||
|
* <li> status : boolean</li>
|
||||||
|
* </ul>
|
||||||
|
*
|
||||||
|
* On errors, returns an XML-RPC error response.
|
||||||
|
* The possible error codes and error message are:
|
||||||
|
* <ul>
|
||||||
|
* <li> 3 - Incorrect parameters passed to method:
|
||||||
|
* Wanted ... , got ... at param </li>
|
||||||
|
* <li> 801 - wrong 1st parameter, struct expected.</li>
|
||||||
|
* <li> 805 - xr_saveGroupPref:
|
||||||
|
* <message from lower layer> </li>
|
||||||
|
* <li> 820 - invalid group name.</li>
|
||||||
|
* <li> 848 - invalid session id.</li>
|
||||||
|
* </ul>
|
||||||
|
*
|
||||||
|
* @param input XMLRPC struct
|
||||||
|
* @return XMLRPC struct
|
||||||
|
* @see Pref::saveGroupPref
|
||||||
|
*/
|
||||||
|
function xr_saveGroupPref($input)
|
||||||
|
{
|
||||||
|
list($ok, $r) = $this->_xr_getPars($input);
|
||||||
|
if(!$ok) return $r;
|
||||||
|
require_once '../../../storageServer/var/Prefs.php';
|
||||||
|
$pr =& new Prefs(&$this);
|
||||||
|
$res = $pr->saveGroupPref($r['sessid'], $r['group'], $r['key'], $r['value']);
|
||||||
|
if(PEAR::isError($res)){
|
||||||
|
$ec0 = intval($res->getCode());
|
||||||
|
$ec = ($ec0==GBERR_SESS || $ec0==ALIBERR_NOTGR ? 800+$ec0 : 805 );
|
||||||
|
return new XML_RPC_Response(0, $ec,
|
||||||
|
"xr_getAudioClip: ".$res->getMessage()." ".$res->getUserInfo()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return new XML_RPC_Response(XML_RPC_encode(array('status'=>$res)));
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- remote repository methods */
|
/* -------------------------------------------- remote repository methods */
|
||||||
/**
|
/**
|
||||||
* Starts upload audioclip to remote archive
|
* Starts upload audioclip to remote archive
|
||||||
|
@ -1466,7 +1595,8 @@ class XR_LocStor extends LocStor{
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>trtype: string - audioclip | playlist</li>
|
* <li>trtype: string - audioclip | playlist</li>
|
||||||
* <li>direction: string - up | down</li>
|
* <li>direction: string - up | down</li>
|
||||||
* <li>status: boolean</li>
|
* <li>status: boolean - true if file have been
|
||||||
|
* succesfully transported</li>
|
||||||
* <li>expectedsize: int - expected size</li>
|
* <li>expectedsize: int - expected size</li>
|
||||||
* <li>realsize: int - size of transported file</li>
|
* <li>realsize: int - size of transported file</li>
|
||||||
* <li>expectedsum: string - expected checksum</li>
|
* <li>expectedsum: string - expected checksum</li>
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Author : $Author: tomas $
|
# Author : $Author: tomas $
|
||||||
# Version : $Revision: 1.17 $
|
# Version : $Revision: 1.18 $
|
||||||
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/xmlrpc/testRunner.sh,v $
|
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/xmlrpc/testRunner.sh,v $
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -231,9 +231,9 @@ deletePlaylist() {
|
||||||
prefTest() {
|
prefTest() {
|
||||||
PREFKEY="testKey"
|
PREFKEY="testKey"
|
||||||
PREFVAL="test preference value"
|
PREFVAL="test preference value"
|
||||||
echo -n "# savePref: "
|
echo -n "# savePref ($PREFKEY): "
|
||||||
$XR_CLI savePref $SESSID "$PREFKEY" "$PREFVAL"|| exit $?
|
$XR_CLI savePref $SESSID "$PREFKEY" "$PREFVAL"|| exit $?
|
||||||
echo -n "# loadPref: "
|
echo -n "# loadPref ($PREFKEY): "
|
||||||
VAL=`$XR_CLI loadPref $SESSID "$PREFKEY"` || \
|
VAL=`$XR_CLI loadPref $SESSID "$PREFKEY"` || \
|
||||||
{ ERN=$?; echo $VAL; exit $ERN; }
|
{ ERN=$?; echo $VAL; exit $ERN; }
|
||||||
echo "$VAL "
|
echo "$VAL "
|
||||||
|
@ -255,6 +255,28 @@ prefTest() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
groupPrefTest() {
|
||||||
|
PREFKEY="Station frequency"
|
||||||
|
PREFVAL="89.5 FM"
|
||||||
|
GR="StationPrefs"
|
||||||
|
echo -n "# saveGroupPref ($PREFKEY): "
|
||||||
|
$XR_CLI saveGroupPref $SESSID "$GR" "$PREFKEY" "$PREFVAL"|| exit $?
|
||||||
|
echo -n "# loadGroupPref ($PREFKEY): "
|
||||||
|
VAL=`$XR_CLI loadGroupPref $SESSID "$GR" "$PREFKEY"` || \
|
||||||
|
{ ERN=$?; echo $VAL; exit $ERN; }
|
||||||
|
echo "$VAL "
|
||||||
|
if [ "x$VAL" != "x$PREFVAL" ] ; then
|
||||||
|
echo " NOT MATCH"
|
||||||
|
echo " Expected:"; echo $PREFVAL
|
||||||
|
echo " Returned:"; echo $VAL
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "# pref value check: OK"
|
||||||
|
fi
|
||||||
|
echo -n "# saveGroupPref (clear it): "
|
||||||
|
$XR_CLI saveGroupPref $SESSID "$GR" "$PREFKEY" ""|| exit $?
|
||||||
|
}
|
||||||
|
|
||||||
logout() {
|
logout() {
|
||||||
echo -n "# logout: "
|
echo -n "# logout: "
|
||||||
$XR_CLI logout $SESSID || exit $?
|
$XR_CLI logout $SESSID || exit $?
|
||||||
|
@ -264,6 +286,7 @@ preferenceTest(){
|
||||||
echo "#XMLRPC preference test"
|
echo "#XMLRPC preference test"
|
||||||
login
|
login
|
||||||
prefTest
|
prefTest
|
||||||
|
groupPrefTest
|
||||||
logout
|
logout
|
||||||
echo "#XMLRPC: preference: OK."
|
echo "#XMLRPC: preference: OK."
|
||||||
echo ""
|
echo ""
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: tomas $
|
Author : $Author: tomas $
|
||||||
Version : $Revision: 1.18 $
|
Version : $Revision: 1.19 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/xmlrpc/xrLocStor.php,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/xmlrpc/xrLocStor.php,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -117,6 +117,8 @@ $methods = array(
|
||||||
'loadPref' => 'Load user preference value.',
|
'loadPref' => 'Load user preference value.',
|
||||||
'savePref' => 'Save user preference value.',
|
'savePref' => 'Save user preference value.',
|
||||||
'delPref' => 'Delete user preference record.',
|
'delPref' => 'Delete user preference record.',
|
||||||
|
'loadGroupPref' => 'Read group preference record.',
|
||||||
|
'saveGroupPref' => 'Delete user preference record.',
|
||||||
|
|
||||||
'uploadToArchive' => 'Starts upload audioclip to remote archive.',
|
'uploadToArchive' => 'Starts upload audioclip to remote archive.',
|
||||||
'downloadFromArchive' => 'Starts download audioclip from remote archive.',
|
'downloadFromArchive' => 'Starts download audioclip from remote archive.',
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: tomas $
|
Author : $Author: tomas $
|
||||||
Version : $Revision: 1.2 $
|
Version : $Revision: 1.3 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/xmlrpc/xr_cli_test.php,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/xmlrpc/xr_cli_test.php,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -37,7 +37,9 @@ if($pars[0] == '-v'){ $verbose = TRUE; array_shift($pars); }
|
||||||
if($pars[0] == '-s'){
|
if($pars[0] == '-s'){
|
||||||
array_shift($pars);
|
array_shift($pars);
|
||||||
$serverPath = array_shift($pars);
|
$serverPath = array_shift($pars);
|
||||||
}else $serverPath = 'http://localhost:80/livesupportStorageServer/xmlrpc/xrLocStor.php';
|
}else{
|
||||||
|
$serverPath = 'http://localhost:80/livesupportStorageServer/xmlrpc/xrLocStor.php';
|
||||||
|
}
|
||||||
|
|
||||||
#$serverPath = "http://localhost:80/livesupportStorageServerCVS/xmlrpc/xrLocStor.php";
|
#$serverPath = "http://localhost:80/livesupportStorageServerCVS/xmlrpc/xrLocStor.php";
|
||||||
|
|
||||||
|
@ -122,6 +124,10 @@ $infos = array(
|
||||||
'p'=>array('sessid', 'key', 'value'), 'r'=>'status'),
|
'p'=>array('sessid', 'key', 'value'), 'r'=>'status'),
|
||||||
"delPref" => array('m'=>"locstor.delPref",
|
"delPref" => array('m'=>"locstor.delPref",
|
||||||
'p'=>array('sessid', 'key'), 'r'=>'status'),
|
'p'=>array('sessid', 'key'), 'r'=>'status'),
|
||||||
|
"loadGroupPref" => array('m'=>"locstor.loadGroupPref",
|
||||||
|
'p'=>array('sessid', 'group', 'key'), 'r'=>'value'),
|
||||||
|
"saveGroupPref" => array('m'=>"locstor.saveGroupPref",
|
||||||
|
'p'=>array('sessid', 'group', 'key', 'value'), 'r'=>'status'),
|
||||||
|
|
||||||
"uploadToArchive" => array('m'=>"locstor.uploadToArchive",
|
"uploadToArchive" => array('m'=>"locstor.uploadToArchive",
|
||||||
'p'=>array('sessid', 'gunid'), 'r'=>'trtok'),
|
'p'=>array('sessid', 'gunid'), 'r'=>'trtok'),
|
||||||
|
|
Loading…
Reference in New Issue