diff options
author | blizzz <blizzz@owncloud.com> | 2012-12-15 00:18:05 +0400 |
---|---|---|
committer | blizzz <blizzz@owncloud.com> | 2012-12-15 00:18:05 +0400 |
commit | 09115c3cdaf4d4f0b0c59749a81c63e199ec630a (patch) | |
tree | 015003b76217bdbf3dc96838005928d5442e2819 /apps | |
parent | 8437dea9ffd2d7edf4e6e734ca6ec4687822ce96 (diff) | |
parent | f417741ac9a50b6f3934a8d90b9a69df70659f58 (diff) |
Merge pull request #753 from owncloud/fixing_files_external_stable45
Fixing files external in stable45 - fixes #290
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_external/ajax/removeMountPoint.php | 10 | ||||
-rw-r--r-- | apps/files_external/lib/smb.php | 4 | ||||
-rw-r--r-- | apps/files_external/templates/settings.php | 2 |
3 files changed, 11 insertions, 5 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 eed2582dc99..a19ef3b3804 100644 --- a/apps/files_external/lib/smb.php +++ b/apps/files_external/lib/smb.php @@ -58,10 +58,6 @@ class OC_FileStorage_SMB extends OC_FileStorage_StreamWrapper{ } } - public function filetype($path) { - return (bool)@$this->opendir($path) ? 'dir' : 'file';//using opendir causes the same amount of requests and caches the content of the folder in one go - } - /** * check if a file or folder has been updated since $time * @param int $time diff --git a/apps/files_external/templates/settings.php b/apps/files_external/templates/settings.php index ad518d07dd2..de101f83453 100644 --- a/apps/files_external/templates/settings.php +++ b/apps/files_external/templates/settings.php @@ -61,7 +61,7 @@ <?php if ($_['isAdminPage']): ?> <td class="applicable" align="right" data-applicable-groups='<?php if (isset($mount['applicable']['groups'])) echo json_encode($mount['applicable']['groups']); ?>' data-applicable-users='<?php if (isset($mount['applicable']['users'])) echo json_encode($mount['applicable']['users']); ?>'> <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)" <?php if (isset($mount['applicable']['groups']) && in_array($group, $mount['applicable']['groups'])) echo 'selected="selected"'; ?>><?php echo $group; ?></option> |