@@ -38,14 +38,14 @@ |
||
38 | 38 | \OC_Mount_Config::$app->registerSettings(); |
39 | 39 | |
40 | 40 | \OCA\Files\App::getNavigationManager()->add(function () { |
41 | - $l = \OC::$server->getL10N('files_external'); |
|
42 | - return [ |
|
43 | - 'id' => 'extstoragemounts', |
|
44 | - 'appname' => 'files_external', |
|
45 | - 'script' => 'list.php', |
|
46 | - 'order' => 30, |
|
47 | - 'name' => $l->t('External storages'), |
|
48 | - ]; |
|
41 | + $l = \OC::$server->getL10N('files_external'); |
|
42 | + return [ |
|
43 | + 'id' => 'extstoragemounts', |
|
44 | + 'appname' => 'files_external', |
|
45 | + 'script' => 'list.php', |
|
46 | + 'order' => 30, |
|
47 | + 'name' => $l->t('External storages'), |
|
48 | + ]; |
|
49 | 49 | }); |
50 | 50 | |
51 | 51 | $mountProvider = $appContainer->query('OCA\Files_External\Config\ConfigAdapter'); |
@@ -87,9 +87,9 @@ |
||
87 | 87 | } |
88 | 88 | ?> |
89 | 89 | |
90 | -<form data-can-create="<?php echo $canCreateMounts?'true':'false' ?>" id="files_external" class="section" data-encryption-enabled="<?php echo $_['encryptionEnabled']?'true': 'false'; ?>"> |
|
90 | +<form data-can-create="<?php echo $canCreateMounts ? 'true' : 'false' ?>" id="files_external" class="section" data-encryption-enabled="<?php echo $_['encryptionEnabled'] ? 'true' : 'false'; ?>"> |
|
91 | 91 | <h2><?php p($l->t('External storages')); ?></h2> |
92 | - <?php if (isset($_['dependencies']) and ($_['dependencies']<>'') and $canCreateMounts) print_unescaped(''.$_['dependencies'].''); ?> |
|
92 | + <?php if (isset($_['dependencies']) and ($_['dependencies'] <> '') and $canCreateMounts) print_unescaped(''.$_['dependencies'].''); ?> |
|
93 | 93 | <table id="externalStorage" class="grid" data-admin='<?php print_unescaped(json_encode($_['visibilityType'] === BackendService::VISIBILITY_ADMIN)); ?>'> |
94 | 94 | <thead> |
95 | 95 | <tr> |
@@ -89,7 +89,10 @@ discard block |
||
89 | 89 | |
90 | 90 | <form data-can-create="<?php echo $canCreateMounts?'true':'false' ?>" id="files_external" class="section" data-encryption-enabled="<?php echo $_['encryptionEnabled']?'true': 'false'; ?>"> |
91 | 91 | <h2><?php p($l->t('External storages')); ?></h2> |
92 | - <?php if (isset($_['dependencies']) and ($_['dependencies']<>'') and $canCreateMounts) print_unescaped(''.$_['dependencies'].''); ?> |
|
92 | + <?php if (isset($_['dependencies']) and ($_['dependencies']<>'') and $canCreateMounts) { |
|
93 | + print_unescaped(''.$_['dependencies'].''); |
|
94 | +} |
|
95 | +?> |
|
93 | 96 | <table id="externalStorage" class="grid" data-admin='<?php print_unescaped(json_encode($_['visibilityType'] === BackendService::VISIBILITY_ADMIN)); ?>'> |
94 | 97 | <thead> |
95 | 98 | <tr> |
@@ -98,7 +101,10 @@ discard block |
||
98 | 101 | <th><?php p($l->t('External storage')); ?></th> |
99 | 102 | <th><?php p($l->t('Authentication')); ?></th> |
100 | 103 | <th><?php p($l->t('Configuration')); ?></th> |
101 | - <?php if ($_['visibilityType'] === BackendService::VISIBILITY_ADMIN) print_unescaped('<th>'.$l->t('Available for').'</th>'); ?> |
|
104 | + <?php if ($_['visibilityType'] === BackendService::VISIBILITY_ADMIN) { |
|
105 | + print_unescaped('<th>'.$l->t('Available for').'</th>'); |
|
106 | +} |
|
107 | +?> |
|
102 | 108 | <th> </th> |
103 | 109 | <th> </th> |
104 | 110 | </tr> |
@@ -130,7 +136,10 @@ discard block |
||
130 | 136 | }); |
131 | 137 | ?> |
132 | 138 | <?php foreach ($sortedBackends as $backend): ?> |
133 | - <?php if ($backend->getDeprecateTo()) continue; // ignore deprecated backends ?> |
|
139 | + <?php if ($backend->getDeprecateTo()) { |
|
140 | + continue; |
|
141 | +} |
|
142 | +// ignore deprecated backends ?> |
|
134 | 143 | <option value="<?php p($backend->getIdentifier()); ?>"><?php p($backend->getText()); ?></option> |
135 | 144 | <?php endforeach; ?> |
136 | 145 | </select> |
@@ -169,7 +178,10 @@ discard block |
||
169 | 178 | |
170 | 179 | <?php if ($_['visibilityType'] === BackendService::VISIBILITY_ADMIN): ?> |
171 | 180 | <input type="checkbox" name="allowUserMounting" id="allowUserMounting" class="checkbox" |
172 | - value="1" <?php if ($_['allowUserMounting'] == 'yes') print_unescaped(' checked="checked"'); ?> /> |
|
181 | + value="1" <?php if ($_['allowUserMounting'] == 'yes') { |
|
182 | + print_unescaped(' checked="checked"'); |
|
183 | +} |
|
184 | +?> /> |
|
173 | 185 | <label for="allowUserMounting"><?php p($l->t('Allow users to mount external storage')); ?></label> <span id="userMountingMsg" class="msg"></span> |
174 | 186 | |
175 | 187 | <p id="userMountingBackends"<?php if ($_['allowUserMounting'] != 'yes'): ?> class="hidden"<?php endif; ?>> |
@@ -182,8 +194,14 @@ discard block |
||
182 | 194 | <?php $i = 0; foreach ($userBackends as $backend): ?> |
183 | 195 | <?php if ($deprecateTo = $backend->getDeprecateTo()): ?> |
184 | 196 | <input type="hidden" id="allowUserMountingBackends<?php p($i); ?>" name="allowUserMountingBackends[]" value="<?php p($backend->getIdentifier()); ?>" data-deprecate-to="<?php p($deprecateTo->getIdentifier()); ?>" /> |
185 | - <?php else: ?> |
|
186 | - <input type="checkbox" id="allowUserMountingBackends<?php p($i); ?>" class="checkbox" name="allowUserMountingBackends[]" value="<?php p($backend->getIdentifier()); ?>" <?php if ($backend->isVisibleFor(BackendService::VISIBILITY_PERSONAL)) print_unescaped(' checked="checked"'); ?> /> |
|
197 | + <?php else { |
|
198 | + : ?> |
|
199 | + <input type="checkbox" id="allowUserMountingBackends<?php p($i); |
|
200 | +} |
|
201 | +?>" class="checkbox" name="allowUserMountingBackends[]" value="<?php p($backend->getIdentifier()); ?>" <?php if ($backend->isVisibleFor(BackendService::VISIBILITY_PERSONAL)) { |
|
202 | + print_unescaped(' checked="checked"'); |
|
203 | +} |
|
204 | +?> /> |
|
187 | 205 | <label for="allowUserMountingBackends<?php p($i); ?>"><?php p($backend->getText()); ?></label> <br /> |
188 | 206 | <?php endif; ?> |
189 | 207 | <?php $i++; ?> |