@@ -52,7 +52,7 @@ |
||
52 | 52 | */ |
53 | 53 | public function generate($name, $parameters = array(), $absolute = false) { |
54 | 54 | asort($parameters); |
55 | - $key = $this->context->getHost() . '#' . $this->context->getBaseUrl() . $name . sha1(json_encode($parameters)) . intval($absolute); |
|
55 | + $key = $this->context->getHost().'#'.$this->context->getBaseUrl().$name.sha1(json_encode($parameters)).intval($absolute); |
|
56 | 56 | $cachedKey = $this->cache->get($key); |
57 | 57 | if ($cachedKey) { |
58 | 58 | return $cachedKey; |
@@ -41,10 +41,10 @@ discard block |
||
41 | 41 | public function search($pattern, $searchProperties = array(), $options = array()) { |
42 | 42 | $this->loadAddressBooks(); |
43 | 43 | $result = array(); |
44 | - foreach($this->addressBooks as $addressBook) { |
|
44 | + foreach ($this->addressBooks as $addressBook) { |
|
45 | 45 | $r = $addressBook->search($pattern, $searchProperties, $options); |
46 | 46 | $contacts = array(); |
47 | - foreach($r as $c){ |
|
47 | + foreach ($r as $c) { |
|
48 | 48 | $c['addressbook-key'] = $addressBook->getKey(); |
49 | 49 | $contacts[] = $c; |
50 | 50 | } |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | public function getAddressBooks() { |
125 | 125 | $this->loadAddressBooks(); |
126 | 126 | $result = array(); |
127 | - foreach($this->addressBooks as $addressBook) { |
|
127 | + foreach ($this->addressBooks as $addressBook) { |
|
128 | 128 | $result[$addressBook->getKey()] = $addressBook->getDisplayName(); |
129 | 129 | } |
130 | 130 | |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | */ |
182 | 182 | protected function loadAddressBooks() |
183 | 183 | { |
184 | - foreach($this->addressBookLoaders as $callable) { |
|
184 | + foreach ($this->addressBookLoaders as $callable) { |
|
185 | 185 | $callable($this); |
186 | 186 | } |
187 | 187 | $this->addressBookLoaders = array(); |
@@ -101,13 +101,13 @@ discard block |
||
101 | 101 | $parts = explode('/', $path); |
102 | 102 | $folder = $tmpBase; |
103 | 103 | foreach ($parts as $part) { |
104 | - $folder .= '/' . $part; |
|
104 | + $folder .= '/'.$part; |
|
105 | 105 | if (!is_dir($folder)) { |
106 | 106 | mkdir($folder); |
107 | 107 | } |
108 | 108 | } |
109 | - $result = $this->tar->addModify(array($tmpBase . $path), '', $tmpBase); |
|
110 | - rmdir($tmpBase . $path); |
|
109 | + $result = $this->tar->addModify(array($tmpBase.$path), '', $tmpBase); |
|
110 | + rmdir($tmpBase.$path); |
|
111 | 111 | $this->fileList = false; |
112 | 112 | $this->cachedHeaders = false; |
113 | 113 | return $result; |
@@ -144,12 +144,12 @@ discard block |
||
144 | 144 | //no proper way to delete, rename entire archive, rename file and remake archive |
145 | 145 | $tmp = \OCP\Files::tmpFolder(); |
146 | 146 | $this->tar->extract($tmp); |
147 | - rename($tmp . $source, $tmp . $dest); |
|
147 | + rename($tmp.$source, $tmp.$dest); |
|
148 | 148 | $this->tar = null; |
149 | 149 | unlink($this->path); |
150 | 150 | $types = array(null, 'gz', 'bz'); |
151 | 151 | $this->tar = new \Archive_Tar($this->path, $types[self::getTarType($this->path)]); |
152 | - $this->tar->createModify(array($tmp), '', $tmp . '/'); |
|
152 | + $this->tar->createModify(array($tmp), '', $tmp.'/'); |
|
153 | 153 | $this->fileList = false; |
154 | 154 | $this->cachedHeaders = false; |
155 | 155 | return true; |
@@ -164,9 +164,9 @@ discard block |
||
164 | 164 | } |
165 | 165 | foreach ($this->cachedHeaders as $header) { |
166 | 166 | if ($file == $header['filename'] |
167 | - or $file . '/' == $header['filename'] |
|
168 | - or '/' . $file . '/' == $header['filename'] |
|
169 | - or '/' . $file == $header['filename'] |
|
167 | + or $file.'/' == $header['filename'] |
|
168 | + or '/'.$file.'/' == $header['filename'] |
|
169 | + or '/'.$file == $header['filename'] |
|
170 | 170 | ) { |
171 | 171 | return $header; |
172 | 172 | } |
@@ -265,13 +265,13 @@ discard block |
||
265 | 265 | if (!$this->fileExists($path)) { |
266 | 266 | return false; |
267 | 267 | } |
268 | - if ($this->fileExists('/' . $path)) { |
|
269 | - $success = $this->tar->extractList(array('/' . $path), $tmp); |
|
268 | + if ($this->fileExists('/'.$path)) { |
|
269 | + $success = $this->tar->extractList(array('/'.$path), $tmp); |
|
270 | 270 | } else { |
271 | 271 | $success = $this->tar->extractList(array($path), $tmp); |
272 | 272 | } |
273 | 273 | if ($success) { |
274 | - rename($tmp . $path, $dest); |
|
274 | + rename($tmp.$path, $dest); |
|
275 | 275 | } |
276 | 276 | \OCP\Files::rmdirr($tmp); |
277 | 277 | return $success; |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | */ |
296 | 296 | function fileExists($path) { |
297 | 297 | $files = $this->getFiles(); |
298 | - if ((array_search($path, $files) !== false) or (array_search($path . '/', $files) !== false)) { |
|
298 | + if ((array_search($path, $files) !== false) or (array_search($path.'/', $files) !== false)) { |
|
299 | 299 | return true; |
300 | 300 | } else { |
301 | 301 | $folderPath = $path; |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | } |
311 | 311 | } |
312 | 312 | if ($path[0] != '/') { //not all programs agree on the use of a leading / |
313 | - return $this->fileExists('/' . $path); |
|
313 | + return $this->fileExists('/'.$path); |
|
314 | 314 | } else { |
315 | 315 | return false; |
316 | 316 | } |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | //no proper way to delete, extract entire archive, delete file and remake archive |
332 | 332 | $tmp = \OCP\Files::tmpFolder(); |
333 | 333 | $this->tar->extract($tmp); |
334 | - \OCP\Files::rmdirr($tmp . $path); |
|
334 | + \OCP\Files::rmdirr($tmp.$path); |
|
335 | 335 | $this->tar = null; |
336 | 336 | unlink($this->path); |
337 | 337 | $this->reopen(); |
@@ -362,7 +362,7 @@ discard block |
||
362 | 362 | return fopen($tmpFile, $mode); |
363 | 363 | } else { |
364 | 364 | $handle = fopen($tmpFile, $mode); |
365 | - return CallbackWrapper::wrap($handle, null, null, function () use ($path, $tmpFile) { |
|
365 | + return CallbackWrapper::wrap($handle, null, null, function() use ($path, $tmpFile) { |
|
366 | 366 | $this->writeBack($tmpFile, $path); |
367 | 367 | }); |
368 | 368 | } |
@@ -33,21 +33,21 @@ discard block |
||
33 | 33 | |
34 | 34 | use Icewind\Streams\CallbackWrapper; |
35 | 35 | |
36 | -class ZIP extends Archive{ |
|
36 | +class ZIP extends Archive { |
|
37 | 37 | /** |
38 | 38 | * @var \ZipArchive zip |
39 | 39 | */ |
40 | - private $zip=null; |
|
40 | + private $zip = null; |
|
41 | 41 | private $path; |
42 | 42 | |
43 | 43 | /** |
44 | 44 | * @param string $source |
45 | 45 | */ |
46 | 46 | function __construct($source) { |
47 | - $this->path=$source; |
|
48 | - $this->zip=new \ZipArchive(); |
|
49 | - if($this->zip->open($source, \ZipArchive::CREATE)) { |
|
50 | - }else{ |
|
47 | + $this->path = $source; |
|
48 | + $this->zip = new \ZipArchive(); |
|
49 | + if ($this->zip->open($source, \ZipArchive::CREATE)) { |
|
50 | + } else { |
|
51 | 51 | \OCP\Util::writeLog('files_archive', 'Error while opening archive '.$source, \OCP\Util::WARN); |
52 | 52 | } |
53 | 53 | } |
@@ -65,14 +65,14 @@ discard block |
||
65 | 65 | * @param string $source either a local file or string data |
66 | 66 | * @return bool |
67 | 67 | */ |
68 | - function addFile($path, $source='') { |
|
69 | - if($source and $source[0]=='/' and file_exists($source)) { |
|
70 | - $result=$this->zip->addFile($source, $path); |
|
71 | - }else{ |
|
72 | - $result=$this->zip->addFromString($path, $source); |
|
68 | + function addFile($path, $source = '') { |
|
69 | + if ($source and $source[0] == '/' and file_exists($source)) { |
|
70 | + $result = $this->zip->addFile($source, $path); |
|
71 | + } else { |
|
72 | + $result = $this->zip->addFromString($path, $source); |
|
73 | 73 | } |
74 | - if($result) { |
|
75 | - $this->zip->close();//close and reopen to save the zip |
|
74 | + if ($result) { |
|
75 | + $this->zip->close(); //close and reopen to save the zip |
|
76 | 76 | $this->zip->open($this->path); |
77 | 77 | } |
78 | 78 | return $result; |
@@ -84,8 +84,8 @@ discard block |
||
84 | 84 | * @return boolean|null |
85 | 85 | */ |
86 | 86 | function rename($source, $dest) { |
87 | - $source=$this->stripPath($source); |
|
88 | - $dest=$this->stripPath($dest); |
|
87 | + $source = $this->stripPath($source); |
|
88 | + $dest = $this->stripPath($dest); |
|
89 | 89 | $this->zip->renameName($source, $dest); |
90 | 90 | } |
91 | 91 | /** |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | * @return int |
95 | 95 | */ |
96 | 96 | function filesize($path) { |
97 | - $stat=$this->zip->statName($path); |
|
97 | + $stat = $this->zip->statName($path); |
|
98 | 98 | return $stat['size']; |
99 | 99 | } |
100 | 100 | /** |
@@ -111,13 +111,13 @@ discard block |
||
111 | 111 | * @return array |
112 | 112 | */ |
113 | 113 | function getFolder($path) { |
114 | - $files=$this->getFiles(); |
|
115 | - $folderContent=array(); |
|
116 | - $pathLength=strlen($path); |
|
117 | - foreach($files as $file) { |
|
118 | - if(substr($file, 0, $pathLength)==$path and $file!=$path) { |
|
119 | - if(strrpos(substr($file, 0, -1), '/')<=$pathLength) { |
|
120 | - $folderContent[]=substr($file, $pathLength); |
|
114 | + $files = $this->getFiles(); |
|
115 | + $folderContent = array(); |
|
116 | + $pathLength = strlen($path); |
|
117 | + foreach ($files as $file) { |
|
118 | + if (substr($file, 0, $pathLength) == $path and $file != $path) { |
|
119 | + if (strrpos(substr($file, 0, -1), '/') <= $pathLength) { |
|
120 | + $folderContent[] = substr($file, $pathLength); |
|
121 | 121 | } |
122 | 122 | } |
123 | 123 | } |
@@ -128,10 +128,10 @@ discard block |
||
128 | 128 | * @return array |
129 | 129 | */ |
130 | 130 | function getFiles() { |
131 | - $fileCount=$this->zip->numFiles; |
|
132 | - $files=array(); |
|
133 | - for($i=0;$i<$fileCount;$i++) { |
|
134 | - $files[]=$this->zip->getNameIndex($i); |
|
131 | + $fileCount = $this->zip->numFiles; |
|
132 | + $files = array(); |
|
133 | + for ($i = 0; $i < $fileCount; $i++) { |
|
134 | + $files[] = $this->zip->getNameIndex($i); |
|
135 | 135 | } |
136 | 136 | return $files; |
137 | 137 | } |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | * @return bool |
168 | 168 | */ |
169 | 169 | function fileExists($path) { |
170 | - return ($this->zip->locateName($path)!==false) or ($this->zip->locateName($path.'/')!==false); |
|
170 | + return ($this->zip->locateName($path) !== false) or ($this->zip->locateName($path.'/') !== false); |
|
171 | 171 | } |
172 | 172 | /** |
173 | 173 | * remove a file or folder from the archive |
@@ -175,9 +175,9 @@ discard block |
||
175 | 175 | * @return bool |
176 | 176 | */ |
177 | 177 | function remove($path) { |
178 | - if($this->fileExists($path.'/')) { |
|
178 | + if ($this->fileExists($path.'/')) { |
|
179 | 179 | return $this->zip->deleteName($path.'/'); |
180 | - }else{ |
|
180 | + } else { |
|
181 | 181 | return $this->zip->deleteName($path); |
182 | 182 | } |
183 | 183 | } |
@@ -188,23 +188,23 @@ discard block |
||
188 | 188 | * @return resource |
189 | 189 | */ |
190 | 190 | function getStream($path, $mode) { |
191 | - if($mode=='r' or $mode=='rb') { |
|
191 | + if ($mode == 'r' or $mode == 'rb') { |
|
192 | 192 | return $this->zip->getStream($path); |
193 | 193 | } else { |
194 | 194 | //since we can't directly get a writable stream, |
195 | 195 | //make a temp copy of the file and put it back |
196 | 196 | //in the archive when the stream is closed |
197 | - if(strrpos($path, '.')!==false) { |
|
198 | - $ext=substr($path, strrpos($path, '.')); |
|
199 | - }else{ |
|
200 | - $ext=''; |
|
197 | + if (strrpos($path, '.') !== false) { |
|
198 | + $ext = substr($path, strrpos($path, '.')); |
|
199 | + } else { |
|
200 | + $ext = ''; |
|
201 | 201 | } |
202 | - $tmpFile=\OCP\Files::tmpFile($ext); |
|
203 | - if($this->fileExists($path)) { |
|
202 | + $tmpFile = \OCP\Files::tmpFile($ext); |
|
203 | + if ($this->fileExists($path)) { |
|
204 | 204 | $this->extractFile($path, $tmpFile); |
205 | 205 | } |
206 | 206 | $handle = fopen($tmpFile, $mode); |
207 | - return CallbackWrapper::wrap($handle, null, null, function () use ($path, $tmpFile) { |
|
207 | + return CallbackWrapper::wrap($handle, null, null, function() use ($path, $tmpFile) { |
|
208 | 208 | $this->writeBack($tmpFile, $path); |
209 | 209 | }); |
210 | 210 | } |
@@ -223,9 +223,9 @@ discard block |
||
223 | 223 | * @return string |
224 | 224 | */ |
225 | 225 | private function stripPath($path) { |
226 | - if(!$path || $path[0]=='/') { |
|
226 | + if (!$path || $path[0] == '/') { |
|
227 | 227 | return substr($path, 1); |
228 | - }else{ |
|
228 | + } else { |
|
229 | 229 | return $path; |
230 | 230 | } |
231 | 231 | } |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | * @param string $source either a local file or string data |
50 | 50 | * @return bool |
51 | 51 | */ |
52 | - abstract function addFile($path, $source=''); |
|
52 | + abstract function addFile($path, $source = ''); |
|
53 | 53 | /** |
54 | 54 | * rename a file or folder in the archive |
55 | 55 | * @param string $source |
@@ -126,15 +126,15 @@ discard block |
||
126 | 126 | */ |
127 | 127 | function addRecursive($path, $source) { |
128 | 128 | $dh = opendir($source); |
129 | - if(is_resource($dh)) { |
|
129 | + if (is_resource($dh)) { |
|
130 | 130 | $this->addFolder($path); |
131 | 131 | while (($file = readdir($dh)) !== false) { |
132 | - if($file=='.' or $file=='..') { |
|
132 | + if ($file == '.' or $file == '..') { |
|
133 | 133 | continue; |
134 | 134 | } |
135 | - if(is_dir($source.'/'.$file)) { |
|
135 | + if (is_dir($source.'/'.$file)) { |
|
136 | 136 | $this->addRecursive($path.'/'.$file, $source.'/'.$file); |
137 | - }else{ |
|
137 | + } else { |
|
138 | 138 | $this->addFile($path.'/'.$file, $source.'/'.$file); |
139 | 139 | } |
140 | 140 | } |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | */ |
58 | 58 | public function execute($jobList, ILogger $logger = null) { |
59 | 59 | // add an interval of 15 mins |
60 | - $this->setInterval(15*60); |
|
60 | + $this->setInterval(15 * 60); |
|
61 | 61 | |
62 | 62 | $this->jobList = $jobList; |
63 | 63 | $this->logger = $logger; |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | try { |
91 | 91 | $repair->addStep($step); |
92 | 92 | } catch (\Exception $ex) { |
93 | - $this->logger->logException($ex,[ |
|
93 | + $this->logger->logException($ex, [ |
|
94 | 94 | 'app' => 'migration' |
95 | 95 | ]); |
96 | 96 |
@@ -55,7 +55,7 @@ |
||
55 | 55 | if ($command instanceof ICommand) { |
56 | 56 | // ensure the command can be serialized |
57 | 57 | $serialized = serialize($command); |
58 | - if(strlen($serialized) > 4000) { |
|
58 | + if (strlen($serialized) > 4000) { |
|
59 | 59 | throw new \InvalidArgumentException('Trying to push a command which serialized form can not be stored in the database (>4000 character)'); |
60 | 60 | } |
61 | 61 | $unserialized = unserialize($serialized); |
@@ -25,7 +25,7 @@ |
||
25 | 25 | use OCP\IUser; |
26 | 26 | |
27 | 27 | trait FileAccess { |
28 | - protected function setupFS(IUser $user){ |
|
28 | + protected function setupFS(IUser $user) { |
|
29 | 29 | \OC_Util::setupFS($user->getUID()); |
30 | 30 | } |
31 | 31 |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | $apps = $this->appManager->getEnabledAppsForUser($this->currentUser); |
109 | 109 | } |
110 | 110 | |
111 | - foreach($apps as $app) { |
|
111 | + foreach ($apps as $app) { |
|
112 | 112 | $apps_paths[$app] = \OC_App::getAppWebPath($app); |
113 | 113 | } |
114 | 114 | |
@@ -121,8 +121,8 @@ discard block |
||
121 | 121 | $outgoingServer2serverShareEnabled = $this->config->getAppValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes') === 'yes'; |
122 | 122 | |
123 | 123 | $countOfDataLocation = 0; |
124 | - $dataLocation = str_replace(\OC::$SERVERROOT .'/', '', $this->config->getSystemValue('datadirectory', ''), $countOfDataLocation); |
|
125 | - if($countOfDataLocation !== 1 || !$this->groupManager->isAdmin($uid)) { |
|
124 | + $dataLocation = str_replace(\OC::$SERVERROOT.'/', '', $this->config->getSystemValue('datadirectory', ''), $countOfDataLocation); |
|
125 | + if ($countOfDataLocation !== 1 || !$this->groupManager->isAdmin($uid)) { |
|
126 | 126 | $dataLocation = false; |
127 | 127 | } |
128 | 128 | |
@@ -144,61 +144,61 @@ discard block |
||
144 | 144 | "datepickerFormatDate" => json_encode($this->l->l('jsdate', null)), |
145 | 145 | 'nc_lastLogin' => $lastConfirmTimestamp, |
146 | 146 | "dayNames" => json_encode([ |
147 | - (string)$this->l->t('Sunday'), |
|
148 | - (string)$this->l->t('Monday'), |
|
149 | - (string)$this->l->t('Tuesday'), |
|
150 | - (string)$this->l->t('Wednesday'), |
|
151 | - (string)$this->l->t('Thursday'), |
|
152 | - (string)$this->l->t('Friday'), |
|
153 | - (string)$this->l->t('Saturday') |
|
147 | + (string) $this->l->t('Sunday'), |
|
148 | + (string) $this->l->t('Monday'), |
|
149 | + (string) $this->l->t('Tuesday'), |
|
150 | + (string) $this->l->t('Wednesday'), |
|
151 | + (string) $this->l->t('Thursday'), |
|
152 | + (string) $this->l->t('Friday'), |
|
153 | + (string) $this->l->t('Saturday') |
|
154 | 154 | ]), |
155 | 155 | "dayNamesShort" => json_encode([ |
156 | - (string)$this->l->t('Sun.'), |
|
157 | - (string)$this->l->t('Mon.'), |
|
158 | - (string)$this->l->t('Tue.'), |
|
159 | - (string)$this->l->t('Wed.'), |
|
160 | - (string)$this->l->t('Thu.'), |
|
161 | - (string)$this->l->t('Fri.'), |
|
162 | - (string)$this->l->t('Sat.') |
|
156 | + (string) $this->l->t('Sun.'), |
|
157 | + (string) $this->l->t('Mon.'), |
|
158 | + (string) $this->l->t('Tue.'), |
|
159 | + (string) $this->l->t('Wed.'), |
|
160 | + (string) $this->l->t('Thu.'), |
|
161 | + (string) $this->l->t('Fri.'), |
|
162 | + (string) $this->l->t('Sat.') |
|
163 | 163 | ]), |
164 | 164 | "dayNamesMin" => json_encode([ |
165 | - (string)$this->l->t('Su'), |
|
166 | - (string)$this->l->t('Mo'), |
|
167 | - (string)$this->l->t('Tu'), |
|
168 | - (string)$this->l->t('We'), |
|
169 | - (string)$this->l->t('Th'), |
|
170 | - (string)$this->l->t('Fr'), |
|
171 | - (string)$this->l->t('Sa') |
|
165 | + (string) $this->l->t('Su'), |
|
166 | + (string) $this->l->t('Mo'), |
|
167 | + (string) $this->l->t('Tu'), |
|
168 | + (string) $this->l->t('We'), |
|
169 | + (string) $this->l->t('Th'), |
|
170 | + (string) $this->l->t('Fr'), |
|
171 | + (string) $this->l->t('Sa') |
|
172 | 172 | ]), |
173 | 173 | "monthNames" => json_encode([ |
174 | - (string)$this->l->t('January'), |
|
175 | - (string)$this->l->t('February'), |
|
176 | - (string)$this->l->t('March'), |
|
177 | - (string)$this->l->t('April'), |
|
178 | - (string)$this->l->t('May'), |
|
179 | - (string)$this->l->t('June'), |
|
180 | - (string)$this->l->t('July'), |
|
181 | - (string)$this->l->t('August'), |
|
182 | - (string)$this->l->t('September'), |
|
183 | - (string)$this->l->t('October'), |
|
184 | - (string)$this->l->t('November'), |
|
185 | - (string)$this->l->t('December') |
|
174 | + (string) $this->l->t('January'), |
|
175 | + (string) $this->l->t('February'), |
|
176 | + (string) $this->l->t('March'), |
|
177 | + (string) $this->l->t('April'), |
|
178 | + (string) $this->l->t('May'), |
|
179 | + (string) $this->l->t('June'), |
|
180 | + (string) $this->l->t('July'), |
|
181 | + (string) $this->l->t('August'), |
|
182 | + (string) $this->l->t('September'), |
|
183 | + (string) $this->l->t('October'), |
|
184 | + (string) $this->l->t('November'), |
|
185 | + (string) $this->l->t('December') |
|
186 | 186 | ]), |
187 | 187 | "monthNamesShort" => json_encode([ |
188 | - (string)$this->l->t('Jan.'), |
|
189 | - (string)$this->l->t('Feb.'), |
|
190 | - (string)$this->l->t('Mar.'), |
|
191 | - (string)$this->l->t('Apr.'), |
|
192 | - (string)$this->l->t('May.'), |
|
193 | - (string)$this->l->t('Jun.'), |
|
194 | - (string)$this->l->t('Jul.'), |
|
195 | - (string)$this->l->t('Aug.'), |
|
196 | - (string)$this->l->t('Sep.'), |
|
197 | - (string)$this->l->t('Oct.'), |
|
198 | - (string)$this->l->t('Nov.'), |
|
199 | - (string)$this->l->t('Dec.') |
|
188 | + (string) $this->l->t('Jan.'), |
|
189 | + (string) $this->l->t('Feb.'), |
|
190 | + (string) $this->l->t('Mar.'), |
|
191 | + (string) $this->l->t('Apr.'), |
|
192 | + (string) $this->l->t('May.'), |
|
193 | + (string) $this->l->t('Jun.'), |
|
194 | + (string) $this->l->t('Jul.'), |
|
195 | + (string) $this->l->t('Aug.'), |
|
196 | + (string) $this->l->t('Sep.'), |
|
197 | + (string) $this->l->t('Oct.'), |
|
198 | + (string) $this->l->t('Nov.'), |
|
199 | + (string) $this->l->t('Dec.') |
|
200 | 200 | ]), |
201 | - "firstDay" => json_encode($this->l->l('firstday', null)) , |
|
201 | + "firstDay" => json_encode($this->l->l('firstday', null)), |
|
202 | 202 | "oc_config" => json_encode([ |
203 | 203 | 'session_lifetime' => min($this->config->getSystemValue('session_lifetime', $this->iniWrapper->getNumeric('session.gc_maxlifetime')), $this->iniWrapper->getNumeric('session.gc_maxlifetime')), |
204 | 204 | 'session_keepalive' => $this->config->getSystemValue('session_keepalive', true), |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | if ($this->currentUser !== null) { |
241 | 241 | $array['oc_userconfig'] = json_encode([ |
242 | 242 | 'avatar' => [ |
243 | - 'version' => (int)$this->config->getUserValue($uid, 'avatar', 'version', 0), |
|
243 | + 'version' => (int) $this->config->getUserValue($uid, 'avatar', 'version', 0), |
|
244 | 244 | ] |
245 | 245 | ]); |
246 | 246 | } |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | |
253 | 253 | // Echo it |
254 | 254 | foreach ($array as $setting => $value) { |
255 | - $result .= 'var '. $setting . '='. $value . ';' . PHP_EOL; |
|
255 | + $result .= 'var '.$setting.'='.$value.';'.PHP_EOL; |
|
256 | 256 | } |
257 | 257 | |
258 | 258 | return $result; |