forked from extern/egroupware
* Api: Make sure share cleanup job doesn't remove shares just because of access rights
This commit is contained in:
parent
ac83e0f3bd
commit
b0f321f35f
@ -126,6 +126,10 @@ class Sharing extends \EGroupware\Api\Sharing
|
|||||||
protected static function check_path($share)
|
protected static function check_path($share)
|
||||||
{
|
{
|
||||||
list($app, $id) = explode('::', $share['share_path']);
|
list($app, $id) = explode('::', $share['share_path']);
|
||||||
|
if(!\EGroupware\Api\Link::$app_register[$app])
|
||||||
|
{
|
||||||
|
\EGroupware\Api\Link::init_static();
|
||||||
|
}
|
||||||
return (boolean) \EGroupware\Api\Link::title($app, $id);
|
return (boolean) \EGroupware\Api\Link::title($app, $id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -833,7 +833,7 @@ class Sharing
|
|||||||
if (!isset(self::$db)) self::$db = $GLOBALS['egw']->db;
|
if (!isset(self::$db)) self::$db = $GLOBALS['egw']->db;
|
||||||
|
|
||||||
foreach(self::$db->select(self::TABLE, array(
|
foreach(self::$db->select(self::TABLE, array(
|
||||||
'share_id','share_path'
|
'share_id','share_path', 'share_writable'
|
||||||
), array(), __LINE__, __FILE__, false) as $share)
|
), array(), __LINE__, __FILE__, false) as $share)
|
||||||
{
|
{
|
||||||
$class = self::get_share_class($share);
|
$class = self::get_share_class($share);
|
||||||
|
@ -390,7 +390,10 @@ class Sharing extends \EGroupware\Api\Sharing
|
|||||||
*/
|
*/
|
||||||
protected static function check_path($share)
|
protected static function check_path($share)
|
||||||
{
|
{
|
||||||
return Vfs::file_exists($share['share_path']);
|
Vfs::$is_root = true;
|
||||||
|
$exists = Vfs::file_exists($share['share_path']);
|
||||||
|
Vfs::$is_root = false;
|
||||||
|
return $exists;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user