<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to bugs</title><link href="https://sourceforge.net/p/phprojektwebdav/bugs/" rel="alternate"/><link href="https://sourceforge.net/p/phprojektwebdav/bugs/feed.atom" rel="self"/><id>https://sourceforge.net/p/phprojektwebdav/bugs/</id><updated>2004-05-02T16:34:25Z</updated><subtitle>Recent changes to bugs</subtitle><entry><title>It get confused with directories with same name.</title><link href="https://sourceforge.net/p/phprojektwebdav/bugs/7/" rel="alternate"/><published>2004-05-02T16:34:25Z</published><updated>2004-05-02T16:34:25Z</updated><author><name>Mario A. Valdez-Ramirez</name><uri>https://sourceforge.net/u/mvaldez/</uri></author><id>https://sourceforge.netba00acf8dd19d5996d4de55c3a1e4c8d6af9e00e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;If there are two or more directories with the same name&lt;br /&gt;
(of the same user) the addon return always the first&lt;br /&gt;
found in the SQL dateien table.&lt;/p&gt;
&lt;p&gt;For example, if there is a directory like this:&lt;br /&gt;
/mydir/test/test2/test/&lt;br /&gt;
whenever you try to enter the second "test" directory&lt;br /&gt;
you get the content of the first one (including its&lt;br /&gt;
test2 directory). You get something like this:&lt;br /&gt;
/mydir/test/test2/test/test2/&lt;/p&gt;
&lt;p&gt;You can go on forever browsing inside these "virtual"&lt;br /&gt;
directories. Actually, if you try to copy recursively&lt;br /&gt;
the /mydir/test/ directory, the Windows Explorer (for&lt;br /&gt;
example) just hang there, asking for deeper and deeper&lt;br /&gt;
directories (I only waited until it went for the 108th&lt;br /&gt;
directory). This is not a fault of Win Explorer, as the&lt;br /&gt;
PHP script just tell it that there are more and more&lt;br /&gt;
directories inside.&lt;/p&gt;
&lt;p&gt;The problem, I think, is with the _path_id function in&lt;br /&gt;
class_webdav.php which only search for the&lt;br /&gt;
filename/dirname in the SQL database table without&lt;br /&gt;
really checking if the parent of the directory is the&lt;br /&gt;
requested one (even though it has the necessary&lt;br /&gt;
information [the full path]).&lt;/p&gt;
&lt;p&gt;I think the _path_id function should recurse checking&lt;br /&gt;
for the parent of each matching filename/dirname. I&lt;br /&gt;
think this can be done from the outer leaf to the root&lt;br /&gt;
or viceversa, anyway it should check the full path, not&lt;br /&gt;
just the immediate parent.&lt;/p&gt;
&lt;p&gt;In Phprojekt filename/dirname selection and checking is&lt;br /&gt;
easier, because there is always an ID associated with&lt;br /&gt;
the filename/dirname in every form or link. But in this&lt;br /&gt;
case I think the only solution is to walk the possible&lt;br /&gt;
branchs until a match is found.&lt;/p&gt;
&lt;p&gt;I hope what I have said make some sense.  :)&lt;/p&gt;
&lt;p&gt;Mario A. Valdez-Ramírez.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Cannot create directories in first-level dir.</title><link href="https://sourceforge.net/p/phprojektwebdav/bugs/6/" rel="alternate"/><published>2004-05-02T14:37:24Z</published><updated>2004-05-02T14:37:24Z</updated><author><name>Mario A. Valdez-Ramirez</name><uri>https://sourceforge.net/u/mvaldez/</uri></author><id>https://sourceforge.net8badfab1567afe8a917c908db12f17b4ff6a8965</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;If you try to create a directory in the root directory&lt;br /&gt;
(/phptojekt/webdav.php/ or whatever) the webdav addon&lt;br /&gt;
refuse to create the directory. This is not a problem&lt;br /&gt;
if the directory is created in an already existing&lt;br /&gt;
directory.&lt;/p&gt;
&lt;p&gt;Webdav MKCOL requests on the first-level directory are&lt;br /&gt;
answered with a 409 status code (409 = Conflict).&lt;/p&gt;
&lt;p&gt;According to RFC 2518 this error code if to be issued&lt;br /&gt;
when the client request that a  directory be created&lt;br /&gt;
but the intermediate directories don't exist. For&lt;br /&gt;
example, if the client request /maindir/adir/bdir/ but&lt;br /&gt;
/maindir/adir/ don't exist, the server must answer with&lt;br /&gt;
a 409.&lt;/p&gt;
&lt;p&gt;The function MKCOL in class_webdav.php calls function&lt;br /&gt;
_path_id to find out if the path of the collection&lt;br /&gt;
(directory) to be created already exist. If the&lt;br /&gt;
directory is / then it returns 0. The MKCOL function&lt;br /&gt;
just test the return value ($pid) for non-zero. So, the&lt;br /&gt;
condition doesn't disguise between a non-existant&lt;br /&gt;
directory and the root directory. &lt;/p&gt;
&lt;p&gt;As a quick workaround, I changed the condition at lines&lt;br /&gt;
255 or so:&lt;/p&gt;
&lt;p&gt;if (!$pid) {&lt;br /&gt;
return '409 Confilct';&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;I changed them to this:&lt;/p&gt;
&lt;p&gt;if (!$pid) {&lt;br /&gt;
if ($pid !== 0) {&lt;br /&gt;
return '409 Confilct';&lt;br /&gt;
}&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;However, I hope the author can comment on this, maybe&lt;br /&gt;
I'm breaking something.&lt;/p&gt;
&lt;p&gt;Mario A. Valdez-Ramírez.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>UNIX_TIMESTAMP is a MySQL-only non-standard function.</title><link href="https://sourceforge.net/p/phprojektwebdav/bugs/5/" rel="alternate"/><published>2004-05-02T11:38:00Z</published><updated>2004-05-02T11:38:00Z</updated><author><name>Mario A. Valdez-Ramirez</name><uri>https://sourceforge.net/u/mvaldez/</uri></author><id>https://sourceforge.netb3c38cbbf382c684626111df241e55e5771e1529</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;In the file class_webdav.php, at line 448 or so, the&lt;br /&gt;
SQL statement reads:&lt;/p&gt;
&lt;p&gt;SELECT UNIX_TIMESTAMP(datum)...&lt;/p&gt;
&lt;p&gt;unix_timestamp is non-standard, and other SQL engines&lt;br /&gt;
don't understand it (or have different function names).&lt;/p&gt;
&lt;p&gt;The datum field stores the file time/date upload time&lt;br /&gt;
in a yyyymmddhhmmss format, just like a mysql timestamp&lt;br /&gt;
column. However, you cannot rely on mysql functions to&lt;br /&gt;
manage this if the addon is going to support all SQL&lt;br /&gt;
backends of Phprojekt.&lt;/p&gt;
&lt;p&gt;A solution is to extract the datum field as is, and&lt;br /&gt;
then convert it in the PHP space. For example, the SQL&lt;br /&gt;
statement would be:&lt;/p&gt;
&lt;p&gt;SELECT datum, typ, filesize, tempname, ID, pw...&lt;/p&gt;
&lt;p&gt;and then convert the datum field to epoch time and&lt;br /&gt;
store it in a variable:&lt;/p&gt;
&lt;p&gt;$unix_timestamp = mktime(substr($row[0],8,2),&lt;br /&gt;
substr($row[0],10,2), substr($row[0],12,2),&lt;br /&gt;
substr($row[0],4,2), substr($row[0],6,2),&lt;br /&gt;
substr($row[0],0,4));&lt;/p&gt;
&lt;p&gt;and then store the values in the return array:&lt;/p&gt;
&lt;p&gt;return array('mdate' =&amp;gt; date ('U', $unix_timestamp),&lt;br /&gt;
'cdate' =&amp;gt; date ('U', $unix_timestamp)...&lt;/p&gt;
&lt;p&gt;(maybe the date function is redundant).&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Mario A. Valdez-Ramírez.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Single quotes in SQL strings dont work in PostgreSQL.</title><link href="https://sourceforge.net/p/phprojektwebdav/bugs/4/" rel="alternate"/><published>2004-05-02T10:51:08Z</published><updated>2004-05-02T10:51:08Z</updated><author><name>Mario A. Valdez-Ramirez</name><uri>https://sourceforge.net/u/mvaldez/</uri></author><id>https://sourceforge.net0c60b994dedb28a48789384525d80e46c3eb2669</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;All SQL strings in class_webdav.php use single-quoted&lt;br /&gt;
strings (for the parameters, not the sql string). They&lt;br /&gt;
cause an error like this in PostgreSQL:&lt;br /&gt;
query failed: ERROR: attribute 'root' not found&lt;/p&gt;
&lt;p&gt;For example, the login SQL string is:&lt;br /&gt;
'SELECT ID, pw, gruppe FROM '.WD_TAB_USER. ' WHERE&lt;br /&gt;
'.$field_name.'="'.$user.'"'&lt;/p&gt;
&lt;p&gt;but I have to change it to:&lt;br /&gt;
'SELECT ID, pw, gruppe FROM '.WD_TAB_USER. ' WHERE&lt;br /&gt;
'.$field_name.'=\''.$user.'\''&lt;br /&gt;
to make it work in PostgreSQL.&lt;/p&gt;
&lt;p&gt;As far as I know, in PostgreSQL single-quotes are used&lt;br /&gt;
to delimit string constants, while double-quotes are&lt;br /&gt;
used to delimit identifiers (called delimited&lt;br /&gt;
identifiers) such as column names or table names.&lt;/p&gt;
&lt;p&gt;In Phprojekt all SQL strings are sorrounded by&lt;br /&gt;
double-quotes but individual parameters are enclosed&lt;br /&gt;
using single-quotes. That may be a definitive solution&lt;br /&gt;
that would work with all DB back-ends supported by&lt;br /&gt;
Phprojekt. So, for example, the login SQL string would&lt;br /&gt;
become:&lt;/p&gt;
&lt;p&gt;"SELECT ID, pw, gruppe FROM ".WD_TAB_USER. " WHERE&lt;br /&gt;
".$field_name."='".$user."'"&lt;/p&gt;
&lt;p&gt;Mario A. Valdez-Ramirez.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Syntax error in 0.5</title><link href="https://sourceforge.net/p/phprojektwebdav/bugs/3/" rel="alternate"/><published>2004-05-02T10:34:11Z</published><updated>2004-05-02T10:34:11Z</updated><author><name>Mario A. Valdez-Ramirez</name><uri>https://sourceforge.net/u/mvaldez/</uri></author><id>https://sourceforge.nete88c06ef790be1b2090002cc1e67b9b820e15c86</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Error at line 78 of class_webdav.php:&lt;br /&gt;
$pass = addlsashes($pw);&lt;br /&gt;
should read:&lt;br /&gt;
$pass = addslashes($pw);&lt;/p&gt;
&lt;p&gt;Mario A. Valdez-Ramirez.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Error while uploading files with Windows</title><link href="https://sourceforge.net/p/phprojektwebdav/bugs/2/" rel="alternate"/><published>2004-01-19T00:51:38Z</published><updated>2004-01-19T00:51:38Z</updated><author><name>Johannes Schlüter</name><uri>https://sourceforge.net/u/joscherl/</uri></author><id>https://sourceforge.net5a9f60c6955c54248e1104916c06411193e30fec</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;After uploading files to the Server Windows reports an&lt;br /&gt;
error. After reloading the folder the files are available.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Login with data stored in LDAP isn't pssible</title><link href="https://sourceforge.net/p/phprojektwebdav/bugs/1/" rel="alternate"/><published>2004-01-19T00:49:37Z</published><updated>2004-01-19T00:49:37Z</updated><author><name>Johannes Schlüter</name><uri>https://sourceforge.net/u/joscherl/</uri></author><id>https://sourceforge.netcdf13377050309f9601616e5f50da7740e8073ae</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;When PHProjekt is running using LDAP there is no way to&lt;br /&gt;
login with WebDAV for PHProjekt.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>