diff options
author | Thomas Mueller <thomas.mueller@tmit.eu> | 2013-02-12 11:01:14 +0100 |
---|---|---|
committer | Thomas Mueller <thomas.mueller@tmit.eu> | 2013-02-12 11:01:14 +0100 |
commit | a953786d7952f2d758a8111302822708d906875e (patch) | |
tree | 167704bb6ad7debce5a38c46e795efb22aff63ea /apps/files_external | |
parent | 646d60ee83168169050271ee9d5442e2dc626e8a (diff) | |
parent | 2507e0da1d61af5d9a9506a29aa6df4c31ac068e (diff) | |
download | nextcloud-server-a953786d7952f2d758a8111302822708d906875e.tar.gz nextcloud-server-a953786d7952f2d758a8111302822708d906875e.zip |
Merge branch 'master' into external_storage_ui_feedback
Diffstat (limited to 'apps/files_external')
-rw-r--r-- | apps/files_external/ajax/removeMountPoint.php | 10 | ||||
-rw-r--r-- | apps/files_external/lib/smb.php | 6 | ||||
-rw-r--r-- | apps/files_external/templates/settings.php | 2 |
3 files changed, 12 insertions, 6 deletions
diff --git a/apps/files_external/ajax/removeMountPoint.php b/apps/files_external/ajax/removeMountPoint.php index aa446426202..2f5dbcfdbac 100644 --- a/apps/files_external/ajax/removeMountPoint.php +++ b/apps/files_external/ajax/removeMountPoint.php @@ -3,6 +3,15 @@ OCP\JSON::checkAppEnabled('files_external'); OCP\JSON::callCheck(); +if (!isset($_POST['isPersonal'])) + return; +if (!isset($_POST['mountPoint'])) + return; +if (!isset($_POST['mountType'])) + return; +if (!isset($_POST['applicable'])) + return; + if ($_POST['isPersonal'] == 'true') { OCP\JSON::checkLoggedIn(); $isPersonal = true; @@ -10,4 +19,5 @@ if ($_POST['isPersonal'] == 'true') { OCP\JSON::checkAdminUser(); $isPersonal = false; } + OC_Mount_Config::removeMountPoint($_POST['mountPoint'], $_POST['mountType'], $_POST['applicable'], $isPersonal); diff --git a/apps/files_external/lib/smb.php b/apps/files_external/lib/smb.php index cea5de36817..989a53a4fc6 100644 --- a/apps/files_external/lib/smb.php +++ b/apps/files_external/lib/smb.php @@ -49,6 +49,7 @@ class SMB extends \OC\Files\Storage\StreamWrapper{ if (substr($path, -1)=='/') { $path=substr($path, 0, -1); } + $path = urlencode($path); return 'smb://'.$this->user.':'.$this->password.'@'.$this->host.$this->share.$this->root.$path; } @@ -63,11 +64,6 @@ class SMB extends \OC\Files\Storage\StreamWrapper{ } } - public function filetype($path) { - // using opendir causes the same amount of requests and caches the content of the folder in one go - return (bool)@$this->opendir($path) ? 'dir' : 'file'; - } - /** * check if a file or folder has been updated since $time * @param string $path diff --git a/apps/files_external/templates/settings.php b/apps/files_external/templates/settings.php index 6dc416303af..16ad6c77bae 100644 --- a/apps/files_external/templates/settings.php +++ b/apps/files_external/templates/settings.php @@ -88,7 +88,7 @@ <select class="chzn-select" multiple style="width:20em;" data-placeholder="<?php echo $l->t('None set'); ?>"> - <option value="all"><?php echo $l->t('All Users'); ?></option> + <option value="all" <?php if (isset($mount['applicable']['users']) && in_array('all', $mount['applicable']['users'])) echo 'selected="selected"';?> ><?php echo $l->t('All Users'); ?></option> <optgroup label="<?php echo $l->t('Groups'); ?>"> <?php foreach ($_['groups'] as $group): ?> <option value="<?php echo $group; ?>(group)" |