fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [16683] Stable: Merge 16681:16682 from trunk


From: sigurdne
Subject: [Fmsystem-commits] [16683] Stable: Merge 16681:16682 from trunk
Date: Wed, 3 May 2017 12:04:59 -0400 (EDT)

Revision: 16683
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16683
Author:   sigurdne
Date:     2017-05-03 12:04:59 -0400 (Wed, 03 May 2017)
Log Message:
-----------
Stable: Merge 16681:16682 from trunk

Modified Paths:
--------------
    branches/Version-2_0-branch/phpgwapi/inc/class.acl.inc.php
    branches/Version-2_0-branch/phpgwapi/inc/xmlrpc/lib/xmlrpc.inc
    branches/Version-2_0-branch/phpgwapi/inc/xmlrpc/lib/xmlrpc_wrappers.inc
    branches/Version-2_0-branch/phpgwapi/inc/xmlrpc/lib/xmlrpcs.inc
    branches/Version-2_0-branch/xmlrpc.php

Property Changed:
----------------
    branches/Version-2_0-branch/

Index: branches/Version-2_0-branch
===================================================================
--- branches/Version-2_0-branch 2017-05-03 16:03:25 UTC (rev 16682)
+++ branches/Version-2_0-branch 2017-05-03 16:04:59 UTC (rev 16683)

Property changes on: branches/Version-2_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
## -1,4 +1,4 ##
 /branches/dev-syncromind:13653
 /branches/dev-syncromind-2:14933-16587
 /branches/stavangerkommune:12743-12875,12986
