@@ -17,7 +17,7 @@ |
||
| 17 | 17 | <tr> |
| 18 | 18 | <th id='headerName' class="hidden column-name"> |
| 19 | 19 | <div id="headerName-container"> |
| 20 | - <a class="name sort columntitle" data-sort="name"><span><?php p($l->t( 'Name' )); ?></span><span class="sort-indicator"></span></a> |
|
| 20 | + <a class="name sort columntitle" data-sort="name"><span><?php p($l->t('Name')); ?></span><span class="sort-indicator"></span></a> |
|
| 21 | 21 | </div> |
| 22 | 22 | </th> |
| 23 | 23 | <th id="headerBackend" class="hidden column-backend"> |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | $this->loadTable($schema, $child); |
| 95 | 95 | break; |
| 96 | 96 | default: |
| 97 | - throw new \DomainException('Unknown element: ' . $child->getName()); |
|
| 97 | + throw new \DomainException('Unknown element: '.$child->getName()); |
|
| 98 | 98 | |
| 99 | 99 | } |
| 100 | 100 | } |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | */ |
| 115 | 115 | switch ($child->getName()) { |
| 116 | 116 | case 'name': |
| 117 | - $name = (string)$child; |
|
| 117 | + $name = (string) $child; |
|
| 118 | 118 | $name = str_replace('*dbprefix*', $this->DBTABLEPREFIX, $name); |
| 119 | 119 | $name = $this->platform->quoteIdentifier($name); |
| 120 | 120 | $table = $schema->createTable($name); |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | $this->loadDeclaration($table, $child); |
| 133 | 133 | break; |
| 134 | 134 | default: |
| 135 | - throw new \DomainException('Unknown element: ' . $child->getName()); |
|
| 135 | + throw new \DomainException('Unknown element: '.$child->getName()); |
|
| 136 | 136 | |
| 137 | 137 | } |
| 138 | 138 | } |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | $this->loadIndex($table, $child); |
| 157 | 157 | break; |
| 158 | 158 | default: |
| 159 | - throw new \DomainException('Unknown element: ' . $child->getName()); |
|
| 159 | + throw new \DomainException('Unknown element: '.$child->getName()); |
|
| 160 | 160 | |
| 161 | 161 | } |
| 162 | 162 | } |
@@ -168,18 +168,18 @@ discard block |
||
| 168 | 168 | * @throws \DomainException |
| 169 | 169 | */ |
| 170 | 170 | private function loadField($table, $xml) { |
| 171 | - $options = array( 'notnull' => false ); |
|
| 171 | + $options = array('notnull' => false); |
|
| 172 | 172 | foreach ($xml->children() as $child) { |
| 173 | 173 | /** |
| 174 | 174 | * @var \SimpleXMLElement $child |
| 175 | 175 | */ |
| 176 | 176 | switch ($child->getName()) { |
| 177 | 177 | case 'name': |
| 178 | - $name = (string)$child; |
|
| 178 | + $name = (string) $child; |
|
| 179 | 179 | $name = $this->platform->quoteIdentifier($name); |
| 180 | 180 | break; |
| 181 | 181 | case 'type': |
| 182 | - $type = (string)$child; |
|
| 182 | + $type = (string) $child; |
|
| 183 | 183 | switch ($type) { |
| 184 | 184 | case 'text': |
| 185 | 185 | $type = 'string'; |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | } |
| 197 | 197 | break; |
| 198 | 198 | case 'length': |
| 199 | - $length = (string)$child; |
|
| 199 | + $length = (string) $child; |
|
| 200 | 200 | $options['length'] = $length; |
| 201 | 201 | break; |
| 202 | 202 | case 'unsigned': |
@@ -212,11 +212,11 @@ discard block |
||
| 212 | 212 | $options['autoincrement'] = $autoincrement; |
| 213 | 213 | break; |
| 214 | 214 | case 'default': |
| 215 | - $default = (string)$child; |
|
| 215 | + $default = (string) $child; |
|
| 216 | 216 | $options['default'] = $default; |
| 217 | 217 | break; |
| 218 | 218 | case 'comments': |
| 219 | - $comment = (string)$child; |
|
| 219 | + $comment = (string) $child; |
|
| 220 | 220 | $options['comment'] = $comment; |
| 221 | 221 | break; |
| 222 | 222 | case 'primary': |
@@ -224,15 +224,15 @@ discard block |
||
| 224 | 224 | $options['primary'] = $primary; |
| 225 | 225 | break; |
| 226 | 226 | case 'precision': |
| 227 | - $precision = (string)$child; |
|
| 227 | + $precision = (string) $child; |
|
| 228 | 228 | $options['precision'] = $precision; |
| 229 | 229 | break; |
| 230 | 230 | case 'scale': |
| 231 | - $scale = (string)$child; |
|
| 231 | + $scale = (string) $child; |
|
| 232 | 232 | $options['scale'] = $scale; |
| 233 | 233 | break; |
| 234 | 234 | default: |
| 235 | - throw new \DomainException('Unknown element: ' . $child->getName()); |
|
| 235 | + throw new \DomainException('Unknown element: '.$child->getName()); |
|
| 236 | 236 | |
| 237 | 237 | } |
| 238 | 238 | } |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | } |
| 255 | 255 | } |
| 256 | 256 | if ($type === 'integer' && isset($options['default'])) { |
| 257 | - $options['default'] = (int)$options['default']; |
|
| 257 | + $options['default'] = (int) $options['default']; |
|
| 258 | 258 | } |
| 259 | 259 | if ($type === 'integer' && isset($options['length'])) { |
| 260 | 260 | $length = $options['length']; |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | */ |
| 294 | 294 | switch ($child->getName()) { |
| 295 | 295 | case 'name': |
| 296 | - $name = (string)$child; |
|
| 296 | + $name = (string) $child; |
|
| 297 | 297 | break; |
| 298 | 298 | case 'primary': |
| 299 | 299 | $primary = $this->asBool($child); |
@@ -308,20 +308,20 @@ discard block |
||
| 308 | 308 | */ |
| 309 | 309 | switch ($field->getName()) { |
| 310 | 310 | case 'name': |
| 311 | - $field_name = (string)$field; |
|
| 311 | + $field_name = (string) $field; |
|
| 312 | 312 | $field_name = $this->platform->quoteIdentifier($field_name); |
| 313 | 313 | $fields[] = $field_name; |
| 314 | 314 | break; |
| 315 | 315 | case 'sorting': |
| 316 | 316 | break; |
| 317 | 317 | default: |
| 318 | - throw new \DomainException('Unknown element: ' . $field->getName()); |
|
| 318 | + throw new \DomainException('Unknown element: '.$field->getName()); |
|
| 319 | 319 | |
| 320 | 320 | } |
| 321 | 321 | } |
| 322 | 322 | break; |
| 323 | 323 | default: |
| 324 | - throw new \DomainException('Unknown element: ' . $child->getName()); |
|
| 324 | + throw new \DomainException('Unknown element: '.$child->getName()); |
|
| 325 | 325 | |
| 326 | 326 | } |
| 327 | 327 | } |
@@ -339,7 +339,7 @@ discard block |
||
| 339 | 339 | } |
| 340 | 340 | } |
| 341 | 341 | } else { |
| 342 | - throw new \DomainException('Empty index definition: ' . $name . ' options:' . print_r($fields, true)); |
|
| 342 | + throw new \DomainException('Empty index definition: '.$name.' options:'.print_r($fields, true)); |
|
| 343 | 343 | } |
| 344 | 344 | } |
| 345 | 345 | |
@@ -348,13 +348,13 @@ discard block |
||
| 348 | 348 | * @return bool |
| 349 | 349 | */ |
| 350 | 350 | private function asBool($xml) { |
| 351 | - $result = (string)$xml; |
|
| 351 | + $result = (string) $xml; |
|
| 352 | 352 | if ($result == 'true') { |
| 353 | 353 | $result = true; |
| 354 | 354 | } elseif ($result == 'false') { |
| 355 | 355 | $result = false; |
| 356 | 356 | } |
| 357 | - return (bool)$result; |
|
| 357 | + return (bool) $result; |
|
| 358 | 358 | } |
| 359 | 359 | |
| 360 | 360 | } |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | case 'database': |
| 95 | 95 | case 'mysql': |
| 96 | 96 | case 'sqlite': |
| 97 | - \OCP\Util::writeLog('core', 'Adding user backend ' . $backend . '.', \OCP\Util::DEBUG); |
|
| 97 | + \OCP\Util::writeLog('core', 'Adding user backend '.$backend.'.', \OCP\Util::DEBUG); |
|
| 98 | 98 | self::$_usedBackends[$backend] = new \OC\User\Database(); |
| 99 | 99 | \OC::$server->getUserManager()->registerBackend(self::$_usedBackends[$backend]); |
| 100 | 100 | break; |
@@ -103,8 +103,8 @@ discard block |
||
| 103 | 103 | \OC::$server->getUserManager()->registerBackend(self::$_usedBackends[$backend]); |
| 104 | 104 | break; |
| 105 | 105 | default: |
| 106 | - \OCP\Util::writeLog('core', 'Adding default user backend ' . $backend . '.', \OCP\Util::DEBUG); |
|
| 107 | - $className = 'OC_USER_' . strtoupper($backend); |
|
| 106 | + \OCP\Util::writeLog('core', 'Adding default user backend '.$backend.'.', \OCP\Util::DEBUG); |
|
| 107 | + $className = 'OC_USER_'.strtoupper($backend); |
|
| 108 | 108 | self::$_usedBackends[$backend] = new $className(); |
| 109 | 109 | \OC::$server->getUserManager()->registerBackend(self::$_usedBackends[$backend]); |
| 110 | 110 | break; |
@@ -140,10 +140,10 @@ discard block |
||
| 140 | 140 | self::useBackend($backend); |
| 141 | 141 | self::$_setupedBackends[] = $i; |
| 142 | 142 | } else { |
| 143 | - \OCP\Util::writeLog('core', 'User backend ' . $class . ' already initialized.', \OCP\Util::DEBUG); |
|
| 143 | + \OCP\Util::writeLog('core', 'User backend '.$class.' already initialized.', \OCP\Util::DEBUG); |
|
| 144 | 144 | } |
| 145 | 145 | } else { |
| 146 | - \OCP\Util::writeLog('core', 'User backend ' . $class . ' not found.', \OCP\Util::ERROR); |
|
| 146 | + \OCP\Util::writeLog('core', 'User backend '.$class.' not found.', \OCP\Util::ERROR); |
|
| 147 | 147 | } |
| 148 | 148 | } |
| 149 | 149 | } |
@@ -471,7 +471,7 @@ discard block |
||
| 471 | 471 | if ($user) { |
| 472 | 472 | return $user->getHome(); |
| 473 | 473 | } else { |
| 474 | - return \OC::$server->getSystemConfig()->getValue('datadirectory', OC::$SERVERROOT . '/data') . '/' . $uid; |
|
| 474 | + return \OC::$server->getSystemConfig()->getValue('datadirectory', OC::$SERVERROOT.'/data').'/'.$uid; |
|
| 475 | 475 | } |
| 476 | 476 | } |
| 477 | 477 | |
@@ -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 | } |
@@ -25,6 +25,6 @@ |
||
| 25 | 25 | |
| 26 | 26 | class OCIFunctionBuilder extends FunctionBuilder { |
| 27 | 27 | public function md5($input) { |
| 28 | - return new QueryFunction('LOWER(DBMS_OBFUSCATION_TOOLKIT.md5 (input => UTL_RAW.cast_to_raw(' . $this->helper->quoteColumnName($input) .')))'); |
|
| 28 | + return new QueryFunction('LOWER(DBMS_OBFUSCATION_TOOLKIT.md5 (input => UTL_RAW.cast_to_raw('.$this->helper->quoteColumnName($input).')))'); |
|
| 29 | 29 | } |
| 30 | 30 | } |
@@ -42,10 +42,10 @@ discard block |
||
| 42 | 42 | |
| 43 | 43 | public function fixupStatement($statement) { |
| 44 | 44 | $statement = preg_replace('/`(\w+)` ILIKE \?/', 'LOWER($1) LIKE LOWER(?)', $statement); |
| 45 | - $statement = str_replace( '`', '"', $statement ); |
|
| 46 | - $statement = str_ireplace( 'NOW()', 'datetime(\'now\')', $statement ); |
|
| 45 | + $statement = str_replace('`', '"', $statement); |
|
| 46 | + $statement = str_ireplace('NOW()', 'datetime(\'now\')', $statement); |
|
| 47 | 47 | $statement = str_ireplace('GREATEST(', 'MAX(', $statement); |
| 48 | - $statement = str_ireplace( 'UNIX_TIMESTAMP()', 'strftime(\'%s\',\'now\')', $statement ); |
|
| 48 | + $statement = str_ireplace('UNIX_TIMESTAMP()', 'strftime(\'%s\',\'now\')', $statement); |
|
| 49 | 49 | return $statement; |
| 50 | 50 | } |
| 51 | 51 | |
@@ -64,14 +64,14 @@ discard block |
||
| 64 | 64 | if (empty($compare)) { |
| 65 | 65 | $compare = array_keys($input); |
| 66 | 66 | } |
| 67 | - $fieldList = '`' . implode('`,`', array_keys($input)) . '`'; |
|
| 67 | + $fieldList = '`'.implode('`,`', array_keys($input)).'`'; |
|
| 68 | 68 | $query = "INSERT INTO `$table` ($fieldList) SELECT " |
| 69 | - . str_repeat('?,', count($input)-1).'? ' |
|
| 69 | + . str_repeat('?,', count($input) - 1).'? ' |
|
| 70 | 70 | . " WHERE NOT EXISTS (SELECT 1 FROM `$table` WHERE "; |
| 71 | 71 | |
| 72 | 72 | $inserts = array_values($input); |
| 73 | - foreach($compare as $key) { |
|
| 74 | - $query .= '`' . $key . '`'; |
|
| 73 | + foreach ($compare as $key) { |
|
| 74 | + $query .= '`'.$key.'`'; |
|
| 75 | 75 | if (is_null($input[$key])) { |
| 76 | 76 | $query .= ' IS NULL AND '; |
| 77 | 77 | } else { |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | <div class="warning title"> |
| 19 | 19 | <?php p($l->t('Please renew your password.')); ?><br> |
| 20 | 20 | </div> |
| 21 | - <?php foreach($_['messages'] as $message): ?> |
|
| 21 | + <?php foreach ($_['messages'] as $message): ?> |
|
| 22 | 22 | <div class="warning"> |
| 23 | 23 | <?php p($message); ?><br> |
| 24 | 24 | </div> |
@@ -31,14 +31,14 @@ discard block |
||
| 31 | 31 | <?php endif; ?> |
| 32 | 32 | <div id="message" class="hidden"> |
| 33 | 33 | <img class="float-spinner" alt="" |
| 34 | - src="<?php p(image_path('core', 'loading-dark.gif'));?>"> |
|
| 34 | + src="<?php p(image_path('core', 'loading-dark.gif')); ?>"> |
|
| 35 | 35 | <span id="messageText"></span> |
| 36 | 36 | <!-- the following div ensures that the spinner is always inside the #message div --> |
| 37 | 37 | <div style="clear: both;"></div> |
| 38 | 38 | </div> |
| 39 | 39 | <p class="grouptop"> |
| 40 | 40 | <input type="password" id="oldPassword" name="oldPassword" |
| 41 | - placeholder="<?php echo $l->t('Current password');?>" |
|
| 41 | + placeholder="<?php echo $l->t('Current password'); ?>" |
|
| 42 | 42 | autofocus autocomplete="off" autocapitalize="off" autocorrect="off" required/> |
| 43 | 43 | <label for="oldPassword" class="infield"><?php p($l->t('Current password')); ?></label> |
| 44 | 44 | </p> |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | <input type="checkbox" id="personal-show" name="show" /><label for="personal-show"></label> |
| 48 | 48 | <label id="newPassword-label" for="newPassword" class="infield"><?php p($l->t('New password')); ?></label> |
| 49 | 49 | <input type="password" id="newPassword" name="newPassword" |
| 50 | - placeholder="<?php echo $l->t('New password');?>" |
|
| 50 | + placeholder="<?php echo $l->t('New password'); ?>" |
|
| 51 | 51 | data-typetoggle="#personal-show" autofocus autocomplete="off" autocapitalize="off" autocorrect="off" required/> |
| 52 | 52 | </p> |
| 53 | 53 | |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | |
| 72 | 72 | $updatedEntries = $builder->execute(); |
| 73 | 73 | if ($updatedEntries > 0) { |
| 74 | - $out->info('Fixed file share permissions for ' . $updatedEntries . ' shares'); |
|
| 74 | + $out->info('Fixed file share permissions for '.$updatedEntries.' shares'); |
|
| 75 | 75 | } |
| 76 | 76 | } |
| 77 | 77 | |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | if ($deletedEntries) { |
| 110 | - $out->info('Removed ' . $deletedEntries . ' shares where the parent did not exist'); |
|
| 110 | + $out->info('Removed '.$deletedEntries.' shares where the parent did not exist'); |
|
| 111 | 111 | } |
| 112 | 112 | } |
| 113 | 113 | |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | public function getACL() { |
| 102 | - $acl = [ |
|
| 102 | + $acl = [ |
|
| 103 | 103 | [ |
| 104 | 104 | 'privilege' => '{DAV:}read', |
| 105 | 105 | 'principal' => $this->getOwner(), |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | 'protected' => true, |
| 112 | 112 | ]; |
| 113 | 113 | if ($this->getOwner() !== parent::getOwner()) { |
| 114 | - $acl[] = [ |
|
| 114 | + $acl[] = [ |
|
| 115 | 115 | 'privilege' => '{DAV:}read', |
| 116 | 116 | 'principal' => parent::getOwner(), |
| 117 | 117 | 'protected' => true, |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | |
| 171 | 171 | public function delete() { |
| 172 | 172 | if (isset($this->addressBookInfo['{http://owncloud.org/ns}owner-principal'])) { |
| 173 | - $principal = 'principal:' . parent::getOwner(); |
|
| 173 | + $principal = 'principal:'.parent::getOwner(); |
|
| 174 | 174 | $shares = $this->carddavBackend->getShares($this->getResourceId()); |
| 175 | 175 | $shares = array_filter($shares, function($share) use ($principal){ |
| 176 | 176 | return $share['href'] === $principal; |