summaryrefslogtreecommitdiffstats
path: root/apps/files_external/templates
diff options
context:
space:
mode:
authorRobin McCorkell <rmccorkell@owncloud.com>2015-08-12 20:03:11 +0100
committerRobin McCorkell <rmccorkell@owncloud.com>2015-08-19 10:05:11 +0100
commit1eeca031f863a652d07ebfa2f75339232bf60dc1 (patch)
tree2f4b046e3506d4e9e385415bf01961f9b9978d97 /apps/files_external/templates
parent272a46ebe1a5e195a078dde74f5f2ad941923d9e (diff)
downloadnextcloud-server-1eeca031f863a652d07ebfa2f75339232bf60dc1.tar.gz
nextcloud-server-1eeca031f863a652d07ebfa2f75339232bf60dc1.zip
Split backend identifiers from the class name
Prior to this, the storage class name was stored in mount.json under the "class" parameter, and the auth mechanism class name under the "authMechanism" parameter. This decouples the class name from the identifier used to retrieve the backend or auth mechanism. Now, backends/auth mechanisms have a unique identifier, which is saved in the "backend" or "authMechanism" parameter in mount.json respectively. An identifier is considered unique for the object it references, but the underlying class may change (e.g. files_external gets pulled into core and namespaces are modified).
Diffstat (limited to 'apps/files_external/templates')
-rw-r--r--apps/files_external/templates/settings.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/files_external/templates/settings.php b/apps/files_external/templates/settings.php
index 2328ea9565d..589574bbae4 100644
--- a/apps/files_external/templates/settings.php
+++ b/apps/files_external/templates/settings.php
@@ -71,7 +71,7 @@
</thead>
<tbody>
<?php foreach ($_['storages'] as $storage): ?>
- <tr class="<?php p($storage->getBackend()->getClass()); ?>" data-id="<?php p($storage->getId()); ?>">
+ <tr class="<?php p($storage->getBackend()->getIdentifier()); ?>" data-id="<?php p($storage->getId()); ?>">
<td class="status">
<span></span>
</td>
@@ -80,7 +80,7 @@
data-mountpoint="<?php p(ltrim($storage->getMountPoint(), '/')); ?>"
placeholder="<?php p($l->t('Folder name')); ?>" />
</td>
- <td class="backend" data-class="<?php p($storage->getBackend()->getClass()); ?>"><?php p($storage->getBackend()->getText()); ?>
+ <td class="backend" data-class="<?php p($storage->getBackend()->getIdentifier()); ?>"><?php p($storage->getBackend()->getText()); ?>
</td>
<td class="authentication">
<select class="selectAuthMechanism">
@@ -91,8 +91,8 @@
});
?>
<?php foreach ($authMechanisms as $mech): ?>
- <option value="<?php p($mech->getClass()); ?>" data-scheme="<?php p($mech->getScheme());?>"
- <?php if ($mech->getClass() === $storage->getAuthMechanism()->getClass()): ?>selected<?php endif; ?>
+ <option value="<?php p($mech->getIdentifier()); ?>" data-scheme="<?php p($mech->getScheme());?>"
+ <?php if ($mech->getIdentifier() === $storage->getAuthMechanism()->getIdentifier()): ?>selected<?php endif; ?>
><?php p($mech->getText()); ?></option>
<?php endforeach; ?>
</select>
@@ -166,7 +166,7 @@
});
?>
<?php foreach ($sortedBackends as $backend): ?>
- <option value="<?php p($backend->getClass()); ?>"><?php p($backend->getText()); ?></option>
+ <option value="<?php p($backend->getIdentifier()); ?>"><?php p($backend->getText()); ?></option>
<?php endforeach; ?>
</select>
</td>
@@ -206,7 +206,7 @@
<p id="userMountingBackends"<?php if ($_['allowUserMounting'] != 'yes'): ?> class="hidden"<?php endif; ?>>
<?php p($l->t('Allow users to mount the following external storage')); ?><br />
<?php $i = 0; foreach ($_['userBackends'] as $backend): ?>
- <input type="checkbox" id="allowUserMountingBackends<?php p($i); ?>" name="allowUserMountingBackends[]" value="<?php p($backend->getClass()); ?>" <?php if ($backend->isVisibleFor(BackendService::VISIBILITY_PERSONAL)) print_unescaped(' checked="checked"'); ?> />
+ <input type="checkbox" id="allowUserMountingBackends<?php p($i); ?>" name="allowUserMountingBackends[]" value="<?php p($backend->getIdentifier()); ?>" <?php if ($backend->isVisibleFor(BackendService::VISIBILITY_PERSONAL)) print_unescaped(' checked="checked"'); ?> />
<label for="allowUserMountingBackends<?php p($i); ?>"><?php p($backend->getText()); ?></label> <br />
<?php $i++; ?>
<?php endforeach; ?>