cvs: pear /HTTP_WebDAV_Server Server.php /HTTP_WebDAV_Server/Server Filesystem.php /HTTP_WebDAV_Server/Tools _parse_proppatch.php

From: Date: Sat, 04 Mar 2006 08:24:13 +0000
Subject: cvs: pear /HTTP_WebDAV_Server Server.php /HTTP_WebDAV_Server/Server Filesystem.php /HTTP_WebDAV_Server/Tools _parse_proppatch.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-38903@lists.php.net to get a copy of this message
hholzgra Sat Mar 4 08:24:13 2006 UTC Modified files: /pear/HTTP_WebDAV_Server Server.php /pear/HTTP_WebDAV_Server/Server Filesystem.php /pear/HTTP_WebDAV_Server/Tools _parse_proppatch.php Log: nuked some warnings http://cvs.php.net/viewcvs.cgi/pear/HTTP_WebDAV_Server/Server.php?r1=1.46&r2=1.47&diff_format=u Index: pear/HTTP_WebDAV_Server/Server.php diff -u pear/HTTP_WebDAV_Server/Server.php:1.46 pear/HTTP_WebDAV_Server/Server.php:1.47 --- pear/HTTP_WebDAV_Server/Server.php:1.46 Fri Mar 3 21:43:09 2006 +++ pear/HTTP_WebDAV_Server/Server.php Sat Mar 4 08:24:13 2006 @@ -17,7 +17,7 @@ // | Christian Stocker <chregu@bitflux.ch> | // +----------------------------------------------------------------------+ // -// $Id: Server.php,v 1.46 2006/03/03 21:43:09 hholzgra Exp $ +// $Id: Server.php,v 1.47 2006/03/04 08:24:13 hholzgra Exp $ // require_once "HTTP/WebDAV/Tools/_parse_propfind.php"; require_once "HTTP/WebDAV/Tools/_parse_proppatch.php"; @@ -1955,7 +1955,7 @@ */ function _unslashify($path) { if ($path[strlen($path)-1] == '/') { - $path = substr($path, 0, strlen($path, 0, -1)); + $path = substr($path, 0, strlen($path) -1); } return $path; } http://cvs.php.net/viewcvs.cgi/pear/HTTP_WebDAV_Server/Server/Filesystem.php?r1=1.26&r2=1.27&diff_format=u Index: pear/HTTP_WebDAV_Server/Server/Filesystem.php diff -u pear/HTTP_WebDAV_Server/Server/Filesystem.php:1.26 pear/HTTP_WebDAV_Server/Server/Filesystem.php:1.27 --- pear/HTTP_WebDAV_Server/Server/Filesystem.php:1.26 Fri Mar 3 21:43:09 2006 +++ pear/HTTP_WebDAV_Server/Server/Filesystem.php Sat Mar 4 08:24:13 2006 @@ -272,7 +272,7 @@ if (!strncmp($reply, "$fspath: ", strlen($fspath)+2)) { $reply = substr($reply, strlen($fspath)+2); // followed by the mime type (maybe including options) - if (preg_match('/^[[:alnum:]_-]+/[[:alnum:]_-]+;?.*/', $reply, $matches)) { + if (preg_match('|^[[:alnum:]_-]+/[[:alnum:]_-]+;?.*|', $reply, $matches)) { $mime_type = $matches[0]; } } @@ -596,14 +596,12 @@ if (is_dir($file)) { if (!is_dir($destfile)) { // TODO "mkdir -p" here? (only natively supported by PHP 5) - if (!mkdir($destfile)) { + if (!@mkdir($destfile)) { return "409 Conflict"; } - } else { - error_log("existing dir '$destfile'"); - } + } } else { - if (!copy($file, $destfile)) { + if (!@copy($file, $destfile)) { return "409 Conflict"; } } @@ -638,7 +636,6 @@ } else { if (isset($prop["val"])) { $query = "REPLACE INTO properties SET path = '$options[path]', name = '$prop[name]', ns= '$prop[ns]', value = '$prop[val]'"; - error_log($query); } else { $query = "DELETE FROM properties WHERE path = '$options[path]' AND name = '$prop[name]' AND ns = '$prop[ns]'"; } http://cvs.php.net/viewcvs.cgi/pear/HTTP_WebDAV_Server/Tools/_parse_proppatch.php?r1=1.3&r2=1.4&diff_format=u Index: pear/HTTP_WebDAV_Server/Tools/_parse_proppatch.php diff -u pear/HTTP_WebDAV_Server/Tools/_parse_proppatch.php:1.3 pear/HTTP_WebDAV_Server/Tools/_parse_proppatch.php:1.4 --- pear/HTTP_WebDAV_Server/Tools/_parse_proppatch.php:1.3 Mon Jan 5 12:41:34 2004 +++ pear/HTTP_WebDAV_Server/Tools/_parse_proppatch.php Sat Mar 4 08:24:13 2006 @@ -17,7 +17,7 @@ // | Christian Stocker <chregu@bitflux.ch> | // +----------------------------------------------------------------------+ // -// $Id: _parse_proppatch.php,v 1.3 2004/01/05 12:41:34 hholzgra Exp $ +// $Id: _parse_proppatch.php,v 1.4 2006/03/04 08:24:13 hholzgra Exp $ // /** @@ -152,8 +152,10 @@ if ($this->depth >= 4) { $this->current["val"] .= "<$tag"; - foreach ($attr as $key => $val) { - $this->current["val"] .= ' '.$key.'="'.str_replace('"','&quot;', $val).'"'; + if (isset($attr)) { + foreach ($attr as $key => $val) { + $this->current["val"] .= ' '.$key.'="'.str_replace('"','&quot;', $val).'"'; + } } $this->current["val"] .= ">"; }

« previous php.pear.cvs (#38903) next »