forked from extern/egroupware
Fix some bugs in hidden uploads
- Creating the share couldn't handle sqlfs://user@path style paths - UI namespace issues
This commit is contained in:
parent
6a5c6599dd
commit
316adfab5e
@ -131,11 +131,11 @@ class HiddenUploadSharing extends Sharing
|
||||
{
|
||||
$upload_dir = Vfs::concat($path, self::HIDDEN_UPLOAD_DIR);
|
||||
|
||||
if (($stat = Vfs::stat($upload_dir)) && !Vfs::check_access($upload_dir, Vfs::WRITABLE, $stat))
|
||||
if (($stat = stat($upload_dir)) && !Vfs::check_access($upload_dir, Vfs::WRITABLE, $stat))
|
||||
{
|
||||
throw new Api\Exception\NoPermission("Upload directory exists, but you have no write permission");
|
||||
}
|
||||
if (!($stat = Vfs::stat($upload_dir)))
|
||||
if (!($stat = stat($upload_dir)))
|
||||
{
|
||||
// Directory is not there, create it
|
||||
if (!mkdir($upload_dir))
|
||||
|
@ -3,7 +3,8 @@
|
||||
|
||||
namespace EGroupware\Filemanager\Sharing;
|
||||
|
||||
|
||||
use EGroupware\Api\Etemplate;
|
||||
use EGroupware\Api\Json;
|
||||
use EGroupware\Api\Vfs;
|
||||
use EGroupware\Api\Vfs\Sharing;
|
||||
use EGroupware\Api\Vfs\UploadSharingUi;
|
||||
@ -33,7 +34,7 @@ class HiddenUpload extends AnonymousList
|
||||
*/
|
||||
function listview(array $content=null,$msg=null)
|
||||
{
|
||||
$this->etemplate = $this->etemplate ? $this->etemplate : new Api\Etemplate(static::LIST_TEMPLATE);
|
||||
$this->etemplate = $this->etemplate ? $this->etemplate : new Etemplate(static::LIST_TEMPLATE);
|
||||
|
||||
if (isset($GLOBALS['egw']->sharing) && $GLOBALS['egw']->sharing->has_hidden_upload())
|
||||
{
|
||||
@ -120,7 +121,7 @@ class HiddenUpload extends AnonymousList
|
||||
}
|
||||
|
||||
// tell client-side that this directory is writeable - allows upload + button
|
||||
$response = Api\Json\Response::get();
|
||||
$response = Json\Response::get();
|
||||
$response->call('app.filemanager.set_readonly', $query['path'], false);
|
||||
|
||||
// Hide the hidden upload directory, mark everything else as readonly
|
||||
|
Loading…
Reference in New Issue
Block a user