-/trunk:14721-14732,14734-14735,14737,14739,14741,14743-14744,14746-14749,14751,14753,14755-14757,14759,14761-14764,14766-14768,14770-14783,14785-14792,14794-14813,14815-14816,14818,14820-14822,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14847,14849-14866,14868-14869,14871,14873-14875,14877-14878,14880-14884,14886-14896,14898,14900-14902,14904,14906-14909,14911-14915,14917-14919,14921-14922,14924-14978,14980-15258,15260-15261,15263-15264,15266-15285,15287-15288,15290-15291,15293,15295,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15356,15358,15360-15541,15543-15566,15568-15569,15571,15573-15581,15583,15585-15617,15619,15621-15630,15632-15635,15637-15639,15641-15643,15645,15647-15665,15667-15668,15670-15671,15673-15693,15695-15712,15714-15764,15766-15767,15769-15787,15789-15802,15804-15811,15813-15814,15816-15818,15820-15849,15851-15887,15889-15900,15902-16046,16048-16051,16053,16055,16057-16063,16065-16071,16073-16077,16079-16081,16083-16099,16101-16130,16132-16140,16142,16144-16212,16214-16219,16221,16223-16224,16226,16228-16229,16231,16233,16235,16237,16239-16240,16242,16244-16246,16248,16250-16251,16253-16255,16257-16259,16261,16263,16265,16267,16269-16276,16278,16280-16283,16285,16287-16288,16290,16292-16295,16297-16305,16307-16314,16316-16318,16320-16322,16324,16326-16330,16332,16334,16336,16338-16339,16341-16342,16344,16346,16348,16350,16352-16353,16355-16358,16360,16362,16364-16369,16371,16373,16375-16378,16380,16382-16383,16385,16387,16389,16391,16393-16395,16397,16399-16402,16404,16406,16408,16410-16415,16417,16419-16420,16422-16425,16427,16429-16440,16442,16444,16446,16448-16449,16451,16453,16455-16463,16465-16472,16474-16475,16477-16484,16486,16488,16490-16497,16499,16501-16503,16505-16512,16514-16517,16519,16521,16523,16525,16527-16532,16534,16536-16541,16543,16545-16554,16556,16558-16565,16567-16575,16577-16584,16586-16588,16590,16592-16593,16595-16596,16598,16600-16601,16603-16608,16610-16614,16616-16618,16620-16621,16623-16624,16626,16628,16630,16632-16638,16640,16642,16644,16646-16651,16653-16663,16665,16667,16669,16671,16673,16675,16677,16679-16680
\ No newline at end of property
+/trunk:14721-14732,14734-14735,14737,14739,14741,14743-14744,14746-14749,14751,14753,14755-14757,14759,14761-14764,14766-14768,14770-14783,14785-14792,14794-14813,14815-14816,14818,14820-14822,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14847,14849-14866,14868-14869,14871,14873-14875,14877-14878,14880-14884,14886-14896,14898,14900-14902,14904,14906-14909,14911-14915,14917-14919,14921-14922,14924-14978,14980-15258,15260-15261,15263-15264,15266-15285,15287-15288,15290-15291,15293,15295,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15356,15358,15360-15541,15543-15566,15568-15569,15571,15573-15581,15583,15585-15617,15619,15621-15630,15632-15635,15637-15639,15641-15643,15645,15647-15665,15667-15668,15670-15671,15673-15693,15695-15712,15714-15764,15766-15767,15769-15787,15789-15802,15804-15811,15813-15814,15816-15818,15820-15849,15851-15887,15889-15900,15902-16046,16048-16051,16053,16055,16057-16063,16065-16071,16073-16077,16079-16081,16083-16099,16101-16130,16132-16140,16142,16144-16212,16214-16219,16221,16223-16224,16226,16228-16229,16231,16233,16235,16237,16239-16240,16242,16244-16246,16248,16250-16251,16253-16255,16257-16259,16261,16263,16265,16267,16269-16276,16278,16280-16283,16285,16287-16288,16290,16292-16295,16297-16305,16307-16314,16316-16318,16320-16322,16324,16326-16330,16332,16334,16336,16338-16339,16341-16342,16344,16346,16348,16350,16352-16353,16355-16358,16360,16362,16364-16369,16371,16373,16375-16378,16380,16382-16383,16385,16387,16389,16391,16393-16395,16397,16399-16402,16404,16406,16408,16410-16415,16417,16419-16420,16422-16425,16427,16429-16440,16442,16444,16446,16448-16449,16451,16453,16455-16463,16465-16472,16474-16475,16477-16484,16486,16488,16490-16497,16499,16501-16503,16505-16512,16514-16517,16519,16521,16523,16525,16527-16532,16534,16536-16541,16543,16545-16554,16556,16558-16565,16567-16575,16577-16584,16586-16588,16590,16592-16593,16595-16596,16598,16600-16601,16603-16608,16610-16614,16616-16618,16620-16621,16623-16624,16626,16628,16630,16632-16638,16640,16642,16644,16646-16651,16653-16663,16665,16667,16669,16671,16673,16675,16677,16679-16680,16682
\ No newline at end of property
Modified: branches/Version-2_0-branch/phpgwapi/inc/class.acl.inc.php
===================================================================
--- branches/Version-2_0-branch/phpgwapi/inc/class.acl.inc.php  2017-05-03 
16:03:25 UTC (rev 16682)
+++ branches/Version-2_0-branch/phpgwapi/inc/class.acl.inc.php  2017-05-03 
16:04:59 UTC (rev 16683)
@@ -1523,13 +1523,16 @@
                                                }
                                        }
 
-                                       foreach ( $accounts[$grantor] as 
$grantors )
+                                       if(isset($accounts[$grantor]) && 
is_array($accounts[$grantor]))
                                        {
-                                               if ( 
!isset($grants['accounts'][$grantors]) )
+                                               foreach ( $accounts[$grantor] 
as $grantors )
                                                {
-                                                       
$grants['accounts'][$grantors] = 0;
+                                                       if ( 
!isset($grants['accounts'][$grantors]) )
+                                                       {
+                                                               
$grants['accounts'][$grantors] = 0;
+                                                       }
+                                                       
$grants['accounts'][$grantors] |= $rights;
                                                }
-                                               $grants['accounts'][$grantors] 
|= $rights;
                                        }
                                }
                        }

