mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-17 19:01:04 +01:00
add missing $relpath
This commit is contained in:
parent
6490e4360f
commit
3d53fa9d97
@ -79,12 +79,14 @@ class Vfs extends File
|
|||||||
/**
|
/**
|
||||||
* Find all attachments, can be used to prepare the data for the widget on client-side
|
* Find all attachments, can be used to prepare the data for the widget on client-side
|
||||||
*
|
*
|
||||||
* @param string $path eg. "/apps/$app/$id/$rel_path"
|
* @param string $path eg. "/apps/$app/$id/$relpath"
|
||||||
* @return array
|
* @return array
|
||||||
* @throws Api\Exception\AssertionFailed
|
* @throws Api\Exception\AssertionFailed
|
||||||
*/
|
*/
|
||||||
public static function findAttachments($path)
|
public static function findAttachments($path)
|
||||||
{
|
{
|
||||||
|
list(,,,, $relpath) = explode('/', $path, 5);
|
||||||
|
|
||||||
$value = [];
|
$value = [];
|
||||||
// Single file, already existing
|
// Single file, already existing
|
||||||
if (substr($path,-1) != '/' && Api\Vfs::file_exists($path) && !Api\Vfs::is_dir($path))
|
if (substr($path,-1) != '/' && Api\Vfs::file_exists($path) && !Api\Vfs::is_dir($path))
|
||||||
|
Loading…
Reference in New Issue
Block a user