From 2b2845fff77160d5dbfcb86e8a6215641d89f921 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 26 May 2016 11:27:03 +0200 Subject: [PATCH] fix PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP --- api/src/WebDAV/Tools/_parse_lockinfo.php | 28 +++++++++++------------ api/src/WebDAV/Tools/_parse_propfind.php | 4 ++-- api/src/WebDAV/Tools/_parse_proppatch.php | 4 ++-- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/api/src/WebDAV/Tools/_parse_lockinfo.php b/api/src/WebDAV/Tools/_parse_lockinfo.php index 34afa0ace4..8e7bd15e04 100644 --- a/api/src/WebDAV/Tools/_parse_lockinfo.php +++ b/api/src/WebDAV/Tools/_parse_lockinfo.php @@ -36,12 +36,12 @@ /** * helper class for parsing LOCK request bodies - * + * * @package HTTP_WebDAV_Server * @author Hartmut Holzgraefe * @version @package-version@ */ -class _parse_lockinfo +class _parse_lockinfo { /** * success state flag @@ -82,21 +82,21 @@ class _parse_lockinfo * @access private */ var $collect_owner = false; - + /** * constructor * * @param string path of stream to read * @access public */ - function _parse_lockinfo($path) + function __construct($path) { // we assume success unless problems occur $this->success = true; // remember if any input was parsed $had_input = false; - + // open stream $f_in = fopen($path, "r"); if (!$f_in) { @@ -125,7 +125,7 @@ class _parse_lockinfo $had_input = true; $this->success &= xml_parse($xml_parser, $line, false); } - } + } // finish parsing if ($had_input) { @@ -140,9 +140,9 @@ class _parse_lockinfo xml_parser_free($xml_parser); // close input stream - fclose($f_in); + fclose($f_in); } - + /** * tag start handler @@ -153,7 +153,7 @@ class _parse_lockinfo * @return void * @access private */ - function _startElement($parser, $name, $attrs) + function _startElement($parser, $name, $attrs) { // namespace handling if (strstr($name, " ")) { @@ -162,8 +162,8 @@ class _parse_lockinfo $ns = ""; $tag = $name; } - - + + if ($this->collect_owner) { // everything within the tag needs to be collected $ns_short = ""; @@ -192,7 +192,7 @@ class _parse_lockinfo } } } - + /** * data handler * @@ -201,7 +201,7 @@ class _parse_lockinfo * @return void * @access private */ - function _data($parser, $data) + function _data($parser, $data) { // only the tag has data content if ($this->collect_owner) { @@ -217,7 +217,7 @@ class _parse_lockinfo * @return void * @access private */ - function _endElement($parser, $name) + function _endElement($parser, $name) { // namespace handling if (strstr($name, " ")) { diff --git a/api/src/WebDAV/Tools/_parse_propfind.php b/api/src/WebDAV/Tools/_parse_propfind.php index 30c2df6db7..436a2aedb7 100644 --- a/api/src/WebDAV/Tools/_parse_propfind.php +++ b/api/src/WebDAV/Tools/_parse_propfind.php @@ -109,9 +109,9 @@ class _parse_propfind * * @access public * @param string $path - * @param boolean $store_request=false if true whole request data will be made available in $this->request + * @param boolean $store_request =false if true whole request data will be made available in $this->request */ - function _parse_propfind($path, $store_request=false) + function __construct($path, $store_request=false) { // success state flag $this->success = true; diff --git a/api/src/WebDAV/Tools/_parse_proppatch.php b/api/src/WebDAV/Tools/_parse_proppatch.php index 25a0bbef9a..f6f3fe18f6 100644 --- a/api/src/WebDAV/Tools/_parse_proppatch.php +++ b/api/src/WebDAV/Tools/_parse_proppatch.php @@ -94,10 +94,10 @@ class _parse_proppatch * constructor * * @param string path of input stream - * @param boolean $store_request=false if true whole request data will be made available in $this->request + * @param boolean $store_request =false if true whole request data will be made available in $this->request * @access public */ - function _parse_proppatch($path, $store_request=false) + function __construct($path, $store_request=false) { $this->success = true;