@@ -71,11 +71,17 @@ discard block |
||
| 71 | 71 | </select> |
| 72 | 72 | |
| 73 | 73 | <label id="mail_smtpsecure_label" for="mail_smtpsecure" |
| 74 | - <?php if ($_['mail_smtpmode'] !== 'smtp') print_unescaped(' class="hidden"'); ?>> |
|
| 74 | + <?php if ($_['mail_smtpmode'] !== 'smtp') { |
|
| 75 | + print_unescaped(' class="hidden"'); |
|
| 76 | +} |
|
| 77 | +?>> |
|
| 75 | 78 | <?php p($l->t('Encryption')); ?> |
| 76 | 79 | </label> |
| 77 | 80 | <select name="mail_smtpsecure" id="mail_smtpsecure" |
| 78 | - <?php if ($_['mail_smtpmode'] !== 'smtp') print_unescaped(' class="hidden"'); ?>> |
|
| 81 | + <?php if ($_['mail_smtpmode'] !== 'smtp') { |
|
| 82 | + print_unescaped(' class="hidden"'); |
|
| 83 | +} |
|
| 84 | +?>> |
|
| 79 | 85 | <?php foreach ($mail_smtpsecure as $secure => $name): |
| 80 | 86 | $selected = ''; |
| 81 | 87 | if ($secure == $_['mail_smtpsecure']): |
@@ -94,7 +100,10 @@ discard block |
||
| 94 | 100 | value="<?php p($_['mail_domain']) ?>" /> |
| 95 | 101 | </p> |
| 96 | 102 | |
| 97 | - <p id="setting_smtpauth" <?php if ($_['mail_smtpmode'] !== 'smtp') print_unescaped(' class="hidden"'); ?>> |
|
| 103 | + <p id="setting_smtpauth" <?php if ($_['mail_smtpmode'] !== 'smtp') { |
|
| 104 | + print_unescaped(' class="hidden"'); |
|
| 105 | +} |
|
| 106 | +?>> |
|
| 98 | 107 | <label for="mail_smtpauthtype"><?php p($l->t('Authentication method')); ?></label> |
| 99 | 108 | <select name="mail_smtpauthtype" id="mail_smtpauthtype"> |
| 100 | 109 | <?php foreach ($mail_smtpauthtype as $authtype => $name): |
@@ -107,11 +116,17 @@ discard block |
||
| 107 | 116 | </select> |
| 108 | 117 | |
| 109 | 118 | <input type="checkbox" name="mail_smtpauth" id="mail_smtpauth" class="checkbox" value="1" |
| 110 | - <?php if ($_['mail_smtpauth']) print_unescaped('checked="checked"'); ?> /> |
|
| 119 | + <?php if ($_['mail_smtpauth']) { |
|
| 120 | + print_unescaped('checked="checked"'); |
|
| 121 | +} |
|
| 122 | +?> /> |
|
| 111 | 123 | <label for="mail_smtpauth"><?php p($l->t('Authentication required')); ?></label> |
| 112 | 124 | </p> |
| 113 | 125 | |
| 114 | - <p id="setting_smtphost" <?php if ($_['mail_smtpmode'] !== 'smtp') print_unescaped(' class="hidden"'); ?>> |
|
| 126 | + <p id="setting_smtphost" <?php if ($_['mail_smtpmode'] !== 'smtp') { |
|
| 127 | + print_unescaped(' class="hidden"'); |
|
| 128 | +} |
|
| 129 | +?>> |
|
| 115 | 130 | <label for="mail_smtphost"><?php p($l->t('Server address')); ?></label> |
| 116 | 131 | <input type="text" name="mail_smtphost" id="mail_smtphost" placeholder="smtp.example.com" |
| 117 | 132 | value="<?php p($_['mail_smtphost']) ?>" /> |
@@ -121,7 +136,10 @@ discard block |
||
| 121 | 136 | </p> |
| 122 | 137 | </form> |
| 123 | 138 | <form class="mail_settings" id="mail_credentials_settings"> |
| 124 | - <p id="mail_credentials" <?php if (!$_['mail_smtpauth'] || $_['mail_smtpmode'] !== 'smtp') print_unescaped(' class="hidden"'); ?>> |
|
| 139 | + <p id="mail_credentials" <?php if (!$_['mail_smtpauth'] || $_['mail_smtpmode'] !== 'smtp') { |
|
| 140 | + print_unescaped(' class="hidden"'); |
|
| 141 | +} |
|
| 142 | +?>> |
|
| 125 | 143 | <label for="mail_smtpname"><?php p($l->t('Credentials')); ?></label> |
| 126 | 144 | <input type="text" name="mail_smtpname" id="mail_smtpname" placeholder="<?php p($l->t('SMTP Username'))?>" |
| 127 | 145 | value="<?php p($_['mail_smtpname']) ?>" /> |
@@ -100,7 +100,10 @@ discard block |
||
| 100 | 100 | <h2 class="inlineblock" data-anchor-name="external-storage"><?php p($l->t('External storages')); ?></h2> |
| 101 | 101 | <a target="_blank" rel="noreferrer" class="icon-info" title="<?php p($l->t('Open documentation'));?>" href="<?php p(link_to_docs('admin-external-storage')); ?>"></a> |
| 102 | 102 | <p class="settings-hint"><?php p($l->t('External storage enables you to mount external storage services and devices as secondary Nextcloud storage devices. You may also allow users to mount their own external storage services.')); ?></p> |
| 103 | - <?php if (isset($_['dependencies']) and ($_['dependencies'] !== '') and $canCreateMounts) print_unescaped(''.$_['dependencies'].''); ?> |
|
| 103 | + <?php if (isset($_['dependencies']) and ($_['dependencies'] !== '') and $canCreateMounts) { |
|
| 104 | + print_unescaped(''.$_['dependencies'].''); |
|
| 105 | +} |
|
| 106 | +?> |
|
| 104 | 107 | <table id="externalStorage" class="grid" data-admin='<?php print_unescaped(json_encode($_['visibilityType'] === BackendService::VISIBILITY_ADMIN)); ?>'> |
| 105 | 108 | <thead> |
| 106 | 109 | <tr> |
@@ -109,7 +112,10 @@ discard block |
||
| 109 | 112 | <th><?php p($l->t('External storage')); ?></th> |
| 110 | 113 | <th><?php p($l->t('Authentication')); ?></th> |
| 111 | 114 | <th><?php p($l->t('Configuration')); ?></th> |
| 112 | - <?php if ($_['visibilityType'] === BackendService::VISIBILITY_ADMIN) print_unescaped('<th>'.$l->t('Available for').'</th>'); ?> |
|
| 115 | + <?php if ($_['visibilityType'] === BackendService::VISIBILITY_ADMIN) { |
|
| 116 | + print_unescaped('<th>'.$l->t('Available for').'</th>'); |
|
| 117 | +} |
|
| 118 | +?> |
|
| 113 | 119 | <th> </th> |
| 114 | 120 | <th> </th> |
| 115 | 121 | <th> </th> |
@@ -142,7 +148,10 @@ discard block |
||
| 142 | 148 | }); |
| 143 | 149 | ?> |
| 144 | 150 | <?php foreach ($sortedBackends as $backend): ?> |
| 145 | - <?php if ($backend->getDeprecateTo()) continue; // ignore deprecated backends ?> |
|
| 151 | + <?php if ($backend->getDeprecateTo()) { |
|
| 152 | + continue; |
|
| 153 | +} |
|
| 154 | +// ignore deprecated backends ?> |
|
| 146 | 155 | <option value="<?php p($backend->getIdentifier()); ?>"><?php p($backend->getText()); ?></option> |
| 147 | 156 | <?php endforeach; ?> |
| 148 | 157 | </select> |
@@ -167,7 +176,10 @@ discard block |
||
| 167 | 176 | |
| 168 | 177 | <?php if ($_['visibilityType'] === BackendService::VISIBILITY_ADMIN): ?> |
| 169 | 178 | <input type="checkbox" name="allowUserMounting" id="allowUserMounting" class="checkbox" |
| 170 | - value="1" <?php if ($_['allowUserMounting']) print_unescaped(' checked="checked"'); ?> /> |
|
| 179 | + value="1" <?php if ($_['allowUserMounting']) { |
|
| 180 | + print_unescaped(' checked="checked"'); |
|
| 181 | +} |
|
| 182 | +?> /> |
|
| 171 | 183 | <label for="allowUserMounting"><?php p($l->t('Allow users to mount external storage')); ?></label> <span id="userMountingMsg" class="msg"></span> |
| 172 | 184 | |
| 173 | 185 | <p id="userMountingBackends"<?php if (!$_['allowUserMounting']): ?> class="hidden"<?php endif; ?>> |
@@ -179,8 +191,14 @@ discard block |
||
| 179 | 191 | <?php $i = 0; foreach ($userBackends as $backend): ?> |
| 180 | 192 | <?php if ($deprecateTo = $backend->getDeprecateTo()): ?> |
| 181 | 193 | <input type="hidden" id="allowUserMountingBackends<?php p($i); ?>" name="allowUserMountingBackends[]" value="<?php p($backend->getIdentifier()); ?>" data-deprecate-to="<?php p($deprecateTo->getIdentifier()); ?>" /> |
| 182 | - <?php else: ?> |
|
| 183 | - <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"'); ?> /> |
|
| 194 | + <?php else { |
|
| 195 | + : ?> |
|
| 196 | + <input type="checkbox" id="allowUserMountingBackends<?php p($i); |
|
| 197 | +} |
|
| 198 | +?>" class="checkbox" name="allowUserMountingBackends[]" value="<?php p($backend->getIdentifier()); ?>" <?php if ($backend->isVisibleFor(BackendService::VISIBILITY_PERSONAL)) { |
|
| 199 | + print_unescaped(' checked="checked"'); |
|
| 200 | +} |
|
| 201 | +?> /> |
|
| 184 | 202 | <label for="allowUserMountingBackends<?php p($i); ?>"><?php p($backend->getText()); ?></label> <br /> |
| 185 | 203 | <?php endif; ?> |
| 186 | 204 | <?php $i++; ?> |
@@ -34,89 +34,167 @@ discard block |
||
| 34 | 34 | <p class="settings-hint"><?php p($l->t('As admin you can fine-tune the sharing behavior. Please see the documentation for more information.'));?></p> |
| 35 | 35 | <p id="enable"> |
| 36 | 36 | <input type="checkbox" name="shareapi_enabled" id="shareAPIEnabled" class="checkbox" |
| 37 | - value="1" <?php if ($_['shareAPIEnabled'] === 'yes') print_unescaped('checked="checked"'); ?> /> |
|
| 37 | + value="1" <?php if ($_['shareAPIEnabled'] === 'yes') { |
|
| 38 | + print_unescaped('checked="checked"'); |
|
| 39 | +} |
|
| 40 | +?> /> |
|
| 38 | 41 | <label for="shareAPIEnabled"><?php p($l->t('Allow apps to use the Share API'));?></label><br/> |
| 39 | 42 | </p> |
| 40 | 43 | |
| 41 | - <p id="internalShareSettings" class="indent <?php if ($_['shareAPIEnabled'] === 'no') p('hidden'); ?>"> |
|
| 44 | + <p id="internalShareSettings" class="indent <?php if ($_['shareAPIEnabled'] === 'no') { |
|
| 45 | + p('hidden'); |
|
| 46 | +} |
|
| 47 | +?>"> |
|
| 42 | 48 | <input type="checkbox" name="shareapi_default_internal_expire_date" id="shareapiDefaultInternalExpireDate" class="checkbox" |
| 43 | - value="1" <?php if ($_['shareDefaultInternalExpireDateSet'] === 'yes') print_unescaped('checked="checked"'); ?> /> |
|
| 49 | + value="1" <?php if ($_['shareDefaultInternalExpireDateSet'] === 'yes') { |
|
| 50 | + print_unescaped('checked="checked"'); |
|
| 51 | +} |
|
| 52 | +?> /> |
|
| 44 | 53 | <label for="shareapiDefaultInternalExpireDate"><?php p($l->t('Set default expiration date for shares'));?></label><br/> |
| 45 | 54 | </p> |
| 46 | - <p id="setDefaultInternalExpireDate" class="double-indent <?php if ($_['shareDefaultInternalExpireDateSet'] === 'no' || $_['shareAPIEnabled'] === 'no') p('hidden');?>"> |
|
| 55 | + <p id="setDefaultInternalExpireDate" class="double-indent <?php if ($_['shareDefaultInternalExpireDateSet'] === 'no' || $_['shareAPIEnabled'] === 'no') { |
|
| 56 | + p('hidden'); |
|
| 57 | +} |
|
| 58 | +?>"> |
|
| 47 | 59 | <?php p($l->t( 'Expire after ' )); ?> |
| 48 | 60 | <input type="text" name='shareapi_internal_expire_after_n_days' id="shareapiInternalExpireAfterNDays" placeholder="<?php p('7')?>" |
| 49 | 61 | value='<?php p($_['shareInternalExpireAfterNDays']) ?>' /> |
| 50 | 62 | <?php p($l->t( 'days' )); ?> |
| 51 | 63 | <input type="checkbox" name="shareapi_internal_enforce_expire_date" id="shareapiInternalEnforceExpireDate" class="checkbox" |
| 52 | - value="1" <?php if ($_['shareInternalEnforceExpireDate'] === 'yes') print_unescaped('checked="checked"'); ?> /> |
|
| 64 | + value="1" <?php if ($_['shareInternalEnforceExpireDate'] === 'yes') { |
|
| 65 | + print_unescaped('checked="checked"'); |
|
| 66 | +} |
|
| 67 | +?> /> |
|
| 53 | 68 | <label for="shareapiInternalEnforceExpireDate"><?php p($l->t('Enforce expiration date'));?></label><br/> |
| 54 | 69 | </p> |
| 55 | 70 | |
| 56 | - <p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>"> |
|
| 71 | + <p class="<?php if ($_['shareAPIEnabled'] === 'no') { |
|
| 72 | + p('hidden'); |
|
| 73 | +} |
|
| 74 | +?>"> |
|
| 57 | 75 | <input type="checkbox" name="shareapi_allow_links" id="allowLinks" class="checkbox" |
| 58 | - value="1" <?php if ($_['allowLinks'] === 'yes') print_unescaped('checked="checked"'); ?> /> |
|
| 76 | + value="1" <?php if ($_['allowLinks'] === 'yes') { |
|
| 77 | + print_unescaped('checked="checked"'); |
|
| 78 | +} |
|
| 79 | +?> /> |
|
| 59 | 80 | <label for="allowLinks"><?php p($l->t('Allow users to share via link'));?></label><br/> |
| 60 | 81 | </p> |
| 61 | 82 | |
| 62 | - <p id="publicLinkSettings" class="indent <?php if ($_['allowLinks'] !== 'yes' || $_['shareAPIEnabled'] === 'no') p('hidden'); ?>"> |
|
| 83 | + <p id="publicLinkSettings" class="indent <?php if ($_['allowLinks'] !== 'yes' || $_['shareAPIEnabled'] === 'no') { |
|
| 84 | + p('hidden'); |
|
| 85 | +} |
|
| 86 | +?>"> |
|
| 63 | 87 | <input type="checkbox" name="shareapi_allow_public_upload" id="allowPublicUpload" class="checkbox" |
| 64 | - value="1" <?php if ($_['allowPublicUpload'] == 'yes') print_unescaped('checked="checked"'); ?> /> |
|
| 88 | + value="1" <?php if ($_['allowPublicUpload'] == 'yes') { |
|
| 89 | + print_unescaped('checked="checked"'); |
|
| 90 | +} |
|
| 91 | +?> /> |
|
| 65 | 92 | <label for="allowPublicUpload"><?php p($l->t('Allow public uploads'));?></label><br/> |
| 66 | 93 | <input type="checkbox" name="shareapi_enable_link_password_by_default" id="enableLinkPasswordByDefault" class="checkbox" |
| 67 | - value="1" <?php if ($_['enableLinkPasswordByDefault'] === 'yes') print_unescaped('checked="checked"'); ?> /> |
|
| 94 | + value="1" <?php if ($_['enableLinkPasswordByDefault'] === 'yes') { |
|
| 95 | + print_unescaped('checked="checked"'); |
|
| 96 | +} |
|
| 97 | +?> /> |
|
| 68 | 98 | <label for="enableLinkPasswordByDefault"><?php p($l->t('Always ask for a password'));?></label><br/> |
| 69 | 99 | <input type="checkbox" name="shareapi_enforce_links_password" id="enforceLinkPassword" class="checkbox" |
| 70 | - value="1" <?php if ($_['enforceLinkPassword']) print_unescaped('checked="checked"'); ?> /> |
|
| 100 | + value="1" <?php if ($_['enforceLinkPassword']) { |
|
| 101 | + print_unescaped('checked="checked"'); |
|
| 102 | +} |
|
| 103 | +?> /> |
|
| 71 | 104 | <label for="enforceLinkPassword"><?php p($l->t('Enforce password protection'));?></label><br/> |
| 72 | 105 | |
| 73 | 106 | <input type="checkbox" name="shareapi_default_expire_date" id="shareapiDefaultExpireDate" class="checkbox" |
| 74 | - value="1" <?php if ($_['shareDefaultExpireDateSet'] === 'yes') print_unescaped('checked="checked"'); ?> /> |
|
| 107 | + value="1" <?php if ($_['shareDefaultExpireDateSet'] === 'yes') { |
|
| 108 | + print_unescaped('checked="checked"'); |
|
| 109 | +} |
|
| 110 | +?> /> |
|
| 75 | 111 | <label for="shareapiDefaultExpireDate"><?php p($l->t('Set default expiration date for link shares'));?></label><br/> |
| 76 | 112 | |
| 77 | 113 | </p> |
| 78 | - <p id="setDefaultExpireDate" class="double-indent <?php if ($_['allowLinks'] !== 'yes' || $_['shareDefaultExpireDateSet'] === 'no' || $_['shareAPIEnabled'] === 'no') p('hidden');?>"> |
|
| 114 | + <p id="setDefaultExpireDate" class="double-indent <?php if ($_['allowLinks'] !== 'yes' || $_['shareDefaultExpireDateSet'] === 'no' || $_['shareAPIEnabled'] === 'no') { |
|
| 115 | + p('hidden'); |
|
| 116 | +} |
|
| 117 | +?>"> |
|
| 79 | 118 | <?php p($l->t( 'Expire after ' )); ?> |
| 80 | 119 | <input type="text" name='shareapi_expire_after_n_days' id="shareapiExpireAfterNDays" placeholder="<?php p('7')?>" |
| 81 | 120 | value='<?php p($_['shareExpireAfterNDays']) ?>' /> |
| 82 | 121 | <?php p($l->t( 'days' )); ?> |
| 83 | 122 | <input type="checkbox" name="shareapi_enforce_expire_date" id="shareapiEnforceExpireDate" class="checkbox" |
| 84 | - value="1" <?php if ($_['shareEnforceExpireDate'] === 'yes') print_unescaped('checked="checked"'); ?> /> |
|
| 123 | + value="1" <?php if ($_['shareEnforceExpireDate'] === 'yes') { |
|
| 124 | + print_unescaped('checked="checked"'); |
|
| 125 | +} |
|
| 126 | +?> /> |
|
| 85 | 127 | <label for="shareapiEnforceExpireDate"><?php p($l->t('Enforce expiration date'));?></label><br/> |
| 86 | 128 | </p> |
| 87 | - <p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>"> |
|
| 129 | + <p class="<?php if ($_['shareAPIEnabled'] === 'no') { |
|
| 130 | + p('hidden'); |
|
| 131 | +} |
|
| 132 | +?>"> |
|
| 88 | 133 | <input type="checkbox" name="shareapi_allow_resharing" id="allowResharing" class="checkbox" |
| 89 | - value="1" <?php if ($_['allowResharing'] === 'yes') print_unescaped('checked="checked"'); ?> /> |
|
| 134 | + value="1" <?php if ($_['allowResharing'] === 'yes') { |
|
| 135 | + print_unescaped('checked="checked"'); |
|
| 136 | +} |
|
| 137 | +?> /> |
|
| 90 | 138 | <label for="allowResharing"><?php p($l->t('Allow resharing'));?></label><br/> |
| 91 | 139 | </p> |
| 92 | - <p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>"> |
|
| 140 | + <p class="<?php if ($_['shareAPIEnabled'] === 'no') { |
|
| 141 | + p('hidden'); |
|
| 142 | +} |
|
| 143 | +?>"> |
|
| 93 | 144 | <input type="checkbox" name="shareapi_allow_group_sharing" id="allowGroupSharing" class="checkbox" |
| 94 | - value="1" <?php if ($_['allowGroupSharing'] === 'yes') print_unescaped('checked="checked"'); ?> /> |
|
| 145 | + value="1" <?php if ($_['allowGroupSharing'] === 'yes') { |
|
| 146 | + print_unescaped('checked="checked"'); |
|
| 147 | +} |
|
| 148 | +?> /> |
|
| 95 | 149 | <label for="allowGroupSharing"><?php p($l->t('Allow sharing with groups'));?></label><br /> |
| 96 | 150 | </p> |
| 97 | - <p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>"> |
|
| 151 | + <p class="<?php if ($_['shareAPIEnabled'] === 'no') { |
|
| 152 | + p('hidden'); |
|
| 153 | +} |
|
| 154 | +?>"> |
|
| 98 | 155 | <input type="checkbox" name="shareapi_only_share_with_group_members" id="onlyShareWithGroupMembers" class="checkbox" |
| 99 | - value="1" <?php if ($_['onlyShareWithGroupMembers']) print_unescaped('checked="checked"'); ?> /> |
|
| 156 | + value="1" <?php if ($_['onlyShareWithGroupMembers']) { |
|
| 157 | + print_unescaped('checked="checked"'); |
|
| 158 | +} |
|
| 159 | +?> /> |
|
| 100 | 160 | <label for="onlyShareWithGroupMembers"><?php p($l->t('Restrict users to only share with users in their groups'));?></label><br/> |
| 101 | 161 | </p> |
| 102 | - <p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>"> |
|
| 162 | + <p class="<?php if ($_['shareAPIEnabled'] === 'no') { |
|
| 163 | + p('hidden'); |
|
| 164 | +} |
|
| 165 | +?>"> |
|
| 103 | 166 | <input type="checkbox" name="shareapi_exclude_groups" id="shareapiExcludeGroups" class="checkbox" |
| 104 | - value="1" <?php if ($_['shareExcludeGroups']) print_unescaped('checked="checked"'); ?> /> |
|
| 167 | + value="1" <?php if ($_['shareExcludeGroups']) { |
|
| 168 | + print_unescaped('checked="checked"'); |
|
| 169 | +} |
|
| 170 | +?> /> |
|
| 105 | 171 | <label for="shareapiExcludeGroups"><?php p($l->t('Exclude groups from sharing'));?></label><br/> |
| 106 | 172 | </p> |
| 107 | - <p id="selectExcludedGroups" class="indent <?php if (!$_['shareExcludeGroups'] || $_['shareAPIEnabled'] === 'no') p('hidden'); ?>"> |
|
| 173 | + <p id="selectExcludedGroups" class="indent <?php if (!$_['shareExcludeGroups'] || $_['shareAPIEnabled'] === 'no') { |
|
| 174 | + p('hidden'); |
|
| 175 | +} |
|
| 176 | +?>"> |
|
| 108 | 177 | <input name="shareapi_exclude_groups_list" type="hidden" id="excludedGroups" value="<?php p($_['shareExcludedGroupsList']) ?>" style="width: 400px" class="noJSAutoUpdate"/> |
| 109 | 178 | <br /> |
| 110 | 179 | <em><?php p($l->t('These groups will still be able to receive shares, but not to initiate them.')); ?></em> |
| 111 | 180 | </p> |
| 112 | - <p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>"> |
|
| 181 | + <p class="<?php if ($_['shareAPIEnabled'] === 'no') { |
|
| 182 | + p('hidden'); |
|
| 183 | +} |
|
| 184 | +?>"> |
|
| 113 | 185 | <input type="checkbox" name="shareapi_allow_share_dialog_user_enumeration" value="1" id="shareapi_allow_share_dialog_user_enumeration" class="checkbox" |
| 114 | - <?php if ($_['allowShareDialogUserEnumeration'] === 'yes') print_unescaped('checked="checked"'); ?> /> |
|
| 186 | + <?php if ($_['allowShareDialogUserEnumeration'] === 'yes') { |
|
| 187 | + print_unescaped('checked="checked"'); |
|
| 188 | +} |
|
| 189 | +?> /> |
|
| 115 | 190 | <label for="shareapi_allow_share_dialog_user_enumeration"><?php p($l->t('Allow username autocompletion in share dialog. If this is disabled the full username or email address needs to be entered.'));?></label><br /> |
| 116 | 191 | </p> |
| 117 | 192 | <p> |
| 118 | 193 | <input type="checkbox" id="publicShareDisclaimer" class="checkbox noJSAutoUpdate" |
| 119 | - <?php if ($_['publicShareDisclaimerText'] !== null) print_unescaped('checked="checked"'); ?> /> |
|
| 194 | + <?php if ($_['publicShareDisclaimerText'] !== null) { |
|
| 195 | + print_unescaped('checked="checked"'); |
|
| 196 | +} |
|
| 197 | +?> /> |
|
| 120 | 198 | <label for="publicShareDisclaimer"><?php p($l->t('Show disclaimer text on the public link upload page. (Only shown when the file list is hidden.)'));?></label> |
| 121 | 199 | <span id="publicShareDisclaimerStatus" class="msg" style="display:none"></span> |
| 122 | 200 | <br/> |
@@ -126,10 +204,16 @@ discard block |
||
| 126 | 204 | <h3><?php p($l->t('Default share permissions'));?></h3> |
| 127 | 205 | <input type="hidden" name="shareapi_default_permissions" id="shareApiDefaultPermissions" class="checkbox" |
| 128 | 206 | value="<?php p($_['shareApiDefaultPermissions']) ?>" /> |
| 129 | - <p id="shareApiDefaultPermissionsSection" class="indent <?php if ($_['shareAPIEnabled'] === 'no') p('hidden'); ?>"> |
|
| 207 | + <p id="shareApiDefaultPermissionsSection" class="indent <?php if ($_['shareAPIEnabled'] === 'no') { |
|
| 208 | + p('hidden'); |
|
| 209 | +} |
|
| 210 | +?>"> |
|
| 130 | 211 | <?php foreach ($_['shareApiDefaultPermissionsCheckboxes'] as $perm): ?> |
| 131 | 212 | <input type="checkbox" name="shareapi_default_permission_<?php p($perm['id']) ?>" id="shareapi_default_permission_<?php p($perm['id']) ?>" |
| 132 | - class="noautosave checkbox" value="<?php p($perm['value']) ?>" <?php if (($_['shareApiDefaultPermissions'] & $perm['value']) !== 0) print_unescaped('checked="checked"'); ?> /> |
|
| 213 | + class="noautosave checkbox" value="<?php p($perm['value']) ?>" <?php if (($_['shareApiDefaultPermissions'] & $perm['value']) !== 0) { |
|
| 214 | + print_unescaped('checked="checked"'); |
|
| 215 | +} |
|
| 216 | +?> /> |
|
| 133 | 217 | <label for="shareapi_default_permission_<?php p($perm['id']) ?>"><?php p($perm['label']);?></label> |
| 134 | 218 | <?php endforeach ?> |
| 135 | 219 | </p> |
@@ -27,11 +27,15 @@ discard block |
||
| 27 | 27 | <?php p($l->t('Set up two-factor authentication')) ?> |
| 28 | 28 | </a> |
| 29 | 29 | <?php } ?> |
| 30 | - <?php else: ?> |
|
| 30 | + <?php else { |
|
| 31 | + : ?> |
|
| 31 | 32 | <strong><?php p($l->t('Two-factor authentication is enforced but has not been configured on your account. Use one of your backup codes to log in or contact your admin for assistance.')) ?></strong> |
| 32 | - <?php endif; ?> |
|
| 33 | + <?php endif; |
|
| 34 | +} |
|
| 35 | +?> |
|
| 33 | 36 | </p> |
| 34 | - <?php else: ?> |
|
| 37 | + <?php else { |
|
| 38 | + : ?> |
|
| 35 | 39 | <ul> |
| 36 | 40 | <?php foreach ($_['providers'] as $provider): ?> |
| 37 | 41 | <li> |
@@ -45,6 +49,7 @@ discard block |
||
| 45 | 49 | <?php |
| 46 | 50 | if ($provider instanceof \OCP\Authentication\TwoFactorAuth\IProvidesIcons) { |
| 47 | 51 | $icon = $provider->getLightIcon(); |
| 52 | +} |
|
| 48 | 53 | } else { |
| 49 | 54 | $icon = image_path('core', 'actions/password-white.svg'); |
| 50 | 55 | } |
@@ -61,7 +66,8 @@ discard block |
||
| 61 | 66 | <?php endif ?> |
| 62 | 67 | <?php if (!is_null($_['backupProvider'])): ?> |
| 63 | 68 | <p> |
| 64 | - <a class="<?php if($noProviders): ?>button primary two-factor-primary<?php else: ?>two-factor-secondary<?php endif ?>" href="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.showChallenge', |
|
| 69 | + <a class="<?php if($noProviders): ?>button primary two-factor-primary<?php else { |
|
| 70 | + : ?>two-factor-secondary<?php endif ?>" href="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.showChallenge', |
|
| 65 | 71 | [ |
| 66 | 72 | 'challengeProviderId' => $_['backupProvider']->getId(), |
| 67 | 73 | 'redirect_url' => $_['redirect_url'], |
@@ -70,7 +76,9 @@ discard block |
||
| 70 | 76 | <?php p($l->t('Use backup code')) ?> |
| 71 | 77 | </a> |
| 72 | 78 | </p> |
| 73 | - <?php endif; ?> |
|
| 79 | + <?php endif; |
|
| 80 | +} |
|
| 81 | +?> |
|
| 74 | 82 | <p><a class="two-factor-secondary" href="<?php print_unescaped($_['logout_url']); ?>"> |
| 75 | 83 | <?php p($l->t('Cancel login')) ?> |
| 76 | 84 | </a></p> |
@@ -76,16 +76,14 @@ |
||
| 76 | 76 | if ($provider instanceof \OCP\Authentication\TwoFactorAuth\IProvidesIcons) { |
| 77 | 77 | if ($_['themedark']) { |
| 78 | 78 | $icon = $provider->getLightIcon(); |
| 79 | - } |
|
| 80 | - else { |
|
| 79 | + } else { |
|
| 81 | 80 | $icon = $provider->getDarkIcon(); |
| 82 | 81 | } |
| 83 | 82 | //fallback icon if the 2factor provider doesn't provide an icon. |
| 84 | 83 | } else { |
| 85 | 84 | if ($_['themedark']) { |
| 86 | 85 | $icon = image_path('core', 'actions/password-white.svg'); |
| 87 | - } |
|
| 88 | - else { |
|
| 86 | + } else { |
|
| 89 | 87 | $icon = image_path('core', 'actions/password.svg'); |
| 90 | 88 | } |
| 91 | 89 | |
@@ -125,8 +125,7 @@ |
||
| 125 | 125 | $query = "CREATE USER '$name'@'%' IDENTIFIED BY '$password'"; |
| 126 | 126 | $connection->executeUpdate($query); |
| 127 | 127 | } |
| 128 | - } |
|
| 129 | - catch (\Exception $ex){ |
|
| 128 | + } catch (\Exception $ex){ |
|
| 130 | 129 | $this->logger->logException($ex, [ |
| 131 | 130 | 'message' => 'Database user creation failed.', |
| 132 | 131 | 'level' => ILogger::ERROR, |