aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2013-01-18 23:57:13 -0500
committerMichael Gapczynski <mtgap@owncloud.com>2013-01-18 23:57:13 -0500
commitcd8d8360b0bcc07e22c4c9b86252ef1676b123dc (patch)
treed9043931484e0dac08e67618fc95a99ec88e46c3 /lib/public
parent5df6f9d14d5a05d91d6706b420c8ad9a387a9f6d (diff)
downloadnextcloud-server-cd8d8360b0bcc07e22c4c9b86252ef1676b123dc.tar.gz
nextcloud-server-cd8d8360b0bcc07e22c4c9b86252ef1676b123dc.zip
Disable fancy folder sharing for now
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/share.php56
1 files changed, 28 insertions, 28 deletions
diff --git a/lib/public/share.php b/lib/public/share.php
index 5f9ad7fc09d..f65d272ff17 100644
--- a/lib/public/share.php
+++ b/lib/public/share.php
@@ -300,36 +300,36 @@ class Share {
throw new \Exception($message);
}
// If the item is a folder, scan through the folder looking for equivalent item types
- if ($itemType == 'folder') {
- $parentFolder = self::put('folder', $itemSource, $shareType, $shareWith, $uidOwner, $permissions, true);
- if ($parentFolder && $files = \OC\Files\Filesystem::getDirectoryContent($itemSource)) {
- for ($i = 0; $i < count($files); $i++) {
- $name = substr($files[$i]['name'], strpos($files[$i]['name'], $itemSource) - strlen($itemSource));
- if ($files[$i]['mimetype'] == 'httpd/unix-directory'
- && $children = \OC\Files\Filesystem::getDirectoryContent($name, '/')
- ) {
- // Continue scanning into child folders
- array_push($files, $children);
- } else {
- // Check file extension for an equivalent item type to convert to
- $extension = strtolower(substr($itemSource, strrpos($itemSource, '.') + 1));
- foreach (self::$backends as $type => $backend) {
- if (isset($backend->dependsOn) && $backend->dependsOn == 'file' && isset($backend->supportedFileExtensions) && in_array($extension, $backend->supportedFileExtensions)) {
- $itemType = $type;
- break;
- }
- }
- // Pass on to put() to check if this item should be converted, the item won't be inserted into the database unless it can be converted
- self::put($itemType, $name, $shareType, $shareWith, $uidOwner, $permissions, $parentFolder);
- }
- }
- return true;
- }
- return false;
- } else {
+// if ($itemType == 'folder') {
+// $parentFolder = self::put('folder', $itemSource, $shareType, $shareWith, $uidOwner, $permissions, true);
+// if ($parentFolder && $files = \OC\Files\Filesystem::getDirectoryContent($itemSource)) {
+// for ($i = 0; $i < count($files); $i++) {
+// $name = substr($files[$i]['name'], strpos($files[$i]['name'], $itemSource) - strlen($itemSource));
+// if ($files[$i]['mimetype'] == 'httpd/unix-directory'
+// && $children = \OC\Files\Filesystem::getDirectoryContent($name, '/')
+// ) {
+// // Continue scanning into child folders
+// array_push($files, $children);
+// } else {
+// // Check file extension for an equivalent item type to convert to
+// $extension = strtolower(substr($itemSource, strrpos($itemSource, '.') + 1));
+// foreach (self::$backends as $type => $backend) {
+// if (isset($backend->dependsOn) && $backend->dependsOn == 'file' && isset($backend->supportedFileExtensions) && in_array($extension, $backend->supportedFileExtensions)) {
+// $itemType = $type;
+// break;
+// }
+// }
+// // Pass on to put() to check if this item should be converted, the item won't be inserted into the database unless it can be converted
+// self::put($itemType, $name, $shareType, $shareWith, $uidOwner, $permissions, $parentFolder);
+// }
+// }
+// return true;
+// }
+// return false;
+// } else {
// Put the item into the database
return self::put($itemType, $itemSource, $shareType, $shareWith, $uidOwner, $permissions);
- }
+// }
}
/**