[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [6687] merge 6681:6686 from trunk
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [6687] merge 6681:6686 from trunk |
Date: |
Tue, 21 Dec 2010 10:03:33 +0000 |
Revision: 6687
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6687
Author: sigurdne
Date: 2010-12-21 10:03:32 +0000 (Tue, 21 Dec 2010)
Log Message:
-----------
merge 6681:6686 from trunk
Modified Paths:
--------------
branches/Version-1_0-branch/phpgwapi/inc/xmlrpc/lib/xmlrpc.inc
branches/Version-1_0-branch/phpgwapi/inc/xmlrpc/lib/xmlrpcs.inc
branches/Version-1_0-branch/property/inc/class.sotts.inc.php
branches/Version-1_0-branch/soap.php
branches/Version-1_0-branch/xmlrpc.php
Property Changed:
----------------
branches/Version-1_0-branch/
Property changes on: branches/Version-1_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
-
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680
+
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686
Modified: branches/Version-1_0-branch/phpgwapi/inc/xmlrpc/lib/xmlrpc.inc
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/xmlrpc/lib/xmlrpc.inc
2010-12-20 15:10:20 UTC (rev 6686)
+++ branches/Version-1_0-branch/phpgwapi/inc/xmlrpc/lib/xmlrpc.inc
2010-12-21 10:03:32 UTC (rev 6687)
@@ -206,7 +206,8 @@
// The encoding used internally by PHP.
// String values received as xml will be converted to this, and php
strings will be converted to xml
// as if having been coded with this
- $GLOBALS['xmlrpc_internalencoding']='ISO-8859-1';
+ $GLOBALS['xmlrpc_internalencoding']='UTF-8';
+// $GLOBALS['xmlrpc_internalencoding']='ISO-8859-1';
$GLOBALS['xmlrpcName']='XML-RPC for PHP';
$GLOBALS['xmlrpcVersion']='3.0.0.beta';
@@ -3773,4 +3774,4 @@
}
}
-?>
\ No newline at end of file
+?>
Modified: branches/Version-1_0-branch/phpgwapi/inc/xmlrpc/lib/xmlrpcs.inc
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/xmlrpc/lib/xmlrpcs.inc
2010-12-20 15:10:20 UTC (rev 6686)
+++ branches/Version-1_0-branch/phpgwapi/inc/xmlrpc/lib/xmlrpcs.inc
2010-12-21 10:03:32 UTC (rev 6687)
@@ -1243,4 +1243,4 @@
print $r->serialize();
}
}
-?>
\ No newline at end of file
+?>
Modified: branches/Version-1_0-branch/property/inc/class.sotts.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.sotts.inc.php
2010-12-20 15:10:20 UTC (rev 6686)
+++ branches/Version-1_0-branch/property/inc/class.sotts.inc.php
2010-12-21 10:03:32 UTC (rev 6687)
@@ -39,11 +39,25 @@
var $uicols_related = array();
var $acl_location = '.ticket';
- var $soap_enabled = array
+ public $soap_functions = array
(
- 'read' => true
+ 'read' => array(
+ 'in' => array('array'),
+ 'out' => array('array')
+ )
);
+
+ public $xmlrpc_methods = array
+ (
+ array
+ (
+ 'name' => 'read',
+ 'decription' => 'Get list of tickets'
+ )
+ );
+
+
function __construct()
{
$this->account =
(int)$GLOBALS['phpgw_info']['user']['account_id'];
@@ -55,6 +69,40 @@
$this->dateformat =
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
}
+
+ function list_methods($_type='xmlrpc')
+ {
+ /*
+ This handles introspection or discovery by the logged
in client,
+ in which case the input might be an array. The
server always calls
+ this function to fill the server dispatch map using a
string.
+ */
+ if (is_array($_type))
+ {
+ $_type = $_type['type'] ? $_type['type'] :
$_type[0];
+ }
+ switch($_type)
+ {
+ case 'xmlrpc':
+ $xml_functions = array(
+ 'read' => array(
+ 'function' => 'read',
+ 'signature' =>
array(array(xmlrpcArray,xmlrpcArray)),
+ 'docstring' => 'Get
list of tickets'
+ ),
+ );
+ return $xml_functions;
+ break;
+ case 'soap':
+ return $this->soap_functions;
+ break;
+ default:
+ return array();
+ break;
+ }
+ }
+
+
function get_category_name($cat_id)
{
$this->db->query("SELECT descr FROM fm_tts_category
WHERE id='$cat_id' ");
Modified: branches/Version-1_0-branch/soap.php
===================================================================
--- branches/Version-1_0-branch/soap.php 2010-12-20 15:10:20 UTC (rev
6686)
+++ branches/Version-1_0-branch/soap.php 2010-12-21 10:03:32 UTC (rev
6687)
@@ -120,7 +120,7 @@
function hello($someone)
{
- return "Hello " . $someone . "! - SOAP 1.2";
+ return "Hello " . $someone . " ! - SOAP 1.2";
}
$functions[] = 'hello';
@@ -166,10 +166,10 @@
if ( !$invalid_data
&& is_object($obj)
- && isset($obj->soap_enabled)
- && is_array($obj->soap_enabled)
- && isset($obj->soap_enabled[$data['method']])
- && $obj->soap_enabled[$data['method']])
+ && isset($obj->soap_functions)
+ && is_array($obj->soap_functions)
+ && isset($obj->soap_functions[$data['method']])
+ && $obj->soap_functions[$data['method']])
{
return $obj->$data['method']($data['input']);
}
Modified: branches/Version-1_0-branch/xmlrpc.php
===================================================================
--- branches/Version-1_0-branch/xmlrpc.php 2010-12-20 15:10:20 UTC (rev
6686)
+++ branches/Version-1_0-branch/xmlrpc.php 2010-12-21 10:03:32 UTC (rev
6687)
@@ -43,7 +43,7 @@
* Include phpgroupware header
*/
- include_once('header.inc.php');
+ require_once 'header.inc.php';
unset($GLOBALS['phpgw_info']['flags']['noapi']);
$GLOBALS['phpgw_info']['flags']['authed'] = false;
@@ -83,7 +83,7 @@
// If XML-RPC isn't enabled in PHP, return an XML-RPC response stating
so
if (! function_exists('xmlrpc_server_create'))
{
- echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n";
+ echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
echo "<methodResponse>\n";
echo "<fault>\n";
echo " <value>\n";
@@ -110,7 +110,7 @@
// Return all PHP errors as faults
- $GLOBALS['xmlrpc_server'] = xmlrpc_server_create();
+
error_reporting(E_ERROR | E_WARNING | E_PARSE);
set_error_handler('xmlrpc_custom_error');
@@ -131,7 +131,6 @@
// domain is invalid
xmlrpc_error(1001,'not a valid domain');
}
-// xmlrpc_error(1001,$headers['Authorization']);
if ( isset($headers['Authorization'])
&& ereg('Basic', $headers['Authorization']) )
@@ -184,7 +183,11 @@
xmlrpc_error(1001,'Access not permitted');
}
- echo
xmlrpc_server_call_method($GLOBALS['xmlrpc_server'],$request_xml,'');
+ //$output_options = array( "output_type" => "xml",
"verbosity" => "pretty", "escaping" => array("markup", "non-ascii",
"non-print"), "version" => "xmlrpc", "encoding" => "utf-8" );
+ //$output_options = array('output_type' => 'php',
'version' => 'xmlrpc', 'encoding' => 'UTF-8');
+ $output_options = array('encoding' => 'UTF-8');
+
+ echo
xmlrpc_server_call_method($GLOBALS['xmlrpc_server'],$request_xml,
null,$output_options);
xmlrpc_server_destroy($GLOBALS['xmlrpc_server']);
}
else
@@ -252,7 +255,7 @@
'faultCode' => $error_number
);
- echo xmlrpc_encode_request(NULL,$values);
+ echo xmlrpc_encode_request(NULL,$values,array("encoding" =>
"utf-8"));
xmlrpc_server_destroy($GLOBALS['xmlrpc_server']);
exit;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [6687] merge 6681:6686 from trunk,
Sigurd Nes <=