@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | return $this->setError(elFinder::ERROR_UPLOAD_FILE_MIME, '(' . $mime . ')'); |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | - $tmpsize = (int)sprintf('%u', filesize($tmpname)); |
|
| 68 | + $tmpsize = (int) sprintf('%u', filesize($tmpname)); |
|
| 69 | 69 | if ($this->uploadMaxSize > 0 && $tmpsize > $this->uploadMaxSize) { |
| 70 | 70 | return $this->setError(elFinder::ERROR_UPLOAD_FILE_SIZE); |
| 71 | 71 | } |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | $output = [$object->get_label()]; |
| 253 | 253 | |
| 254 | 254 | $parent = $object->get_parent(); |
| 255 | - while ( $parent |
|
| 255 | + while ($parent |
|
| 256 | 256 | && $parent->component == 'org.openpsa.documents') { |
| 257 | 257 | $output[] = $parent->extra; |
| 258 | 258 | $parent = $parent->get_parent(); |
@@ -349,12 +349,12 @@ discard block |
||
| 349 | 349 | $data['mime'] = 'directory'; |
| 350 | 350 | } |
| 351 | 351 | |
| 352 | - if ( $owner |
|
| 352 | + if ($owner |
|
| 353 | 353 | && $group = midcom::get()->auth->get_assignee($owner)) { |
| 354 | 354 | $data['group'] = $group->name; |
| 355 | 355 | } |
| 356 | 356 | |
| 357 | - if ( $this->root !== $path |
|
| 357 | + if ($this->root !== $path |
|
| 358 | 358 | && $parent = $object->get_parent()) { |
| 359 | 359 | $data['phash'] = $this->encode($parent->guid); |
| 360 | 360 | } |
@@ -413,7 +413,7 @@ discard block |
||
| 413 | 413 | * @param string $mode open mode |
| 414 | 414 | * @return resource|false |
| 415 | 415 | */ |
| 416 | - protected function _fopen($path, $mode="rb") |
|
| 416 | + protected function _fopen($path, $mode = "rb") |
|
| 417 | 417 | { |
| 418 | 418 | $document = org_openpsa_documents_document_dba::get_cached($path); |
| 419 | 419 | $attachments = org_openpsa_helpers::get_dm2_attachments($document, 'document'); |
@@ -431,7 +431,7 @@ discard block |
||
| 431 | 431 | * @param string $path file path |
| 432 | 432 | * @return bool |
| 433 | 433 | */ |
| 434 | - protected function _fclose($fp, $path='') |
|
| 434 | + protected function _fclose($fp, $path = '') |
|
| 435 | 435 | { |
| 436 | 436 | fclose($fp); |
| 437 | 437 | return true; |
@@ -615,7 +615,7 @@ discard block |
||
| 615 | 615 | { |
| 616 | 616 | $filename = midcom_db_attachment::safe_filename($name, true); |
| 617 | 617 | $att = $doc->create_attachment($filename, $name, $mimetype); |
| 618 | - if ( !$att |
|
| 618 | + if (!$att |
|
| 619 | 619 | || !$att->copy_from_handle($fp)) { |
| 620 | 620 | return false; |
| 621 | 621 | } |