@@ -40,8 +40,7 @@ |
||
40 | 40 | $list[] = $folder; |
41 | 41 | $folder = dirname($folder); |
42 | 42 | } |
43 | -} |
|
44 | -else { |
|
43 | +} else { |
|
45 | 44 | $deleteAll = false; |
46 | 45 | $files = (string)$_POST['files']; |
47 | 46 | $list = json_decode($files); |
@@ -11,7 +11,10 @@ |
||
11 | 11 | <em><?php p($l->t('Federation allows you to connect with other trusted servers to exchange the user directory. For example this will be used to auto-complete external users for federated sharing.')); ?></em> |
12 | 12 | |
13 | 13 | <p> |
14 | - <input id="autoAddServers" type="checkbox" class="checkbox" <?php if($_['autoAddServers']) p('checked'); ?> /> |
|
14 | + <input id="autoAddServers" type="checkbox" class="checkbox" <?php if($_['autoAddServers']) { |
|
15 | + p('checked'); |
|
16 | +} |
|
17 | +?> /> |
|
15 | 18 | <label for="autoAddServers"><?php p($l->t('Add server automatically once a federated share was created successfully')); ?></label> |
16 | 19 | </p> |
17 | 20 |
@@ -177,7 +177,7 @@ |
||
177 | 177 | && $status !== Http::STATUS_FORBIDDEN |
178 | 178 | ) { |
179 | 179 | $this->retainJob = true; |
180 | - } else { |
|
180 | + } else { |
|
181 | 181 | // reset token if we received a valid response |
182 | 182 | $this->dbHandler->addToken($target, ''); |
183 | 183 | } |
@@ -119,8 +119,9 @@ |
||
119 | 119 | |
120 | 120 | // Only handling xml |
121 | 121 | $contentType = $request->getHeader('Content-Type'); |
122 | - if (strpos($contentType, 'application/xml') === false && strpos($contentType, 'text/xml') === false) |
|
123 | - return; |
|
122 | + if (strpos($contentType, 'application/xml') === false && strpos($contentType, 'text/xml') === false) { |
|
123 | + return; |
|
124 | + } |
|
124 | 125 | |
125 | 126 | // Making sure the node exists |
126 | 127 | try { |
@@ -808,7 +808,9 @@ |
||
808 | 808 | $stmt = $query->execute(); |
809 | 809 | $row = $stmt->fetch(\PDO::FETCH_ASSOC); |
810 | 810 | |
811 | - if(!$row) return null; |
|
811 | + if(!$row) { |
|
812 | + return null; |
|
813 | + } |
|
812 | 814 | |
813 | 815 | return [ |
814 | 816 | 'id' => $row['id'], |
@@ -745,7 +745,9 @@ |
||
745 | 745 | $stmt->execute([ $addressBookId ]); |
746 | 746 | $currentToken = $stmt->fetchColumn(0); |
747 | 747 | |
748 | - if (is_null($currentToken)) return null; |
|
748 | + if (is_null($currentToken)) { |
|
749 | + return null; |
|
750 | + } |
|
749 | 751 | |
750 | 752 | $result = [ |
751 | 753 | 'syncToken' => $currentToken, |
@@ -35,7 +35,7 @@ |
||
35 | 35 | |
36 | 36 | if(OCA\Files_Versions\Storage::rollback( $file, $revision )) { |
37 | 37 | OCP\JSON::success(array("data" => array( "revision" => $revision, "file" => $file ))); |
38 | -}else{ |
|
38 | +} else{ |
|
39 | 39 | $l = \OC::$server->getL10N('files_versions'); |
40 | 40 | OCP\JSON::error(array("data" => array( "message" => $l->t("Could not revert: %s", array($file) )))); |
41 | 41 | } |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $this->path=$source; |
48 | 48 | $this->zip=new \ZipArchive(); |
49 | 49 | if($this->zip->open($source, \ZipArchive::CREATE)) { |
50 | - }else{ |
|
50 | + } else{ |
|
51 | 51 | \OCP\Util::writeLog('files_archive', 'Error while opening archive '.$source, \OCP\Util::WARN); |
52 | 52 | } |
53 | 53 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | function addFile($path, $source='') { |
69 | 69 | if($source and $source[0]=='/' and file_exists($source)) { |
70 | 70 | $result=$this->zip->addFile($source, $path); |
71 | - }else{ |
|
71 | + } else{ |
|
72 | 72 | $result=$this->zip->addFromString($path, $source); |
73 | 73 | } |
74 | 74 | if($result) { |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | function remove($path) { |
178 | 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 | } |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | //in the archive when the stream is closed |
197 | 197 | if(strrpos($path, '.')!==false) { |
198 | 198 | $ext=substr($path, strrpos($path, '.')); |
199 | - }else{ |
|
199 | + } else{ |
|
200 | 200 | $ext=''; |
201 | 201 | } |
202 | 202 | $tmpFile=\OCP\Files::tmpFile($ext); |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | private function stripPath($path) { |
226 | 226 | if(!$path || $path[0]=='/') { |
227 | 227 | return substr($path, 1); |
228 | - }else{ |
|
228 | + } else{ |
|
229 | 229 | return $path; |
230 | 230 | } |
231 | 231 | } |
@@ -134,7 +134,7 @@ |
||
134 | 134 | } |
135 | 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 | } |