Modified: branches/Version-2_0-branch/phpgwapi/inc/xmlrpc/lib/xmlrpc.inc
===================================================================
--- branches/Version-2_0-branch/phpgwapi/inc/xmlrpc/lib/xmlrpc.inc      
2017-05-03 16:03:25 UTC (rev 16682)
+++ branches/Version-2_0-branch/phpgwapi/inc/xmlrpc/lib/xmlrpc.inc      
2017-05-03 16:04:59 UTC (rev 16683)
@@ -205,10 +205,10 @@
        // 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']='ISO-8859-1';
 
        $GLOBALS['xmlrpcName']='XML-RPC for PHP';
-       $GLOBALS['xmlrpcVersion']='3.0.0';
+       $GLOBALS['xmlrpcVersion']='3.0.0';
 
        // let user errors start at 800
        $GLOBALS['xmlrpcerruser']=800;
@@ -225,7 +225,7 @@
 
        // set to TRUE to enable encoding of php NULL values to <EX:NIL/> 
instead of <NIL/>
        $GLOBALS['xmlrpc_null_apache_encoding']=false;
-    
$GLOBALS['xmlrpc_null_apache_encoding_ns']='http://ws.apache.org/xmlrpc/namespaces/extensions';
+    
$GLOBALS['xmlrpc_null_apache_encoding_ns']='http://ws.apache.org/xmlrpc/namespaces/extensions';
 
        // used to store state during parsing
        // quick explanation of components:
@@ -850,7 +850,7 @@
                * http://curl.haxx.se/docs/faq.html#7.3)
                */
                var $xmlrpc_curl_handle = null;
-               /// Whether to use persistent connections for http 1.1 and https
+               /// Whether to use persistent connections for http 1.1 and https
                var $keepalive = false;
                /// Charset encodings that can be decoded without problems by 
the client
                var $accepted_charset_encodings = array();
@@ -872,7 +872,7 @@
                * @param integer $port the port the server is listening on, 
defaults to 80 or 443 depending on protocol used
                * @param string $method the http protocol variant: defaults to 
'http', 'https' and 'http11' can be used if CURL is installed
                */
-               function xmlrpc_client($path, $server='', $port='', $method='')
+               function __construct($path, $server='', $port='', $method='')
                {
                        // allow user to specify all params in $path
                        if($server == '' and $port == '' and $method == '')
@@ -944,7 +944,7 @@
 
                /**
                * Enables/disables the echoing to screen of the xmlrpc 
responses received
-               * @param integer $in values 0, 1 and 2 are supported (2 = echo 
sent msg too, before received response)
+               * @param integer $in values 0, 1 and 2 are supported (2 = echo 
sent msg too, before received response)
                * @access public
                */
                function setDebug($in)
@@ -980,7 +980,7 @@
 
                /**
                * Add a CA certificate to verify server with (see man page about
-               * CURLOPT_CAINFO for more details)
+               * CURLOPT_CAINFO for more details)
                * @param string $cacert certificate file name (or dir holding 
certificates)
                * @param bool $is_dir set to true to indicate cacert is a dir. 
defaults to false
                * @access public
@@ -1062,9 +1062,9 @@
                        if ($compmethod == 'any')
                                $this->accepted_compression = array('gzip', 
'deflate');
                        else
-                               if ($compmethod == false )
-                                       $this->accepted_compression = array();
-                               else
+                               if ($compmethod == false )
+                                       $this->accepted_compression = array();
+                               else
                                $this->accepted_compression = 
array($compmethod);
                }
 
@@ -1112,7 +1112,7 @@
                /**
                * Directly set cURL options, for extra flexibility
                * It allows eg. to bind client to a specific IP interface / 
address
-               * @param array $options
+               * @param array $options
                */
                function SetCurlOptions( $options )
                {
@@ -1345,12 +1345,12 @@
                                $cookieheader = 'Cookie:' . $version . 
substr($cookieheader, 0, -1) . "\r\n";
                        }
 
-                       // omit port if 80
-                       $port = ($port == 80) ? '' : (':' . $port);
-
+                       // omit port if 80
+                       $port = ($port == 80) ? '' : (':' . $port);
+
                        $op= 'POST ' . $uri. " HTTP/1.0\r\n" .
                                'User-Agent: ' . $this->user_agent . "\r\n" .
-                               'Host: '. $server . $port . "\r\n" .
+                               'Host: '. $server . $port . "\r\n" .
                                $credentials .
                                $proxy_credentials .
                                $accepted_encoding .
@@ -1399,11 +1399,11 @@
                        }
                        else
                        {
-                               // reset errno and errstr on successful socket 
connection
+                               // reset errno and errstr on successful socket 
connection
                                $this->errstr = '';
                        }
                        // G. Giunta 2005/10/24: close socket before parsing.
