summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorSam Tuke <samtuke@owncloud.com>2013-02-05 13:44:45 +0000
committerSam Tuke <samtuke@owncloud.com>2013-02-05 13:44:45 +0000
commitfd90b82acd5c553c28998e9a66d6d914c1fb987b (patch)
tree5d67e42f6a00a79ab8e07e25caa3bae26e78dae8 /lib/public
parent0677d56ee226b0ba884f3e175c86540dbab643a5 (diff)
parent59ed0e6318e447e66429af43a5d3a7fe49ae9d9f (diff)
downloadnextcloud-server-fd90b82acd5c553c28998e9a66d6d914c1fb987b.tar.gz
nextcloud-server-fd90b82acd5c553c28998e9a66d6d914c1fb987b.zip
Merge github.com:owncloud/core
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/share.php3
-rw-r--r--lib/public/util.php22
2 files changed, 24 insertions, 1 deletions
diff --git a/lib/public/share.php b/lib/public/share.php
index 9894f1550a8..9aacf5e3449 100644
--- a/lib/public/share.php
+++ b/lib/public/share.php
@@ -529,7 +529,8 @@ class Share {
$collectionTypes[] = $type;
}
}
- if (!self::getBackend($itemType) instanceof Share_Backend_Collection) {
+ // TODO Add option for collections to be collection of themselves, only 'folder' does it now...
+ if (!self::getBackend($itemType) instanceof Share_Backend_Collection || $itemType != 'folder') {
unset($collectionTypes[0]);
}
// Return array if collections were found or the item type is a collection itself - collections can be inside collections
diff --git a/lib/public/util.php b/lib/public/util.php
index 413dbcccd28..a78a52f326e 100644
--- a/lib/public/util.php
+++ b/lib/public/util.php
@@ -219,6 +219,28 @@ class Util {
}
/**
+ * @brief Returns the request uri
+ * @returns the request uri
+ *
+ * Returns the request uri, even if the website uses one or more
+ * reverse proxies
+ */
+ public static function getRequestUri() {
+ return(\OC_Request::requestUri());
+ }
+
+ /**
+ * @brief Returns the script name
+ * @returns the script name
+ *
+ * Returns the script name, even if the website uses one or more
+ * reverse proxies
+ */
+ public static function getScriptName() {
+ return(\OC_Request::scriptName());
+ }
+
+ /**
* @brief Creates path to an image
* @param string $app app
* @param string $image image name