@@ -52,9 +52,9 @@ discard block |
||
| 52 | 52 | |
| 53 | 53 | <div class="section" id="mail_general_settings"> |
| 54 | 54 | <form id="mail_general_settings_form" class="mail_settings"> |
| 55 | - <h2><?php p($l->t('Email server'));?></h2> |
|
| 55 | + <h2><?php p($l->t('Email server')); ?></h2> |
|
| 56 | 56 | <a target="_blank" rel="noreferrer noopener" class="icon-info" |
| 57 | - title="<?php p($l->t('Open documentation'));?>" |
|
| 57 | + title="<?php p($l->t('Open documentation')); ?>" |
|
| 58 | 58 | href="<?php p(link_to_docs('admin-email')); ?>"></a> |
| 59 | 59 | <p class="settings-hint"><?php p($l->t('It is important to set up this server to be able to send emails, like for password reset and notifications.')); ?></p> |
| 60 | 60 | <p><span id="mail_settings_msg" class="msg"></span></p> |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | $selected = 'selected="selected"'; |
| 69 | 69 | endif; ?> |
| 70 | 70 | <option value="<?php p($smtpmode[0])?>" <?php p($selected) ?>><?php p($smtpmode[1]) ?></option> |
| 71 | - <?php endforeach;?> |
|
| 71 | + <?php endforeach; ?> |
|
| 72 | 72 | </select> |
| 73 | 73 | |
| 74 | 74 | <label id="mail_smtpsecure_label" for="mail_smtpsecure" |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | $selected = 'selected="selected"'; |
| 84 | 84 | endif; ?> |
| 85 | 85 | <option value="<?php p($secure)?>" <?php p($selected) ?>><?php p($name) ?></option> |
| 86 | - <?php endforeach;?> |
|
| 86 | + <?php endforeach; ?> |
|
| 87 | 87 | </select> |
| 88 | 88 | </p> |
| 89 | 89 | |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | $selected = 'selected="selected"'; |
| 105 | 105 | endif; ?> |
| 106 | 106 | <option value="<?php p($authtype)?>" <?php p($selected) ?>><?php p($name) ?></option> |
| 107 | - <?php endforeach;?> |
|
| 107 | + <?php endforeach; ?> |
|
| 108 | 108 | </select> |
| 109 | 109 | |
| 110 | 110 | <input type="checkbox" name="mail_smtpauth" id="mail_smtpauth" class="checkbox" value="1" |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | <div class="section" id='encryptionAPI'> |
| 30 | 30 | <h2><?php p($l->t('Server-side encryption')); ?></h2> |
| 31 | 31 | <a target="_blank" rel="noreferrer noopener" class="icon-info" |
| 32 | - title="<?php p($l->t('Open documentation'));?>" |
|
| 32 | + title="<?php p($l->t('Open documentation')); ?>" |
|
| 33 | 33 | href="<?php p(link_to_docs('admin-encryption')); ?>"></a> |
| 34 | 34 | <p class="settings-hint"><?php p($l->t('Server-side encryption makes it possible to encrypt files which are uploaded to this server. This comes with limitations like a performance penalty, so enable this only if needed.')); ?></p> |
| 35 | 35 | <p id="enable"> |
@@ -27,81 +27,81 @@ |
||
| 27 | 27 | ?> |
| 28 | 28 | |
| 29 | 29 | <div class="section" id="shareAPI"> |
| 30 | - <h2><?php p($l->t('Sharing'));?></h2> |
|
| 30 | + <h2><?php p($l->t('Sharing')); ?></h2> |
|
| 31 | 31 | <a target="_blank" rel="noreferrer noopener" class="icon-info" |
| 32 | - title="<?php p($l->t('Open documentation'));?>" |
|
| 32 | + title="<?php p($l->t('Open documentation')); ?>" |
|
| 33 | 33 | href="<?php p(link_to_docs('admin-sharing')); ?>"></a> |
| 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> |
|
| 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 | 37 | value="1" <?php if ($_['shareAPIEnabled'] === 'yes') print_unescaped('checked="checked"'); ?> /> |
| 38 | - <label for="shareAPIEnabled"><?php p($l->t('Allow apps to use the Share API'));?></label><br/> |
|
| 38 | + <label for="shareAPIEnabled"><?php p($l->t('Allow apps to use the Share API')); ?></label><br/> |
|
| 39 | 39 | </p> |
| 40 | - <p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>"> |
|
| 40 | + <p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden'); ?>"> |
|
| 41 | 41 | <input type="checkbox" name="shareapi_allow_links" id="allowLinks" class="checkbox" |
| 42 | 42 | value="1" <?php if ($_['allowLinks'] === 'yes') print_unescaped('checked="checked"'); ?> /> |
| 43 | - <label for="allowLinks"><?php p($l->t('Allow users to share via link'));?></label><br/> |
|
| 43 | + <label for="allowLinks"><?php p($l->t('Allow users to share via link')); ?></label><br/> |
|
| 44 | 44 | </p> |
| 45 | 45 | |
| 46 | 46 | <p id="publicLinkSettings" class="indent <?php if ($_['allowLinks'] !== 'yes' || $_['shareAPIEnabled'] === 'no') p('hidden'); ?>"> |
| 47 | 47 | <input type="checkbox" name="shareapi_allow_public_upload" id="allowPublicUpload" class="checkbox" |
| 48 | 48 | value="1" <?php if ($_['allowPublicUpload'] == 'yes') print_unescaped('checked="checked"'); ?> /> |
| 49 | - <label for="allowPublicUpload"><?php p($l->t('Allow public uploads'));?></label><br/> |
|
| 49 | + <label for="allowPublicUpload"><?php p($l->t('Allow public uploads')); ?></label><br/> |
|
| 50 | 50 | <input type="checkbox" name="shareapi_enable_link_password_by_default" id="enableLinkPasswordByDefault" class="checkbox" |
| 51 | 51 | value="1" <?php if ($_['enableLinkPasswordByDefault'] === 'yes') print_unescaped('checked="checked"'); ?> /> |
| 52 | - <label for="enableLinkPasswordByDefault"><?php p($l->t('Always ask for a password'));?></label><br/> |
|
| 52 | + <label for="enableLinkPasswordByDefault"><?php p($l->t('Always ask for a password')); ?></label><br/> |
|
| 53 | 53 | <input type="checkbox" name="shareapi_enforce_links_password" id="enforceLinkPassword" class="checkbox" |
| 54 | 54 | value="1" <?php if ($_['enforceLinkPassword']) print_unescaped('checked="checked"'); ?> /> |
| 55 | - <label for="enforceLinkPassword"><?php p($l->t('Enforce password protection'));?></label><br/> |
|
| 55 | + <label for="enforceLinkPassword"><?php p($l->t('Enforce password protection')); ?></label><br/> |
|
| 56 | 56 | |
| 57 | 57 | <input type="checkbox" name="shareapi_default_expire_date" id="shareapiDefaultExpireDate" class="checkbox" |
| 58 | 58 | value="1" <?php if ($_['shareDefaultExpireDateSet'] === 'yes') print_unescaped('checked="checked"'); ?> /> |
| 59 | - <label for="shareapiDefaultExpireDate"><?php p($l->t('Set default expiration date'));?></label><br/> |
|
| 59 | + <label for="shareapiDefaultExpireDate"><?php p($l->t('Set default expiration date')); ?></label><br/> |
|
| 60 | 60 | |
| 61 | 61 | </p> |
| 62 | - <p id="setDefaultExpireDate" class="double-indent <?php if ($_['allowLinks'] !== 'yes' || $_['shareDefaultExpireDateSet'] === 'no' || $_['shareAPIEnabled'] === 'no') p('hidden');?>"> |
|
| 63 | - <?php p($l->t( 'Expire after ' )); ?> |
|
| 62 | + <p id="setDefaultExpireDate" class="double-indent <?php if ($_['allowLinks'] !== 'yes' || $_['shareDefaultExpireDateSet'] === 'no' || $_['shareAPIEnabled'] === 'no') p('hidden'); ?>"> |
|
| 63 | + <?php p($l->t('Expire after ')); ?> |
|
| 64 | 64 | <input type="text" name='shareapi_expire_after_n_days' id="shareapiExpireAfterNDays" placeholder="<?php p('7')?>" |
| 65 | 65 | value='<?php p($_['shareExpireAfterNDays']) ?>' /> |
| 66 | - <?php p($l->t( 'days' )); ?> |
|
| 66 | + <?php p($l->t('days')); ?> |
|
| 67 | 67 | <input type="checkbox" name="shareapi_enforce_expire_date" id="shareapiEnforceExpireDate" class="checkbox" |
| 68 | 68 | value="1" <?php if ($_['shareEnforceExpireDate'] === 'yes') print_unescaped('checked="checked"'); ?> /> |
| 69 | - <label for="shareapiEnforceExpireDate"><?php p($l->t('Enforce expiration date'));?></label><br/> |
|
| 69 | + <label for="shareapiEnforceExpireDate"><?php p($l->t('Enforce expiration date')); ?></label><br/> |
|
| 70 | 70 | </p> |
| 71 | - <p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>"> |
|
| 71 | + <p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden'); ?>"> |
|
| 72 | 72 | <input type="checkbox" name="shareapi_allow_resharing" id="allowResharing" class="checkbox" |
| 73 | 73 | value="1" <?php if ($_['allowResharing'] === 'yes') print_unescaped('checked="checked"'); ?> /> |
| 74 | - <label for="allowResharing"><?php p($l->t('Allow resharing'));?></label><br/> |
|
| 74 | + <label for="allowResharing"><?php p($l->t('Allow resharing')); ?></label><br/> |
|
| 75 | 75 | </p> |
| 76 | - <p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>"> |
|
| 76 | + <p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden'); ?>"> |
|
| 77 | 77 | <input type="checkbox" name="shareapi_allow_group_sharing" id="allowGroupSharing" class="checkbox" |
| 78 | 78 | value="1" <?php if ($_['allowGroupSharing'] === 'yes') print_unescaped('checked="checked"'); ?> /> |
| 79 | - <label for="allowGroupSharing"><?php p($l->t('Allow sharing with groups'));?></label><br /> |
|
| 79 | + <label for="allowGroupSharing"><?php p($l->t('Allow sharing with groups')); ?></label><br /> |
|
| 80 | 80 | </p> |
| 81 | - <p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>"> |
|
| 81 | + <p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden'); ?>"> |
|
| 82 | 82 | <input type="checkbox" name="shareapi_only_share_with_group_members" id="onlyShareWithGroupMembers" class="checkbox" |
| 83 | 83 | value="1" <?php if ($_['onlyShareWithGroupMembers']) print_unescaped('checked="checked"'); ?> /> |
| 84 | - <label for="onlyShareWithGroupMembers"><?php p($l->t('Restrict users to only share with users in their groups'));?></label><br/> |
|
| 84 | + <label for="onlyShareWithGroupMembers"><?php p($l->t('Restrict users to only share with users in their groups')); ?></label><br/> |
|
| 85 | 85 | </p> |
| 86 | - <p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>"> |
|
| 86 | + <p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden'); ?>"> |
|
| 87 | 87 | <input type="checkbox" name="shareapi_exclude_groups" id="shareapiExcludeGroups" class="checkbox" |
| 88 | 88 | value="1" <?php if ($_['shareExcludeGroups']) print_unescaped('checked="checked"'); ?> /> |
| 89 | - <label for="shareapiExcludeGroups"><?php p($l->t('Exclude groups from sharing'));?></label><br/> |
|
| 89 | + <label for="shareapiExcludeGroups"><?php p($l->t('Exclude groups from sharing')); ?></label><br/> |
|
| 90 | 90 | </p> |
| 91 | 91 | <p id="selectExcludedGroups" class="indent <?php if (!$_['shareExcludeGroups'] || $_['shareAPIEnabled'] === 'no') p('hidden'); ?>"> |
| 92 | 92 | <input name="shareapi_exclude_groups_list" type="hidden" id="excludedGroups" value="<?php p($_['shareExcludedGroupsList']) ?>" style="width: 400px" class="noJSAutoUpdate"/> |
| 93 | 93 | <br /> |
| 94 | 94 | <em><?php p($l->t('These groups will still be able to receive shares, but not to initiate them.')); ?></em> |
| 95 | 95 | </p> |
| 96 | - <p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>"> |
|
| 96 | + <p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden'); ?>"> |
|
| 97 | 97 | <input type="checkbox" name="shareapi_allow_share_dialog_user_enumeration" value="1" id="shareapi_allow_share_dialog_user_enumeration" class="checkbox" |
| 98 | 98 | <?php if ($_['allowShareDialogUserEnumeration'] === 'yes') print_unescaped('checked="checked"'); ?> /> |
| 99 | - <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 /> |
|
| 99 | + <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 /> |
|
| 100 | 100 | </p> |
| 101 | 101 | <p> |
| 102 | 102 | <input type="checkbox" id="publicShareDisclaimer" class="checkbox noJSAutoUpdate" |
| 103 | 103 | <?php if ($_['publicShareDisclaimerText'] !== null) print_unescaped('checked="checked"'); ?> /> |
| 104 | - <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> |
|
| 104 | + <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> |
|
| 105 | 105 | <span id="publicShareDisclaimerStatus" class="msg" style="display:none"></span> |
| 106 | 106 | <br/> |
| 107 | 107 | <textarea placeholder="<?php p($l->t('This text will be shown on the public link upload page when the file list is hidden.')) ?>" id="publicShareDisclaimerText" <?php if ($_['publicShareDisclaimerText'] === null) { print_unescaped('class="hidden"'); } ?>><?php p($_['publicShareDisclaimerText']) ?></textarea> |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | ?> |
| 28 | 28 | |
| 29 | 29 | <div class="section" id="admin-tips"> |
| 30 | - <h2><?php p($l->t('Tips & tricks'));?></h2> |
|
| 30 | + <h2><?php p($l->t('Tips & tricks')); ?></h2> |
|
| 31 | 31 | <p class="settings-hint"><?php p($l->t('There are a lot of features and config switches available to optimally customize and use this instance. Here are some pointers for more information.')); ?></p> |
| 32 | 32 | <ul> |
| 33 | 33 | <?php |
@@ -37,15 +37,15 @@ discard block |
||
| 37 | 37 | <li> |
| 38 | 38 | <?php p($l->t('SQLite is currently being used as the backend database. For larger installations we recommend that you switch to a different database backend.')); ?><br> |
| 39 | 39 | <?php p($l->t('This is particularly recommended when using the desktop client for file synchronisation.')); ?><br> |
| 40 | - <?php print_unescaped($l->t('To migrate to another database use the command line tool: \'occ db:convert-type\', or see the <a target="_blank" rel="noreferrer noopener" href="%s">documentation ↗</a>.', link_to_docs('admin-db-conversion') )); ?> |
|
| 40 | + <?php print_unescaped($l->t('To migrate to another database use the command line tool: \'occ db:convert-type\', or see the <a target="_blank" rel="noreferrer noopener" href="%s">documentation ↗</a>.', link_to_docs('admin-db-conversion'))); ?> |
|
| 41 | 41 | </li> |
| 42 | 42 | <?php } ?> |
| 43 | - <li><a target="_blank" rel="noreferrer noopener" href="<?php p(link_to_docs('admin-backup')); ?>"><?php p($l->t('How to do backups'));?> ↗</a></li> |
|
| 44 | - <li><a target="_blank" rel="noreferrer noopener" href="<?php p(link_to_docs('admin-monitoring')); ?>"><?php p($l->t('Advanced monitoring'));?> ↗</a></li> |
|
| 45 | - <li><a target="_blank" rel="noreferrer noopener" href="<?php p(link_to_docs('admin-performance')); ?>"><?php p($l->t('Performance tuning'));?> ↗</a></li> |
|
| 46 | - <li><a target="_blank" rel="noreferrer noopener" href="<?php p(link_to_docs('admin-config')); ?>"><?php p($l->t('Improving the config.php'));?> ↗</a></li> |
|
| 47 | - <li><a target="_blank" rel="noreferrer noopener" href="<?php p(link_to_docs('developer-theming')); ?>"><?php p($l->t('Theming'));?> ↗</a></li> |
|
| 48 | - <li><a target="_blank" rel="noreferrer noopener" href="https://scan.nextcloud.com"><?php p($l->t('Check the security of your Nextcloud over our security scan'));?> ↗</a></li> |
|
| 49 | - <li><a target="_blank" rel="noreferrer noopener" href="<?php p(link_to_docs('admin-security')); ?>"><?php p($l->t('Hardening and security guidance'));?> ↗</a></li> |
|
| 43 | + <li><a target="_blank" rel="noreferrer noopener" href="<?php p(link_to_docs('admin-backup')); ?>"><?php p($l->t('How to do backups')); ?> ↗</a></li> |
|
| 44 | + <li><a target="_blank" rel="noreferrer noopener" href="<?php p(link_to_docs('admin-monitoring')); ?>"><?php p($l->t('Advanced monitoring')); ?> ↗</a></li> |
|
| 45 | + <li><a target="_blank" rel="noreferrer noopener" href="<?php p(link_to_docs('admin-performance')); ?>"><?php p($l->t('Performance tuning')); ?> ↗</a></li> |
|
| 46 | + <li><a target="_blank" rel="noreferrer noopener" href="<?php p(link_to_docs('admin-config')); ?>"><?php p($l->t('Improving the config.php')); ?> ↗</a></li> |
|
| 47 | + <li><a target="_blank" rel="noreferrer noopener" href="<?php p(link_to_docs('developer-theming')); ?>"><?php p($l->t('Theming')); ?> ↗</a></li> |
|
| 48 | + <li><a target="_blank" rel="noreferrer noopener" href="https://scan.nextcloud.com"><?php p($l->t('Check the security of your Nextcloud over our security scan')); ?> ↗</a></li> |
|
| 49 | + <li><a target="_blank" rel="noreferrer noopener" href="<?php p(link_to_docs('admin-security')); ?>"><?php p($l->t('Hardening and security guidance')); ?> ↗</a></li> |
|
| 50 | 50 | </ul> |
| 51 | 51 | </div> |
@@ -39,17 +39,17 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | <div id="quota" class="section"> |
| 41 | 41 | <progress value="<?php p($_['usage_relative']); ?>" max="100" |
| 42 | - <?php if($_['usage_relative'] > 80): ?> class="quota-warning" <?php endif; ?>></progress> |
|
| 42 | + <?php if ($_['usage_relative'] > 80): ?> class="quota-warning" <?php endif; ?>></progress> |
|
| 43 | 43 | |
| 44 | - <div style="width:<?php p($_['usage_relative']);?>%" class="quotatext-fg |
|
| 45 | - <?php if($_['usage_relative'] > 80): ?> quota-warning <?php endif; ?>"> |
|
| 44 | + <div style="width:<?php p($_['usage_relative']); ?>%" class="quotatext-fg |
|
| 45 | + <?php if ($_['usage_relative'] > 80): ?> quota-warning <?php endif; ?>"> |
|
| 46 | 46 | <p class="quotatext"> |
| 47 | 47 | <?php if ($_['quota'] === \OCP\Files\FileInfo::SPACE_UNLIMITED): ?> |
| 48 | 48 | <?php print_unescaped($l->t('You are using <strong>%s</strong> of <strong>%s</strong>', |
| 49 | - [$_['usage'], $_['total_space']]));?> |
|
| 49 | + [$_['usage'], $_['total_space']])); ?> |
|
| 50 | 50 | <?php else: ?> |
| 51 | 51 | <?php print_unescaped($l->t('You are using <strong>%s</strong> of <strong>%s</strong> (<strong>%s %%</strong>)', |
| 52 | - [$_['usage'], $_['total_space'], $_['usage_relative']]));?> |
|
| 52 | + [$_['usage'], $_['total_space'], $_['usage_relative']])); ?> |
|
| 53 | 53 | <?php endif ?> |
| 54 | 54 | </p> |
| 55 | 55 | </div> |
@@ -57,10 +57,10 @@ discard block |
||
| 57 | 57 | <p class="quotatext"> |
| 58 | 58 | <?php if ($_['quota'] === \OCP\Files\FileInfo::SPACE_UNLIMITED): ?> |
| 59 | 59 | <?php print_unescaped($l->t('You are using <strong>%s</strong> of <strong>%s</strong>', |
| 60 | - [$_['usage'], $_['total_space']]));?> |
|
| 60 | + [$_['usage'], $_['total_space']])); ?> |
|
| 61 | 61 | <?php else: ?> |
| 62 | 62 | <?php print_unescaped($l->t('You are using <strong>%s</strong> of <strong>%s</strong> (<strong>%s %%</strong>)', |
| 63 | - [$_['usage'], $_['total_space'], $_['usage_relative']]));?> |
|
| 63 | + [$_['usage'], $_['total_space'], $_['usage_relative']])); ?> |
|
| 64 | 64 | <?php endif ?> |
| 65 | 65 | </p> |
| 66 | 66 | </div> |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | </div> |
| 96 | 96 | </div> |
| 97 | 97 | <span class="icon-checkmark hidden"></span> |
| 98 | - <?php if($_['lookupServerUploadEnabled']) { ?> |
|
| 98 | + <?php if ($_['lookupServerUploadEnabled']) { ?> |
|
| 99 | 99 | <input type="hidden" id="avatarscope" value="<?php p($_['avatarScope']) ?>"> |
| 100 | 100 | <?php } ?> |
| 101 | 101 | </form> |
@@ -111,15 +111,15 @@ discard block |
||
| 111 | 111 | </span> |
| 112 | 112 | </h2> |
| 113 | 113 | <input type="text" id="displayname" name="displayname" |
| 114 | - <?php if(!$_['displayNameChangeSupported']) { print_unescaped('class="hidden"'); } ?> |
|
| 114 | + <?php if (!$_['displayNameChangeSupported']) { print_unescaped('class="hidden"'); } ?> |
|
| 115 | 115 | value="<?php p($_['displayName']) ?>" |
| 116 | 116 | autocomplete="on" autocapitalize="none" autocorrect="off" /> |
| 117 | - <?php if(!$_['displayNameChangeSupported']) { ?> |
|
| 118 | - <span><?php if(isset($_['displayName']) && !empty($_['displayName'])) { p($_['displayName']); } else { p($l->t('No display name set')); } ?></span> |
|
| 117 | + <?php if (!$_['displayNameChangeSupported']) { ?> |
|
| 118 | + <span><?php if (isset($_['displayName']) && !empty($_['displayName'])) { p($_['displayName']); } else { p($l->t('No display name set')); } ?></span> |
|
| 119 | 119 | <?php } ?> |
| 120 | 120 | <span class="icon-checkmark hidden"></span> |
| 121 | 121 | <span class="icon-error hidden" ></span> |
| 122 | - <?php if($_['lookupServerUploadEnabled']) { ?> |
|
| 122 | + <?php if ($_['lookupServerUploadEnabled']) { ?> |
|
| 123 | 123 | <input type="hidden" id="displaynamescope" value="<?php p($_['displayNameScope']) ?>"> |
| 124 | 124 | <?php } ?> |
| 125 | 125 | </form> |
@@ -132,10 +132,10 @@ discard block |
||
| 132 | 132 | <span class="icon-triangle-s"></span> |
| 133 | 133 | </span> |
| 134 | 134 | </h2> |
| 135 | - <div class="verify <?php if ($_['email'] === '' || $_['emailScope'] !== 'public') p('hidden'); ?>"> |
|
| 135 | + <div class="verify <?php if ($_['email'] === '' || $_['emailScope'] !== 'public') p('hidden'); ?>"> |
|
| 136 | 136 | <img id="verify-email" title="<?php p($_['emailMessage']); ?>" data-status="<?php p($_['emailVerification']) ?>" src=" |
| 137 | 137 | <?php |
| 138 | - switch($_['emailVerification']) { |
|
| 138 | + switch ($_['emailVerification']) { |
|
| 139 | 139 | case \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS: |
| 140 | 140 | p(image_path('core', 'actions/verifying.svg')); |
| 141 | 141 | break; |
@@ -148,18 +148,18 @@ discard block |
||
| 148 | 148 | ?>"> |
| 149 | 149 | </div> |
| 150 | 150 | <input type="email" name="email" id="email" value="<?php p($_['email']); ?>" |
| 151 | - <?php if(!$_['displayNameChangeSupported']) { print_unescaped('class="hidden"'); } ?> |
|
| 151 | + <?php if (!$_['displayNameChangeSupported']) { print_unescaped('class="hidden"'); } ?> |
|
| 152 | 152 | placeholder="<?php p($l->t('Your email address')); ?>" |
| 153 | 153 | autocomplete="on" autocapitalize="none" autocorrect="off" /> |
| 154 | 154 | <span class="icon-checkmark hidden"></span> |
| 155 | 155 | <span class="icon-error hidden" ></span> |
| 156 | - <?php if(!$_['displayNameChangeSupported']) { ?> |
|
| 157 | - <span><?php if(isset($_['email']) && !empty($_['email'])) { p($_['email']); } else { p($l->t('No email address set')); }?></span> |
|
| 156 | + <?php if (!$_['displayNameChangeSupported']) { ?> |
|
| 157 | + <span><?php if (isset($_['email']) && !empty($_['email'])) { p($_['email']); } else { p($l->t('No email address set')); }?></span> |
|
| 158 | 158 | <?php } ?> |
| 159 | - <?php if($_['displayNameChangeSupported']) { ?> |
|
| 159 | + <?php if ($_['displayNameChangeSupported']) { ?> |
|
| 160 | 160 | <em><?php p($l->t('For password reset and notifications')); ?></em> |
| 161 | 161 | <?php } ?> |
| 162 | - <?php if($_['lookupServerUploadEnabled']) { ?> |
|
| 162 | + <?php if ($_['lookupServerUploadEnabled']) { ?> |
|
| 163 | 163 | <input type="hidden" id="emailscope" value="<?php p($_['emailScope']) ?>"> |
| 164 | 164 | <?php } ?> |
| 165 | 165 | </form> |
@@ -173,12 +173,12 @@ discard block |
||
| 173 | 173 | <span class="icon-triangle-s"></span> |
| 174 | 174 | </span> |
| 175 | 175 | </h2> |
| 176 | - <input type="tel" id="phone" name="phone" <?php if(!$_['lookupServerUploadEnabled']) print_unescaped('disabled="1"'); ?> |
|
| 176 | + <input type="tel" id="phone" name="phone" <?php if (!$_['lookupServerUploadEnabled']) print_unescaped('disabled="1"'); ?> |
|
| 177 | 177 | value="<?php p($_['phone']) ?>" |
| 178 | 178 | placeholder="<?php p($l->t('Your phone number')); ?>" |
| 179 | 179 | autocomplete="on" autocapitalize="none" autocorrect="off" /> |
| 180 | 180 | <span class="icon-checkmark hidden"></span> |
| 181 | - <?php if($_['lookupServerUploadEnabled']) { ?> |
|
| 181 | + <?php if ($_['lookupServerUploadEnabled']) { ?> |
|
| 182 | 182 | <input type="hidden" id="phonescope" value="<?php p($_['phoneScope']) ?>"> |
| 183 | 183 | <?php } ?> |
| 184 | 184 | </form> |
@@ -193,12 +193,12 @@ discard block |
||
| 193 | 193 | <span class="icon-triangle-s"></span> |
| 194 | 194 | </span> |
| 195 | 195 | </h2> |
| 196 | - <input type="text" id="address" name="address" <?php if(!$_['lookupServerUploadEnabled']) print_unescaped('disabled="1"'); ?> |
|
| 196 | + <input type="text" id="address" name="address" <?php if (!$_['lookupServerUploadEnabled']) print_unescaped('disabled="1"'); ?> |
|
| 197 | 197 | placeholder="<?php p($l->t('Your postal address')); ?>" |
| 198 | 198 | value="<?php p($_['address']) ?>" |
| 199 | 199 | autocomplete="on" autocapitalize="none" autocorrect="off" /> |
| 200 | 200 | <span class="icon-checkmark hidden"></span> |
| 201 | - <?php if($_['lookupServerUploadEnabled']) { ?> |
|
| 201 | + <?php if ($_['lookupServerUploadEnabled']) { ?> |
|
| 202 | 202 | <input type="hidden" id="addressscope" value="<?php p($_['addressScope']) ?>"> |
| 203 | 203 | <?php } ?> |
| 204 | 204 | </form> |
@@ -213,11 +213,11 @@ discard block |
||
| 213 | 213 | <span class="icon-triangle-s"></span> |
| 214 | 214 | </span> |
| 215 | 215 | </h2> |
| 216 | - <?php if($_['lookupServerUploadEnabled']) { ?> |
|
| 217 | - <div class="verify <?php if ($_['website'] === '' || $_['websiteScope'] !== 'public') p('hidden'); ?>"> |
|
| 216 | + <?php if ($_['lookupServerUploadEnabled']) { ?> |
|
| 217 | + <div class="verify <?php if ($_['website'] === '' || $_['websiteScope'] !== 'public') p('hidden'); ?>"> |
|
| 218 | 218 | <img id="verify-website" title="<?php p($_['websiteMessage']); ?>" data-status="<?php p($_['websiteVerification']) ?>" src=" |
| 219 | 219 | <?php |
| 220 | - switch($_['websiteVerification']) { |
|
| 220 | + switch ($_['websiteVerification']) { |
|
| 221 | 221 | case \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS: |
| 222 | 222 | p(image_path('core', 'actions/verifying.svg')); |
| 223 | 223 | break; |
@@ -228,13 +228,13 @@ discard block |
||
| 228 | 228 | p(image_path('core', 'actions/verify.svg')); |
| 229 | 229 | } |
| 230 | 230 | ?>" |
| 231 | - <?php if($_['websiteVerification'] === \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS || $_['websiteVerification'] === \OC\Accounts\AccountManager::NOT_VERIFIED) print_unescaped(' class="verify-action"') ?> |
|
| 231 | + <?php if ($_['websiteVerification'] === \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS || $_['websiteVerification'] === \OC\Accounts\AccountManager::NOT_VERIFIED) print_unescaped(' class="verify-action"') ?> |
|
| 232 | 232 | > |
| 233 | 233 | <div class="verification-dialog popovermenu bubble menu"> |
| 234 | 234 | <div class="verification-dialog-content"> |
| 235 | 235 | <p class="explainVerification"></p> |
| 236 | 236 | <p class="verificationCode"></p> |
| 237 | - <p><?php p($l->t('It can take up to 24 hours before the account is displayed as verified.'));?></p> |
|
| 237 | + <p><?php p($l->t('It can take up to 24 hours before the account is displayed as verified.')); ?></p> |
|
| 238 | 238 | </div> |
| 239 | 239 | </div> |
| 240 | 240 | </div> |
@@ -242,10 +242,10 @@ discard block |
||
| 242 | 242 | <input type="text" name="website" id="website" value="<?php p($_['website']); ?>" |
| 243 | 243 | placeholder="<?php p($l->t('Link https://…')); ?>" |
| 244 | 244 | autocomplete="on" autocapitalize="none" autocorrect="off" |
| 245 | - <?php if(!$_['lookupServerUploadEnabled']) print_unescaped('disabled="1"'); ?> |
|
| 245 | + <?php if (!$_['lookupServerUploadEnabled']) print_unescaped('disabled="1"'); ?> |
|
| 246 | 246 | /> |
| 247 | 247 | <span class="icon-checkmark hidden"></span> |
| 248 | - <?php if($_['lookupServerUploadEnabled']) { ?> |
|
| 248 | + <?php if ($_['lookupServerUploadEnabled']) { ?> |
|
| 249 | 249 | <input type="hidden" id="websitescope" value="<?php p($_['websiteScope']) ?>"> |
| 250 | 250 | <?php } ?> |
| 251 | 251 | </form> |
@@ -260,11 +260,11 @@ discard block |
||
| 260 | 260 | <span class="icon-triangle-s"></span> |
| 261 | 261 | </span> |
| 262 | 262 | </h2> |
| 263 | - <?php if($_['lookupServerUploadEnabled']) { ?> |
|
| 264 | - <div class="verify <?php if ($_['twitter'] === '' || $_['twitterScope'] !== 'public') p('hidden'); ?>"> |
|
| 263 | + <?php if ($_['lookupServerUploadEnabled']) { ?> |
|
| 264 | + <div class="verify <?php if ($_['twitter'] === '' || $_['twitterScope'] !== 'public') p('hidden'); ?>"> |
|
| 265 | 265 | <img id="verify-twitter" title="<?php p($_['twitterMessage']); ?>" data-status="<?php p($_['twitterVerification']) ?>" src=" |
| 266 | 266 | <?php |
| 267 | - switch($_['twitterVerification']) { |
|
| 267 | + switch ($_['twitterVerification']) { |
|
| 268 | 268 | case \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS: |
| 269 | 269 | p(image_path('core', 'actions/verifying.svg')); |
| 270 | 270 | break; |
@@ -275,13 +275,13 @@ discard block |
||
| 275 | 275 | p(image_path('core', 'actions/verify.svg')); |
| 276 | 276 | } |
| 277 | 277 | ?>" |
| 278 | - <?php if($_['twitterVerification'] === \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS || $_['twitterVerification'] === \OC\Accounts\AccountManager::NOT_VERIFIED) print_unescaped(' class="verify-action"') ?> |
|
| 278 | + <?php if ($_['twitterVerification'] === \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS || $_['twitterVerification'] === \OC\Accounts\AccountManager::NOT_VERIFIED) print_unescaped(' class="verify-action"') ?> |
|
| 279 | 279 | > |
| 280 | 280 | <div class="verification-dialog popovermenu bubble menu"> |
| 281 | 281 | <div class="verification-dialog-content"> |
| 282 | 282 | <p class="explainVerification"></p> |
| 283 | 283 | <p class="verificationCode"></p> |
| 284 | - <p><?php p($l->t('It can take up to 24 hours before the account is displayed as verified.'));?></p> |
|
| 284 | + <p><?php p($l->t('It can take up to 24 hours before the account is displayed as verified.')); ?></p> |
|
| 285 | 285 | </div> |
| 286 | 286 | </div> |
| 287 | 287 | </div> |
@@ -289,10 +289,10 @@ discard block |
||
| 289 | 289 | <input type="text" name="twitter" id="twitter" value="<?php p($_['twitter']); ?>" |
| 290 | 290 | placeholder="<?php p($l->t('Twitter handle @…')); ?>" |
| 291 | 291 | autocomplete="on" autocapitalize="none" autocorrect="off" |
| 292 | - <?php if(!$_['lookupServerUploadEnabled']) print_unescaped('disabled="1"'); ?> |
|
| 292 | + <?php if (!$_['lookupServerUploadEnabled']) print_unescaped('disabled="1"'); ?> |
|
| 293 | 293 | /> |
| 294 | 294 | <span class="icon-checkmark hidden"></span> |
| 295 | - <?php if($_['lookupServerUploadEnabled']) { ?> |
|
| 295 | + <?php if ($_['lookupServerUploadEnabled']) { ?> |
|
| 296 | 296 | <input type="hidden" id="twitterscope" value="<?php p($_['twitterScope']) ?>"> |
| 297 | 297 | <?php } ?> |
| 298 | 298 | </form> |
@@ -319,47 +319,47 @@ discard block |
||
| 319 | 319 | <?php if (isset($_['activelanguage'])) { ?> |
| 320 | 320 | <form id="language" class="section"> |
| 321 | 321 | <h2> |
| 322 | - <label for="languageinput"><?php p($l->t('Language'));?></label> |
|
| 322 | + <label for="languageinput"><?php p($l->t('Language')); ?></label> |
|
| 323 | 323 | </h2> |
| 324 | - <select id="languageinput" name="lang" data-placeholder="<?php p($l->t('Language'));?>"> |
|
| 325 | - <option value="<?php p($_['activelanguage']['code']);?>"> |
|
| 326 | - <?php p($_['activelanguage']['name']);?> |
|
| 324 | + <select id="languageinput" name="lang" data-placeholder="<?php p($l->t('Language')); ?>"> |
|
| 325 | + <option value="<?php p($_['activelanguage']['code']); ?>"> |
|
| 326 | + <?php p($_['activelanguage']['name']); ?> |
|
| 327 | 327 | </option> |
| 328 | - <?php foreach($_['commonlanguages'] as $language):?> |
|
| 329 | - <option value="<?php p($language['code']);?>"> |
|
| 330 | - <?php p($language['name']);?> |
|
| 328 | + <?php foreach ($_['commonlanguages'] as $language):?> |
|
| 329 | + <option value="<?php p($language['code']); ?>"> |
|
| 330 | + <?php p($language['name']); ?> |
|
| 331 | 331 | </option> |
| 332 | - <?php endforeach;?> |
|
| 332 | + <?php endforeach; ?> |
|
| 333 | 333 | <optgroup label="––––––––––"></optgroup> |
| 334 | - <?php foreach($_['languages'] as $language):?> |
|
| 335 | - <option value="<?php p($language['code']);?>"> |
|
| 336 | - <?php p($language['name']);?> |
|
| 334 | + <?php foreach ($_['languages'] as $language):?> |
|
| 335 | + <option value="<?php p($language['code']); ?>"> |
|
| 336 | + <?php p($language['name']); ?> |
|
| 337 | 337 | </option> |
| 338 | - <?php endforeach;?> |
|
| 338 | + <?php endforeach; ?> |
|
| 339 | 339 | </select> |
| 340 | 340 | <a href="https://www.transifex.com/nextcloud/nextcloud/" |
| 341 | 341 | target="_blank" rel="noreferrer noopener"> |
| 342 | - <em><?php p($l->t('Help translate'));?></em> |
|
| 342 | + <em><?php p($l->t('Help translate')); ?></em> |
|
| 343 | 343 | </a> |
| 344 | 344 | </form> |
| 345 | 345 | <?php } ?> |
| 346 | 346 | </div> |
| 347 | 347 | <div class="personal-settings-setting-box personal-settings-password-box"> |
| 348 | 348 | <?php |
| 349 | - if($_['passwordChangeSupported']) { |
|
| 349 | + if ($_['passwordChangeSupported']) { |
|
| 350 | 350 | script('jquery-showpassword'); |
| 351 | 351 | ?> |
| 352 | 352 | <form id="passwordform" class="section"> |
| 353 | - <h2 class="inlineblock"><?php p($l->t('Password'));?></h2> |
|
| 353 | + <h2 class="inlineblock"><?php p($l->t('Password')); ?></h2> |
|
| 354 | 354 | <div id="password-error-msg" class="msg success inlineblock" style="display: none;">Saved</div> |
| 355 | 355 | |
| 356 | 356 | <label for="pass1" class="hidden-visually"><?php p($l->t('Current password')); ?>: </label> |
| 357 | 357 | <input type="password" id="pass1" name="oldpassword" |
| 358 | - placeholder="<?php p($l->t('Current password'));?>" |
|
| 358 | + placeholder="<?php p($l->t('Current password')); ?>" |
|
| 359 | 359 | autocomplete="off" autocapitalize="none" autocorrect="off" /> |
| 360 | 360 | |
| 361 | 361 | <div class="personal-show-container"> |
| 362 | - <label for="pass2" class="hidden-visually"><?php p($l->t('New password'));?>: </label> |
|
| 362 | + <label for="pass2" class="hidden-visually"><?php p($l->t('New password')); ?>: </label> |
|
| 363 | 363 | <input type="password" id="pass2" name="newpassword" |
| 364 | 364 | placeholder="<?php p($l->t('New password')); ?>" |
| 365 | 365 | data-typetoggle="#personal-show" |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | $this->defaultSlogan = $this->l->t('a safe home for all your data'); |
| 64 | 64 | $this->defaultColorPrimary = '#0082c9'; |
| 65 | 65 | |
| 66 | - $themePath = OC::$SERVERROOT . '/themes/' . OC_Util::getTheme() . '/defaults.php'; |
|
| 66 | + $themePath = OC::$SERVERROOT.'/themes/'.OC_Util::getTheme().'/defaults.php'; |
|
| 67 | 67 | if (file_exists($themePath)) { |
| 68 | 68 | // prevent defaults.php from printing output |
| 69 | 69 | ob_start(); |
@@ -234,9 +234,9 @@ discard block |
||
| 234 | 234 | if ($this->themeExist('getShortFooter')) { |
| 235 | 235 | $footer = $this->theme->getShortFooter(); |
| 236 | 236 | } else { |
| 237 | - $footer = '<a href="'. $this->getBaseUrl() . '" target="_blank"' . |
|
| 238 | - ' rel="noreferrer noopener">' .$this->getEntity() . '</a>'. |
|
| 239 | - ' – ' . $this->getSlogan(); |
|
| 237 | + $footer = '<a href="'.$this->getBaseUrl().'" target="_blank"'. |
|
| 238 | + ' rel="noreferrer noopener">'.$this->getEntity().'</a>'. |
|
| 239 | + ' – '.$this->getSlogan(); |
|
| 240 | 240 | } |
| 241 | 241 | |
| 242 | 242 | return $footer; |
@@ -264,7 +264,7 @@ discard block |
||
| 264 | 264 | if ($this->themeExist('buildDocLinkToKey')) { |
| 265 | 265 | return $this->theme->buildDocLinkToKey($key); |
| 266 | 266 | } |
| 267 | - return $this->getDocBaseUrl() . '/server/' . $this->defaultDocVersion . '/go.php?to=' . $key; |
|
| 267 | + return $this->getDocBaseUrl().'/server/'.$this->defaultDocVersion.'/go.php?to='.$key; |
|
| 268 | 268 | } |
| 269 | 269 | |
| 270 | 270 | /** |
@@ -286,7 +286,7 @@ discard block |
||
| 286 | 286 | * @return array scss variables to overwrite |
| 287 | 287 | */ |
| 288 | 288 | public function getScssVariables() { |
| 289 | - if($this->themeExist('getScssVariables')) { |
|
| 289 | + if ($this->themeExist('getScssVariables')) { |
|
| 290 | 290 | return $this->theme->getScssVariables(); |
| 291 | 291 | } |
| 292 | 292 | return []; |
@@ -307,11 +307,11 @@ discard block |
||
| 307 | 307 | return $this->theme->getLogo($useSvg); |
| 308 | 308 | } |
| 309 | 309 | |
| 310 | - if($useSvg) { |
|
| 310 | + if ($useSvg) { |
|
| 311 | 311 | $logo = \OC::$server->getURLGenerator()->imagePath('core', 'logo.svg'); |
| 312 | 312 | } else { |
| 313 | 313 | $logo = \OC::$server->getURLGenerator()->imagePath('core', 'logo.png'); |
| 314 | 314 | } |
| 315 | - return $logo . '?v=' . hash('sha1', implode('.', \OCP\Util::getVersion())); |
|
| 315 | + return $logo.'?v='.hash('sha1', implode('.', \OCP\Util::getVersion())); |
|
| 316 | 316 | } |
| 317 | 317 | } |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | */ |
| 103 | 103 | public function installApp($appId) { |
| 104 | 104 | $app = \OC_App::findAppInDirectories($appId); |
| 105 | - if($app === false) { |
|
| 105 | + if ($app === false) { |
|
| 106 | 106 | throw new \Exception('App not found in any app directory'); |
| 107 | 107 | } |
| 108 | 108 | |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | |
| 112 | 112 | $l = \OC::$server->getL10N('core'); |
| 113 | 113 | |
| 114 | - if(!is_array($info)) { |
|
| 114 | + if (!is_array($info)) { |
|
| 115 | 115 | throw new \Exception( |
| 116 | 116 | $l->t('App "%s" cannot be installed because appinfo file cannot be read.', |
| 117 | 117 | [$info['name']] |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | \OC_App::registerAutoloading($appId, $basedir); |
| 135 | 135 | |
| 136 | 136 | //install the database |
| 137 | - if(is_file($basedir.'/appinfo/database.xml')) { |
|
| 137 | + if (is_file($basedir.'/appinfo/database.xml')) { |
|
| 138 | 138 | if (\OC::$server->getAppConfig()->getValue($info['id'], 'installed_version') === null) { |
| 139 | 139 | OC_DB::createDbFromStructure($basedir.'/appinfo/database.xml'); |
| 140 | 140 | } else { |
@@ -146,13 +146,13 @@ discard block |
||
| 146 | 146 | } |
| 147 | 147 | |
| 148 | 148 | \OC_App::setupBackgroundJobs($info['background-jobs']); |
| 149 | - if(isset($info['settings']) && is_array($info['settings'])) { |
|
| 149 | + if (isset($info['settings']) && is_array($info['settings'])) { |
|
| 150 | 150 | \OC::$server->getSettingsManager()->setupSettings($info['settings']); |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | //run appinfo/install.php |
| 154 | - if((!isset($data['noinstall']) or $data['noinstall']==false)) { |
|
| 155 | - self::includeAppScript($basedir . '/appinfo/install.php'); |
|
| 154 | + if ((!isset($data['noinstall']) or $data['noinstall'] == false)) { |
|
| 155 | + self::includeAppScript($basedir.'/appinfo/install.php'); |
|
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | $appData = OC_App::getAppInfo($appId); |
@@ -163,10 +163,10 @@ discard block |
||
| 163 | 163 | \OC::$server->getConfig()->setAppValue($info['id'], 'enabled', 'no'); |
| 164 | 164 | |
| 165 | 165 | //set remote/public handlers |
| 166 | - foreach($info['remote'] as $name=>$path) { |
|
| 166 | + foreach ($info['remote'] as $name=>$path) { |
|
| 167 | 167 | \OC::$server->getConfig()->setAppValue('core', 'remote_'.$name, $info['id'].'/'.$path); |
| 168 | 168 | } |
| 169 | - foreach($info['public'] as $name=>$path) { |
|
| 169 | + foreach ($info['public'] as $name=>$path) { |
|
| 170 | 170 | \OC::$server->getConfig()->setAppValue('core', 'public_'.$name, $info['id'].'/'.$path); |
| 171 | 171 | } |
| 172 | 172 | |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | * |
| 183 | 183 | * Checks whether or not an app is installed, i.e. registered in apps table. |
| 184 | 184 | */ |
| 185 | - public static function isInstalled( $app ) { |
|
| 185 | + public static function isInstalled($app) { |
|
| 186 | 186 | return (\OC::$server->getConfig()->getAppValue($app, "installed_version", null) !== null); |
| 187 | 187 | } |
| 188 | 188 | |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | * @return bool |
| 194 | 194 | */ |
| 195 | 195 | public function updateAppstoreApp($appId) { |
| 196 | - if(self::isUpdateAvailable($appId, $this->appFetcher)) { |
|
| 196 | + if (self::isUpdateAvailable($appId, $this->appFetcher)) { |
|
| 197 | 197 | try { |
| 198 | 198 | $this->downloadApp($appId); |
| 199 | 199 | } catch (\Exception $e) { |
@@ -217,18 +217,18 @@ discard block |
||
| 217 | 217 | $appId = strtolower($appId); |
| 218 | 218 | |
| 219 | 219 | $apps = $this->appFetcher->get(); |
| 220 | - foreach($apps as $app) { |
|
| 221 | - if($app['id'] === $appId) { |
|
| 220 | + foreach ($apps as $app) { |
|
| 221 | + if ($app['id'] === $appId) { |
|
| 222 | 222 | // Load the certificate |
| 223 | 223 | $certificate = new X509(); |
| 224 | - $certificate->loadCA(file_get_contents(__DIR__ . '/../../resources/codesigning/root.crt')); |
|
| 224 | + $certificate->loadCA(file_get_contents(__DIR__.'/../../resources/codesigning/root.crt')); |
|
| 225 | 225 | $loadedCertificate = $certificate->loadX509($app['certificate']); |
| 226 | 226 | |
| 227 | 227 | // Verify if the certificate has been revoked |
| 228 | 228 | $crl = new X509(); |
| 229 | - $crl->loadCA(file_get_contents(__DIR__ . '/../../resources/codesigning/root.crt')); |
|
| 230 | - $crl->loadCRL(file_get_contents(__DIR__ . '/../../resources/codesigning/root.crl')); |
|
| 231 | - if($crl->validateSignature() !== true) { |
|
| 229 | + $crl->loadCA(file_get_contents(__DIR__.'/../../resources/codesigning/root.crt')); |
|
| 230 | + $crl->loadCRL(file_get_contents(__DIR__.'/../../resources/codesigning/root.crl')); |
|
| 231 | + if ($crl->validateSignature() !== true) { |
|
| 232 | 232 | throw new \Exception('Could not validate CRL signature'); |
| 233 | 233 | } |
| 234 | 234 | $csn = $loadedCertificate['tbsCertificate']['serialNumber']->toString(); |
@@ -243,7 +243,7 @@ discard block |
||
| 243 | 243 | } |
| 244 | 244 | |
| 245 | 245 | // Verify if the certificate has been issued by the Nextcloud Code Authority CA |
| 246 | - if($certificate->validateSignature() !== true) { |
|
| 246 | + if ($certificate->validateSignature() !== true) { |
|
| 247 | 247 | throw new \Exception( |
| 248 | 248 | sprintf( |
| 249 | 249 | 'App with id %s has a certificate not issued by a trusted Code Signing Authority', |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | |
| 255 | 255 | // Verify if the certificate is issued for the requested app id |
| 256 | 256 | $certInfo = openssl_x509_parse($app['certificate']); |
| 257 | - if(!isset($certInfo['subject']['CN'])) { |
|
| 257 | + if (!isset($certInfo['subject']['CN'])) { |
|
| 258 | 258 | throw new \Exception( |
| 259 | 259 | sprintf( |
| 260 | 260 | 'App with id %s has a cert with no CN', |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | ) |
| 263 | 263 | ); |
| 264 | 264 | } |
| 265 | - if($certInfo['subject']['CN'] !== $appId) { |
|
| 265 | + if ($certInfo['subject']['CN'] !== $appId) { |
|
| 266 | 266 | throw new \Exception( |
| 267 | 267 | sprintf( |
| 268 | 268 | 'App with id %s has a cert issued to %s', |
@@ -279,15 +279,15 @@ discard block |
||
| 279 | 279 | |
| 280 | 280 | // Check if the signature actually matches the downloaded content |
| 281 | 281 | $certificate = openssl_get_publickey($app['certificate']); |
| 282 | - $verified = (bool)openssl_verify(file_get_contents($tempFile), base64_decode($app['releases'][0]['signature']), $certificate, OPENSSL_ALGO_SHA512); |
|
| 282 | + $verified = (bool) openssl_verify(file_get_contents($tempFile), base64_decode($app['releases'][0]['signature']), $certificate, OPENSSL_ALGO_SHA512); |
|
| 283 | 283 | openssl_free_key($certificate); |
| 284 | 284 | |
| 285 | - if($verified === true) { |
|
| 285 | + if ($verified === true) { |
|
| 286 | 286 | // Seems to match, let's proceed |
| 287 | 287 | $extractDir = $this->tempManager->getTemporaryFolder(); |
| 288 | 288 | $archive = new TAR($tempFile); |
| 289 | 289 | |
| 290 | - if($archive) { |
|
| 290 | + if ($archive) { |
|
| 291 | 291 | if (!$archive->extract($extractDir)) { |
| 292 | 292 | throw new \Exception( |
| 293 | 293 | sprintf( |
@@ -300,7 +300,7 @@ discard block |
||
| 300 | 300 | $folders = array_diff($allFiles, ['.', '..']); |
| 301 | 301 | $folders = array_values($folders); |
| 302 | 302 | |
| 303 | - if(count($folders) > 1) { |
|
| 303 | + if (count($folders) > 1) { |
|
| 304 | 304 | throw new \Exception( |
| 305 | 305 | sprintf( |
| 306 | 306 | 'Extracted app %s has more than 1 folder', |
@@ -311,22 +311,22 @@ discard block |
||
| 311 | 311 | |
| 312 | 312 | // Check if appinfo/info.xml has the same app ID as well |
| 313 | 313 | $loadEntities = libxml_disable_entity_loader(false); |
| 314 | - $xml = simplexml_load_file($extractDir . '/' . $folders[0] . '/appinfo/info.xml'); |
|
| 314 | + $xml = simplexml_load_file($extractDir.'/'.$folders[0].'/appinfo/info.xml'); |
|
| 315 | 315 | libxml_disable_entity_loader($loadEntities); |
| 316 | - if((string)$xml->id !== $appId) { |
|
| 316 | + if ((string) $xml->id !== $appId) { |
|
| 317 | 317 | throw new \Exception( |
| 318 | 318 | sprintf( |
| 319 | 319 | 'App for id %s has a wrong app ID in info.xml: %s', |
| 320 | 320 | $appId, |
| 321 | - (string)$xml->id |
|
| 321 | + (string) $xml->id |
|
| 322 | 322 | ) |
| 323 | 323 | ); |
| 324 | 324 | } |
| 325 | 325 | |
| 326 | 326 | // Check if the version is lower than before |
| 327 | 327 | $currentVersion = OC_App::getAppVersion($appId); |
| 328 | - $newVersion = (string)$xml->version; |
|
| 329 | - if(version_compare($currentVersion, $newVersion) === 1) { |
|
| 328 | + $newVersion = (string) $xml->version; |
|
| 329 | + if (version_compare($currentVersion, $newVersion) === 1) { |
|
| 330 | 330 | throw new \Exception( |
| 331 | 331 | sprintf( |
| 332 | 332 | 'App for id %s has version %s and tried to update to lower version %s', |
@@ -337,12 +337,12 @@ discard block |
||
| 337 | 337 | ); |
| 338 | 338 | } |
| 339 | 339 | |
| 340 | - $baseDir = OC_App::getInstallPath() . '/' . $appId; |
|
| 340 | + $baseDir = OC_App::getInstallPath().'/'.$appId; |
|
| 341 | 341 | // Remove old app with the ID if existent |
| 342 | 342 | OC_Helper::rmdirr($baseDir); |
| 343 | 343 | // Move to app folder |
| 344 | - if(@mkdir($baseDir)) { |
|
| 345 | - $extractDir .= '/' . $folders[0]; |
|
| 344 | + if (@mkdir($baseDir)) { |
|
| 345 | + $extractDir .= '/'.$folders[0]; |
|
| 346 | 346 | OC_Helper::copyr($extractDir, $baseDir); |
| 347 | 347 | } |
| 348 | 348 | OC_Helper::copyr($extractDir, $baseDir); |
@@ -402,8 +402,8 @@ discard block |
||
| 402 | 402 | } |
| 403 | 403 | |
| 404 | 404 | $apps = $appFetcher->get(); |
| 405 | - foreach($apps as $app) { |
|
| 406 | - if($app['id'] === $appId) { |
|
| 405 | + foreach ($apps as $app) { |
|
| 406 | + if ($app['id'] === $appId) { |
|
| 407 | 407 | $currentVersion = OC_App::getAppVersion($appId); |
| 408 | 408 | $newestVersion = $app['releases'][0]['version']; |
| 409 | 409 | if (version_compare($newestVersion, $currentVersion, '>')) { |
@@ -425,7 +425,7 @@ discard block |
||
| 425 | 425 | * The function will check if the app is already downloaded in the apps repository |
| 426 | 426 | */ |
| 427 | 427 | public function isDownloaded($name) { |
| 428 | - foreach(\OC::$APPSROOTS as $dir) { |
|
| 428 | + foreach (\OC::$APPSROOTS as $dir) { |
|
| 429 | 429 | $dirToTest = $dir['path']; |
| 430 | 430 | $dirToTest .= '/'; |
| 431 | 431 | $dirToTest .= $name; |
@@ -453,11 +453,11 @@ discard block |
||
| 453 | 453 | * this has to be done by the function oc_app_uninstall(). |
| 454 | 454 | */ |
| 455 | 455 | public function removeApp($appId) { |
| 456 | - if($this->isDownloaded( $appId )) { |
|
| 457 | - $appDir = OC_App::getInstallPath() . '/' . $appId; |
|
| 456 | + if ($this->isDownloaded($appId)) { |
|
| 457 | + $appDir = OC_App::getInstallPath().'/'.$appId; |
|
| 458 | 458 | OC_Helper::rmdirr($appDir); |
| 459 | 459 | return true; |
| 460 | - }else{ |
|
| 460 | + } else { |
|
| 461 | 461 | \OCP\Util::writeLog('core', 'can\'t remove app '.$appId.'. It is not installed.', \OCP\Util::ERROR); |
| 462 | 462 | |
| 463 | 463 | return false; |
@@ -473,8 +473,8 @@ discard block |
||
| 473 | 473 | */ |
| 474 | 474 | public function installAppBundle(Bundle $bundle) { |
| 475 | 475 | $appIds = $bundle->getAppIdentifiers(); |
| 476 | - foreach($appIds as $appId) { |
|
| 477 | - if(!$this->isDownloaded($appId)) { |
|
| 476 | + foreach ($appIds as $appId) { |
|
| 477 | + if (!$this->isDownloaded($appId)) { |
|
| 478 | 478 | $this->downloadApp($appId); |
| 479 | 479 | } |
| 480 | 480 | $this->installApp($appId); |
@@ -496,13 +496,13 @@ discard block |
||
| 496 | 496 | */ |
| 497 | 497 | public static function installShippedApps($softErrors = false) { |
| 498 | 498 | $errors = []; |
| 499 | - foreach(\OC::$APPSROOTS as $app_dir) { |
|
| 500 | - if($dir = opendir( $app_dir['path'] )) { |
|
| 501 | - while( false !== ( $filename = readdir( $dir ))) { |
|
| 502 | - if( substr( $filename, 0, 1 ) != '.' and is_dir($app_dir['path']."/$filename") ) { |
|
| 503 | - if( file_exists( $app_dir['path']."/$filename/appinfo/info.xml" )) { |
|
| 504 | - if(!Installer::isInstalled($filename)) { |
|
| 505 | - $info=OC_App::getAppInfo($filename); |
|
| 499 | + foreach (\OC::$APPSROOTS as $app_dir) { |
|
| 500 | + if ($dir = opendir($app_dir['path'])) { |
|
| 501 | + while (false !== ($filename = readdir($dir))) { |
|
| 502 | + if (substr($filename, 0, 1) != '.' and is_dir($app_dir['path']."/$filename")) { |
|
| 503 | + if (file_exists($app_dir['path']."/$filename/appinfo/info.xml")) { |
|
| 504 | + if (!Installer::isInstalled($filename)) { |
|
| 505 | + $info = OC_App::getAppInfo($filename); |
|
| 506 | 506 | $enabled = isset($info['default_enable']); |
| 507 | 507 | if (($enabled || in_array($filename, \OC::$server->getAppManager()->getAlwaysEnabledApps())) |
| 508 | 508 | && \OC::$server->getConfig()->getAppValue($filename, 'enabled') !== 'no') { |
@@ -525,7 +525,7 @@ discard block |
||
| 525 | 525 | } |
| 526 | 526 | } |
| 527 | 527 | } |
| 528 | - closedir( $dir ); |
|
| 528 | + closedir($dir); |
|
| 529 | 529 | } |
| 530 | 530 | } |
| 531 | 531 | |
@@ -542,12 +542,12 @@ discard block |
||
| 542 | 542 | $appPath = OC_App::getAppPath($app); |
| 543 | 543 | \OC_App::registerAutoloading($app, $appPath); |
| 544 | 544 | |
| 545 | - if(is_file("$appPath/appinfo/database.xml")) { |
|
| 545 | + if (is_file("$appPath/appinfo/database.xml")) { |
|
| 546 | 546 | try { |
| 547 | 547 | OC_DB::createDbFromStructure("$appPath/appinfo/database.xml"); |
| 548 | 548 | } catch (TableExistsException $e) { |
| 549 | 549 | throw new HintException( |
| 550 | - 'Failed to enable app ' . $app, |
|
| 550 | + 'Failed to enable app '.$app, |
|
| 551 | 551 | 'Please ask for help via one of our <a href="https://nextcloud.com/support/" target="_blank" rel="noreferrer noopener">support channels</a>.', |
| 552 | 552 | 0, $e |
| 553 | 553 | ); |
@@ -576,16 +576,16 @@ discard block |
||
| 576 | 576 | } |
| 577 | 577 | |
| 578 | 578 | //set remote/public handlers |
| 579 | - foreach($info['remote'] as $name=>$path) { |
|
| 579 | + foreach ($info['remote'] as $name=>$path) { |
|
| 580 | 580 | $config->setAppValue('core', 'remote_'.$name, $app.'/'.$path); |
| 581 | 581 | } |
| 582 | - foreach($info['public'] as $name=>$path) { |
|
| 582 | + foreach ($info['public'] as $name=>$path) { |
|
| 583 | 583 | $config->setAppValue('core', 'public_'.$name, $app.'/'.$path); |
| 584 | 584 | } |
| 585 | 585 | |
| 586 | 586 | OC_App::setAppTypes($info['id']); |
| 587 | 587 | |
| 588 | - if(isset($info['settings']) && is_array($info['settings'])) { |
|
| 588 | + if (isset($info['settings']) && is_array($info['settings'])) { |
|
| 589 | 589 | // requires that autoloading was registered for the app, |
| 590 | 590 | // as happens before running the install.php some lines above |
| 591 | 591 | \OC::$server->getSettingsManager()->setupSettings($info['settings']); |
@@ -601,7 +601,7 @@ discard block |
||
| 601 | 601 | */ |
| 602 | 602 | public static function checkCode($folder) { |
| 603 | 603 | // is the code checker enabled? |
| 604 | - if(!\OC::$server->getConfig()->getSystemValue('appcodechecker', false)) { |
|
| 604 | + if (!\OC::$server->getConfig()->getSystemValue('appcodechecker', false)) { |
|
| 605 | 605 | return true; |
| 606 | 606 | } |
| 607 | 607 | |
@@ -615,7 +615,7 @@ discard block |
||
| 615 | 615 | * @param string $script |
| 616 | 616 | */ |
| 617 | 617 | private static function includeAppScript($script) { |
| 618 | - if ( file_exists($script) ){ |
|
| 618 | + if (file_exists($script)) { |
|
| 619 | 619 | include $script; |
| 620 | 620 | } |
| 621 | 621 | } |