-                       // should yield slightly better execution times, and 
make easier recursive calls (e.g. to follow http redirects)
+                       // should yield slightly better execution times, and 
make easier recursive calls (e.g. to follow http redirects)
                        $ipd='';
                        do
                        {
@@ -1621,13 +1621,13 @@
                                {
                                        curl_setopt($curl, 
CURLOPT_SSLKEYPASSWD, $keypass);
                                }
-
-                // Upgrade transparently to more stringent check for versions 
of php which do not support otherwise.
-                // Doing it in constructor would be cleaner; doing it here 
saves us a couple of function calls
-                if($this->verifyhost == 1 && $info = curl_version() && 
version_compare($info['version'], '7.28.1') >= 0)
-                {
-                    $this->verifyhost = 2;
-                }
+
+                // Upgrade transparently to more stringent check for versions 
of php which do not support otherwise.
+                // Doing it in constructor would be cleaner; doing it here 
saves us a couple of function calls
+                if($this->verifyhost == 1 && $info = curl_version() && 
version_compare($info['version'], '7.28.1') >= 0)
+                {
+                    $this->verifyhost = 2;
+                }
                                // whether to verify cert's common name (CN); 0 
for no, 1 to verify that it exists, and 2 to verify that it matches the 
hostname used
                                curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 
$this->verifyhost);
                        }
@@ -1679,14 +1679,14 @@
                        {
                                print "<PRE>\n---CURL INFO---\n";
                                foreach(curl_getinfo($curl) as $name => $val)
-                               {
-                                       if (is_array($val))
-                                       {
-                                               $val = implode("\n", $val);
-                                       }
-                                       print $name . ': ' . htmlentities($val) 
. "\n";
-                               }
-
+                               {
+                                       if (is_array($val))
+                                       {
+                                               $val = implode("\n", $val);
+                                       }
+                                       print $name . ': ' . htmlentities($val) 
. "\n";
+                               }
+
                                print "---END---\n</PRE>";
                        }
 
@@ -1707,12 +1707,12 @@
                                        curl_close($curl);
                                }
                                $resp =& $msg->parseResponse($result, true, 
$this->return_type);
-                // if we got back a 302, we can not reuse the curl handle for 
later calls
-                if($resp->faultCode() == $GLOBALS['xmlrpcerr']['http_error'] 
&& $keepalive)
-                {
-                    curl_close($curl);
-                    $this->xmlrpc_curl_handle = null;
-                }
+                // if we got back a 302, we can not reuse the curl handle for 
later calls
+                if($resp->faultCode() == $GLOBALS['xmlrpcerr']['http_error'] 
&& $keepalive)
+                {
+                    curl_close($curl);
+                    $this->xmlrpc_curl_handle = null;
+                }
                        }
                        return $resp;
                }
@@ -1735,7 +1735,7 @@
                * @param array $msgs an array of xmlrpcmsg objects
                * @param integer $timeout connection timeout (in seconds)
                * @param string $method the http protocol variant to be used
-               * @param boolean fallback When true, upon receiving an error 
during multicall, multiple single calls will be attempted
+               * @param boolean fallback When true, upon receiving an error 
during multicall, multiple single calls will be attempted
                * @return array
                * @access public
                */
@@ -1968,7 +1968,7 @@
                * NB: as of now we do not do it, since it might be either an 
xmlrpcval or a plain
                * php val, or a complete xml chunk, depending on usage of 
xmlrpc_client::send() inside which creator is called...
                */
