summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-06-02 17:05:33 +0200
committerLukas Reschke <lukas@owncloud.com>2015-06-02 17:05:33 +0200
commit1cccb227c398d3c5428672aaf9cf6b14e248e5f7 (patch)
tree432c2cdbf077d60688031629fb34f867ec85bfd2 /apps/files_sharing/lib
parent259937680b79044701331eed8bff98e3acd12e6c (diff)
parent70f0cf67a53de5e301e4e773f552b2296dfabaac (diff)
downloadnextcloud-server-1cccb227c398d3c5428672aaf9cf6b14e248e5f7.tar.gz
nextcloud-server-1cccb227c398d3c5428672aaf9cf6b14e248e5f7.zip
Merge pull request #16686 from owncloud/show_cloud_id
show federated cloud id in the personal settings
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r--apps/files_sharing/lib/helper.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/helper.php b/apps/files_sharing/lib/helper.php
index 05b0352ca1f..c76704802b1 100644
--- a/apps/files_sharing/lib/helper.php
+++ b/apps/files_sharing/lib/helper.php
@@ -306,4 +306,20 @@ class Helper {
\OC::$server->getConfig()->setSystemValue('share_folder', $shareFolder);
}
+ /**
+ * remove protocol from URL
+ *
+ * @param string $url
+ * @return string
+ */
+ public static function removeProtocolFromUrl($url) {
+ if (strpos($url, 'https://') === 0) {
+ return substr($url, strlen('https://'));
+ } else if (strpos($url, 'http://') === 0) {
+ return substr($url, strlen('http://'));
+ }
+
+ return $url;
+ }
+
}