aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2013-01-03 12:07:04 -0500
committerMichael Gapczynski <mtgap@owncloud.com>2013-01-03 12:07:04 -0500
commit38876fc98a11a917e68780357d7f4b5a146ba89a (patch)
tree9bbf1f75462fb104d3dbb3e456dc8be4c1427e33 /apps/files_external/lib
parentf144be8857e3356495acefca787637b5672f73ef (diff)
downloadnextcloud-server-38876fc98a11a917e68780357d7f4b5a146ba89a.tar.gz
nextcloud-server-38876fc98a11a917e68780357d7f4b5a146ba89a.zip
Update old storage classes names to the new namespace during mounting
Diffstat (limited to 'apps/files_external/lib')
-rwxr-xr-xapps/files_external/lib/config.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php
index 323e4060a43..d7286c52c02 100755
--- a/apps/files_external/lib/config.php
+++ b/apps/files_external/lib/config.php
@@ -120,6 +120,10 @@ class OC_Mount_Config {
if (isset($mountPoints[self::MOUNT_TYPE_GROUP])) {
foreach ($mountPoints[self::MOUNT_TYPE_GROUP] as $group => $mounts) {
foreach ($mounts as $mountPoint => $mount) {
+ // Update old classes to new namespace
+ if (strpos($mount['class'], 'OC_Filestorage_') !== false) {
+ $mount['class'] = '\OC\Files\Storage\\'.substr($mount['class'], 15, strlen($mount['class']) - 15);
+ }
// Remove '/$user/files/' from mount point
$mountPoint = substr($mountPoint, 13);
// Merge the mount point into the current mount points
@@ -139,6 +143,10 @@ class OC_Mount_Config {
if (isset($mountPoints[self::MOUNT_TYPE_USER])) {
foreach ($mountPoints[self::MOUNT_TYPE_USER] as $user => $mounts) {
foreach ($mounts as $mountPoint => $mount) {
+ // Update old classes to new namespace
+ if (strpos($mount['class'], 'OC_Filestorage_') !== false) {
+ $mount['class'] = '\OC\Files\Storage\\'.substr($mount['class'], 15, strlen($mount['class']) - 15);
+ }
// Remove '/$user/files/' from mount point
$mountPoint = substr($mountPoint, 13);
// Merge the mount point into the current mount points
@@ -169,6 +177,10 @@ class OC_Mount_Config {
$personal = array();
if (isset($mountPoints[self::MOUNT_TYPE_USER][$uid])) {
foreach ($mountPoints[self::MOUNT_TYPE_USER][$uid] as $mountPoint => $mount) {
+ // Update old classes to new namespace
+ if (strpos($mount['class'], 'OC_Filestorage_') !== false) {
+ $mount['class'] = '\OC\Files\Storage\\'.substr($mount['class'], 15, strlen($mount['class']) - 15);
+ }
// Remove '/uid/files/' from mount point
$personal[substr($mountPoint, strlen($uid) + 8)] = array('class' => $mount['class'],
'backend' => $backends[$mount['class']]['backend'],