-               function xmlrpcresp($val, $fcode = 0, $fstr = '', $valtyp='')
+               function __construct($val, $fcode = 0, $fstr = '', $valtyp='')
                {
                        if($fcode != 0)
                        {
@@ -2042,7 +2042,7 @@
                * with attributes being e.g. 'expires', 'path', domain'.
                * NB: cookies sent as 'expired' by the server (i.e. with an 
expiry date in the past)
                * are still present in the array. It is up to the user-defined 
code to decide
-               * how to use the received cookies, and whether they have to be 
sent back with the next
+               * how to use the received cookies, and whether they have to be 
sent back with the next
                * request to the server (using xmlrpc_client::setCookie) or not
                * @return array array of cookies received from the server
                * @access public
@@ -2064,14 +2064,14 @@
                                $this->content_type = 'text/xml; charset=' . 
$charset_encoding;
                        else
                                $this->content_type = 'text/xml';
-                       if ($GLOBALS['xmlrpc_null_apache_encoding'])
-                       {
-                               $result = "<methodResponse 
xmlns:ex=\"".$GLOBALS['xmlrpc_null_apache_encoding_ns']."\">\n";
-                       }
-                       else
-                       {
+                       if ($GLOBALS['xmlrpc_null_apache_encoding'])
+                       {
+                               $result = "<methodResponse 
xmlns:ex=\"".$GLOBALS['xmlrpc_null_apache_encoding_ns']."\">\n";
+                       }
+                       else
+                       {
                        $result = "<methodResponse>\n";
-                       }
+                       }
                        if($this->errno)
                        {
                                // G. Giunta 2005/2/13: let non-ASCII response 
messages be tolerated by clients
@@ -2121,9 +2121,9 @@
 
                /**
                * @param string $meth the name of the method to invoke
-               * @param array $pars array of parameters to be passed to the 
method (xmlrpcval objects)
+               * @param array $pars array of parameters to be passed to the 
method (xmlrpcval objects)
                */
-               function xmlrpcmsg($meth, $pars=0)
+               function __construct($meth, $pars=0)
                {
                        $this->methodname=$meth;
                        if(is_array($pars) && count($pars)>0)
@@ -2205,7 +2205,7 @@
 
                /**
                * Returns xml representation of the message. XML prologue 
included
-               * @param string $charset_encoding
+               * @param string $charset_encoding
                * @return string the xml representation of the message, xml 
prologue included
                * @access public
                */
@@ -2259,7 +2259,7 @@
                *      infinite loop in that case, because we cannot trust the 
caller
                *      to give us a valid pointer to an open file...
                * @access public
-               * @param resource $fp stream pointer
+               * @param resource $fp stream pointer
                * @return xmlrpcresp
                * @todo add 2nd & 3rd param to be passed to ParseResponse() ???
                */
@@ -2748,7 +2748,7 @@
                * @param mixed $val
                * @param string $type any valid xmlrpc type name (lowercase). 
If null, 'string' is assumed
                */
-               function xmlrpcval($val=-1, $type='')
+               function __construct($val=-1, $type='')
                {
                        /// @todo: optimization creep - do not call addXX, do 
it all inline.
                        /// downside: booleans will not be coerced anymore
@@ -3089,7 +3089,7 @@
                }
 
                /**
-               * Checks whether a struct member with a given name is present.
+               * Checks whether a struct member with a given name is present.
                * Works only on xmlrpcvals of type struct.
                * @param string $m the name of the struct member to be looked up
                * @return boolean
@@ -3688,10 +3688,10 @@
        * we SHOULD assume it is strictly US-ASCII. But we try to be more 
tolerant of unconforming (legacy?) clients/servers,
        * which will be most probably using UTF-8 anyway...
        *
-       * @param string $httpheader the http Content-type header
+       * @param string $httpheader the http Content-type header
        * @param string $xmlchunk xml content buffer
        * @param string $encoding_prefs comma separated list of character 
encodings to be used as default (when mb extension is enabled)
-       * @return string
+       * @return string
        *
        * @todo explore usage of mb_http_input(): does it detect http headers + 
post data? if so, use it instead of hand-detection!!!
        */
@@ -3784,7 +3784,7 @@
        * if it is a valid subset of any encoding in the list
        * @param string $encoding charset to be tested
        * @param mixed $validlist comma separated list of valid charsets (or 
array of charsets)
-       * @return bool
+       * @return bool
        */
        function is_valid_charset($encoding, $validlist)
        {
@@ -3807,6 +3807,4 @@
                                                return true;
                                return false;
                }
-       }
-
-?>
+       }
\ No newline at end of file

Modified: 
branches/Version-2_0-branch/phpgwapi/inc/xmlrpc/lib/xmlrpc_wrappers.inc
===================================================================
--- branches/Version-2_0-branch/phpgwapi/inc/xmlrpc/lib/xmlrpc_wrappers.inc     
2017-05-03 16:03:25 UTC (rev 16682)
+++ branches/Version-2_0-branch/phpgwapi/inc/xmlrpc/lib/xmlrpc_wrappers.inc     
2017-05-03 16:04:59 UTC (rev 16683)
@@ -4,7 +4,7 @@
  * Generate stubs to transparently access xmlrpc methods as php functions and 
viceversa
  *
  * @author Gaetano Giunta
- * @copyright (C) 2006-2014 G. Giunta
+ * @copyright (C) 2006-2014 G. Giunta
  * @license code licensed under the BSD License: 
http://phpxmlrpc.sourceforge.net/license.txt
  *
  * @todo separate introspection from code generation for func-2-method wrapping
@@ -226,7 +226,7 @@
                                error_log('XML-RPC: method to be wrapped is the 
constructor: '.$plainfuncname);
                                return false;
                        }
-                if($func->isDestructor())
+                if($func->isDestructor())
                        {
                                error_log('XML-RPC: method to be wrapped is the 
destructor: '.$plainfuncname);
                                return false;
@@ -515,12 +515,12 @@
        * Given an xmlrpc client and a method name, register a php wrapper 
function
        * that will call it and return results using native php types for both
        * params and results. The generated php function will return an 
xmlrpcresp
-       * object for failed xmlrpc calls
+       * object for failed xmlrpc calls
        *
        * Known limitations:
        * - server must support system.methodsignature for the wanted xmlrpc 
method
        * - for methods that expose many signatures, only one can be picked (we
-       *   could in principle check if signatures differ only by number of 
params
+       *   could in principle check if signatures differ only by number of 
params
        *   and not by type, but it would be more complication than we can 
spare time)
        * - nested xmlrpc params: the caller of the generated php function has 
to
        *   encode on its own the params passed to the php function if these 
are structs
@@ -536,11 +536,11 @@
        *
        * @param xmlrpc_client $client     an xmlrpc client set up correctly to 
communicate with target server
        * @param string        $methodname the xmlrpc method to be mapped to a 
php function
-       * @param array         $extra_options array of options that specify 
conversion details. valid options include
+       * @param array         $extra_options array of options that specify 
conversion details. valid options include
        *        integer       signum      the index of the method signature to 
use in mapping (if method exposes many sigs)
        *        integer       timeout     timeout (in secs) to be used when 
executing function/calling remote method
        *        string        protocol    'http' (default), 'http11' or 'https'
-       *        string        new_function_name the name of php function to 
create. If unspecified, lib will pick an appropriate name
+       *        string        new_function_name the name of php function to 
create. If unspecified, lib will pick an appropriate name
        *        string        return_source if true return php code w. 
function definition instead fo function name
        *        bool          encode_php_objs let php objects be sent to 
server using the 'improved' xmlrpc notation, so server can deserialize them as 
php objects
        *        bool          decode_php_objs --- WARNING !!! possible 
security hazard. only use it with trusted servers ---
@@ -570,7 +570,7 @@
 
                $encode_php_objects = isset($extra_options['encode_php_objs']) 
? (bool)$extra_options['encode_php_objs'] : false;
                $decode_php_objects = isset($extra_options['decode_php_objs']) 
? (bool)$extra_options['decode_php_objs'] : false;
-               // it seems like the meaning of 'simple_client_copy' here is 
swapped wrt client_copy_mode later on...
+               // it seems like the meaning of 'simple_client_copy' here is 
swapped wrt client_copy_mode later on...
                $simple_client_copy = 
isset($extra_options['simple_client_copy']) ? 
(int)($extra_options['simple_client_copy']) : 0;
                $buildit = isset($extra_options['return_source']) ? 
!($extra_options['return_source']) : true;
                $prefix = isset($extra_options['prefix']) ? 
$extra_options['prefix'] : 'xmlrpc';
@@ -930,5 +930,4 @@
                $code .= "\$client->return_type = '{$prefix}vals';\n";
                //$code .= "\$client->setDebug(\$debug);\n";
                return $code;
-       }
-?>
\ No newline at end of file
+       }
\ No newline at end of file

Modified: branches/Version-2_0-branch/phpgwapi/inc/xmlrpc/lib/xmlrpcs.inc
===================================================================
--- branches/Version-2_0-branch/phpgwapi/inc/xmlrpc/lib/xmlrpcs.inc     
2017-05-03 16:03:25 UTC (rev 16682)
+++ branches/Version-2_0-branch/phpgwapi/inc/xmlrpc/lib/xmlrpcs.inc     
2017-05-03 16:04:59 UTC (rev 16683)
@@ -420,7 +420,7 @@
        /**
        * Add a string to the debug info that can be later seralized by the 
server
        * as part of the response message.
-       * Note that for best compatibility, the debug string should be encoded 
using
+       * Note that for best compatibility, the debug string should be encoded 
using
        * the $GLOBALS['xmlrpc_internalencoding'] character set.
        * @param string $m
        * @access public
@@ -450,7 +450,7 @@
                * @see php_xmlrpc_encode for a list of values
                */
                var $phpvals_encoding_options = array( 'auto_dates' );
-               /// controls whether the server is going to echo debugging 
messages back to the client as comments in response body. valid values: 0,1,2,3
+               /// controls whether the server is going to echo debugging 
messages back to the client as comments in response body. valid values: 0,1,2,3
                var $debug = 1;
                /**
                * Controls behaviour of server when invoked user function 
throws an exception:
@@ -494,10 +494,10 @@
                var $user_data = null;
 
                /**
-               * @param array $dispmap the dispatch map with definition of 
exposed services
-               * @param boolean $servicenow set to false to prevent the server 
from running upon construction
+               * @param array $dispmap the dispatch map with definition of 
exposed services
+               * @param boolean $servicenow set to false to prevent the server 
from running upon construction
                */
-               function xmlrpc_server($dispMap=null, $serviceNow=true)
+               function __construct($dispMap=null, $serviceNow=true)
                {
                        // if ZLIB is enabled, let the server by default accept 
compressed requests,
                        // and compress responses sent to clients that support 
them
@@ -540,7 +540,7 @@
                * with the standard processing of the php function exposed as 
method. In
                * particular, triggering an USER_ERROR level error will not 
halt script
                * execution anymore, but just end up logged in the xmlrpc 
response)
-               * Note that info added at level 2 and 3 will be base64 encoded
+               * Note that info added at level 2 and 3 will be base64 encoded
                * @access public
                */
                function setDebug($in)
@@ -711,7 +711,7 @@
                * Verify type and number of parameters received against a list 
of known signatures
                * @param array $in array of either xmlrpcval objects or xmlrpc 
type definitions
                * @param array $sig array of known signatures to match against
-               * @return array
+               * @return array
                * @access private
                */
                function verifySignature($in, $sig)
@@ -777,7 +777,7 @@
 
                /**
                * Parse http headers received along with xmlrpc request. If 
needed, inflate request
-               * @return mixed null on success or an xmlrpcresp
+               * @return mixed null on success or an xmlrpcresp
                * @access private
                */
                function parseRequestHeaders(&$data, &$req_encoding, 
&$resp_encoding, &$resp_compression)
@@ -940,7 +940,7 @@
                                }
                                /// @BUG this will fail on PHP 5 if charset is 
not specified in the xml prologue,
                                // the encoding is not UTF8 and there are 
non-ascii chars in the text...
-                               /// @todo use an empty string for php 5 ???
+                               /// @todo use an empty string for php 5 ???
                                $parser = xml_parser_create($req_encoding);
                        }
                        else
