@@ -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> |
@@ -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 | } |
@@ -39,16 +39,16 @@ 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="warn" <?php endif; ?>></progress> |
|
42 | + <?php if ($_['usage_relative'] > 80): ?> class="warn" <?php endif; ?>></progress> |
|
43 | 43 | |
44 | - <div style="width:<?php p($_['usage_relative']);?>%" class="quotatext-fg"> |
|
44 | + <div style="width:<?php p($_['usage_relative']); ?>%" class="quotatext-fg"> |
|
45 | 45 | <p class="quotatext"> |
46 | 46 | <?php if ($_['quota'] === \OCP\Files\FileInfo::SPACE_UNLIMITED): ?> |
47 | 47 | <?php print_unescaped($l->t('You are using <strong>%s</strong> of <strong>%s</strong>', |
48 | - [$_['usage'], $_['total_space']]));?> |
|
48 | + [$_['usage'], $_['total_space']])); ?> |
|
49 | 49 | <?php else: ?> |
50 | 50 | <?php print_unescaped($l->t('You are using <strong>%s</strong> of <strong>%s</strong> (<strong>%s %%</strong>)', |
51 | - [$_['usage'], $_['total_space'], $_['usage_relative']]));?> |
|
51 | + [$_['usage'], $_['total_space'], $_['usage_relative']])); ?> |
|
52 | 52 | <?php endif ?> |
53 | 53 | </p> |
54 | 54 | </div> |
@@ -56,10 +56,10 @@ discard block |
||
56 | 56 | <p class="quotatext"> |
57 | 57 | <?php if ($_['quota'] === \OCP\Files\FileInfo::SPACE_UNLIMITED): ?> |
58 | 58 | <?php print_unescaped($l->t('You are using <strong>%s</strong> of <strong>%s</strong>', |
59 | - [$_['usage'], $_['total_space']]));?> |
|
59 | + [$_['usage'], $_['total_space']])); ?> |
|
60 | 60 | <?php else: ?> |
61 | 61 | <?php print_unescaped($l->t('You are using <strong>%s</strong> of <strong>%s</strong> (<strong>%s %%</strong>)', |
62 | - [$_['usage'], $_['total_space'], $_['usage_relative']]));?> |
|
62 | + [$_['usage'], $_['total_space'], $_['usage_relative']])); ?> |
|
63 | 63 | <?php endif ?> |
64 | 64 | </p> |
65 | 65 | </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> |
@@ -112,15 +112,15 @@ discard block |
||
112 | 112 | </span> |
113 | 113 | </h2> |
114 | 114 | <input type="text" id="displayname" name="displayname" |
115 | - <?php if(!$_['displayNameChangeSupported']) { print_unescaped('class="hidden"'); } ?> |
|
115 | + <?php if (!$_['displayNameChangeSupported']) { print_unescaped('class="hidden"'); } ?> |
|
116 | 116 | value="<?php p($_['displayName']) ?>" |
117 | 117 | autocomplete="on" autocapitalize="none" autocorrect="off" /> |
118 | - <?php if(!$_['displayNameChangeSupported']) { ?> |
|
119 | - <span><?php if(isset($_['displayName']) && !empty($_['displayName'])) { p($_['displayName']); } else { p($l->t('No display name set')); } ?></span> |
|
118 | + <?php if (!$_['displayNameChangeSupported']) { ?> |
|
119 | + <span><?php if (isset($_['displayName']) && !empty($_['displayName'])) { p($_['displayName']); } else { p($l->t('No display name set')); } ?></span> |
|
120 | 120 | <?php } ?> |
121 | 121 | <span class="icon-checkmark hidden"></span> |
122 | 122 | <span class="icon-error hidden" ></span> |
123 | - <?php if($_['lookupServerUploadEnabled']) { ?> |
|
123 | + <?php if ($_['lookupServerUploadEnabled']) { ?> |
|
124 | 124 | <input type="hidden" id="displaynamescope" value="<?php p($_['displayNameScope']) ?>"> |
125 | 125 | <?php } ?> |
126 | 126 | </form> |
@@ -133,10 +133,10 @@ discard block |
||
133 | 133 | <span class="icon-triangle-s"></span> |
134 | 134 | </span> |
135 | 135 | </h2> |
136 | - <div class="verify <?php if ($_['email'] === '' || $_['emailScope'] !== 'public') p('hidden'); ?>"> |
|
136 | + <div class="verify <?php if ($_['email'] === '' || $_['emailScope'] !== 'public') p('hidden'); ?>"> |
|
137 | 137 | <img id="verify-email" title="<?php p($_['emailMessage']); ?>" data-status="<?php p($_['emailVerification']) ?>" src=" |
138 | 138 | <?php |
139 | - switch($_['emailVerification']) { |
|
139 | + switch ($_['emailVerification']) { |
|
140 | 140 | case \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS: |
141 | 141 | p(image_path('core', 'actions/verifying.svg')); |
142 | 142 | break; |
@@ -149,18 +149,18 @@ discard block |
||
149 | 149 | ?>"> |
150 | 150 | </div> |
151 | 151 | <input type="email" name="email" id="email" value="<?php p($_['email']); ?>" |
152 | - <?php if(!$_['displayNameChangeSupported']) { print_unescaped('class="hidden"'); } ?> |
|
152 | + <?php if (!$_['displayNameChangeSupported']) { print_unescaped('class="hidden"'); } ?> |
|
153 | 153 | placeholder="<?php p($l->t('Your email address')); ?>" |
154 | 154 | autocomplete="on" autocapitalize="none" autocorrect="off" /> |
155 | 155 | <span class="icon-checkmark hidden"></span> |
156 | 156 | <span class="icon-error hidden" ></span> |
157 | - <?php if(!$_['displayNameChangeSupported']) { ?> |
|
158 | - <span><?php if(isset($_['email']) && !empty($_['email'])) { p($_['email']); } else { p($l->t('No email address set')); }?></span> |
|
157 | + <?php if (!$_['displayNameChangeSupported']) { ?> |
|
158 | + <span><?php if (isset($_['email']) && !empty($_['email'])) { p($_['email']); } else { p($l->t('No email address set')); }?></span> |
|
159 | 159 | <?php } ?> |
160 | - <?php if($_['displayNameChangeSupported']) { ?> |
|
160 | + <?php if ($_['displayNameChangeSupported']) { ?> |
|
161 | 161 | <em><?php p($l->t('For password reset and notifications')); ?></em> |
162 | 162 | <?php } ?> |
163 | - <?php if($_['lookupServerUploadEnabled']) { ?> |
|
163 | + <?php if ($_['lookupServerUploadEnabled']) { ?> |
|
164 | 164 | <input type="hidden" id="emailscope" value="<?php p($_['emailScope']) ?>"> |
165 | 165 | <?php } ?> |
166 | 166 | </form> |
@@ -174,12 +174,12 @@ discard block |
||
174 | 174 | <span class="icon-triangle-s"></span> |
175 | 175 | </span> |
176 | 176 | </h2> |
177 | - <input type="tel" id="phone" name="phone" <?php if(!$_['lookupServerUploadEnabled']) print_unescaped('disabled="1"'); ?> |
|
177 | + <input type="tel" id="phone" name="phone" <?php if (!$_['lookupServerUploadEnabled']) print_unescaped('disabled="1"'); ?> |
|
178 | 178 | value="<?php p($_['phone']) ?>" |
179 | 179 | placeholder="<?php p($l->t('Your phone number')); ?>" |
180 | 180 | autocomplete="on" autocapitalize="none" autocorrect="off" /> |
181 | 181 | <span class="icon-checkmark hidden"></span> |
182 | - <?php if($_['lookupServerUploadEnabled']) { ?> |
|
182 | + <?php if ($_['lookupServerUploadEnabled']) { ?> |
|
183 | 183 | <input type="hidden" id="phonescope" value="<?php p($_['phoneScope']) ?>"> |
184 | 184 | <?php } ?> |
185 | 185 | </form> |
@@ -194,12 +194,12 @@ discard block |
||
194 | 194 | <span class="icon-triangle-s"></span> |
195 | 195 | </span> |
196 | 196 | </h2> |
197 | - <input type="text" id="address" name="address" <?php if(!$_['lookupServerUploadEnabled']) print_unescaped('disabled="1"'); ?> |
|
197 | + <input type="text" id="address" name="address" <?php if (!$_['lookupServerUploadEnabled']) print_unescaped('disabled="1"'); ?> |
|
198 | 198 | placeholder="<?php p($l->t('Your postal address')); ?>" |
199 | 199 | value="<?php p($_['address']) ?>" |
200 | 200 | autocomplete="on" autocapitalize="none" autocorrect="off" /> |
201 | 201 | <span class="icon-checkmark hidden"></span> |
202 | - <?php if($_['lookupServerUploadEnabled']) { ?> |
|
202 | + <?php if ($_['lookupServerUploadEnabled']) { ?> |
|
203 | 203 | <input type="hidden" id="addressscope" value="<?php p($_['addressScope']) ?>"> |
204 | 204 | <?php } ?> |
205 | 205 | </form> |
@@ -214,11 +214,11 @@ discard block |
||
214 | 214 | <span class="icon-triangle-s"></span> |
215 | 215 | </span> |
216 | 216 | </h2> |
217 | - <?php if($_['lookupServerUploadEnabled']) { ?> |
|
218 | - <div class="verify <?php if ($_['website'] === '' || $_['websiteScope'] !== 'public') p('hidden'); ?>"> |
|
217 | + <?php if ($_['lookupServerUploadEnabled']) { ?> |
|
218 | + <div class="verify <?php if ($_['website'] === '' || $_['websiteScope'] !== 'public') p('hidden'); ?>"> |
|
219 | 219 | <img id="verify-website" title="<?php p($_['websiteMessage']); ?>" data-status="<?php p($_['websiteVerification']) ?>" src=" |
220 | 220 | <?php |
221 | - switch($_['websiteVerification']) { |
|
221 | + switch ($_['websiteVerification']) { |
|
222 | 222 | case \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS: |
223 | 223 | p(image_path('core', 'actions/verifying.svg')); |
224 | 224 | break; |
@@ -229,13 +229,13 @@ discard block |
||
229 | 229 | p(image_path('core', 'actions/verify.svg')); |
230 | 230 | } |
231 | 231 | ?>" |
232 | - <?php if($_['websiteVerification'] === \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS || $_['websiteVerification'] === \OC\Accounts\AccountManager::NOT_VERIFIED) print_unescaped(' class="verify-action"') ?> |
|
232 | + <?php if ($_['websiteVerification'] === \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS || $_['websiteVerification'] === \OC\Accounts\AccountManager::NOT_VERIFIED) print_unescaped(' class="verify-action"') ?> |
|
233 | 233 | > |
234 | 234 | <div class="verification-dialog popovermenu bubble menu"> |
235 | 235 | <div class="verification-dialog-content"> |
236 | 236 | <p class="explainVerification"></p> |
237 | 237 | <p class="verificationCode"></p> |
238 | - <p><?php p($l->t('It can take up to 24 hours before the account is displayed as verified.'));?></p> |
|
238 | + <p><?php p($l->t('It can take up to 24 hours before the account is displayed as verified.')); ?></p> |
|
239 | 239 | </div> |
240 | 240 | </div> |
241 | 241 | </div> |
@@ -243,10 +243,10 @@ discard block |
||
243 | 243 | <input type="text" name="website" id="website" value="<?php p($_['website']); ?>" |
244 | 244 | placeholder="<?php p($l->t('Link https://…')); ?>" |
245 | 245 | autocomplete="on" autocapitalize="none" autocorrect="off" |
246 | - <?php if(!$_['lookupServerUploadEnabled']) print_unescaped('disabled="1"'); ?> |
|
246 | + <?php if (!$_['lookupServerUploadEnabled']) print_unescaped('disabled="1"'); ?> |
|
247 | 247 | /> |
248 | 248 | <span class="icon-checkmark hidden"></span> |
249 | - <?php if($_['lookupServerUploadEnabled']) { ?> |
|
249 | + <?php if ($_['lookupServerUploadEnabled']) { ?> |
|
250 | 250 | <input type="hidden" id="websitescope" value="<?php p($_['websiteScope']) ?>"> |
251 | 251 | <?php } ?> |
252 | 252 | </form> |
@@ -261,11 +261,11 @@ discard block |
||
261 | 261 | <span class="icon-triangle-s"></span> |
262 | 262 | </span> |
263 | 263 | </h2> |
264 | - <?php if($_['lookupServerUploadEnabled']) { ?> |
|
265 | - <div class="verify <?php if ($_['twitter'] === '' || $_['twitterScope'] !== 'public') p('hidden'); ?>"> |
|
264 | + <?php if ($_['lookupServerUploadEnabled']) { ?> |
|
265 | + <div class="verify <?php if ($_['twitter'] === '' || $_['twitterScope'] !== 'public') p('hidden'); ?>"> |
|
266 | 266 | <img id="verify-twitter" title="<?php p($_['twitterMessage']); ?>" data-status="<?php p($_['twitterVerification']) ?>" src=" |
267 | 267 | <?php |
268 | - switch($_['twitterVerification']) { |
|
268 | + switch ($_['twitterVerification']) { |
|
269 | 269 | case \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS: |
270 | 270 | p(image_path('core', 'actions/verifying.svg')); |
271 | 271 | break; |
@@ -276,13 +276,13 @@ discard block |
||
276 | 276 | p(image_path('core', 'actions/verify.svg')); |
277 | 277 | } |
278 | 278 | ?>" |
279 | - <?php if($_['twitterVerification'] === \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS || $_['twitterVerification'] === \OC\Accounts\AccountManager::NOT_VERIFIED) print_unescaped(' class="verify-action"') ?> |
|
279 | + <?php if ($_['twitterVerification'] === \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS || $_['twitterVerification'] === \OC\Accounts\AccountManager::NOT_VERIFIED) print_unescaped(' class="verify-action"') ?> |
|
280 | 280 | > |
281 | 281 | <div class="verification-dialog popovermenu bubble menu"> |
282 | 282 | <div class="verification-dialog-content"> |
283 | 283 | <p class="explainVerification"></p> |
284 | 284 | <p class="verificationCode"></p> |
285 | - <p><?php p($l->t('It can take up to 24 hours before the account is displayed as verified.'));?></p> |
|
285 | + <p><?php p($l->t('It can take up to 24 hours before the account is displayed as verified.')); ?></p> |
|
286 | 286 | </div> |
287 | 287 | </div> |
288 | 288 | </div> |
@@ -290,10 +290,10 @@ discard block |
||
290 | 290 | <input type="text" name="twitter" id="twitter" value="<?php p($_['twitter']); ?>" |
291 | 291 | placeholder="<?php p($l->t('Twitter handle @…')); ?>" |
292 | 292 | autocomplete="on" autocapitalize="none" autocorrect="off" |
293 | - <?php if(!$_['lookupServerUploadEnabled']) print_unescaped('disabled="1"'); ?> |
|
293 | + <?php if (!$_['lookupServerUploadEnabled']) print_unescaped('disabled="1"'); ?> |
|
294 | 294 | /> |
295 | 295 | <span class="icon-checkmark hidden"></span> |
296 | - <?php if($_['lookupServerUploadEnabled']) { ?> |
|
296 | + <?php if ($_['lookupServerUploadEnabled']) { ?> |
|
297 | 297 | <input type="hidden" id="twitterscope" value="<?php p($_['twitterScope']) ?>"> |
298 | 298 | <?php } ?> |
299 | 299 | </form> |
@@ -320,47 +320,47 @@ discard block |
||
320 | 320 | <?php if (isset($_['activelanguage'])) { ?> |
321 | 321 | <form id="language" class="section"> |
322 | 322 | <h2> |
323 | - <label for="languageinput"><?php p($l->t('Language'));?></label> |
|
323 | + <label for="languageinput"><?php p($l->t('Language')); ?></label> |
|
324 | 324 | </h2> |
325 | - <select id="languageinput" name="lang" data-placeholder="<?php p($l->t('Language'));?>"> |
|
326 | - <option value="<?php p($_['activelanguage']['code']);?>"> |
|
327 | - <?php p($_['activelanguage']['name']);?> |
|
325 | + <select id="languageinput" name="lang" data-placeholder="<?php p($l->t('Language')); ?>"> |
|
326 | + <option value="<?php p($_['activelanguage']['code']); ?>"> |
|
327 | + <?php p($_['activelanguage']['name']); ?> |
|
328 | 328 | </option> |
329 | - <?php foreach($_['commonlanguages'] as $language):?> |
|
330 | - <option value="<?php p($language['code']);?>"> |
|
331 | - <?php p($language['name']);?> |
|
329 | + <?php foreach ($_['commonlanguages'] as $language):?> |
|
330 | + <option value="<?php p($language['code']); ?>"> |
|
331 | + <?php p($language['name']); ?> |
|
332 | 332 | </option> |
333 | - <?php endforeach;?> |
|
333 | + <?php endforeach; ?> |
|
334 | 334 | <optgroup label="––––––––––"></optgroup> |
335 | - <?php foreach($_['languages'] as $language):?> |
|
336 | - <option value="<?php p($language['code']);?>"> |
|
337 | - <?php p($language['name']);?> |
|
335 | + <?php foreach ($_['languages'] as $language):?> |
|
336 | + <option value="<?php p($language['code']); ?>"> |
|
337 | + <?php p($language['name']); ?> |
|
338 | 338 | </option> |
339 | - <?php endforeach;?> |
|
339 | + <?php endforeach; ?> |
|
340 | 340 | </select> |
341 | 341 | <a href="https://www.transifex.com/nextcloud/nextcloud/" |
342 | 342 | target="_blank" rel="noreferrer noopener"> |
343 | - <em><?php p($l->t('Help translate'));?></em> |
|
343 | + <em><?php p($l->t('Help translate')); ?></em> |
|
344 | 344 | </a> |
345 | 345 | </form> |
346 | 346 | <?php } ?> |
347 | 347 | </div> |
348 | 348 | <div class="personal-settings-setting-box personal-settings-password-box"> |
349 | 349 | <?php |
350 | - if($_['passwordChangeSupported']) { |
|
350 | + if ($_['passwordChangeSupported']) { |
|
351 | 351 | script('jquery-showpassword'); |
352 | 352 | ?> |
353 | 353 | <form id="passwordform" class="section"> |
354 | - <h2 class="inlineblock"><?php p($l->t('Password'));?></h2> |
|
354 | + <h2 class="inlineblock"><?php p($l->t('Password')); ?></h2> |
|
355 | 355 | <div id="password-error-msg" class="msg success inlineblock" style="display: none;">Saved</div> |
356 | 356 | |
357 | 357 | <label for="pass1" class="hidden-visually"><?php p($l->t('Current password')); ?>: </label> |
358 | 358 | <input type="password" id="pass1" name="oldpassword" |
359 | - placeholder="<?php p($l->t('Current password'));?>" |
|
359 | + placeholder="<?php p($l->t('Current password')); ?>" |
|
360 | 360 | autocomplete="off" autocapitalize="none" autocorrect="off" /> |
361 | 361 | |
362 | 362 | <div class="personal-show-container"> |
363 | - <label for="pass2" class="hidden-visually"><?php p($l->t('New password'));?>: </label> |
|
363 | + <label for="pass2" class="hidden-visually"><?php p($l->t('New password')); ?>: </label> |
|
364 | 364 | <input type="password" id="pass2" name="newpassword" |
365 | 365 | placeholder="<?php p($l->t('New password')); ?>" |
366 | 366 | data-typetoggle="#personal-show" |
@@ -2,18 +2,18 @@ discard block |
||
2 | 2 | <ul class="with-icon"> |
3 | 3 | <?php $pinned = 0 ?> |
4 | 4 | <?php foreach ($_['navigationItems'] as $item) { |
5 | - strpos($item['classes'], 'pinned')!==false ? $pinned++ : ''; |
|
5 | + strpos($item['classes'], 'pinned') !== false ? $pinned++ : ''; |
|
6 | 6 | ?> |
7 | - <li data-id="<?php p($item['id']) ?>" class="nav-<?php p($item['id']) ?> <?php p($item['classes']) ?> <?php p($pinned===1?'first-pinned':'') ?>"> |
|
7 | + <li data-id="<?php p($item['id']) ?>" class="nav-<?php p($item['id']) ?> <?php p($item['classes']) ?> <?php p($pinned === 1 ? 'first-pinned' : '') ?>"> |
|
8 | 8 | <a href="<?php p(isset($item['href']) ? $item['href'] : '#') ?>" |
9 | 9 | class="nav-icon-<?php p($item['icon'] !== '' ? $item['icon'] : $item['id']) ?> svg"> |
10 | - <?php p($item['name']);?> |
|
10 | + <?php p($item['name']); ?> |
|
11 | 11 | </a> |
12 | 12 | </li> |
13 | 13 | <?php } ?> |
14 | 14 | <li id="quota" class="pinned <?php |
15 | 15 | if ($_['quota'] !== \OCP\Files\FileInfo::SPACE_UNLIMITED) { |
16 | - ?>has-tooltip" title="<?php p($_['usage_relative'] . '%'); |
|
16 | + ?>has-tooltip" title="<?php p($_['usage_relative'].'%'); |
|
17 | 17 | } ?>"> |
18 | 18 | <a href="#" class="nav-icon-quota svg"> |
19 | 19 | <p id="quotatext"><?php |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | } ?></p> |
25 | 25 | <div class="quota-container"> |
26 | 26 | <progress value="<?php p($_['usage_relative']); ?>" max="100" |
27 | - <?php if($_['usage_relative'] > 80): ?> class="warn" <?php endif; ?>></progress> |
|
27 | + <?php if ($_['usage_relative'] > 80): ?> class="warn" <?php endif; ?>></progress> |
|
28 | 28 | </div> |
29 | 29 | </a> |
30 | 30 | </li> |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | <div id="app-settings"> |
33 | 33 | <div id="app-settings-header"> |
34 | 34 | <button class="settings-button" data-apps-slide-toggle="#app-settings-content"> |
35 | - <?php p($l->t('Settings'));?> |
|
35 | + <?php p($l->t('Settings')); ?> |
|
36 | 36 | </button> |
37 | 37 | </div> |
38 | 38 | <div id="app-settings-content"> |
@@ -40,9 +40,9 @@ discard block |
||
40 | 40 | <input class="checkbox" id="showhiddenfilesToggle" checked="checked" type="checkbox"> |
41 | 41 | <label for="showhiddenfilesToggle"><?php p($l->t('Show hidden files')); ?></label> |
42 | 42 | </div> |
43 | - <label for="webdavurl"><?php p($l->t('WebDAV'));?></label> |
|
43 | + <label for="webdavurl"><?php p($l->t('WebDAV')); ?></label> |
|
44 | 44 | <input id="webdavurl" type="text" readonly="readonly" value="<?php p(\OCP\Util::linkToRemote('webdav')); ?>" /> |
45 | - <em><?php print_unescaped($l->t('Use this address to <a href="%s" target="_blank" rel="noreferrer noopener">access your Files via WebDAV</a>', array(link_to_docs('user-webdav'))));?></em> |
|
45 | + <em><?php print_unescaped($l->t('Use this address to <a href="%s" target="_blank" rel="noreferrer noopener">access your Files via WebDAV</a>', array(link_to_docs('user-webdav')))); ?></em> |
|
46 | 46 | </div> |
47 | 47 | </div> |
48 | 48 | </div> |