Support sharing from filemanager as an app, treating it as VFS

This commit is contained in:
nathangray 2019-04-05 09:34:47 -06:00
parent 921d61070c
commit 49008fd529
2 changed files with 6 additions and 1 deletions

View File

@ -366,7 +366,7 @@ class Sharing
if(!$share) $share = $this->share;
list($app, $id) = explode('::', $share['share_path']);
return $share && $share['share_path'] &&
$app && $id && $app !== 'vfs' ;//&& array_key_exists($app, $GLOBALS['egw_info']['apps']);
$app && $id && !in_array($app, array('filemanager', 'vfs')) ;//&& array_key_exists($app, $GLOBALS['egw_info']['apps']);
}
public function need_session()

View File

@ -198,6 +198,11 @@ class Sharing extends \EGroupware\Api\Sharing
{
if (!isset(self::$db)) self::$db = $GLOBALS['egw']->db;
// Parent puts the application as a prefix. If we're coming from there, pull it off
if(strpos($path, 'filemanager::') === 0)
{
list(,$path) = explode('::', $path);
}
if (empty($name)) $name = $path;
$path2tmp =& Api\Cache::getSession(__CLASS__, 'path2tmp');