@@ -51,7 +51,7 @@ |
||
51 | 51 | * @return ILinkAction |
52 | 52 | */ |
53 | 53 | public function newEMailAction($icon, $name, $email) { |
54 | - return $this->newLinkAction($icon, $name, 'mailto:' . urlencode($email)); |
|
54 | + return $this->newLinkAction($icon, $name, 'mailto:'.urlencode($email)); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | } |
@@ -10,12 +10,12 @@ discard block |
||
10 | 10 | <input type='hidden' id='hasOracle' value='<?php p($_['hasOracle']) ?>'> |
11 | 11 | <form action="index.php" method="post"> |
12 | 12 | <input type="hidden" name="install" value="true"> |
13 | - <?php if(count($_['errors']) > 0): ?> |
|
13 | + <?php if (count($_['errors']) > 0): ?> |
|
14 | 14 | <fieldset class="warning"> |
15 | - <legend><strong><?php p($l->t('Error'));?></strong></legend> |
|
16 | - <?php foreach($_['errors'] as $err): ?> |
|
15 | + <legend><strong><?php p($l->t('Error')); ?></strong></legend> |
|
16 | + <?php foreach ($_['errors'] as $err): ?> |
|
17 | 17 | <p> |
18 | - <?php if(is_array($err)):?> |
|
18 | + <?php if (is_array($err)):?> |
|
19 | 19 | <?php print_unescaped($err['error']); ?> |
20 | 20 | <span class='hint'><?php print_unescaped($err['hint']); ?></span> |
21 | 21 | <?php else: ?> |
@@ -25,10 +25,10 @@ discard block |
||
25 | 25 | <?php endforeach; ?> |
26 | 26 | </fieldset> |
27 | 27 | <?php endif; ?> |
28 | - <?php if(!$_['htaccessWorking']): ?> |
|
28 | + <?php if (!$_['htaccessWorking']): ?> |
|
29 | 29 | <fieldset class="warning"> |
30 | - <legend><strong><?php p($l->t('Security warning'));?></strong></legend> |
|
31 | - <p><?php p($l->t('Your data directory and files are probably accessible from the internet because the .htaccess file does not work.'));?><br> |
|
30 | + <legend><strong><?php p($l->t('Security warning')); ?></strong></legend> |
|
31 | + <p><?php p($l->t('Your data directory and files are probably accessible from the internet because the .htaccess file does not work.')); ?><br> |
|
32 | 32 | <?php print_unescaped($l->t( |
33 | 33 | 'For information how to properly configure your server, please see the <a href="%s" target="_blank" rel="noreferrer">documentation</a>.', |
34 | 34 | link_to_docs('admin-install') |
@@ -36,35 +36,35 @@ discard block |
||
36 | 36 | </fieldset> |
37 | 37 | <?php endif; ?> |
38 | 38 | <fieldset id="adminaccount"> |
39 | - <legend><?php print_unescaped($l->t( 'Create an <strong>admin account</strong>' )); ?></legend> |
|
39 | + <legend><?php print_unescaped($l->t('Create an <strong>admin account</strong>')); ?></legend> |
|
40 | 40 | <p class="grouptop"> |
41 | 41 | <input type="text" name="adminlogin" id="adminlogin" |
42 | - placeholder="<?php p($l->t( 'Username' )); ?>" |
|
42 | + placeholder="<?php p($l->t('Username')); ?>" |
|
43 | 43 | value="<?php p($_['adminlogin']); ?>" |
44 | 44 | autocomplete="off" autocapitalize="none" autocorrect="off" autofocus required> |
45 | - <label for="adminlogin" class="infield"><?php p($l->t( 'Username' )); ?></label> |
|
45 | + <label for="adminlogin" class="infield"><?php p($l->t('Username')); ?></label> |
|
46 | 46 | </p> |
47 | 47 | <p class="groupbottom"> |
48 | 48 | <input type="password" name="adminpass" data-typetoggle="#show" id="adminpass" |
49 | - placeholder="<?php p($l->t( 'Password' )); ?>" |
|
49 | + placeholder="<?php p($l->t('Password')); ?>" |
|
50 | 50 | value="<?php p($_['adminpass']); ?>" |
51 | 51 | autocomplete="off" autocapitalize="none" autocorrect="off" required> |
52 | - <label for="adminpass" class="infield"><?php p($l->t( 'Password' )); ?></label> |
|
52 | + <label for="adminpass" class="infield"><?php p($l->t('Password')); ?></label> |
|
53 | 53 | <input type="checkbox" id="show" name="show"> |
54 | 54 | <label for="show"></label> |
55 | 55 | </p> |
56 | 56 | </fieldset> |
57 | 57 | |
58 | - <?php if(!$_['directoryIsSet'] OR !$_['dbIsSet'] OR count($_['errors']) > 0): ?> |
|
58 | + <?php if (!$_['directoryIsSet'] OR !$_['dbIsSet'] OR count($_['errors']) > 0): ?> |
|
59 | 59 | <fieldset id="advancedHeader"> |
60 | - <legend><a id="showAdvanced"><?php p($l->t( 'Storage & database' )); ?> <img src="<?php print_unescaped(image_path('', 'actions/caret.svg')); ?>" /></a></legend> |
|
60 | + <legend><a id="showAdvanced"><?php p($l->t('Storage & database')); ?> <img src="<?php print_unescaped(image_path('', 'actions/caret.svg')); ?>" /></a></legend> |
|
61 | 61 | </fieldset> |
62 | 62 | <?php endif; ?> |
63 | 63 | |
64 | - <?php if(!$_['directoryIsSet'] OR count($_['errors']) > 0): ?> |
|
64 | + <?php if (!$_['directoryIsSet'] OR count($_['errors']) > 0): ?> |
|
65 | 65 | <fieldset id="datadirField"> |
66 | 66 | <div id="datadirContent"> |
67 | - <label for="directory"><?php p($l->t( 'Data folder' )); ?></label> |
|
67 | + <label for="directory"><?php p($l->t('Data folder')); ?></label> |
|
68 | 68 | <input type="text" name="directory" id="directory" |
69 | 69 | placeholder="<?php p(OC::$SERVERROOT.'/data'); ?>" |
70 | 70 | value="<?php p($_['directory']); ?>" |
@@ -73,19 +73,19 @@ discard block |
||
73 | 73 | </fieldset> |
74 | 74 | <?php endif; ?> |
75 | 75 | |
76 | - <?php if(!$_['dbIsSet'] OR count($_['errors']) > 0): ?> |
|
76 | + <?php if (!$_['dbIsSet'] OR count($_['errors']) > 0): ?> |
|
77 | 77 | <fieldset id='databaseBackend'> |
78 | - <?php if($_['hasMySQL'] or $_['hasPostgreSQL'] or $_['hasOracle']) |
|
79 | - $hasOtherDB = true; else $hasOtherDB =false; //other than SQLite ?> |
|
80 | - <legend><?php p($l->t( 'Configure the database' )); ?></legend> |
|
78 | + <?php if ($_['hasMySQL'] or $_['hasPostgreSQL'] or $_['hasOracle']) |
|
79 | + $hasOtherDB = true; else $hasOtherDB = false; //other than SQLite ?> |
|
80 | + <legend><?php p($l->t('Configure the database')); ?></legend> |
|
81 | 81 | <div id="selectDbType"> |
82 | - <?php foreach($_['databases'] as $type => $label): ?> |
|
83 | - <?php if(count($_['databases']) === 1): ?> |
|
82 | + <?php foreach ($_['databases'] as $type => $label): ?> |
|
83 | + <?php if (count($_['databases']) === 1): ?> |
|
84 | 84 | <p class="info"> |
85 | - <?php p($l->t( 'Only %s is available.', array($label) )); ?> |
|
86 | - <?php p($l->t( 'Install and activate additional PHP modules to choose other database types.' )); ?><br> |
|
85 | + <?php p($l->t('Only %s is available.', array($label))); ?> |
|
86 | + <?php p($l->t('Install and activate additional PHP modules to choose other database types.')); ?><br> |
|
87 | 87 | <a href="<?php print_unescaped(link_to_docs('admin-source_install')); ?>" target="_blank" rel="noreferrer"> |
88 | - <?php p($l->t( 'For more details check out the documentation.' )); ?> ↗</a> |
|
88 | + <?php p($l->t('For more details check out the documentation.')); ?> ↗</a> |
|
89 | 89 | </p> |
90 | 90 | <input type="hidden" id="dbtype" name="dbtype" value="<?php p($type) ?>"> |
91 | 91 | <?php else: ?> |
@@ -97,75 +97,75 @@ discard block |
||
97 | 97 | </div> |
98 | 98 | </fieldset> |
99 | 99 | |
100 | - <?php if($hasOtherDB): ?> |
|
100 | + <?php if ($hasOtherDB): ?> |
|
101 | 101 | <fieldset id='databaseField'> |
102 | 102 | <div id="use_other_db"> |
103 | 103 | <p class="grouptop"> |
104 | - <label for="dbuser" class="infield"><?php p($l->t( 'Database user' )); ?></label> |
|
104 | + <label for="dbuser" class="infield"><?php p($l->t('Database user')); ?></label> |
|
105 | 105 | <input type="text" name="dbuser" id="dbuser" |
106 | - placeholder="<?php p($l->t( 'Database user' )); ?>" |
|
106 | + placeholder="<?php p($l->t('Database user')); ?>" |
|
107 | 107 | value="<?php p($_['dbuser']); ?>" |
108 | 108 | autocomplete="off" autocapitalize="none" autocorrect="off"> |
109 | 109 | </p> |
110 | 110 | <p class="groupmiddle"> |
111 | 111 | <input type="password" name="dbpass" id="dbpass" data-typetoggle="#dbpassword-toggle" |
112 | - placeholder="<?php p($l->t( 'Database password' )); ?>" |
|
112 | + placeholder="<?php p($l->t('Database password')); ?>" |
|
113 | 113 | value="<?php p($_['dbpass']); ?>" |
114 | 114 | autocomplete="off" autocapitalize="none" autocorrect="off"> |
115 | - <label for="dbpass" class="infield"><?php p($l->t( 'Database password' )); ?></label> |
|
115 | + <label for="dbpass" class="infield"><?php p($l->t('Database password')); ?></label> |
|
116 | 116 | <input type="checkbox" id="dbpassword-toggle" name="dbpassword-toggle"> |
117 | 117 | <label for="dbpassword-toggle"></label> |
118 | 118 | </p> |
119 | 119 | <p class="groupmiddle"> |
120 | - <label for="dbname" class="infield"><?php p($l->t( 'Database name' )); ?></label> |
|
120 | + <label for="dbname" class="infield"><?php p($l->t('Database name')); ?></label> |
|
121 | 121 | <input type="text" name="dbname" id="dbname" |
122 | - placeholder="<?php p($l->t( 'Database name' )); ?>" |
|
122 | + placeholder="<?php p($l->t('Database name')); ?>" |
|
123 | 123 | value="<?php p($_['dbname']); ?>" |
124 | 124 | autocomplete="off" autocapitalize="none" autocorrect="off" |
125 | 125 | pattern="[0-9a-zA-Z$_-]+"> |
126 | 126 | </p> |
127 | - <?php if($_['hasOracle']): ?> |
|
127 | + <?php if ($_['hasOracle']): ?> |
|
128 | 128 | <div id="use_oracle_db"> |
129 | 129 | <p class="groupmiddle"> |
130 | - <label for="dbtablespace" class="infield"><?php p($l->t( 'Database tablespace' )); ?></label> |
|
130 | + <label for="dbtablespace" class="infield"><?php p($l->t('Database tablespace')); ?></label> |
|
131 | 131 | <input type="text" name="dbtablespace" id="dbtablespace" |
132 | - placeholder="<?php p($l->t( 'Database tablespace' )); ?>" |
|
132 | + placeholder="<?php p($l->t('Database tablespace')); ?>" |
|
133 | 133 | value="<?php p($_['dbtablespace']); ?>" |
134 | 134 | autocomplete="off" autocapitalize="none" autocorrect="off"> |
135 | 135 | </p> |
136 | 136 | </div> |
137 | 137 | <?php endif; ?> |
138 | 138 | <p class="groupbottom"> |
139 | - <label for="dbhost" class="infield"><?php p($l->t( 'Database host' )); ?></label> |
|
139 | + <label for="dbhost" class="infield"><?php p($l->t('Database host')); ?></label> |
|
140 | 140 | <input type="text" name="dbhost" id="dbhost" |
141 | - placeholder="<?php p($l->t( 'Database host' )); ?>" |
|
141 | + placeholder="<?php p($l->t('Database host')); ?>" |
|
142 | 142 | value="<?php p($_['dbhost']); ?>" |
143 | 143 | autocomplete="off" autocapitalize="none" autocorrect="off"> |
144 | 144 | </p> |
145 | 145 | <p class="info"> |
146 | - <?php p($l->t( 'Please specify the port number along with the host name (e.g., localhost:5432).' )); ?> |
|
146 | + <?php p($l->t('Please specify the port number along with the host name (e.g., localhost:5432).')); ?> |
|
147 | 147 | </p> |
148 | 148 | </div> |
149 | 149 | </fieldset> |
150 | 150 | <?php endif; ?> |
151 | 151 | <?php endif; ?> |
152 | 152 | |
153 | - <?php if(!$_['dbIsSet'] OR count($_['errors']) > 0): ?> |
|
153 | + <?php if (!$_['dbIsSet'] OR count($_['errors']) > 0): ?> |
|
154 | 154 | <fieldset id="sqliteInformation" class="warning"> |
155 | - <legend><?php p($l->t('Performance warning'));?></legend> |
|
156 | - <p><?php p($l->t('SQLite will be used as database.'));?></p> |
|
157 | - <p><?php p($l->t('For larger installations we recommend to choose a different database backend.'));?></p> |
|
155 | + <legend><?php p($l->t('Performance warning')); ?></legend> |
|
156 | + <p><?php p($l->t('SQLite will be used as database.')); ?></p> |
|
157 | + <p><?php p($l->t('For larger installations we recommend to choose a different database backend.')); ?></p> |
|
158 | 158 | <p><?php p($l->t('Especially when using the desktop client for file syncing the use of SQLite is discouraged.')); ?></p> |
159 | 159 | </fieldset> |
160 | 160 | <?php endif ?> |
161 | 161 | |
162 | 162 | <div class="icon-loading-dark float-spinner"> </div> |
163 | 163 | |
164 | - <div class="buttons"><input type="submit" class="primary" value="<?php p($l->t( 'Finish setup' )); ?>" data-finishing="<?php p($l->t( 'Finishing …' )); ?>"></div> |
|
164 | + <div class="buttons"><input type="submit" class="primary" value="<?php p($l->t('Finish setup')); ?>" data-finishing="<?php p($l->t('Finishing …')); ?>"></div> |
|
165 | 165 | |
166 | 166 | <p class="info"> |
167 | 167 | <span class="icon-info-white"></span> |
168 | - <?php p($l->t('Need help?'));?> |
|
169 | - <a target="_blank" rel="noreferrer" href="<?php p(link_to_docs('admin-install')); ?>"><?php p($l->t('See the documentation'));?> ↗</a> |
|
168 | + <?php p($l->t('Need help?')); ?> |
|
169 | + <a target="_blank" rel="noreferrer" href="<?php p(link_to_docs('admin-install')); ?>"><?php p($l->t('See the documentation')); ?> ↗</a> |
|
170 | 170 | </p> |
171 | 171 | </form> |
@@ -54,8 +54,8 @@ discard block |
||
54 | 54 | /** |
55 | 55 | * pass all other function directly to the \Doctrine\DBAL\Driver\Statement |
56 | 56 | */ |
57 | - public function __call($name,$arguments) { |
|
58 | - return call_user_func_array(array($this->statement,$name), $arguments); |
|
57 | + public function __call($name, $arguments) { |
|
58 | + return call_user_func_array(array($this->statement, $name), $arguments); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
@@ -64,11 +64,11 @@ discard block |
||
64 | 64 | * @param array $input |
65 | 65 | * @return \OC_DB_StatementWrapper|int |
66 | 66 | */ |
67 | - public function execute($input=array()) { |
|
68 | - if(\OC::$server->getSystemConfig()->getValue( "log_query", false)) { |
|
67 | + public function execute($input = array()) { |
|
68 | + if (\OC::$server->getSystemConfig()->getValue("log_query", false)) { |
|
69 | 69 | $backTrace = debug_backtrace(); |
70 | - $class = $backTrace[1]['class'] . ':' . $backTrace[1]['function']; |
|
71 | - $file = substr($backTrace[0]['file'], strlen(\OC::$SERVERROOT)) . ':' . $backTrace[0]['line']; |
|
70 | + $class = $backTrace[1]['class'].':'.$backTrace[1]['function']; |
|
71 | + $file = substr($backTrace[0]['file'], strlen(\OC::$SERVERROOT)).':'.$backTrace[0]['line']; |
|
72 | 72 | $params_str = str_replace("\n", " ", var_export($input, true)); |
73 | 73 | \OCP\Util::writeLog('core', "DB execute with arguments : $params_str in $class; $file", \OCP\Util::DEBUG); |
74 | 74 | } |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | * @param integer|null $length max length when using an OUT bind |
121 | 121 | * @return boolean |
122 | 122 | */ |
123 | - public function bindParam($column, &$variable, $type = null, $length = null){ |
|
123 | + public function bindParam($column, &$variable, $type = null, $length = null) { |
|
124 | 124 | return $this->statement->bindParam($column, $variable, $type, $length); |
125 | 125 | } |
126 | 126 | } |
@@ -10,10 +10,10 @@ discard block |
||
10 | 10 | |
11 | 11 | <div id="app-navigation"> |
12 | 12 | <ul class="with-icon"> |
13 | - <?php foreach($_['forms'] as $form) { |
|
13 | + <?php foreach ($_['forms'] as $form) { |
|
14 | 14 | if (isset($form['anchor'])) { |
15 | - $anchor = '#' . $form['anchor']; |
|
16 | - $class = 'nav-icon-' . $form['anchor']; |
|
15 | + $anchor = '#'.$form['anchor']; |
|
16 | + $class = 'nav-icon-'.$form['anchor']; |
|
17 | 17 | $sectionName = $form['section-name']; |
18 | 18 | print_unescaped(sprintf("<li><a href='%s' class='%s'>%s</a></li>", \OCP\Util::sanitizeHTML($anchor), |
19 | 19 | \OCP\Util::sanitizeHTML($class), \OCP\Util::sanitizeHTML($sectionName))); |
@@ -25,15 +25,15 @@ discard block |
||
25 | 25 | <div id="app-content"> |
26 | 26 | |
27 | 27 | <div id="quota" class="section"> |
28 | - <div style="width:<?php p($_['usage_relative']);?>%" |
|
29 | - <?php if($_['usage_relative'] > 80): ?> class="quota-warning" <?php endif; ?>> |
|
28 | + <div style="width:<?php p($_['usage_relative']); ?>%" |
|
29 | + <?php if ($_['usage_relative'] > 80): ?> class="quota-warning" <?php endif; ?>> |
|
30 | 30 | <p id="quotatext"> |
31 | 31 | <?php if ($_['quota'] === \OCP\Files\FileInfo::SPACE_UNLIMITED): ?> |
32 | 32 | <?php print_unescaped($l->t('You are using <strong>%s</strong> of <strong>%s</strong>', |
33 | - [$_['usage'], $_['total_space']]));?> |
|
33 | + [$_['usage'], $_['total_space']])); ?> |
|
34 | 34 | <?php else: ?> |
35 | 35 | <?php print_unescaped($l->t('You are using <strong>%s</strong> of <strong>%s</strong> (<strong>%s %%</strong>)', |
36 | - [$_['usage'], $_['total_space'], $_['usage_relative']]));?> |
|
36 | + [$_['usage'], $_['total_space'], $_['usage_relative']])); ?> |
|
37 | 37 | <?php endif ?> |
38 | 38 | </p> |
39 | 39 | </div> |
@@ -79,11 +79,11 @@ discard block |
||
79 | 79 | <span class="icon-password"/> |
80 | 80 | </h2> |
81 | 81 | <input type="text" id="displayname" name="displayname" |
82 | - <?php if(!$_['displayNameChangeSupported']) { print_unescaped('class="hidden"'); } ?> |
|
82 | + <?php if (!$_['displayNameChangeSupported']) { print_unescaped('class="hidden"'); } ?> |
|
83 | 83 | value="<?php p($_['displayName']) ?>" |
84 | 84 | autocomplete="on" autocapitalize="none" autocorrect="off" /> |
85 | - <?php if(!$_['displayNameChangeSupported']) { ?> |
|
86 | - <span><?php if(isset($_['displayName']) && !empty($_['displayName'])) { p($_['displayName']); } else { p($l->t('No display name set')); } ?></span> |
|
85 | + <?php if (!$_['displayNameChangeSupported']) { ?> |
|
86 | + <span><?php if (isset($_['displayName']) && !empty($_['displayName'])) { p($_['displayName']); } else { p($l->t('No display name set')); } ?></span> |
|
87 | 87 | <?php } ?> |
88 | 88 | <span class="icon-checkmark hidden"/> |
89 | 89 | <input type="hidden" id="displaynamescope" value="<?php p($_['displayNameScope']) ?>"> |
@@ -96,13 +96,13 @@ discard block |
||
96 | 96 | <span class="icon-password"/> |
97 | 97 | </h2> |
98 | 98 | <input type="email" name="email" id="email" value="<?php p($_['email']); ?>" |
99 | - <?php if(!$_['displayNameChangeSupported']) { print_unescaped('class="hidden"'); } ?> |
|
99 | + <?php if (!$_['displayNameChangeSupported']) { print_unescaped('class="hidden"'); } ?> |
|
100 | 100 | placeholder="<?php p($l->t('Your email address')); ?>" |
101 | 101 | autocomplete="on" autocapitalize="none" autocorrect="off" /> |
102 | - <?php if(!$_['displayNameChangeSupported']) { ?> |
|
103 | - <span><?php if(isset($_['email']) && !empty($_['email'])) { p($_['email']); } else { p($l->t('No email address set')); }?></span> |
|
102 | + <?php if (!$_['displayNameChangeSupported']) { ?> |
|
103 | + <span><?php if (isset($_['email']) && !empty($_['email'])) { p($_['email']); } else { p($l->t('No email address set')); }?></span> |
|
104 | 104 | <?php } ?> |
105 | - <?php if($_['displayNameChangeSupported']) { ?> |
|
105 | + <?php if ($_['displayNameChangeSupported']) { ?> |
|
106 | 106 | <br /> |
107 | 107 | <em><?php p($l->t('For password reset and notifications')); ?></em> |
108 | 108 | <?php } ?> |
@@ -178,19 +178,19 @@ discard block |
||
178 | 178 | </div> |
179 | 179 | |
180 | 180 | <?php |
181 | -if($_['passwordChangeSupported']) { |
|
181 | +if ($_['passwordChangeSupported']) { |
|
182 | 182 | script('jquery-showpassword'); |
183 | 183 | ?> |
184 | 184 | <form id="passwordform" class="section"> |
185 | - <h2 class="inlineblock"><?php p($l->t('Password'));?></h2> |
|
185 | + <h2 class="inlineblock"><?php p($l->t('Password')); ?></h2> |
|
186 | 186 | <div id="password-error-msg" class="msg success inlineblock" style="display: none;">Saved</div> |
187 | 187 | <br> |
188 | 188 | <label for="pass1" class="hidden-visually"><?php p($l->t('Current password')); ?>: </label> |
189 | 189 | <input type="password" id="pass1" name="oldpassword" |
190 | - placeholder="<?php p($l->t('Current password'));?>" |
|
190 | + placeholder="<?php p($l->t('Current password')); ?>" |
|
191 | 191 | autocomplete="off" autocapitalize="none" autocorrect="off" /> |
192 | 192 | <div class="personal-show-container"> |
193 | - <label for="pass2" class="hidden-visually"><?php p($l->t('New password'));?>: </label> |
|
193 | + <label for="pass2" class="hidden-visually"><?php p($l->t('New password')); ?>: </label> |
|
194 | 194 | <input type="password" id="pass2" name="newpassword" |
195 | 195 | placeholder="<?php p($l->t('New password')); ?>" |
196 | 196 | data-typetoggle="#personal-show" |
@@ -206,44 +206,44 @@ discard block |
||
206 | 206 | |
207 | 207 | <form id="language" class="section"> |
208 | 208 | <h2> |
209 | - <label for="languageinput"><?php p($l->t('Language'));?></label> |
|
209 | + <label for="languageinput"><?php p($l->t('Language')); ?></label> |
|
210 | 210 | </h2> |
211 | - <select id="languageinput" name="lang" data-placeholder="<?php p($l->t('Language'));?>"> |
|
212 | - <option value="<?php p($_['activelanguage']['code']);?>"> |
|
213 | - <?php p($_['activelanguage']['name']);?> |
|
211 | + <select id="languageinput" name="lang" data-placeholder="<?php p($l->t('Language')); ?>"> |
|
212 | + <option value="<?php p($_['activelanguage']['code']); ?>"> |
|
213 | + <?php p($_['activelanguage']['name']); ?> |
|
214 | 214 | </option> |
215 | - <?php foreach($_['commonlanguages'] as $language):?> |
|
216 | - <option value="<?php p($language['code']);?>"> |
|
217 | - <?php p($language['name']);?> |
|
215 | + <?php foreach ($_['commonlanguages'] as $language):?> |
|
216 | + <option value="<?php p($language['code']); ?>"> |
|
217 | + <?php p($language['name']); ?> |
|
218 | 218 | </option> |
219 | - <?php endforeach;?> |
|
219 | + <?php endforeach; ?> |
|
220 | 220 | <optgroup label="––––––––––"></optgroup> |
221 | - <?php foreach($_['languages'] as $language):?> |
|
222 | - <option value="<?php p($language['code']);?>"> |
|
223 | - <?php p($language['name']);?> |
|
221 | + <?php foreach ($_['languages'] as $language):?> |
|
222 | + <option value="<?php p($language['code']); ?>"> |
|
223 | + <?php p($language['name']); ?> |
|
224 | 224 | </option> |
225 | - <?php endforeach;?> |
|
225 | + <?php endforeach; ?> |
|
226 | 226 | </select> |
227 | 227 | <a href="https://www.transifex.com/nextcloud/nextcloud/" |
228 | 228 | target="_blank" rel="noreferrer"> |
229 | - <em><?php p($l->t('Help translate'));?></em> |
|
229 | + <em><?php p($l->t('Help translate')); ?></em> |
|
230 | 230 | </a> |
231 | 231 | </form> |
232 | 232 | |
233 | 233 | |
234 | 234 | <div id="clientsbox" class="section clientsbox"> |
235 | - <h2><?php p($l->t('Get the apps to sync your files'));?></h2> |
|
235 | + <h2><?php p($l->t('Get the apps to sync your files')); ?></h2> |
|
236 | 236 | <a href="<?php p($_['clients']['desktop']); ?>" rel="noreferrer" target="_blank"> |
237 | 237 | <img src="<?php print_unescaped(image_path('core', 'desktopapp.svg')); ?>" |
238 | - alt="<?php p($l->t('Desktop client'));?>" /> |
|
238 | + alt="<?php p($l->t('Desktop client')); ?>" /> |
|
239 | 239 | </a> |
240 | 240 | <a href="<?php p($_['clients']['android']); ?>" rel="noreferrer" target="_blank"> |
241 | 241 | <img src="<?php print_unescaped(image_path('core', 'googleplay.png')); ?>" |
242 | - alt="<?php p($l->t('Android app'));?>" /> |
|
242 | + alt="<?php p($l->t('Android app')); ?>" /> |
|
243 | 243 | </a> |
244 | 244 | <a href="<?php p($_['clients']['ios']); ?>" rel="noreferrer" target="_blank"> |
245 | 245 | <img src="<?php print_unescaped(image_path('core', 'appstore.svg')); ?>" |
246 | - alt="<?php p($l->t('iOS app'));?>" /> |
|
246 | + alt="<?php p($l->t('iOS app')); ?>" /> |
|
247 | 247 | </a> |
248 | 248 | |
249 | 249 | <p> |
@@ -259,19 +259,19 @@ discard block |
||
259 | 259 | $l->t('If you want to support the project {contributeopen}join development{linkclose} or {contributeopen}spread the word{linkclose}!'))); ?> |
260 | 260 | </p> |
261 | 261 | |
262 | - <?php if(OC_APP::isEnabled('firstrunwizard')) {?> |
|
263 | - <p><a class="button" href="#" id="showWizard"><?php p($l->t('Show First Run Wizard again'));?></a></p> |
|
262 | + <?php if (OC_APP::isEnabled('firstrunwizard')) {?> |
|
263 | + <p><a class="button" href="#" id="showWizard"><?php p($l->t('Show First Run Wizard again')); ?></a></p> |
|
264 | 264 | <?php }?> |
265 | 265 | </div> |
266 | 266 | |
267 | 267 | <div id="sessions" class="section"> |
268 | - <h2><?php p($l->t('Sessions'));?></h2> |
|
269 | - <span class="hidden-when-empty"><?php p($l->t('Web, desktop and mobile clients currently logged in to your account.'));?></span> |
|
268 | + <h2><?php p($l->t('Sessions')); ?></h2> |
|
269 | + <span class="hidden-when-empty"><?php p($l->t('Web, desktop and mobile clients currently logged in to your account.')); ?></span> |
|
270 | 270 | <table class="icon-loading"> |
271 | 271 | <thead class="token-list-header"> |
272 | 272 | <tr> |
273 | - <th><?php p($l->t('Device'));?></th> |
|
274 | - <th><?php p($l->t('Last activity'));?></th> |
|
273 | + <th><?php p($l->t('Device')); ?></th> |
|
274 | + <th><?php p($l->t('Last activity')); ?></th> |
|
275 | 275 | <th></th> |
276 | 276 | </tr> |
277 | 277 | </thead> |
@@ -281,13 +281,13 @@ discard block |
||
281 | 281 | </div> |
282 | 282 | |
283 | 283 | <div id="apppasswords" class="section"> |
284 | - <h2><?php p($l->t('App passwords'));?></h2> |
|
285 | - <p><?php p($l->t('Passcodes that give an app or device permissions to access your account.'));?></p> |
|
284 | + <h2><?php p($l->t('App passwords')); ?></h2> |
|
285 | + <p><?php p($l->t('Passcodes that give an app or device permissions to access your account.')); ?></p> |
|
286 | 286 | <table class="icon-loading"> |
287 | 287 | <thead class="hidden-when-empty"> |
288 | 288 | <tr> |
289 | - <th><?php p($l->t('Name'));?></th> |
|
290 | - <th><?php p($l->t('Last activity'));?></th> |
|
289 | + <th><?php p($l->t('Name')); ?></th> |
|
290 | + <th><?php p($l->t('Last activity')); ?></th> |
|
291 | 291 | <th></th> |
292 | 292 | </tr> |
293 | 293 | </thead> |
@@ -316,14 +316,14 @@ discard block |
||
316 | 316 | </div> |
317 | 317 | </div> |
318 | 318 | |
319 | -<?php foreach($_['forms'] as $form) { |
|
319 | +<?php foreach ($_['forms'] as $form) { |
|
320 | 320 | if (isset($form['form'])) {?> |
321 | - <div id="<?php isset($form['anchor']) ? p($form['anchor']) : p('');?>"><?php print_unescaped($form['form']);?></div> |
|
321 | + <div id="<?php isset($form['anchor']) ? p($form['anchor']) : p(''); ?>"><?php print_unescaped($form['form']); ?></div> |
|
322 | 322 | <?php } |
323 | 323 | };?> |
324 | 324 | |
325 | 325 | <div class="section"> |
326 | - <h2><?php p($l->t('Version'));?></h2> |
|
326 | + <h2><?php p($l->t('Version')); ?></h2> |
|
327 | 327 | <p><a href="<?php print_unescaped($theme->getBaseUrl()); ?>" target="_blank"><?php p($theme->getTitle()); ?></a> <?php p(OC_Util::getHumanVersion()) ?></p> |
328 | 328 | <p><?php include('settings.development.notice.php'); ?></p> |
329 | 329 | </div> |
@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | <meta charset="utf-8"> |
5 | 5 | <title> |
6 | 6 | <?php |
7 | - p(!empty($_['application'])?$_['application'].' - ':''); |
|
7 | + p(!empty($_['application']) ? $_['application'].' - ' : ''); |
|
8 | 8 | p($theme->getTitle()); |
9 | 9 | ?> |
10 | 10 | </title> |
@@ -14,16 +14,16 @@ discard block |
||
14 | 14 | <meta name="apple-itunes-app" content="app-id=<?php p($theme->getiTunesAppId()); ?>"> |
15 | 15 | <meta name="apple-mobile-web-app-capable" content="yes"> |
16 | 16 | <meta name="apple-mobile-web-app-status-bar-style" content="black"> |
17 | - <meta name="apple-mobile-web-app-title" content="<?php p((!empty($_['application']) && $_['appid']!='files')? $_['application']:$theme->getTitle()); ?>"> |
|
17 | + <meta name="apple-mobile-web-app-title" content="<?php p((!empty($_['application']) && $_['appid'] != 'files') ? $_['application'] : $theme->getTitle()); ?>"> |
|
18 | 18 | <meta name="mobile-web-app-capable" content="yes"> |
19 | 19 | <meta name="theme-color" content="<?php p($theme->getMailHeaderColor()); ?>"> |
20 | 20 | <link rel="icon" href="<?php print_unescaped(image_path($_['appid'], 'favicon.ico')); /* IE11+ supports png */ ?>"> |
21 | 21 | <link rel="apple-touch-icon-precomposed" href="<?php print_unescaped(image_path($_['appid'], 'favicon-touch.png')); ?>"> |
22 | 22 | <link rel="mask-icon" sizes="any" href="<?php print_unescaped(image_path($_['appid'], 'favicon-mask.svg')); ?>" color="#0082c9"> |
23 | - <?php foreach($_['cssfiles'] as $cssfile): ?> |
|
23 | + <?php foreach ($_['cssfiles'] as $cssfile): ?> |
|
24 | 24 | <link rel="stylesheet" href="<?php print_unescaped($cssfile); ?>"> |
25 | 25 | <?php endforeach; ?> |
26 | - <?php foreach($_['printcssfiles'] as $cssfile): ?> |
|
26 | + <?php foreach ($_['printcssfiles'] as $cssfile): ?> |
|
27 | 27 | <link rel="stylesheet" href="<?php print_unescaped($cssfile); ?>" media="print"> |
28 | 28 | <?php endforeach; ?> |
29 | 29 | <?php if (isset($_['inline_ocjs'])): ?> |
@@ -31,12 +31,12 @@ discard block |
||
31 | 31 | <?php print_unescaped($_['inline_ocjs']); ?> |
32 | 32 | </script> |
33 | 33 | <?php endif; ?> |
34 | - <?php foreach($_['jsfiles'] as $jsfile): ?> |
|
34 | + <?php foreach ($_['jsfiles'] as $jsfile): ?> |
|
35 | 35 | <script nonce="<?php p(\OC::$server->getContentSecurityPolicyNonceManager()->getNonce()) ?>" src="<?php print_unescaped($jsfile); ?>"></script> |
36 | 36 | <?php endforeach; ?> |
37 | 37 | <?php print_unescaped($_['headers']); ?> |
38 | 38 | </head> |
39 | - <body id="<?php p($_['bodyid']);?>"> |
|
39 | + <body id="<?php p($_['bodyid']); ?>"> |
|
40 | 40 | <?php include('layout.noscript.warning.php'); ?> |
41 | 41 | <div id="notification-container"> |
42 | 42 | <div id="notification"></div> |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | |
55 | 55 | <a href="#" class="header-appname-container menutoggle" tabindex="2"> |
56 | 56 | <h1 class="header-appname"> |
57 | - <?php p(!empty($_['application'])?$_['application']: $l->t('Apps')); ?> |
|
57 | + <?php p(!empty($_['application']) ? $_['application'] : $l->t('Apps')); ?> |
|
58 | 58 | </h1> |
59 | 59 | <div class="icon-caret"></div> |
60 | 60 | </a> |
@@ -62,11 +62,11 @@ discard block |
||
62 | 62 | <div id="appmenu"> |
63 | 63 | <ul> |
64 | 64 | <?php $headerIconCount = 8; ?> |
65 | - <?php foreach($_['headernavigation'] as $entry): ?> |
|
65 | + <?php foreach ($_['headernavigation'] as $entry): ?> |
|
66 | 66 | <li data-id="<?php p($entry['id']); ?>"> |
67 | 67 | <a href="<?php print_unescaped($entry['href']); ?>" tabindex="3" |
68 | - <?php if( $entry['active'] ): ?> class="active"<?php endif; ?>> |
|
69 | - <img src="<?php print_unescaped($entry['icon'] . '?v=' . $_['versionHash']); ?>" class="app-icon" /> |
|
68 | + <?php if ($entry['active']): ?> class="active"<?php endif; ?>> |
|
69 | + <img src="<?php print_unescaped($entry['icon'].'?v='.$_['versionHash']); ?>" class="app-icon" /> |
|
70 | 70 | <div class="icon-loading-dark" style="display:none;"></div> |
71 | 71 | <span> |
72 | 72 | <?php p($entry['name']); ?> |
@@ -74,17 +74,17 @@ discard block |
||
74 | 74 | </a> |
75 | 75 | </li> |
76 | 76 | <?php endforeach; ?> |
77 | - <li id="more-apps" class="menutoggle<?php if (!(count($_['navigation']) > $headerIconCount || (OC_User::isAdminUser(OC_User::getUser()) && count($_['navigation'])>=$headerIconCount))): ?> hidden<?php endif; ?>"> |
|
77 | + <li id="more-apps" class="menutoggle<?php if (!(count($_['navigation']) > $headerIconCount || (OC_User::isAdminUser(OC_User::getUser()) && count($_['navigation']) >= $headerIconCount))): ?> hidden<?php endif; ?>"> |
|
78 | 78 | <a href="#"> |
79 | 79 | <div class="icon-more-white"></div> |
80 | 80 | <span><?php p($l->t('More apps')); ?></span> |
81 | 81 | </a> |
82 | 82 | </li> |
83 | - <?php if(OC_User::isAdminUser(OC_User::getUser())): ?> |
|
84 | - <li <?php if(count($_['navigation'])>$headerIconCount-1): ?> class="hidden apps-management"<?php else: ?> class="apps-management" <?php endif; ?>> |
|
83 | + <?php if (OC_User::isAdminUser(OC_User::getUser())): ?> |
|
84 | + <li <?php if (count($_['navigation']) > $headerIconCount - 1): ?> class="hidden apps-management"<?php else: ?> class="apps-management" <?php endif; ?>> |
|
85 | 85 | <a href="<?php print_unescaped(\OC::$server->getURLGenerator()->linkToRoute('settings.AppSettings.viewApps')); ?>" tabindex="4" |
86 | - <?php if( $_['appsmanagement_active'] ): ?> class="active"<?php endif; ?>> |
|
87 | - <img src="<?php print_unescaped(image_path('settings', 'apps.svg') . '?v=' . $_['versionHash']); ?>" /> |
|
86 | + <?php if ($_['appsmanagement_active']): ?> class="active"<?php endif; ?>> |
|
87 | + <img src="<?php print_unescaped(image_path('settings', 'apps.svg').'?v='.$_['versionHash']); ?>" /> |
|
88 | 88 | <div class="icon-loading-dark" style="display:none;"></div> |
89 | 89 | <span><?php p($l->t('Apps')); ?></span> |
90 | 90 | </a> |
@@ -96,17 +96,17 @@ discard block |
||
96 | 96 | <nav role="navigation"><div id="navigation"> |
97 | 97 | <div id="apps"> |
98 | 98 | <ul> |
99 | - <?php foreach($_['navigation'] as $entry): ?> |
|
100 | - <?php if($entry['showInHeader']): ?> |
|
99 | + <?php foreach ($_['navigation'] as $entry): ?> |
|
100 | + <?php if ($entry['showInHeader']): ?> |
|
101 | 101 | <li data-id="<?php p($entry['id']); ?>" class="in-header"> |
102 | 102 | <?php else: ?> |
103 | 103 | <li data-id="<?php p($entry['id']); ?>"> |
104 | 104 | <?php endif; ?> |
105 | 105 | <a href="<?php print_unescaped($entry['href']); ?>" tabindex="3" |
106 | - <?php if( $entry['active'] ): ?> class="active"<?php endif; ?>> |
|
106 | + <?php if ($entry['active']): ?> class="active"<?php endif; ?>> |
|
107 | 107 | <svg width="32" height="32" viewBox="0 0 32 32"> |
108 | 108 | <defs><filter id="invert-<?php p($entry['id']); ?>"><feColorMatrix in="SourceGraphic" type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0"></feColorMatrix></filter></defs> |
109 | - <image x="0" y="0" width="32" height="32" preserveAspectRatio="xMinYMin meet" filter="url(#invert-<?php p($entry['id']); ?>)" xlink:href="<?php print_unescaped($entry['icon'] . '?v=' . $_['versionHash']); ?>" class="app-icon"></image> |
|
109 | + <image x="0" y="0" width="32" height="32" preserveAspectRatio="xMinYMin meet" filter="url(#invert-<?php p($entry['id']); ?>)" xlink:href="<?php print_unescaped($entry['icon'].'?v='.$_['versionHash']); ?>" class="app-icon"></image> |
|
110 | 110 | </svg> |
111 | 111 | <div class="icon-loading-dark" style="display:none;"></div> |
112 | 112 | <span> |
@@ -117,14 +117,14 @@ discard block |
||
117 | 117 | <?php endforeach; ?> |
118 | 118 | <?php |
119 | 119 | /* show "More apps" link to app administration directly in app navigation, as last entry */ |
120 | - if(OC_User::isAdminUser(OC_User::getUser())): |
|
120 | + if (OC_User::isAdminUser(OC_User::getUser())): |
|
121 | 121 | ?> |
122 | 122 | <li class="apps-management"> |
123 | 123 | <a href="<?php print_unescaped(\OC::$server->getURLGenerator()->linkToRoute('settings.AppSettings.viewApps')); ?>" tabindex="4" |
124 | - <?php if( $_['appsmanagement_active'] ): ?> class="active"<?php endif; ?>> |
|
124 | + <?php if ($_['appsmanagement_active']): ?> class="active"<?php endif; ?>> |
|
125 | 125 | <svg width="32" height="32" viewBox="0 0 32 32" class="app-icon"> |
126 | 126 | <defs><filter id="invert-appsmanagement"><feColorMatrix in="SourceGraphic" type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0"></feColorMatrix></filter></defs> |
127 | - <image x="0" y="0" width="32" height="32" preserveAspectRatio="xMinYMin meet" filter="url(#invert-appsmanagement)" xlink:href="<?php print_unescaped(image_path('settings', 'apps.svg') . '?v=' . $_['versionHash']); ?>"></image> |
|
127 | + <image x="0" y="0" width="32" height="32" preserveAspectRatio="xMinYMin meet" filter="url(#invert-appsmanagement)" xlink:href="<?php print_unescaped(image_path('settings', 'apps.svg').'?v='.$_['versionHash']); ?>"></image> |
|
128 | 128 | </svg> |
129 | 129 | <div class="icon-loading-dark" style="display:none;"></div> |
130 | 130 | <span> |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | <div id="header-right"> |
144 | 144 | <form class="searchbox" action="#" method="post" role="search" novalidate> |
145 | 145 | <label for="searchbox" class="hidden-visually"> |
146 | - <?php p($l->t('Search'));?> |
|
146 | + <?php p($l->t('Search')); ?> |
|
147 | 147 | </label> |
148 | 148 | <input id="searchbox" type="search" name="query" |
149 | 149 | value="" required |
@@ -155,8 +155,8 @@ discard block |
||
155 | 155 | <div class="avatardiv<?php if ($_['userAvatarSet']) { print_unescaped(' avatardiv-shown'); } else { print_unescaped('" style="display: none'); } ?>"> |
156 | 156 | <?php if ($_['userAvatarSet']): ?> |
157 | 157 | <img alt="" width="32" height="32" |
158 | - src="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.avatar.getAvatar', ['userId' => $_['user_uid'], 'size' => 32, 'v' => $_['userAvatarVersion']]));?>" |
|
159 | - srcset="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.avatar.getAvatar', ['userId' => $_['user_uid'], 'size' => 64, 'v' => $_['userAvatarVersion']]));?> 2x, <?php p(\OC::$server->getURLGenerator()->linkToRoute('core.avatar.getAvatar', ['userId' => $_['user_uid'], 'size' => 128, 'v' => $_['userAvatarVersion']]));?> 4x" |
|
158 | + src="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.avatar.getAvatar', ['userId' => $_['user_uid'], 'size' => 32, 'v' => $_['userAvatarVersion']])); ?>" |
|
159 | + srcset="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.avatar.getAvatar', ['userId' => $_['user_uid'], 'size' => 64, 'v' => $_['userAvatarVersion']])); ?> 2x, <?php p(\OC::$server->getURLGenerator()->linkToRoute('core.avatar.getAvatar', ['userId' => $_['user_uid'], 'size' => 128, 'v' => $_['userAvatarVersion']])); ?> 4x" |
|
160 | 160 | > |
161 | 161 | <?php endif; ?> |
162 | 162 | </div> |
@@ -165,19 +165,19 @@ discard block |
||
165 | 165 | </div> |
166 | 166 | <div id="expanddiv"> |
167 | 167 | <ul> |
168 | - <?php foreach($_['settingsnavigation'] as $entry):?> |
|
168 | + <?php foreach ($_['settingsnavigation'] as $entry):?> |
|
169 | 169 | <li> |
170 | 170 | <a href="<?php print_unescaped($entry['href']); ?>" |
171 | - <?php if( $entry["active"] ): ?> class="active"<?php endif; ?>> |
|
172 | - <img alt="" src="<?php print_unescaped($entry['icon'] . '?v=' . $_['versionHash']); ?>"> |
|
171 | + <?php if ($entry["active"]): ?> class="active"<?php endif; ?>> |
|
172 | + <img alt="" src="<?php print_unescaped($entry['icon'].'?v='.$_['versionHash']); ?>"> |
|
173 | 173 | <?php p($entry['name']) ?> |
174 | 174 | </a> |
175 | 175 | </li> |
176 | 176 | <?php endforeach; ?> |
177 | 177 | <li> |
178 | 178 | <a id="logout" <?php print_unescaped(OC_User::getLogoutAttribute()); ?>> |
179 | - <img alt="" src="<?php print_unescaped(image_path('', 'actions/logout.svg') . '?v=' . $_['versionHash']); ?>"> |
|
180 | - <?php p($l->t('Log out'));?> |
|
179 | + <img alt="" src="<?php print_unescaped(image_path('', 'actions/logout.svg').'?v='.$_['versionHash']); ?>"> |
|
180 | + <?php p($l->t('Log out')); ?> |
|
181 | 181 | </a> |
182 | 182 | </li> |
183 | 183 | </ul> |
@@ -122,12 +122,12 @@ discard block |
||
122 | 122 | parent::__construct(); |
123 | 123 | $this->webRoot = $webRoot; |
124 | 124 | |
125 | - $this->registerService('ContactsManager', function ($c) { |
|
125 | + $this->registerService('ContactsManager', function($c) { |
|
126 | 126 | return new ContactsManager(); |
127 | 127 | }); |
128 | 128 | $this->registerAlias(IActionFactory::class, ActionFactory::class); |
129 | 129 | |
130 | - $this->registerService('PreviewManager', function (Server $c) { |
|
130 | + $this->registerService('PreviewManager', function(Server $c) { |
|
131 | 131 | return new PreviewManager( |
132 | 132 | $c->getConfig(), |
133 | 133 | $c->getRootFolder(), |
@@ -137,13 +137,13 @@ discard block |
||
137 | 137 | ); |
138 | 138 | }); |
139 | 139 | |
140 | - $this->registerService(\OC\Preview\Watcher::class, function (Server $c) { |
|
140 | + $this->registerService(\OC\Preview\Watcher::class, function(Server $c) { |
|
141 | 141 | return new \OC\Preview\Watcher( |
142 | 142 | $c->getAppDataDir('preview') |
143 | 143 | ); |
144 | 144 | }); |
145 | 145 | |
146 | - $this->registerService('EncryptionManager', function (Server $c) { |
|
146 | + $this->registerService('EncryptionManager', function(Server $c) { |
|
147 | 147 | $view = new View(); |
148 | 148 | $util = new Encryption\Util( |
149 | 149 | $view, |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | ); |
162 | 162 | }); |
163 | 163 | |
164 | - $this->registerService('EncryptionFileHelper', function (Server $c) { |
|
164 | + $this->registerService('EncryptionFileHelper', function(Server $c) { |
|
165 | 165 | $util = new Encryption\Util( |
166 | 166 | new View(), |
167 | 167 | $c->getUserManager(), |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | return new Encryption\File($util); |
172 | 172 | }); |
173 | 173 | |
174 | - $this->registerService('EncryptionKeyStorage', function (Server $c) { |
|
174 | + $this->registerService('EncryptionKeyStorage', function(Server $c) { |
|
175 | 175 | $view = new View(); |
176 | 176 | $util = new Encryption\Util( |
177 | 177 | $view, |
@@ -182,27 +182,27 @@ discard block |
||
182 | 182 | |
183 | 183 | return new Encryption\Keys\Storage($view, $util); |
184 | 184 | }); |
185 | - $this->registerService('TagMapper', function (Server $c) { |
|
185 | + $this->registerService('TagMapper', function(Server $c) { |
|
186 | 186 | return new TagMapper($c->getDatabaseConnection()); |
187 | 187 | }); |
188 | - $this->registerService('TagManager', function (Server $c) { |
|
188 | + $this->registerService('TagManager', function(Server $c) { |
|
189 | 189 | $tagMapper = $c->query('TagMapper'); |
190 | 190 | return new TagManager($tagMapper, $c->getUserSession()); |
191 | 191 | }); |
192 | - $this->registerService('SystemTagManagerFactory', function (Server $c) { |
|
192 | + $this->registerService('SystemTagManagerFactory', function(Server $c) { |
|
193 | 193 | $config = $c->getConfig(); |
194 | 194 | $factoryClass = $config->getSystemValue('systemtags.managerFactory', '\OC\SystemTag\ManagerFactory'); |
195 | 195 | /** @var \OC\SystemTag\ManagerFactory $factory */ |
196 | 196 | $factory = new $factoryClass($this); |
197 | 197 | return $factory; |
198 | 198 | }); |
199 | - $this->registerService('SystemTagManager', function (Server $c) { |
|
199 | + $this->registerService('SystemTagManager', function(Server $c) { |
|
200 | 200 | return $c->query('SystemTagManagerFactory')->getManager(); |
201 | 201 | }); |
202 | - $this->registerService('SystemTagObjectMapper', function (Server $c) { |
|
202 | + $this->registerService('SystemTagObjectMapper', function(Server $c) { |
|
203 | 203 | return $c->query('SystemTagManagerFactory')->getObjectMapper(); |
204 | 204 | }); |
205 | - $this->registerService('RootFolder', function (Server $c) { |
|
205 | + $this->registerService('RootFolder', function(Server $c) { |
|
206 | 206 | $manager = \OC\Files\Filesystem::getMountManager(null); |
207 | 207 | $view = new View(); |
208 | 208 | $root = new Root( |
@@ -226,28 +226,28 @@ discard block |
||
226 | 226 | return $c->query('RootFolder'); |
227 | 227 | }); |
228 | 228 | }); |
229 | - $this->registerService('UserManager', function (Server $c) { |
|
229 | + $this->registerService('UserManager', function(Server $c) { |
|
230 | 230 | $config = $c->getConfig(); |
231 | 231 | return new \OC\User\Manager($config); |
232 | 232 | }); |
233 | - $this->registerService('GroupManager', function (Server $c) { |
|
233 | + $this->registerService('GroupManager', function(Server $c) { |
|
234 | 234 | $groupManager = new \OC\Group\Manager($this->getUserManager(), $this->getLogger()); |
235 | - $groupManager->listen('\OC\Group', 'preCreate', function ($gid) { |
|
235 | + $groupManager->listen('\OC\Group', 'preCreate', function($gid) { |
|
236 | 236 | \OC_Hook::emit('OC_Group', 'pre_createGroup', array('run' => true, 'gid' => $gid)); |
237 | 237 | }); |
238 | - $groupManager->listen('\OC\Group', 'postCreate', function (\OC\Group\Group $gid) { |
|
238 | + $groupManager->listen('\OC\Group', 'postCreate', function(\OC\Group\Group $gid) { |
|
239 | 239 | \OC_Hook::emit('OC_User', 'post_createGroup', array('gid' => $gid->getGID())); |
240 | 240 | }); |
241 | - $groupManager->listen('\OC\Group', 'preDelete', function (\OC\Group\Group $group) { |
|
241 | + $groupManager->listen('\OC\Group', 'preDelete', function(\OC\Group\Group $group) { |
|
242 | 242 | \OC_Hook::emit('OC_Group', 'pre_deleteGroup', array('run' => true, 'gid' => $group->getGID())); |
243 | 243 | }); |
244 | - $groupManager->listen('\OC\Group', 'postDelete', function (\OC\Group\Group $group) { |
|
244 | + $groupManager->listen('\OC\Group', 'postDelete', function(\OC\Group\Group $group) { |
|
245 | 245 | \OC_Hook::emit('OC_User', 'post_deleteGroup', array('gid' => $group->getGID())); |
246 | 246 | }); |
247 | - $groupManager->listen('\OC\Group', 'preAddUser', function (\OC\Group\Group $group, \OC\User\User $user) { |
|
247 | + $groupManager->listen('\OC\Group', 'preAddUser', function(\OC\Group\Group $group, \OC\User\User $user) { |
|
248 | 248 | \OC_Hook::emit('OC_Group', 'pre_addToGroup', array('run' => true, 'uid' => $user->getUID(), 'gid' => $group->getGID())); |
249 | 249 | }); |
250 | - $groupManager->listen('\OC\Group', 'postAddUser', function (\OC\Group\Group $group, \OC\User\User $user) { |
|
250 | + $groupManager->listen('\OC\Group', 'postAddUser', function(\OC\Group\Group $group, \OC\User\User $user) { |
|
251 | 251 | \OC_Hook::emit('OC_Group', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID())); |
252 | 252 | //Minimal fix to keep it backward compatible TODO: clean up all the GroupManager hooks |
253 | 253 | \OC_Hook::emit('OC_User', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID())); |
@@ -265,11 +265,11 @@ discard block |
||
265 | 265 | return new Store($session, $logger, $tokenProvider); |
266 | 266 | }); |
267 | 267 | $this->registerAlias(IStore::class, Store::class); |
268 | - $this->registerService('OC\Authentication\Token\DefaultTokenMapper', function (Server $c) { |
|
268 | + $this->registerService('OC\Authentication\Token\DefaultTokenMapper', function(Server $c) { |
|
269 | 269 | $dbConnection = $c->getDatabaseConnection(); |
270 | 270 | return new Authentication\Token\DefaultTokenMapper($dbConnection); |
271 | 271 | }); |
272 | - $this->registerService('OC\Authentication\Token\DefaultTokenProvider', function (Server $c) { |
|
272 | + $this->registerService('OC\Authentication\Token\DefaultTokenProvider', function(Server $c) { |
|
273 | 273 | $mapper = $c->query('OC\Authentication\Token\DefaultTokenMapper'); |
274 | 274 | $crypto = $c->getCrypto(); |
275 | 275 | $config = $c->getConfig(); |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | return new \OC\Authentication\Token\DefaultTokenProvider($mapper, $crypto, $config, $logger, $timeFactory); |
279 | 279 | }); |
280 | 280 | $this->registerAlias('OC\Authentication\Token\IProvider', 'OC\Authentication\Token\DefaultTokenProvider'); |
281 | - $this->registerService('UserSession', function (Server $c) { |
|
281 | + $this->registerService('UserSession', function(Server $c) { |
|
282 | 282 | $manager = $c->getUserManager(); |
283 | 283 | $session = new \OC\Session\Memory(''); |
284 | 284 | $timeFactory = new TimeFactory(); |
@@ -291,70 +291,70 @@ discard block |
||
291 | 291 | } |
292 | 292 | |
293 | 293 | $userSession = new \OC\User\Session($manager, $session, $timeFactory, $defaultTokenProvider, $c->getConfig(), $c->getSecureRandom()); |
294 | - $userSession->listen('\OC\User', 'preCreateUser', function ($uid, $password) { |
|
294 | + $userSession->listen('\OC\User', 'preCreateUser', function($uid, $password) { |
|
295 | 295 | \OC_Hook::emit('OC_User', 'pre_createUser', array('run' => true, 'uid' => $uid, 'password' => $password)); |
296 | 296 | }); |
297 | - $userSession->listen('\OC\User', 'postCreateUser', function ($user, $password) { |
|
297 | + $userSession->listen('\OC\User', 'postCreateUser', function($user, $password) { |
|
298 | 298 | /** @var $user \OC\User\User */ |
299 | 299 | \OC_Hook::emit('OC_User', 'post_createUser', array('uid' => $user->getUID(), 'password' => $password)); |
300 | 300 | }); |
301 | - $userSession->listen('\OC\User', 'preDelete', function ($user) { |
|
301 | + $userSession->listen('\OC\User', 'preDelete', function($user) { |
|
302 | 302 | /** @var $user \OC\User\User */ |
303 | 303 | \OC_Hook::emit('OC_User', 'pre_deleteUser', array('run' => true, 'uid' => $user->getUID())); |
304 | 304 | }); |
305 | - $userSession->listen('\OC\User', 'postDelete', function ($user) { |
|
305 | + $userSession->listen('\OC\User', 'postDelete', function($user) { |
|
306 | 306 | /** @var $user \OC\User\User */ |
307 | 307 | \OC_Hook::emit('OC_User', 'post_deleteUser', array('uid' => $user->getUID())); |
308 | 308 | }); |
309 | - $userSession->listen('\OC\User', 'preSetPassword', function ($user, $password, $recoveryPassword) { |
|
309 | + $userSession->listen('\OC\User', 'preSetPassword', function($user, $password, $recoveryPassword) { |
|
310 | 310 | /** @var $user \OC\User\User */ |
311 | 311 | \OC_Hook::emit('OC_User', 'pre_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword)); |
312 | 312 | }); |
313 | - $userSession->listen('\OC\User', 'postSetPassword', function ($user, $password, $recoveryPassword) { |
|
313 | + $userSession->listen('\OC\User', 'postSetPassword', function($user, $password, $recoveryPassword) { |
|
314 | 314 | /** @var $user \OC\User\User */ |
315 | 315 | \OC_Hook::emit('OC_User', 'post_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword)); |
316 | 316 | }); |
317 | - $userSession->listen('\OC\User', 'preLogin', function ($uid, $password) { |
|
317 | + $userSession->listen('\OC\User', 'preLogin', function($uid, $password) { |
|
318 | 318 | \OC_Hook::emit('OC_User', 'pre_login', array('run' => true, 'uid' => $uid, 'password' => $password)); |
319 | 319 | }); |
320 | - $userSession->listen('\OC\User', 'postLogin', function ($user, $password) { |
|
320 | + $userSession->listen('\OC\User', 'postLogin', function($user, $password) { |
|
321 | 321 | /** @var $user \OC\User\User */ |
322 | 322 | \OC_Hook::emit('OC_User', 'post_login', array('run' => true, 'uid' => $user->getUID(), 'password' => $password)); |
323 | 323 | }); |
324 | - $userSession->listen('\OC\User', 'logout', function () { |
|
324 | + $userSession->listen('\OC\User', 'logout', function() { |
|
325 | 325 | \OC_Hook::emit('OC_User', 'logout', array()); |
326 | 326 | }); |
327 | - $userSession->listen('\OC\User', 'changeUser', function ($user, $feature, $value) { |
|
327 | + $userSession->listen('\OC\User', 'changeUser', function($user, $feature, $value) { |
|
328 | 328 | /** @var $user \OC\User\User */ |
329 | 329 | \OC_Hook::emit('OC_User', 'changeUser', array('run' => true, 'user' => $user, 'feature' => $feature, 'value' => $value)); |
330 | 330 | }); |
331 | 331 | return $userSession; |
332 | 332 | }); |
333 | 333 | |
334 | - $this->registerService(\OC\Authentication\TwoFactorAuth\Manager::class, function (Server $c) { |
|
334 | + $this->registerService(\OC\Authentication\TwoFactorAuth\Manager::class, function(Server $c) { |
|
335 | 335 | return new \OC\Authentication\TwoFactorAuth\Manager($c->getAppManager(), $c->getSession(), $c->getConfig(), $c->getActivityManager(), $c->getLogger()); |
336 | 336 | }); |
337 | 337 | |
338 | - $this->registerService('NavigationManager', function (Server $c) { |
|
338 | + $this->registerService('NavigationManager', function(Server $c) { |
|
339 | 339 | return new \OC\NavigationManager($c->getAppManager(), |
340 | 340 | $c->getURLGenerator(), |
341 | 341 | $c->getL10NFactory(), |
342 | 342 | $c->getUserSession(), |
343 | 343 | $c->getGroupManager()); |
344 | 344 | }); |
345 | - $this->registerService('AllConfig', function (Server $c) { |
|
345 | + $this->registerService('AllConfig', function(Server $c) { |
|
346 | 346 | return new \OC\AllConfig( |
347 | 347 | $c->getSystemConfig() |
348 | 348 | ); |
349 | 349 | }); |
350 | 350 | $this->registerAlias(\OCP\IConfig::class, 'AllConfig'); |
351 | - $this->registerService('SystemConfig', function ($c) use ($config) { |
|
351 | + $this->registerService('SystemConfig', function($c) use ($config) { |
|
352 | 352 | return new \OC\SystemConfig($config); |
353 | 353 | }); |
354 | - $this->registerService('AppConfig', function (Server $c) { |
|
354 | + $this->registerService('AppConfig', function(Server $c) { |
|
355 | 355 | return new \OC\AppConfig($c->getDatabaseConnection()); |
356 | 356 | }); |
357 | - $this->registerService('L10NFactory', function (Server $c) { |
|
357 | + $this->registerService('L10NFactory', function(Server $c) { |
|
358 | 358 | return new \OC\L10N\Factory( |
359 | 359 | $c->getConfig(), |
360 | 360 | $c->getRequest(), |
@@ -362,7 +362,7 @@ discard block |
||
362 | 362 | \OC::$SERVERROOT |
363 | 363 | ); |
364 | 364 | }); |
365 | - $this->registerService('URLGenerator', function (Server $c) { |
|
365 | + $this->registerService('URLGenerator', function(Server $c) { |
|
366 | 366 | $config = $c->getConfig(); |
367 | 367 | $cacheFactory = $c->getMemCacheFactory(); |
368 | 368 | return new \OC\URLGenerator( |
@@ -371,10 +371,10 @@ discard block |
||
371 | 371 | ); |
372 | 372 | }); |
373 | 373 | $this->registerAlias(IURLGenerator::class, 'URLGenerator'); |
374 | - $this->registerService('AppHelper', function ($c) { |
|
374 | + $this->registerService('AppHelper', function($c) { |
|
375 | 375 | return new \OC\AppHelper(); |
376 | 376 | }); |
377 | - $this->registerService('AppFetcher', function ($c) { |
|
377 | + $this->registerService('AppFetcher', function($c) { |
|
378 | 378 | return new AppFetcher( |
379 | 379 | $this->getAppDataDir('appstore'), |
380 | 380 | $this->getHTTPClientService(), |
@@ -382,7 +382,7 @@ discard block |
||
382 | 382 | $this->getConfig() |
383 | 383 | ); |
384 | 384 | }); |
385 | - $this->registerService('CategoryFetcher', function ($c) { |
|
385 | + $this->registerService('CategoryFetcher', function($c) { |
|
386 | 386 | return new CategoryFetcher( |
387 | 387 | $this->getAppDataDir('appstore'), |
388 | 388 | $this->getHTTPClientService(), |
@@ -390,19 +390,19 @@ discard block |
||
390 | 390 | $this->getConfig() |
391 | 391 | ); |
392 | 392 | }); |
393 | - $this->registerService('UserCache', function ($c) { |
|
393 | + $this->registerService('UserCache', function($c) { |
|
394 | 394 | return new Cache\File(); |
395 | 395 | }); |
396 | - $this->registerService('MemCacheFactory', function (Server $c) { |
|
396 | + $this->registerService('MemCacheFactory', function(Server $c) { |
|
397 | 397 | $config = $c->getConfig(); |
398 | 398 | |
399 | 399 | if ($config->getSystemValue('installed', false) && !(defined('PHPUNIT_RUN') && PHPUNIT_RUN)) { |
400 | 400 | $v = \OC_App::getAppVersions(); |
401 | - $v['core'] = md5(file_get_contents(\OC::$SERVERROOT . '/version.php')); |
|
401 | + $v['core'] = md5(file_get_contents(\OC::$SERVERROOT.'/version.php')); |
|
402 | 402 | $version = implode(',', $v); |
403 | 403 | $instanceId = \OC_Util::getInstanceId(); |
404 | 404 | $path = \OC::$SERVERROOT; |
405 | - $prefix = md5($instanceId . '-' . $version . '-' . $path . '-' . \OC::$WEBROOT); |
|
405 | + $prefix = md5($instanceId.'-'.$version.'-'.$path.'-'.\OC::$WEBROOT); |
|
406 | 406 | return new \OC\Memcache\Factory($prefix, $c->getLogger(), |
407 | 407 | $config->getSystemValue('memcache.local', null), |
408 | 408 | $config->getSystemValue('memcache.distributed', null), |
@@ -416,11 +416,11 @@ discard block |
||
416 | 416 | '\\OC\\Memcache\\ArrayCache' |
417 | 417 | ); |
418 | 418 | }); |
419 | - $this->registerService('RedisFactory', function (Server $c) { |
|
419 | + $this->registerService('RedisFactory', function(Server $c) { |
|
420 | 420 | $systemConfig = $c->getSystemConfig(); |
421 | 421 | return new RedisFactory($systemConfig); |
422 | 422 | }); |
423 | - $this->registerService('ActivityManager', function (Server $c) { |
|
423 | + $this->registerService('ActivityManager', function(Server $c) { |
|
424 | 424 | return new \OC\Activity\Manager( |
425 | 425 | $c->getRequest(), |
426 | 426 | $c->getUserSession(), |
@@ -428,13 +428,13 @@ discard block |
||
428 | 428 | $c->query(IValidator::class) |
429 | 429 | ); |
430 | 430 | }); |
431 | - $this->registerService(\OCP\Activity\IEventMerger::class, function (Server $c) { |
|
431 | + $this->registerService(\OCP\Activity\IEventMerger::class, function(Server $c) { |
|
432 | 432 | return new \OC\Activity\EventMerger( |
433 | 433 | $c->getL10N('lib') |
434 | 434 | ); |
435 | 435 | }); |
436 | 436 | $this->registerAlias(IValidator::class, Validator::class); |
437 | - $this->registerService('AvatarManager', function (Server $c) { |
|
437 | + $this->registerService('AvatarManager', function(Server $c) { |
|
438 | 438 | return new AvatarManager( |
439 | 439 | $c->getUserManager(), |
440 | 440 | $c->getAppDataDir('avatar'), |
@@ -443,14 +443,14 @@ discard block |
||
443 | 443 | $c->getConfig() |
444 | 444 | ); |
445 | 445 | }); |
446 | - $this->registerService('Logger', function (Server $c) { |
|
446 | + $this->registerService('Logger', function(Server $c) { |
|
447 | 447 | $logType = $c->query('AllConfig')->getSystemValue('log_type', 'file'); |
448 | 448 | $logger = Log::getLogClass($logType); |
449 | 449 | call_user_func(array($logger, 'init')); |
450 | 450 | |
451 | 451 | return new Log($logger); |
452 | 452 | }); |
453 | - $this->registerService('JobList', function (Server $c) { |
|
453 | + $this->registerService('JobList', function(Server $c) { |
|
454 | 454 | $config = $c->getConfig(); |
455 | 455 | return new \OC\BackgroundJob\JobList( |
456 | 456 | $c->getDatabaseConnection(), |
@@ -458,7 +458,7 @@ discard block |
||
458 | 458 | new TimeFactory() |
459 | 459 | ); |
460 | 460 | }); |
461 | - $this->registerService('Router', function (Server $c) { |
|
461 | + $this->registerService('Router', function(Server $c) { |
|
462 | 462 | $cacheFactory = $c->getMemCacheFactory(); |
463 | 463 | $logger = $c->getLogger(); |
464 | 464 | if ($cacheFactory->isAvailable()) { |
@@ -468,22 +468,22 @@ discard block |
||
468 | 468 | } |
469 | 469 | return $router; |
470 | 470 | }); |
471 | - $this->registerService('Search', function ($c) { |
|
471 | + $this->registerService('Search', function($c) { |
|
472 | 472 | return new Search(); |
473 | 473 | }); |
474 | - $this->registerService('SecureRandom', function ($c) { |
|
474 | + $this->registerService('SecureRandom', function($c) { |
|
475 | 475 | return new SecureRandom(); |
476 | 476 | }); |
477 | - $this->registerService('Crypto', function (Server $c) { |
|
477 | + $this->registerService('Crypto', function(Server $c) { |
|
478 | 478 | return new Crypto($c->getConfig(), $c->getSecureRandom()); |
479 | 479 | }); |
480 | - $this->registerService('Hasher', function (Server $c) { |
|
480 | + $this->registerService('Hasher', function(Server $c) { |
|
481 | 481 | return new Hasher($c->getConfig()); |
482 | 482 | }); |
483 | - $this->registerService('CredentialsManager', function (Server $c) { |
|
483 | + $this->registerService('CredentialsManager', function(Server $c) { |
|
484 | 484 | return new CredentialsManager($c->getCrypto(), $c->getDatabaseConnection()); |
485 | 485 | }); |
486 | - $this->registerService('DatabaseConnection', function (Server $c) { |
|
486 | + $this->registerService('DatabaseConnection', function(Server $c) { |
|
487 | 487 | $systemConfig = $c->getSystemConfig(); |
488 | 488 | $factory = new \OC\DB\ConnectionFactory($systemConfig); |
489 | 489 | $type = $systemConfig->getValue('dbtype', 'sqlite'); |
@@ -495,14 +495,14 @@ discard block |
||
495 | 495 | $connection->getConfiguration()->setSQLLogger($c->getQueryLogger()); |
496 | 496 | return $connection; |
497 | 497 | }); |
498 | - $this->registerService('HTTPHelper', function (Server $c) { |
|
498 | + $this->registerService('HTTPHelper', function(Server $c) { |
|
499 | 499 | $config = $c->getConfig(); |
500 | 500 | return new HTTPHelper( |
501 | 501 | $config, |
502 | 502 | $c->getHTTPClientService() |
503 | 503 | ); |
504 | 504 | }); |
505 | - $this->registerService('HttpClientService', function (Server $c) { |
|
505 | + $this->registerService('HttpClientService', function(Server $c) { |
|
506 | 506 | $user = \OC_User::getUser(); |
507 | 507 | $uid = $user ? $user : null; |
508 | 508 | return new ClientService( |
@@ -510,27 +510,27 @@ discard block |
||
510 | 510 | new \OC\Security\CertificateManager($uid, new View(), $c->getConfig(), $c->getLogger()) |
511 | 511 | ); |
512 | 512 | }); |
513 | - $this->registerService('EventLogger', function (Server $c) { |
|
513 | + $this->registerService('EventLogger', function(Server $c) { |
|
514 | 514 | if ($c->getSystemConfig()->getValue('debug', false)) { |
515 | 515 | return new EventLogger(); |
516 | 516 | } else { |
517 | 517 | return new NullEventLogger(); |
518 | 518 | } |
519 | 519 | }); |
520 | - $this->registerService('QueryLogger', function (Server $c) { |
|
520 | + $this->registerService('QueryLogger', function(Server $c) { |
|
521 | 521 | if ($c->getSystemConfig()->getValue('debug', false)) { |
522 | 522 | return new QueryLogger(); |
523 | 523 | } else { |
524 | 524 | return new NullQueryLogger(); |
525 | 525 | } |
526 | 526 | }); |
527 | - $this->registerService('TempManager', function (Server $c) { |
|
527 | + $this->registerService('TempManager', function(Server $c) { |
|
528 | 528 | return new TempManager( |
529 | 529 | $c->getLogger(), |
530 | 530 | $c->getConfig() |
531 | 531 | ); |
532 | 532 | }); |
533 | - $this->registerService('AppManager', function (Server $c) { |
|
533 | + $this->registerService('AppManager', function(Server $c) { |
|
534 | 534 | return new \OC\App\AppManager( |
535 | 535 | $c->getUserSession(), |
536 | 536 | $c->getAppConfig(), |
@@ -539,13 +539,13 @@ discard block |
||
539 | 539 | $c->getEventDispatcher() |
540 | 540 | ); |
541 | 541 | }); |
542 | - $this->registerService('DateTimeZone', function (Server $c) { |
|
542 | + $this->registerService('DateTimeZone', function(Server $c) { |
|
543 | 543 | return new DateTimeZone( |
544 | 544 | $c->getConfig(), |
545 | 545 | $c->getSession() |
546 | 546 | ); |
547 | 547 | }); |
548 | - $this->registerService('DateTimeFormatter', function (Server $c) { |
|
548 | + $this->registerService('DateTimeFormatter', function(Server $c) { |
|
549 | 549 | $language = $c->getConfig()->getUserValue($c->getSession()->get('user_id'), 'core', 'lang', null); |
550 | 550 | |
551 | 551 | return new DateTimeFormatter( |
@@ -553,16 +553,16 @@ discard block |
||
553 | 553 | $c->getL10N('lib', $language) |
554 | 554 | ); |
555 | 555 | }); |
556 | - $this->registerService('UserMountCache', function (Server $c) { |
|
556 | + $this->registerService('UserMountCache', function(Server $c) { |
|
557 | 557 | $mountCache = new UserMountCache($c->getDatabaseConnection(), $c->getUserManager(), $c->getLogger()); |
558 | 558 | $listener = new UserMountCacheListener($mountCache); |
559 | 559 | $listener->listen($c->getUserManager()); |
560 | 560 | return $mountCache; |
561 | 561 | }); |
562 | - $this->registerService('MountConfigManager', function (Server $c) { |
|
562 | + $this->registerService('MountConfigManager', function(Server $c) { |
|
563 | 563 | $loader = \OC\Files\Filesystem::getLoader(); |
564 | 564 | $mountCache = $c->query('UserMountCache'); |
565 | - $manager = new \OC\Files\Config\MountProviderCollection($loader, $mountCache); |
|
565 | + $manager = new \OC\Files\Config\MountProviderCollection($loader, $mountCache); |
|
566 | 566 | |
567 | 567 | // builtin providers |
568 | 568 | |
@@ -573,14 +573,14 @@ discard block |
||
573 | 573 | |
574 | 574 | return $manager; |
575 | 575 | }); |
576 | - $this->registerService('IniWrapper', function ($c) { |
|
576 | + $this->registerService('IniWrapper', function($c) { |
|
577 | 577 | return new IniGetWrapper(); |
578 | 578 | }); |
579 | - $this->registerService('AsyncCommandBus', function (Server $c) { |
|
579 | + $this->registerService('AsyncCommandBus', function(Server $c) { |
|
580 | 580 | $jobList = $c->getJobList(); |
581 | 581 | return new AsyncBus($jobList); |
582 | 582 | }); |
583 | - $this->registerService('TrustedDomainHelper', function ($c) { |
|
583 | + $this->registerService('TrustedDomainHelper', function($c) { |
|
584 | 584 | return new TrustedDomainHelper($this->getConfig()); |
585 | 585 | }); |
586 | 586 | $this->registerService('Throttler', function(Server $c) { |
@@ -591,10 +591,10 @@ discard block |
||
591 | 591 | $c->getConfig() |
592 | 592 | ); |
593 | 593 | }); |
594 | - $this->registerService('IntegrityCodeChecker', function (Server $c) { |
|
594 | + $this->registerService('IntegrityCodeChecker', function(Server $c) { |
|
595 | 595 | // IConfig and IAppManager requires a working database. This code |
596 | 596 | // might however be called when ownCloud is not yet setup. |
597 | - if(\OC::$server->getSystemConfig()->getValue('installed', false)) { |
|
597 | + if (\OC::$server->getSystemConfig()->getValue('installed', false)) { |
|
598 | 598 | $config = $c->getConfig(); |
599 | 599 | $appManager = $c->getAppManager(); |
600 | 600 | } else { |
@@ -612,7 +612,7 @@ discard block |
||
612 | 612 | $c->getTempManager() |
613 | 613 | ); |
614 | 614 | }); |
615 | - $this->registerService('Request', function ($c) { |
|
615 | + $this->registerService('Request', function($c) { |
|
616 | 616 | if (isset($this['urlParams'])) { |
617 | 617 | $urlParams = $this['urlParams']; |
618 | 618 | } else { |
@@ -646,7 +646,7 @@ discard block |
||
646 | 646 | $stream |
647 | 647 | ); |
648 | 648 | }); |
649 | - $this->registerService('Mailer', function (Server $c) { |
|
649 | + $this->registerService('Mailer', function(Server $c) { |
|
650 | 650 | return new Mailer( |
651 | 651 | $c->getConfig(), |
652 | 652 | $c->getLogger(), |
@@ -656,14 +656,14 @@ discard block |
||
656 | 656 | $this->registerService('LDAPProvider', function(Server $c) { |
657 | 657 | $config = $c->getConfig(); |
658 | 658 | $factoryClass = $config->getSystemValue('ldapProviderFactory', null); |
659 | - if(is_null($factoryClass)) { |
|
659 | + if (is_null($factoryClass)) { |
|
660 | 660 | throw new \Exception('ldapProviderFactory not set'); |
661 | 661 | } |
662 | 662 | /** @var \OCP\LDAP\ILDAPProviderFactory $factory */ |
663 | 663 | $factory = new $factoryClass($this); |
664 | 664 | return $factory->getLDAPProvider(); |
665 | 665 | }); |
666 | - $this->registerService('LockingProvider', function (Server $c) { |
|
666 | + $this->registerService('LockingProvider', function(Server $c) { |
|
667 | 667 | $ini = $c->getIniWrapper(); |
668 | 668 | $config = $c->getConfig(); |
669 | 669 | $ttl = $config->getSystemValue('filelocking.ttl', max(3600, $ini->getNumeric('max_execution_time'))); |
@@ -678,29 +678,29 @@ discard block |
||
678 | 678 | } |
679 | 679 | return new NoopLockingProvider(); |
680 | 680 | }); |
681 | - $this->registerService('MountManager', function () { |
|
681 | + $this->registerService('MountManager', function() { |
|
682 | 682 | return new \OC\Files\Mount\Manager(); |
683 | 683 | }); |
684 | - $this->registerService('MimeTypeDetector', function (Server $c) { |
|
684 | + $this->registerService('MimeTypeDetector', function(Server $c) { |
|
685 | 685 | return new \OC\Files\Type\Detection( |
686 | 686 | $c->getURLGenerator(), |
687 | 687 | \OC::$configDir, |
688 | - \OC::$SERVERROOT . '/resources/config/' |
|
688 | + \OC::$SERVERROOT.'/resources/config/' |
|
689 | 689 | ); |
690 | 690 | }); |
691 | - $this->registerService('MimeTypeLoader', function (Server $c) { |
|
691 | + $this->registerService('MimeTypeLoader', function(Server $c) { |
|
692 | 692 | return new \OC\Files\Type\Loader( |
693 | 693 | $c->getDatabaseConnection() |
694 | 694 | ); |
695 | 695 | }); |
696 | - $this->registerService('NotificationManager', function (Server $c) { |
|
696 | + $this->registerService('NotificationManager', function(Server $c) { |
|
697 | 697 | return new Manager( |
698 | 698 | $c->query(IValidator::class) |
699 | 699 | ); |
700 | 700 | }); |
701 | - $this->registerService('CapabilitiesManager', function (Server $c) { |
|
701 | + $this->registerService('CapabilitiesManager', function(Server $c) { |
|
702 | 702 | $manager = new \OC\CapabilitiesManager($c->getLogger()); |
703 | - $manager->registerCapability(function () use ($c) { |
|
703 | + $manager->registerCapability(function() use ($c) { |
|
704 | 704 | return new \OC\OCS\CoreCapabilities($c->getConfig()); |
705 | 705 | }); |
706 | 706 | return $manager; |
@@ -738,10 +738,10 @@ discard block |
||
738 | 738 | } |
739 | 739 | return new \OC_Defaults(); |
740 | 740 | }); |
741 | - $this->registerService('EventDispatcher', function () { |
|
741 | + $this->registerService('EventDispatcher', function() { |
|
742 | 742 | return new EventDispatcher(); |
743 | 743 | }); |
744 | - $this->registerService('CryptoWrapper', function (Server $c) { |
|
744 | + $this->registerService('CryptoWrapper', function(Server $c) { |
|
745 | 745 | // FIXME: Instantiiated here due to cyclic dependency |
746 | 746 | $request = new Request( |
747 | 747 | [ |
@@ -766,7 +766,7 @@ discard block |
||
766 | 766 | $request |
767 | 767 | ); |
768 | 768 | }); |
769 | - $this->registerService('CsrfTokenManager', function (Server $c) { |
|
769 | + $this->registerService('CsrfTokenManager', function(Server $c) { |
|
770 | 770 | $tokenGenerator = new CsrfTokenGenerator($c->getSecureRandom()); |
771 | 771 | |
772 | 772 | return new CsrfTokenManager( |
@@ -774,10 +774,10 @@ discard block |
||
774 | 774 | $c->query(SessionStorage::class) |
775 | 775 | ); |
776 | 776 | }); |
777 | - $this->registerService(SessionStorage::class, function (Server $c) { |
|
777 | + $this->registerService(SessionStorage::class, function(Server $c) { |
|
778 | 778 | return new SessionStorage($c->getSession()); |
779 | 779 | }); |
780 | - $this->registerService('ContentSecurityPolicyManager', function (Server $c) { |
|
780 | + $this->registerService('ContentSecurityPolicyManager', function(Server $c) { |
|
781 | 781 | return new ContentSecurityPolicyManager(); |
782 | 782 | }); |
783 | 783 | $this->registerService('ContentSecurityPolicyNonceManager', function(Server $c) { |
@@ -823,23 +823,23 @@ discard block |
||
823 | 823 | ); |
824 | 824 | return $manager; |
825 | 825 | }); |
826 | - $this->registerService(\OC\Files\AppData\Factory::class, function (Server $c) { |
|
826 | + $this->registerService(\OC\Files\AppData\Factory::class, function(Server $c) { |
|
827 | 827 | return new \OC\Files\AppData\Factory( |
828 | 828 | $c->getRootFolder(), |
829 | 829 | $c->getSystemConfig() |
830 | 830 | ); |
831 | 831 | }); |
832 | 832 | |
833 | - $this->registerService('LockdownManager', function (Server $c) { |
|
833 | + $this->registerService('LockdownManager', function(Server $c) { |
|
834 | 834 | return new LockdownManager(); |
835 | 835 | }); |
836 | 836 | |
837 | - $this->registerService(ICloudIdManager::class, function (Server $c) { |
|
837 | + $this->registerService(ICloudIdManager::class, function(Server $c) { |
|
838 | 838 | return new CloudIdManager(); |
839 | 839 | }); |
840 | 840 | |
841 | 841 | /* To trick DI since we don't extend the DIContainer here */ |
842 | - $this->registerService(CleanPreviewsBackgroundJob::class, function (Server $c) { |
|
842 | + $this->registerService(CleanPreviewsBackgroundJob::class, function(Server $c) { |
|
843 | 843 | return new CleanPreviewsBackgroundJob( |
844 | 844 | $c->getRootFolder(), |
845 | 845 | $c->getLogger(), |
@@ -983,7 +983,7 @@ discard block |
||
983 | 983 | * @deprecated since 9.2.0 use IAppData |
984 | 984 | */ |
985 | 985 | public function getAppFolder() { |
986 | - $dir = '/' . \OC_App::getCurrentApp(); |
|
986 | + $dir = '/'.\OC_App::getCurrentApp(); |
|
987 | 987 | $root = $this->getRootFolder(); |
988 | 988 | if (!$root->nodeExists($dir)) { |
989 | 989 | $folder = $root->newFolder($dir); |