@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | <form method="post" name="login"> |
13 | 13 | <fieldset> |
14 | 14 | <?php if (!empty($_['redirect_url'])) { |
15 | - print_unescaped('<input type="hidden" name="redirect_url" value="' . \OCP\Util::sanitizeHTML($_['redirect_url']) . '">'); |
|
15 | + print_unescaped('<input type="hidden" name="redirect_url" value="'.\OCP\Util::sanitizeHTML($_['redirect_url']).'">'); |
|
16 | 16 | } ?> |
17 | 17 | <?php if (isset($_['apacheauthfailed']) && ($_['apacheauthfailed'])): ?> |
18 | 18 | <div class="warning"> |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | <small><?php p($l->t('Please contact your administrator.')); ?></small> |
21 | 21 | </div> |
22 | 22 | <?php endif; ?> |
23 | - <?php foreach($_['messages'] as $message): ?> |
|
23 | + <?php foreach ($_['messages'] as $message): ?> |
|
24 | 24 | <div class="warning"> |
25 | 25 | <?php p($message); ?><br> |
26 | 26 | </div> |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | <?php endif; ?> |
34 | 34 | <div id="message" class="hidden"> |
35 | 35 | <img class="float-spinner" alt="" |
36 | - src="<?php p(image_path('core', 'loading-dark.gif'));?>"> |
|
36 | + src="<?php p(image_path('core', 'loading-dark.gif')); ?>"> |
|
37 | 37 | <span id="messageText"></span> |
38 | 38 | <!-- the following div ensures that the spinner is always inside the #message div --> |
39 | 39 | <div style="clear: both;"></div> |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | <fieldset> |
89 | 89 | <legend><?php p($l->t('Alternative Logins')) ?></legend> |
90 | 90 | <ul> |
91 | - <?php foreach($_['alt_login'] as $login): ?> |
|
91 | + <?php foreach ($_['alt_login'] as $login): ?> |
|
92 | 92 | <li><a class="button" href="<?php print_unescaped($login['href']); ?>" ><?php p($login['name']); ?></a></li> |
93 | 93 | <?php endforeach; ?> |
94 | 94 | </ul> |
@@ -49,7 +49,7 @@ |
||
49 | 49 | <p id="update-progress-message-error" class="hidden"></p> |
50 | 50 | <ul id="update-progress-message-warnings" class="hidden"></ul> |
51 | 51 | <p id="update-progress-message"></p> |
52 | - <a class="update-show-detailed"><?php p($l->t( 'Detailed logs' )); ?> <img src="<?php print_unescaped(image_path('', 'actions/caret.svg')); ?>" /></a> |
|
52 | + <a class="update-show-detailed"><?php p($l->t('Detailed logs')); ?> <img src="<?php print_unescaped(image_path('', 'actions/caret.svg')); ?>" /></a> |
|
53 | 53 | <div id="update-progress-detailed" class="hidden"></div> |
54 | 54 | </div> |
55 | 55 | </div> |
@@ -101,6 +101,6 @@ |
||
101 | 101 | }); |
102 | 102 | |
103 | 103 | // used for heartbeat |
104 | -$this->create('heartbeat', '/heartbeat')->action(function(){ |
|
104 | +$this->create('heartbeat', '/heartbeat')->action(function() { |
|
105 | 105 | // do nothing |
106 | 106 | }); |
@@ -44,16 +44,16 @@ |
||
44 | 44 | $inApps = array(); |
45 | 45 | } |
46 | 46 | if (isset($_GET['page'])) { |
47 | - $page = (int)$_GET['page']; |
|
47 | + $page = (int) $_GET['page']; |
|
48 | 48 | } else { |
49 | 49 | $page = 1; |
50 | 50 | } |
51 | 51 | if (isset($_GET['size'])) { |
52 | - $size = (int)$_GET['size']; |
|
52 | + $size = (int) $_GET['size']; |
|
53 | 53 | } else { |
54 | 54 | $size = 30; |
55 | 55 | } |
56 | -if($query) { |
|
56 | +if ($query) { |
|
57 | 57 | $result = \OC::$server->getSearch()->searchPaged($query, $inApps, $page, $size); |
58 | 58 | OC_JSON::encodedPrint($result); |
59 | 59 | } |
@@ -60,12 +60,12 @@ discard block |
||
60 | 60 | $post['dbpass'] = $post['dbpassword']; |
61 | 61 | } |
62 | 62 | |
63 | - if(isset($post['install']) AND $post['install']=='true') { |
|
63 | + if (isset($post['install']) AND $post['install'] == 'true') { |
|
64 | 64 | // We have to launch the installation process : |
65 | 65 | $e = $this->setupHelper->install($post); |
66 | 66 | $errors = array('errors' => $e); |
67 | 67 | |
68 | - if(count($e) > 0) { |
|
68 | + if (count($e) > 0) { |
|
69 | 69 | $options = array_merge($opts, $post, $errors); |
70 | 70 | $this->display($options); |
71 | 71 | } else { |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | } |
98 | 98 | |
99 | 99 | public function finishSetup() { |
100 | - if( file_exists( $this->autoConfigFile )) { |
|
100 | + if (file_exists($this->autoConfigFile)) { |
|
101 | 101 | unlink($this->autoConfigFile); |
102 | 102 | } |
103 | 103 | \OC::$server->getIntegrityCodeChecker()->runInstanceVerification(); |
@@ -105,11 +105,11 @@ discard block |
||
105 | 105 | } |
106 | 106 | |
107 | 107 | public function loadAutoConfig($post) { |
108 | - if( file_exists($this->autoConfigFile)) { |
|
108 | + if (file_exists($this->autoConfigFile)) { |
|
109 | 109 | \OCP\Util::writeLog('core', 'Autoconfig file found, setting up ownCloud…', \OCP\Util::INFO); |
110 | 110 | $AUTOCONFIG = array(); |
111 | 111 | include $this->autoConfigFile; |
112 | - $post = array_merge ($post, $AUTOCONFIG); |
|
112 | + $post = array_merge($post, $AUTOCONFIG); |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | $dbIsSet = isset($post['dbtype']); |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | protected function execute(InputInterface $input, OutputInterface $output) { |
56 | 56 | $outputType = $input->getOption('output'); |
57 | 57 | if ($outputType === self::OUTPUT_FORMAT_JSON || $outputType === self::OUTPUT_FORMAT_JSON_PRETTY) { |
58 | - $certificates = array_map(function (ICertificate $certificate) { |
|
58 | + $certificates = array_map(function(ICertificate $certificate) { |
|
59 | 59 | return [ |
60 | 60 | 'name' => $certificate->getName(), |
61 | 61 | 'common_name' => $certificate->getCommonName(), |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | 'Issued By' |
82 | 82 | ]); |
83 | 83 | |
84 | - $rows = array_map(function (ICertificate $certificate) { |
|
84 | + $rows = array_map(function(ICertificate $certificate) { |
|
85 | 85 | return [ |
86 | 86 | $certificate->getName(), |
87 | 87 | $certificate->getCommonName(), |
@@ -66,7 +66,7 @@ |
||
66 | 66 | $path = strval($input->getOption('path')); |
67 | 67 | $result = $this->checker->verifyAppSignature($appid, $path); |
68 | 68 | $this->writeArrayInOutputFormat($input, $output, $result); |
69 | - if (count($result)>0){ |
|
69 | + if (count($result) > 0) { |
|
70 | 70 | return 1; |
71 | 71 | } |
72 | 72 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | $privateKeyPath = $input->getOption('privateKey'); |
70 | 70 | $keyBundlePath = $input->getOption('certificate'); |
71 | 71 | $path = $input->getOption('path'); |
72 | - if(is_null($privateKeyPath) || is_null($keyBundlePath) || is_null($path)) { |
|
72 | + if (is_null($privateKeyPath) || is_null($keyBundlePath) || is_null($path)) { |
|
73 | 73 | $output->writeln('--privateKey, --certificate and --path are required.'); |
74 | 74 | return null; |
75 | 75 | } |
@@ -77,12 +77,12 @@ discard block |
||
77 | 77 | $privateKey = $this->fileAccessHelper->file_get_contents($privateKeyPath); |
78 | 78 | $keyBundle = $this->fileAccessHelper->file_get_contents($keyBundlePath); |
79 | 79 | |
80 | - if($privateKey === false) { |
|
80 | + if ($privateKey === false) { |
|
81 | 81 | $output->writeln(sprintf('Private key "%s" does not exists.', $privateKeyPath)); |
82 | 82 | return null; |
83 | 83 | } |
84 | 84 | |
85 | - if($keyBundle === false) { |
|
85 | + if ($keyBundle === false) { |
|
86 | 86 | $output->writeln(sprintf('Certificate "%s" does not exists.', $keyBundlePath)); |
87 | 87 | return null; |
88 | 88 | } |
@@ -96,8 +96,8 @@ discard block |
||
96 | 96 | try { |
97 | 97 | $this->checker->writeCoreSignature($x509, $rsa, $path); |
98 | 98 | $output->writeln('Successfully signed "core"'); |
99 | - } catch (\Exception $e){ |
|
100 | - $output->writeln('Error: ' . $e->getMessage()); |
|
99 | + } catch (\Exception $e) { |
|
100 | + $output->writeln('Error: '.$e->getMessage()); |
|
101 | 101 | return 1; |
102 | 102 | } |
103 | 103 | return 0; |
@@ -75,23 +75,23 @@ discard block |
||
75 | 75 | $path = $input->getOption('path'); |
76 | 76 | $privateKeyPath = $input->getOption('privateKey'); |
77 | 77 | $keyBundlePath = $input->getOption('certificate'); |
78 | - if(is_null($path) || is_null($privateKeyPath) || is_null($keyBundlePath)) { |
|
78 | + if (is_null($path) || is_null($privateKeyPath) || is_null($keyBundlePath)) { |
|
79 | 79 | $documentationUrl = $this->urlGenerator->linkToDocs('developer-code-integrity'); |
80 | 80 | $output->writeln('This command requires the --path, --privateKey and --certificate.'); |
81 | 81 | $output->writeln('Example: ./occ integrity:sign-app --path="/Users/lukasreschke/Programming/myapp/" --privateKey="/Users/lukasreschke/private/myapp.key" --certificate="/Users/lukasreschke/public/mycert.crt"'); |
82 | - $output->writeln('For more information please consult the documentation: '. $documentationUrl); |
|
82 | + $output->writeln('For more information please consult the documentation: '.$documentationUrl); |
|
83 | 83 | return null; |
84 | 84 | } |
85 | 85 | |
86 | 86 | $privateKey = $this->fileAccessHelper->file_get_contents($privateKeyPath); |
87 | 87 | $keyBundle = $this->fileAccessHelper->file_get_contents($keyBundlePath); |
88 | 88 | |
89 | - if($privateKey === false) { |
|
89 | + if ($privateKey === false) { |
|
90 | 90 | $output->writeln(sprintf('Private key "%s" does not exists.', $privateKeyPath)); |
91 | 91 | return null; |
92 | 92 | } |
93 | 93 | |
94 | - if($keyBundle === false) { |
|
94 | + if ($keyBundle === false) { |
|
95 | 95 | $output->writeln(sprintf('Certificate "%s" does not exists.', $keyBundlePath)); |
96 | 96 | return null; |
97 | 97 | } |
@@ -104,8 +104,8 @@ discard block |
||
104 | 104 | try { |
105 | 105 | $this->checker->writeAppSignature($path, $x509, $rsa); |
106 | 106 | $output->writeln('Successfully signed "'.$path.'"'); |
107 | - } catch (\Exception $e){ |
|
108 | - $output->writeln('Error: ' . $e->getMessage()); |
|
107 | + } catch (\Exception $e) { |
|
108 | + $output->writeln('Error: '.$e->getMessage()); |
|
109 | 109 | return 1; |
110 | 110 | } |
111 | 111 | return 0; |