@@ -1202,7 +1202,7 @@
 
                /**
                * add a string to the 'internal debug message' (separate from 
'user debug message')
-               * @param string $string
+               * @param string $string
                * @access private
                */
                function debugmsg($string)
@@ -1234,5 +1234,4 @@
                        $r=new xmlrpcresp(new xmlrpcval( "'Aha said I: '" . 
$GLOBALS['HTTP_RAW_POST_DATA'], 'string'));
                        print $r->serialize();
                }
-       }
-?>
+       }
\ No newline at end of file

Modified: branches/Version-2_0-branch/xmlrpc.php
===================================================================
--- branches/Version-2_0-branch/xmlrpc.php      2017-05-03 16:03:25 UTC (rev 
16682)
+++ branches/Version-2_0-branch/xmlrpc.php      2017-05-03 16:04:59 UTC (rev 
16683)
@@ -27,8 +27,8 @@
        * @subpackage communication
        * @version $Id$
        */
-       
 
+
        $GLOBALS['phpgw_info'] = array();
 
        $GLOBALS['phpgw_info']['flags'] = array
@@ -123,7 +123,9 @@
        }
        else
        {
-               $request_xml = implode("\r\n", file('php://input'));
+       //      $request_xml = implode("\r\n", file('php://input'));
+
+               $request_xml =  file_get_contents('php://input');
        }
 
        if(!$_domain_info)
