mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:15 +01:00
* All apps/PostgreSQL: fix SQL error when deleting an entry without attachments
This commit is contained in:
parent
93353a55c0
commit
4a13fb4c21
@ -280,6 +280,30 @@ class StreamWrapper extends LinksParent
|
||||
return $ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called in response to rmdir() calls on URL paths associated with the wrapper.
|
||||
*
|
||||
* Reimplemented to do nothing (specially not complain), if an entry directory does not exist,
|
||||
* as we always report them as existing!
|
||||
*
|
||||
* @param string $url
|
||||
* @param int $options Possible values include STREAM_REPORT_ERRORS.
|
||||
* @return boolean TRUE on success or FALSE on failure.
|
||||
*/
|
||||
function rmdir ( $url, $options )
|
||||
{
|
||||
$path = $url != '/' ? Vfs::parse_url($url,PHP_URL_PATH) : $url;
|
||||
|
||||
list(,/*$apps*/,/*$app*/,/*$id*/,$rest) = explode('/',$path);
|
||||
|
||||
// never delete entry-dir, as it makes attic inaccessible
|
||||
if (empty($rest))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return parent::rmdir( $path, $options );
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called immediately after your stream object is created.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user