@@ -16,8 +16,8 @@ discard block |
||
| 16 | 16 | die('Access denied.'); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | -return array( |
|
| 20 | - 'ctrl' => array( |
|
| 19 | +return array ( |
|
| 20 | + 'ctrl' => array ( |
|
| 21 | 21 | 'title' => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_storedsearch', |
| 22 | 22 | 'label' => 'name', |
| 23 | 23 | 'tstamp' => 'tstamp', |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | 'transOrigPointerField' => 'l10n_parent', |
| 29 | 29 | 'transOrigDiffSourceField' => 'l10n_diffsource', |
| 30 | 30 | 'delete' => 'deleted', |
| 31 | - 'enablecolumns' => array( |
|
| 31 | + 'enablecolumns' => array ( |
|
| 32 | 32 | 'disabled' => 'hidden', |
| 33 | 33 | 'starttime' => 'starttime', |
| 34 | 34 | 'endtime' => 'endtime', |
@@ -36,97 +36,97 @@ discard block |
||
| 36 | 36 | 'searchFields' => 'title', |
| 37 | 37 | 'iconfile' => 'EXT:dpf/Resources/Public/Icons/tx_dpf_domain_model_editinglock.gif', |
| 38 | 38 | ), |
| 39 | - 'interface' => array( |
|
| 39 | + 'interface' => array ( |
|
| 40 | 40 | 'showRecordFieldList' => 'name, query', |
| 41 | 41 | ), |
| 42 | - 'types' => array( |
|
| 43 | - '1' => array('showitem' => ',--palette--;;1, |
|
| 42 | + 'types' => array ( |
|
| 43 | + '1' => array ('showitem' => ',--palette--;;1, |
|
| 44 | 44 | name, query, |
| 45 | 45 | --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.access'), |
| 46 | 46 | ), |
| 47 | - 'palettes' => array( |
|
| 48 | - '1' => array('showitem' => ''), |
|
| 47 | + 'palettes' => array ( |
|
| 48 | + '1' => array ('showitem' => ''), |
|
| 49 | 49 | ), |
| 50 | - 'columns' => array( |
|
| 50 | + 'columns' => array ( |
|
| 51 | 51 | |
| 52 | - 'sys_language_uid' => array( |
|
| 52 | + 'sys_language_uid' => array ( |
|
| 53 | 53 | 'exclude' => 1, |
| 54 | 54 | 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.language', |
| 55 | - 'config' => array( |
|
| 55 | + 'config' => array ( |
|
| 56 | 56 | 'type' => 'select', |
| 57 | 57 | 'renderType' => 'selectSingle', |
| 58 | 58 | 'foreign_table' => 'sys_language', |
| 59 | 59 | 'foreign_table_where' => 'ORDER BY sys_language.title', |
| 60 | - 'items' => array( |
|
| 61 | - array('LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', -1), |
|
| 62 | - array('LLL:EXT:lang/locallang_general.xlf:LGL.default_value', 0), |
|
| 60 | + 'items' => array ( |
|
| 61 | + array ('LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', -1), |
|
| 62 | + array ('LLL:EXT:lang/locallang_general.xlf:LGL.default_value', 0), |
|
| 63 | 63 | ), |
| 64 | 64 | ), |
| 65 | 65 | ), |
| 66 | - 'l10n_parent' => array( |
|
| 66 | + 'l10n_parent' => array ( |
|
| 67 | 67 | 'displayCond' => 'FIELD:sys_language_uid:>:0', |
| 68 | 68 | 'exclude' => 1, |
| 69 | 69 | 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent', |
| 70 | - 'config' => array( |
|
| 70 | + 'config' => array ( |
|
| 71 | 71 | 'type' => 'select', |
| 72 | 72 | 'renderType' => 'selectSingle', |
| 73 | - 'items' => array( |
|
| 74 | - array('', 0), |
|
| 73 | + 'items' => array ( |
|
| 74 | + array ('', 0), |
|
| 75 | 75 | ), |
| 76 | 76 | 'foreign_table' => 'tx_dpf_domain_model_storedsearch', |
| 77 | 77 | 'foreign_table_where' => 'AND tx_dpf_domain_model_storedsearch.pid=###CURRENT_PID### AND tx_dpf_domain_model_storedsearch.sys_language_uid IN (-1,0)', |
| 78 | 78 | ), |
| 79 | 79 | ), |
| 80 | - 'l10n_diffsource' => array( |
|
| 81 | - 'config' => array( |
|
| 80 | + 'l10n_diffsource' => array ( |
|
| 81 | + 'config' => array ( |
|
| 82 | 82 | 'type' => 'passthrough', |
| 83 | 83 | ), |
| 84 | 84 | ), |
| 85 | 85 | |
| 86 | - 't3ver_label' => array( |
|
| 86 | + 't3ver_label' => array ( |
|
| 87 | 87 | 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.versionLabel', |
| 88 | - 'config' => array( |
|
| 88 | + 'config' => array ( |
|
| 89 | 89 | 'type' => 'input', |
| 90 | 90 | 'size' => 30, |
| 91 | 91 | 'max' => 255, |
| 92 | 92 | ), |
| 93 | 93 | ), |
| 94 | 94 | |
| 95 | - 'hidden' => array( |
|
| 95 | + 'hidden' => array ( |
|
| 96 | 96 | 'exclude' => 1, |
| 97 | 97 | 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.hidden', |
| 98 | - 'config' => array( |
|
| 98 | + 'config' => array ( |
|
| 99 | 99 | 'type' => 'check', |
| 100 | 100 | ), |
| 101 | 101 | ), |
| 102 | - 'starttime' => array( |
|
| 102 | + 'starttime' => array ( |
|
| 103 | 103 | 'exclude' => 1, |
| 104 | 104 | 'l10n_mode' => 'mergeIfNotBlank', |
| 105 | 105 | 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.starttime', |
| 106 | - 'config' => array( |
|
| 106 | + 'config' => array ( |
|
| 107 | 107 | 'type' => 'input', |
| 108 | 108 | 'renderType' => 'inputDateTime', |
| 109 | 109 | 'size' => 13, |
| 110 | 110 | 'eval' => 'datetime', |
| 111 | 111 | 'checkbox' => 0, |
| 112 | 112 | 'default' => 0, |
| 113 | - 'range' => array( |
|
| 113 | + 'range' => array ( |
|
| 114 | 114 | 'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y')), |
| 115 | 115 | ), |
| 116 | 116 | ), |
| 117 | 117 | ), |
| 118 | - 'endtime' => array( |
|
| 118 | + 'endtime' => array ( |
|
| 119 | 119 | 'exclude' => 1, |
| 120 | 120 | 'l10n_mode' => 'mergeIfNotBlank', |
| 121 | 121 | 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.endtime', |
| 122 | - 'config' => array( |
|
| 122 | + 'config' => array ( |
|
| 123 | 123 | 'type' => 'input', |
| 124 | 124 | 'renderType' => 'inputDateTime', |
| 125 | 125 | 'size' => 13, |
| 126 | 126 | 'eval' => 'datetime', |
| 127 | 127 | 'checkbox' => 0, |
| 128 | 128 | 'default' => 0, |
| 129 | - 'range' => array( |
|
| 129 | + 'range' => array ( |
|
| 130 | 130 | 'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y')), |
| 131 | 131 | ), |
| 132 | 132 | ), |
@@ -138,20 +138,20 @@ discard block |
||
| 138 | 138 | ], |
| 139 | 139 | ], |
| 140 | 140 | |
| 141 | - 'name' => array( |
|
| 141 | + 'name' => array ( |
|
| 142 | 142 | 'exclude' => 1, |
| 143 | 143 | 'label' => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_storedsearch.name', |
| 144 | - 'config' => array( |
|
| 144 | + 'config' => array ( |
|
| 145 | 145 | 'type' => 'input', |
| 146 | 146 | 'size' => 30, |
| 147 | 147 | 'eval' => 'trim', |
| 148 | 148 | ), |
| 149 | 149 | ), |
| 150 | 150 | |
| 151 | - 'query' => array( |
|
| 151 | + 'query' => array ( |
|
| 152 | 152 | 'exclude' => 1, |
| 153 | 153 | 'label' => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_storedsearch.query', |
| 154 | - 'config' => array( |
|
| 154 | + 'config' => array ( |
|
| 155 | 155 | 'type' => 'text', |
| 156 | 156 | 'cols' => 40, |
| 157 | 157 | 'rows' => 15, |
@@ -324,7 +324,7 @@ discard block |
||
| 324 | 324 | public function setObjectIdentifier($objectIdentifier) |
| 325 | 325 | { |
| 326 | 326 | // Due to uniqe key uc_object_identifier, which should ignore empty object identifiers. |
| 327 | - $this->objectIdentifier = empty($objectIdentifier)? null : $objectIdentifier; |
|
| 327 | + $this->objectIdentifier = empty($objectIdentifier) ? null : $objectIdentifier; |
|
| 328 | 328 | } |
| 329 | 329 | |
| 330 | 330 | /** |
@@ -506,14 +506,14 @@ discard block |
||
| 506 | 506 | |
| 507 | 507 | $fileId = new \EWW\Dpf\Services\Transfer\FileId($this); |
| 508 | 508 | |
| 509 | - $files = array(); |
|
| 509 | + $files = array (); |
|
| 510 | 510 | |
| 511 | 511 | if (is_a($this->getFile(), '\TYPO3\CMS\Extbase\Persistence\ObjectStorage')) { |
| 512 | 512 | foreach ($this->getFile() as $file) { |
| 513 | 513 | |
| 514 | 514 | if (!$file->isFileGroupDeleted()) { |
| 515 | 515 | |
| 516 | - $tmpFile = array( |
|
| 516 | + $tmpFile = array ( |
|
| 517 | 517 | 'path' => $file->getLink(), |
| 518 | 518 | 'type' => $file->getContentType(), |
| 519 | 519 | 'title' => (($file->getLabel()) ? $file->getLabel() : $file->getTitle()), |
@@ -557,12 +557,12 @@ discard block |
||
| 557 | 557 | |
| 558 | 558 | $fileId = new \EWW\Dpf\Services\Transfer\FileId($this); |
| 559 | 559 | |
| 560 | - $files = array(); |
|
| 560 | + $files = array (); |
|
| 561 | 561 | |
| 562 | 562 | if (is_a($this->getFile(), '\TYPO3\CMS\Extbase\Persistence\ObjectStorage')) { |
| 563 | 563 | foreach ($this->getFile() as $file) { |
| 564 | 564 | |
| 565 | - $tmpFile = array( |
|
| 565 | + $tmpFile = array ( |
|
| 566 | 566 | 'path' => $file->getLink(), |
| 567 | 567 | 'type' => $file->getContentType(), |
| 568 | 568 | 'title' => (($file->getLabel()) ? $file->getLabel() : $file->getTitle()), |
@@ -715,7 +715,7 @@ discard block |
||
| 715 | 715 | */ |
| 716 | 716 | public function getCreator() |
| 717 | 717 | { |
| 718 | - return $this->creator? $this->creator : 0; |
|
| 718 | + return $this->creator ? $this->creator : 0; |
|
| 719 | 719 | } |
| 720 | 720 | |
| 721 | 721 | /** |
@@ -861,7 +861,7 @@ discard block |
||
| 861 | 861 | |
| 862 | 862 | foreach ($availableProperties as $propertyName) { |
| 863 | 863 | if (\TYPO3\CMS\Extbase\Reflection\ObjectAccess::isPropertySettable($newDocument, $propertyName) |
| 864 | - && !in_array($propertyName, array('uid','pid', 'file', 'comment', 'linkedUid', 'suggestion', 'creator'))) { |
|
| 864 | + && !in_array($propertyName, array ('uid', 'pid', 'file', 'comment', 'linkedUid', 'suggestion', 'creator'))) { |
|
| 865 | 865 | |
| 866 | 866 | $propertyValue = \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getProperty($documentToCopy, $propertyName); |
| 867 | 867 | \TYPO3\CMS\Extbase\Reflection\ObjectAccess::setProperty($newDocument, $propertyName, $propertyValue); |
@@ -883,7 +883,7 @@ discard block |
||
| 883 | 883 | */ |
| 884 | 884 | public function getDocumentIdentifier() |
| 885 | 885 | { |
| 886 | - return $this->getObjectIdentifier()? $this->getObjectIdentifier() : $this->getUid(); |
|
| 886 | + return $this->getObjectIdentifier() ? $this->getObjectIdentifier() : $this->getUid(); |
|
| 887 | 887 | } |
| 888 | 888 | |
| 889 | 889 | /** |
@@ -916,8 +916,8 @@ discard block |
||
| 916 | 916 | public function getPublicationYear() |
| 917 | 917 | { |
| 918 | 918 | $mods = new Mods($this->getXmlData()); |
| 919 | - $year = $mods->getPublishingYear(); |
|
| 920 | - return $year? $year : ""; |
|
| 919 | + $year = $mods->getPublishingYear(); |
|
| 920 | + return $year ? $year : ""; |
|
| 921 | 921 | } |
| 922 | 922 | |
| 923 | 923 | /** |
@@ -929,7 +929,7 @@ discard block |
||
| 929 | 929 | { |
| 930 | 930 | $mods = new Mods($this->getXmlData()); |
| 931 | 931 | $title = $mods->getTitle(); |
| 932 | - return $title? $title : ""; |
|
| 932 | + return $title ? $title : ""; |
|
| 933 | 933 | } |
| 934 | 934 | |
| 935 | 935 | |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | $query = [ |
| 136 | 136 | 'bool' => [ |
| 137 | 137 | 'must' => [ |
| 138 | - 'match_all' => (object)[] |
|
| 138 | + 'match_all' => (object) [] |
|
| 139 | 139 | ], |
| 140 | 140 | 'filter' => $queryFilter |
| 141 | 141 | ] |
@@ -177,11 +177,11 @@ discard block |
||
| 177 | 177 | 'script' => [ |
| 178 | 178 | 'lang' => 'painless', |
| 179 | 179 | 'source' => |
| 180 | - "for (int i = 0; i < doc['collections'].length; ++i) {". |
|
| 181 | - " if(doc['collections'][i] =='".$this->getSettings()['universityCollection']."') {". |
|
| 182 | - " return 'true';". |
|
| 183 | - " }". |
|
| 184 | - "}". |
|
| 180 | + "for (int i = 0; i < doc['collections'].length; ++i) {" . |
|
| 181 | + " if(doc['collections'][i] =='" . $this->getSettings()['universityCollection'] . "') {" . |
|
| 182 | + " return 'true';" . |
|
| 183 | + " }" . |
|
| 184 | + "}" . |
|
| 185 | 185 | "return 'false';" |
| 186 | 186 | ] |
| 187 | 187 | ] |
@@ -196,23 +196,23 @@ discard block |
||
| 196 | 196 | 'script' => [ |
| 197 | 197 | 'lang' => 'painless', |
| 198 | 198 | 'source' => |
| 199 | - "if (". |
|
| 200 | - " doc['creator'].size() > 0 &&". |
|
| 201 | - " doc['creator'].value == '".$this->security->getUser()->getUid()."') {". |
|
| 202 | - " return 'self';". |
|
| 203 | - "}". |
|
| 204 | - "if (". |
|
| 205 | - " doc['creatorRole'].size() > 0 &&". |
|
| 206 | - " doc['creatorRole'].value == '".Security::ROLE_LIBRARIAN."'". |
|
| 207 | - ") {". |
|
| 208 | - " return 'librarian';". |
|
| 209 | - "}". |
|
| 210 | - "if (". |
|
| 211 | - " doc['creatorRole'].size() > 0 &&". |
|
| 212 | - " doc['creatorRole'].value == '".Security::ROLE_RESEARCHER."'". |
|
| 213 | - ") {". |
|
| 214 | - " return 'user';". |
|
| 215 | - "}". |
|
| 199 | + "if (" . |
|
| 200 | + " doc['creator'].size() > 0 &&" . |
|
| 201 | + " doc['creator'].value == '" . $this->security->getUser()->getUid() . "') {" . |
|
| 202 | + " return 'self';" . |
|
| 203 | + "}" . |
|
| 204 | + "if (" . |
|
| 205 | + " doc['creatorRole'].size() > 0 &&" . |
|
| 206 | + " doc['creatorRole'].value == '" . Security::ROLE_LIBRARIAN . "'" . |
|
| 207 | + ") {" . |
|
| 208 | + " return 'librarian';" . |
|
| 209 | + "}" . |
|
| 210 | + "if (" . |
|
| 211 | + " doc['creatorRole'].size() > 0 &&" . |
|
| 212 | + " doc['creatorRole'].value == '" . Security::ROLE_RESEARCHER . "'" . |
|
| 213 | + ") {" . |
|
| 214 | + " return 'user';" . |
|
| 215 | + "}" . |
|
| 216 | 216 | "return 'unknown';" |
| 217 | 217 | ] |
| 218 | 218 | ] |
@@ -414,8 +414,8 @@ discard block |
||
| 414 | 414 | */ |
| 415 | 415 | protected function buildSortQueryPart($sortField, $sortOrder) { |
| 416 | 416 | |
| 417 | - $sortField = ($sortField)? $sortField : 'title'; |
|
| 418 | - $sortOrder = ($sortOrder)? $sortOrder : 'asc'; |
|
| 417 | + $sortField = ($sortField) ? $sortField : 'title'; |
|
| 418 | + $sortOrder = ($sortOrder) ? $sortOrder : 'asc'; |
|
| 419 | 419 | |
| 420 | 420 | // Build the sorting part. |
| 421 | 421 | $script = ""; |
@@ -445,7 +445,7 @@ discard block |
||
| 445 | 445 | ]; |
| 446 | 446 | } else { |
| 447 | 447 | if ($sortField == 'title') { |
| 448 | - $sortField.= ".keyword"; |
|
| 448 | + $sortField .= ".keyword"; |
|
| 449 | 449 | } |
| 450 | 450 | |
| 451 | 451 | $sort = [ |
@@ -462,7 +462,7 @@ discard block |
||
| 462 | 462 | protected function getSortScriptUniversityCollection($collection) |
| 463 | 463 | { |
| 464 | 464 | $script = "for (int i = 0; i < doc['collections'].length; ++i) {"; |
| 465 | - $script .= " if (doc['collections'][i] == '".$collection."') {"; |
|
| 465 | + $script .= " if (doc['collections'][i] == '" . $collection . "') {"; |
|
| 466 | 466 | $script .= " return '1';"; |
| 467 | 467 | $script .= " }"; |
| 468 | 468 | $script .= "}"; |
@@ -483,13 +483,13 @@ discard block |
||
| 483 | 483 | |
| 484 | 484 | protected function getSortScriptCreatorRole($feUserUid) |
| 485 | 485 | { |
| 486 | - $script = "if (doc['creator'].value == '".$feUserUid."') {"; |
|
| 486 | + $script = "if (doc['creator'].value == '" . $feUserUid . "') {"; |
|
| 487 | 487 | $script .= " return '1';"; |
| 488 | 488 | $script .= "}"; |
| 489 | - $script .= "if (doc['creatorRole'].value == '".Security::ROLE_LIBRARIAN."') {"; |
|
| 489 | + $script .= "if (doc['creatorRole'].value == '" . Security::ROLE_LIBRARIAN . "') {"; |
|
| 490 | 490 | $script .= "return '2';"; |
| 491 | 491 | $script .= "}"; |
| 492 | - $script .= "if (doc['creatorRole'].value == '".Security::ROLE_RESEARCHER."') {"; |
|
| 492 | + $script .= "if (doc['creatorRole'].value == '" . Security::ROLE_RESEARCHER . "') {"; |
|
| 493 | 493 | $script .= " return '3';"; |
| 494 | 494 | $script .= "}"; |
| 495 | 495 | $script .= "return '4';"; |
@@ -504,15 +504,15 @@ discard block |
||
| 504 | 504 | foreach (DocumentWorkflow::PLACES as $state) { |
| 505 | 505 | if (array_key_exists($state, DocumentWorkflow::STATE_TO_ALIASSTATE_MAPPING)) { |
| 506 | 506 | $aliasState = DocumentWorkflow::STATE_TO_ALIASSTATE_MAPPING[$state]; |
| 507 | - $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:manager.documentList.state.'.$aliasState; |
|
| 507 | + $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:manager.documentList.state.' . $aliasState; |
|
| 508 | 508 | $stateName = LocalizationUtility::translate($key, 'dpf'); |
| 509 | - $sortStates[] = "if (doc['state'].value == '".$state."') return '".$stateName."';"; |
|
| 509 | + $sortStates[] = "if (doc['state'].value == '" . $state . "') return '" . $stateName . "';"; |
|
| 510 | 510 | } |
| 511 | 511 | } |
| 512 | 512 | |
| 513 | 513 | $sortStates = implode(" ", $sortStates); |
| 514 | 514 | |
| 515 | - return $sortStates." return '';"; |
|
| 515 | + return $sortStates . " return '';"; |
|
| 516 | 516 | } |
| 517 | 517 | |
| 518 | 518 | |
@@ -521,14 +521,14 @@ discard block |
||
| 521 | 521 | $sortDoctypes = []; |
| 522 | 522 | foreach ($this->documentTypeRepository->findAll() as $documentType) { |
| 523 | 523 | if ($documentType->getName() && $documentType->getDisplayname()) { |
| 524 | - $sortDoctypes[] = "if (doc['doctype'].value == '".$documentType->getName()."')" |
|
| 525 | - ." return '".$documentType->getDisplayname()."';"; |
|
| 524 | + $sortDoctypes[] = "if (doc['doctype'].value == '" . $documentType->getName() . "')" |
|
| 525 | + ." return '" . $documentType->getDisplayname() . "';"; |
|
| 526 | 526 | } |
| 527 | 527 | } |
| 528 | 528 | |
| 529 | 529 | $sortDoctypes = implode(" ", $sortDoctypes); |
| 530 | 530 | |
| 531 | - return $sortDoctypes." return '';"; |
|
| 531 | + return $sortDoctypes . " return '';"; |
|
| 532 | 532 | } |
| 533 | 533 | |
| 534 | 534 | } |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | list($redirectAction, $redirectController) = $this->session->getStoredAction(); |
| 156 | 156 | $this->redirect( |
| 157 | 157 | $redirectAction, $redirectController, null, |
| 158 | - array('message' => [], 'checkedDocumentIdentifiers' => []) |
|
| 158 | + array ('message' => [], 'checkedDocumentIdentifiers' => []) |
|
| 159 | 159 | ); |
| 160 | 160 | } |
| 161 | 161 | |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | $currentPage = 1; |
| 213 | 213 | } |
| 214 | 214 | |
| 215 | - $this->list((empty($currentPage)? 0 : ($currentPage-1) * $this->itemsPerPage())); |
|
| 215 | + $this->list((empty($currentPage) ? 0 : ($currentPage - 1) * $this->itemsPerPage())); |
|
| 216 | 216 | |
| 217 | 217 | $this->view->assign('currentPage', $currentPage); |
| 218 | 218 | $this->view->assign('workspaceListAction', $this->getCurrentAction()); |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | $successful = []; |
| 242 | 242 | $checkedDocumentIdentifiers = []; |
| 243 | 243 | |
| 244 | - if (array_key_exists('documentIdentifiers', $listData) && is_array($listData['documentIdentifiers']) ) { |
|
| 244 | + if (array_key_exists('documentIdentifiers', $listData) && is_array($listData['documentIdentifiers'])) { |
|
| 245 | 245 | $checkedDocumentIdentifiers = $listData['documentIdentifiers']; |
| 246 | 246 | foreach ($listData['documentIdentifiers'] as $documentIdentifier) { |
| 247 | 247 | |
@@ -311,7 +311,7 @@ discard block |
||
| 311 | 311 | list($redirectAction, $redirectController) = $this->session->getStoredAction(); |
| 312 | 312 | $this->redirect( |
| 313 | 313 | $redirectAction, $redirectController, null, |
| 314 | - array('message' => $message, 'checkedDocumentIdentifiers' => $checkedDocumentIdentifiers)); |
|
| 314 | + array ('message' => $message, 'checkedDocumentIdentifiers' => $checkedDocumentIdentifiers)); |
|
| 315 | 315 | } |
| 316 | 316 | |
| 317 | 317 | /** |
@@ -323,7 +323,7 @@ discard block |
||
| 323 | 323 | $successful = []; |
| 324 | 324 | $checkedDocumentIdentifiers = []; |
| 325 | 325 | |
| 326 | - if (array_key_exists('documentIdentifiers', $listData) && is_array($listData['documentIdentifiers']) ) { |
|
| 326 | + if (array_key_exists('documentIdentifiers', $listData) && is_array($listData['documentIdentifiers'])) { |
|
| 327 | 327 | $checkedDocumentIdentifiers = $listData['documentIdentifiers']; |
| 328 | 328 | foreach ($listData['documentIdentifiers'] as $documentIdentifier) { |
| 329 | 329 | $feUserUid = $this->security->getUser()->getUid(); |
@@ -360,7 +360,7 @@ discard block |
||
| 360 | 360 | list($redirectAction, $redirectController) = $this->session->getStoredAction(); |
| 361 | 361 | $this->redirect( |
| 362 | 362 | $redirectAction, $redirectController, null, |
| 363 | - array('message' => $message, 'checkedDocumentIdentifiers' => $checkedDocumentIdentifiers)); |
|
| 363 | + array ('message' => $message, 'checkedDocumentIdentifiers' => $checkedDocumentIdentifiers)); |
|
| 364 | 364 | } |
| 365 | 365 | |
| 366 | 366 | |
@@ -395,7 +395,7 @@ discard block |
||
| 395 | 395 | $successful = []; |
| 396 | 396 | $checkedDocumentIdentifiers = []; |
| 397 | 397 | |
| 398 | - if (array_key_exists('documentIdentifiers', $listData) && is_array($listData['documentIdentifiers']) ) { |
|
| 398 | + if (array_key_exists('documentIdentifiers', $listData) && is_array($listData['documentIdentifiers'])) { |
|
| 399 | 399 | $checkedDocumentIdentifiers = $listData['documentIdentifiers']; |
| 400 | 400 | foreach ($listData['documentIdentifiers'] as $documentIdentifier) { |
| 401 | 401 | |
@@ -463,15 +463,15 @@ discard block |
||
| 463 | 463 | (sizeof($successful) > 0 ? AbstractMessage::OK : AbstractMessage::WARNING) |
| 464 | 464 | ); |
| 465 | 465 | |
| 466 | - if (sizeof($successful) === 1 ) { |
|
| 466 | + if (sizeof($successful) === 1) { |
|
| 467 | 467 | $this->addFlashMessage( |
| 468 | - "1 ".LocalizationUtility::translate("manager.workspace.bookmarkRemoved.singular", "dpf"), |
|
| 468 | + "1 " . LocalizationUtility::translate("manager.workspace.bookmarkRemoved.singular", "dpf"), |
|
| 469 | 469 | '', |
| 470 | 470 | AbstractMessage::INFO |
| 471 | 471 | ); |
| 472 | 472 | } |
| 473 | 473 | |
| 474 | - if (sizeof($successful) > 1 ) { |
|
| 474 | + if (sizeof($successful) > 1) { |
|
| 475 | 475 | $this->addFlashMessage( |
| 476 | 476 | LocalizationUtility::translate( |
| 477 | 477 | "manager.workspace.bookmarkRemoved.plural", "dpf", [sizeof($successful)] |
@@ -491,7 +491,7 @@ discard block |
||
| 491 | 491 | list($redirectAction, $redirectController) = $this->session->getStoredAction(); |
| 492 | 492 | $this->redirect( |
| 493 | 493 | $redirectAction, $redirectController, null, |
| 494 | - array('message' => $message, 'checkedDocumentIdentifiers' => $checkedDocumentIdentifiers)); |
|
| 494 | + array ('message' => $message, 'checkedDocumentIdentifiers' => $checkedDocumentIdentifiers)); |
|
| 495 | 495 | |
| 496 | 496 | } |
| 497 | 497 | |
@@ -670,13 +670,13 @@ discard block |
||
| 670 | 670 | $message = LocalizationUtility::translate( |
| 671 | 671 | 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_edit.accessDenied', |
| 672 | 672 | 'dpf', |
| 673 | - array($document->getTitle()) |
|
| 673 | + array ($document->getTitle()) |
|
| 674 | 674 | ); |
| 675 | 675 | } else { |
| 676 | 676 | $message = LocalizationUtility::translate( |
| 677 | 677 | 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_edit.failureBlocked', |
| 678 | 678 | 'dpf', |
| 679 | - array($document->getTitle()) |
|
| 679 | + array ($document->getTitle()) |
|
| 680 | 680 | ); |
| 681 | 681 | } |
| 682 | 682 | } |
@@ -694,7 +694,7 @@ discard block |
||
| 694 | 694 | if ($redirectUri) { |
| 695 | 695 | $this->redirectToUri($redirectUri); |
| 696 | 696 | } else { |
| 697 | - $this->redirect($action, $controller, null, array('message' => $message)); |
|
| 697 | + $this->redirect($action, $controller, null, array ('message' => $message)); |
|
| 698 | 698 | } |
| 699 | 699 | |
| 700 | 700 | } |
@@ -711,8 +711,8 @@ discard block |
||
| 711 | 711 | $workspaceData = $this->session->getWorkspaceData(); |
| 712 | 712 | $itemsPerPage = $workspaceData->getItemsPerPage(); |
| 713 | 713 | |
| 714 | - $default = ($this->settings['workspaceItemsPerPage'])? $this->settings['workspaceItemsPerPage'] : 10; |
|
| 715 | - return ($itemsPerPage)? $itemsPerPage : $default; |
|
| 714 | + $default = ($this->settings['workspaceItemsPerPage']) ? $this->settings['workspaceItemsPerPage'] : 10; |
|
| 715 | + return ($itemsPerPage) ? $itemsPerPage : $default; |
|
| 716 | 716 | } |
| 717 | 717 | |
| 718 | 718 | } |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | } |
| 195 | 195 | |
| 196 | 196 | $this->list( |
| 197 | - (empty($currentPage)? 0 : ($currentPage-1) * $this->itemsPerPage()), |
|
| 197 | + (empty($currentPage) ? 0 : ($currentPage - 1) * $this->itemsPerPage()), |
|
| 198 | 198 | $this->escapeQuery(trim($simpleSearch)) |
| 199 | 199 | ); |
| 200 | 200 | |
@@ -219,7 +219,7 @@ discard block |
||
| 219 | 219 | * @return array |
| 220 | 220 | */ |
| 221 | 221 | protected function getSearchQuery( |
| 222 | - $from = 0, $bookmarkIdentifiers = [], $filters= [], $excludeFilters = [], |
|
| 222 | + $from = 0, $bookmarkIdentifiers = [], $filters = [], $excludeFilters = [], |
|
| 223 | 223 | $sortField = null, $sortOrder = null, $queryString = null |
| 224 | 224 | ) |
| 225 | 225 | { |
@@ -280,12 +280,12 @@ discard block |
||
| 280 | 280 | $successful = []; |
| 281 | 281 | $checkedDocumentIdentifiers = []; |
| 282 | 282 | |
| 283 | - if (array_key_exists('documentIdentifiers', $listData) && is_array($listData['documentIdentifiers']) ) { |
|
| 283 | + if (array_key_exists('documentIdentifiers', $listData) && is_array($listData['documentIdentifiers'])) { |
|
| 284 | 284 | $checkedDocumentIdentifiers = $listData['documentIdentifiers']; |
| 285 | 285 | |
| 286 | 286 | foreach ($listData['documentIdentifiers'] as $documentIdentifier) { |
| 287 | 287 | |
| 288 | - if ( $listData['documentAliasState'][$documentIdentifier] != DocumentWorkflow::ALIAS_STATE_NEW) { |
|
| 288 | + if ($listData['documentAliasState'][$documentIdentifier] != DocumentWorkflow::ALIAS_STATE_NEW) { |
|
| 289 | 289 | if ( |
| 290 | 290 | $this->bookmarkRepository->addBookmark( |
| 291 | 291 | $documentIdentifier, |
@@ -323,7 +323,7 @@ discard block |
||
| 323 | 323 | list($redirectAction, $redirectController) = $this->session->getStoredAction(); |
| 324 | 324 | $this->redirect( |
| 325 | 325 | $redirectAction, $redirectController, null, |
| 326 | - array('message' => $message, 'checkedDocumentIdentifiers' => $checkedDocumentIdentifiers)); |
|
| 326 | + array ('message' => $message, 'checkedDocumentIdentifiers' => $checkedDocumentIdentifiers)); |
|
| 327 | 327 | } |
| 328 | 328 | |
| 329 | 329 | /** |
@@ -363,22 +363,22 @@ discard block |
||
| 363 | 363 | $this->view->assign('documentTypes', $docTypes); |
| 364 | 364 | |
| 365 | 365 | $states[DocumentWorkflow::ALIAS_STATE_NEW] = LocalizationUtility::translate( |
| 366 | - "manager.documentList.state.".DocumentWorkflow::ALIAS_STATE_NEW, 'dpf' |
|
| 366 | + "manager.documentList.state." . DocumentWorkflow::ALIAS_STATE_NEW, 'dpf' |
|
| 367 | 367 | ); |
| 368 | 368 | $states[DocumentWorkflow::ALIAS_STATE_REGISTERED] = LocalizationUtility::translate( |
| 369 | - "manager.documentList.state.".DocumentWorkflow::ALIAS_STATE_REGISTERED, 'dpf' |
|
| 369 | + "manager.documentList.state." . DocumentWorkflow::ALIAS_STATE_REGISTERED, 'dpf' |
|
| 370 | 370 | ); |
| 371 | 371 | $states[DocumentWorkflow::ALIAS_STATE_IN_PROGRESS] = LocalizationUtility::translate( |
| 372 | - "manager.documentList.state.".DocumentWorkflow::ALIAS_STATE_IN_PROGRESS, 'dpf' |
|
| 372 | + "manager.documentList.state." . DocumentWorkflow::ALIAS_STATE_IN_PROGRESS, 'dpf' |
|
| 373 | 373 | ); |
| 374 | 374 | $states[DocumentWorkflow::ALIAS_STATE_RELEASED] = LocalizationUtility::translate( |
| 375 | - "manager.documentList.state.".DocumentWorkflow::ALIAS_STATE_RELEASED, 'dpf' |
|
| 375 | + "manager.documentList.state." . DocumentWorkflow::ALIAS_STATE_RELEASED, 'dpf' |
|
| 376 | 376 | ); |
| 377 | 377 | $states[DocumentWorkflow::ALIAS_STATE_POSTPONED] = LocalizationUtility::translate( |
| 378 | - "manager.documentList.state.".DocumentWorkflow::ALIAS_STATE_POSTPONED, 'dpf' |
|
| 378 | + "manager.documentList.state." . DocumentWorkflow::ALIAS_STATE_POSTPONED, 'dpf' |
|
| 379 | 379 | ); |
| 380 | 380 | $states[DocumentWorkflow::ALIAS_STATE_DISCARDED] = LocalizationUtility::translate( |
| 381 | - "manager.documentList.state.".DocumentWorkflow::ALIAS_STATE_DISCARDED, 'dpf' |
|
| 381 | + "manager.documentList.state." . DocumentWorkflow::ALIAS_STATE_DISCARDED, 'dpf' |
|
| 382 | 382 | ); |
| 383 | 383 | |
| 384 | 384 | $this->view->assign('states', $states); |
@@ -397,7 +397,7 @@ discard block |
||
| 397 | 397 | $currentPage = 1; |
| 398 | 398 | } |
| 399 | 399 | |
| 400 | - $this->list((empty($currentPage)? 0 : ($currentPage-1) * $this->itemsPerPage()), $simpleSearch); |
|
| 400 | + $this->list((empty($currentPage) ? 0 : ($currentPage - 1) * $this->itemsPerPage()), $simpleSearch); |
|
| 401 | 401 | |
| 402 | 402 | $this->view->assign('simpleSearch', $simpleSearch); |
| 403 | 403 | $this->view->assign('currentPage', $currentPage); |
@@ -437,7 +437,7 @@ discard block |
||
| 437 | 437 | |
| 438 | 438 | } |
| 439 | 439 | |
| 440 | - $this->forward("list", null, null, array('results' => $results)); |
|
| 440 | + $this->forward("list", null, null, array ('results' => $results)); |
|
| 441 | 441 | } |
| 442 | 442 | |
| 443 | 443 | |
@@ -480,7 +480,7 @@ discard block |
||
| 480 | 480 | |
| 481 | 481 | $results = $elasticSearch->search($query, ''); |
| 482 | 482 | |
| 483 | - $searchList = array(); |
|
| 483 | + $searchList = array (); |
|
| 484 | 484 | |
| 485 | 485 | // filter out identical document from the search result list |
| 486 | 486 | foreach ($results['hits'] as $entry) { |
@@ -536,7 +536,7 @@ discard block |
||
| 536 | 536 | $client = $this->clientRepository->findAll()->current(); |
| 537 | 537 | |
| 538 | 538 | // get the latest documents /CREATED_DATE |
| 539 | - $query['body']['sort'] = array('CREATED_DATE' => array('order' => 'desc')); |
|
| 539 | + $query['body']['sort'] = array ('CREATED_DATE' => array ('order' => 'desc')); |
|
| 540 | 540 | |
| 541 | 541 | // add owner id |
| 542 | 542 | $query['body']['query']['bool']['must']['term']['OWNER_ID'] = $client->getOwnerId(); // qucosa |
@@ -564,8 +564,8 @@ discard block |
||
| 564 | 564 | $workspaceData = $this->session->getWorkspaceData(); |
| 565 | 565 | $itemsPerPage = $workspaceData->getItemsPerPage(); |
| 566 | 566 | |
| 567 | - $default = ($this->settings['workspaceItemsPerPage'])? $this->settings['workspaceItemsPerPage'] : 10; |
|
| 568 | - return ($itemsPerPage)? $itemsPerPage : $default; |
|
| 567 | + $default = ($this->settings['workspaceItemsPerPage']) ? $this->settings['workspaceItemsPerPage'] : 10; |
|
| 568 | + return ($itemsPerPage) ? $itemsPerPage : $default; |
|
| 569 | 569 | } |
| 570 | 570 | |
| 571 | 571 | |
@@ -579,7 +579,7 @@ discard block |
||
| 579 | 579 | $luceneReservedCharacters = preg_quote('+-&|!(){}[]^~?:\\'); |
| 580 | 580 | $string = preg_replace_callback( |
| 581 | 581 | '/([' . $luceneReservedCharacters . '])/', |
| 582 | - function ($matches) { |
|
| 582 | + function($matches) { |
|
| 583 | 583 | return '\\' . $matches[0]; |
| 584 | 584 | }, |
| 585 | 585 | $string |