@@ -132,7 +134,7 @@
                xmlrpc_error(1001,'not a valid domain');
        }
 
-       if ( isset($headers['Authorization']) 
+       if ( isset($headers['Authorization'])
                && preg_match('/Basic/', $headers['Authorization']) )
        {
                $tmp = $headers['Authorization'];
@@ -148,6 +150,7 @@
                        // Find out what method they are calling
                        // This function is odd, you *NEED* to assign the 
results
                        // to a value, or $method is never returned.  (jengo)
+                       $method = null;
                        $null = xmlrpc_decode_request($request_xml, $method);
 
                        $GLOBALS['phpgw']->session->xmlrpc_method_called = 
$method;
@@ -286,7 +289,7 @@
        * Get XMLRPC methods
        *
        * @param string $method
-       * @return array 
+       * @return array
        */
        function xmlrpc_describe_methods($method)
        {
@@ -307,7 +310,7 @@
        // and kp3 instead of using HTTP_AUTH features.
        // Would be a nice workaround for librarys that don't support it, as its
        // not in the XML-RPC spec.
-       
+
        /**
        * XMLRPC call wrapper
        *
@@ -314,18 +317,20 @@
        * @param string $method_name
        * @param array $parameters
        * @return unknown
-       */ 
+       */
        function xmlrpc_call_wrapper($method_name, $parameters)
        {
                $a = explode('.',$method_name);
 
+               $function_name = (string) $a['2'];
+
                if (count($parameters) == 0)
                {
-                       $return = $GLOBALS['obj']->$a[2]();
+                       $return = $GLOBALS['obj']->$function_name();
                }
                else if (count($parameters) == 1)
                {
-                       $return = $GLOBALS['obj']->$a[2]($parameters[0]);
+                       $return = 
$GLOBALS['obj']->$function_name($parameters[0]);
                }
                else
                {
@@ -333,7 +338,7 @@
                        {
                                $p[] = '$parameters[' . $i . ']';
                        }
-                       eval('$return = $GLOBALS[\'obj\']->$a[2](' . 
implode(',',$p) . ');');
+                       eval('$return = $GLOBALS[\'obj\']->$function_name(' . 
implode(',',$p) . ');');
                }
 
                // This needs to be expanded and more fully tested
@@ -348,8 +353,8 @@
        }
 
        // The following are common functions used ONLY by XML-RPC
-       
-       
+
+
        /**
        * XMLRPC login
        *




reply via email to

[Prev in Thread] Current Thread [Next in Thread]