summaryrefslogtreecommitdiffstats
path: root/lib/public/util.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/util.php')
-rw-r--r--lib/public/util.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/public/util.php b/lib/public/util.php
index 8197482c0dd..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
@@ -367,4 +389,14 @@ class Util {
public static function recursiveArraySearch($haystack, $needle, $index = null) {
return(\OC_Helper::recursiveArraySearch($haystack, $needle, $index));
}
+
+ /**
+ * @brief calculates the maximum upload size respecting system settings, free space and user quota
+ *
+ * @param $dir the current folder where the user currently operates
+ * @return number of bytes representing
+ */
+ public static function maxUploadFilesize($dir) {
+ return \OC_Helper::maxUploadFilesize($dir);
+ }
}