@@ -169,20 +169,20 @@ |
||
| 169 | 169 | |
| 170 | 170 | // Register tools for toolbox plugin. |
| 171 | 171 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'] = []; |
| 172 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_fulltexttool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.fulltexttool'; |
|
| 173 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_annotationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.annotationtool'; |
|
| 174 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_imagedownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.imagedownloadtool'; |
|
| 175 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_imagemanipulationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.imagemanipulationtool'; |
|
| 176 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_pdfdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.pdfdownloadtool'; |
|
| 177 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_searchindocumenttool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.searchindocumenttool'; |
|
| 172 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_fulltexttool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.fulltexttool'; |
|
| 173 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_annotationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.annotationtool'; |
|
| 174 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_imagedownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.imagedownloadtool'; |
|
| 175 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_imagemanipulationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.imagemanipulationtool'; |
|
| 176 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_pdfdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.pdfdownloadtool'; |
|
| 177 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_searchindocumenttool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.searchindocumenttool'; |
|
| 178 | 178 | // Register hooks. |
| 179 | 179 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = \Kitodo\Dlf\Hooks\DataHandler::class; |
| 180 | 180 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'][] = \Kitodo\Dlf\Hooks\DataHandler::class; |
| 181 | 181 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Common/MetsDocument.php']['hookClass'][] = \Kitodo\Dlf\Hooks\KitodoProductionHacks::class; |
| 182 | 182 | // Register AJAX eID handlers. |
| 183 | -$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_suggest'] = \Kitodo\Dlf\Plugin\Eid\SearchSuggest::class . '::main'; |
|
| 184 | -$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_in_document'] = \Kitodo\Dlf\Plugin\Eid\SearchInDocument::class . '::main'; |
|
| 185 | -$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_pageview_proxy'] = \Kitodo\Dlf\Plugin\Eid\PageViewProxy::class . '::main'; |
|
| 183 | +$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_suggest'] = \Kitodo\Dlf\Plugin\Eid\SearchSuggest::class.'::main'; |
|
| 184 | +$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_in_document'] = \Kitodo\Dlf\Plugin\Eid\SearchInDocument::class.'::main'; |
|
| 185 | +$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_pageview_proxy'] = \Kitodo\Dlf\Plugin\Eid\PageViewProxy::class.'::main'; |
|
| 186 | 186 | // Use Caching Framework for Solr queries |
| 187 | 187 | if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tx_dlf_solr'])) { |
| 188 | 188 | $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tx_dlf_solr'] = []; |
@@ -226,7 +226,7 @@ |
||
| 226 | 226 | 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_documents.thumbnail', |
| 227 | 227 | 'config' => [ |
| 228 | 228 | 'type' => 'user', |
| 229 | - 'userFunc' => \Kitodo\Dlf\Hooks\UserFunc::class . '->displayThumbnail', |
|
| 229 | + 'userFunc' => \Kitodo\Dlf\Hooks\UserFunc::class.'->displayThumbnail', |
|
| 230 | 230 | ], |
| 231 | 231 | ], |
| 232 | 232 | 'metadata' => [ |
@@ -269,10 +269,10 @@ |
||
| 269 | 269 | 'readOnly' => 1, |
| 270 | 270 | 'fieldControl' => [ |
| 271 | 271 | 'elementBrowser' => [ |
| 272 | - 'disabled' => true |
|
| 272 | + 'disabled' => TRUE |
|
| 273 | 273 | ] |
| 274 | 274 | ], |
| 275 | - 'hideDeleteIcon' => true |
|
| 275 | + 'hideDeleteIcon' => TRUE |
|
| 276 | 276 | ], |
| 277 | 277 | ], |
| 278 | 278 | 'volume' => [ |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_metadata.wrap', |
| 145 | 145 | 'config' => [ |
| 146 | 146 | 'behaviour' => [ |
| 147 | - 'allowLanguageSynchronization' => true |
|
| 147 | + 'allowLanguageSynchronization' => TRUE |
|
| 148 | 148 | ], |
| 149 | 149 | 'type' => 'text', |
| 150 | 150 | 'cols' => 48, |
@@ -152,8 +152,8 @@ discard block |
||
| 152 | 152 | 'wrap' => 'off', |
| 153 | 153 | 'eval' => 'trim', |
| 154 | 154 | 'default' => "key.wrap = <dt>|</dt>\nvalue.required = 1\nvalue.wrap = <dd>|</dd>", |
| 155 | - 'fixedFont' => true, |
|
| 156 | - 'enableTabulator' => true |
|
| 155 | + 'fixedFont' => TRUE, |
|
| 156 | + 'enableTabulator' => TRUE |
|
| 157 | 157 | ], |
| 158 | 158 | ], |
| 159 | 159 | 'index_tokenized' => [ |
@@ -17,79 +17,79 @@ |
||
| 17 | 17 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_audioplayer'] = 'layout,select_key,pages,recursive'; |
| 18 | 18 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_audioplayer'] = 'pi_flexform'; |
| 19 | 19 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_audioplayer', 'dlf_audioplayer'], 'list_type', 'dlf'); |
| 20 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_audioplayer', 'FILE:EXT:' . 'dlf/Configuration/Flexforms/AudioPlayer.xml'); |
|
| 20 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_audioplayer', 'FILE:EXT:'.'dlf/Configuration/Flexforms/AudioPlayer.xml'); |
|
| 21 | 21 | // Plugin "basket". |
| 22 | 22 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_basket'] = 'layout,select_key,pages,recursive'; |
| 23 | 23 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_basket'] = 'pi_flexform'; |
| 24 | 24 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_basket', 'dlf_basket'], 'list_type', 'dlf'); |
| 25 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_basket', 'FILE:EXT:' . 'dlf/Configuration/Flexforms/Basket.xml'); |
|
| 25 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_basket', 'FILE:EXT:'.'dlf/Configuration/Flexforms/Basket.xml'); |
|
| 26 | 26 | // Plugin "calendar". |
| 27 | 27 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_calendar'] = 'layout,select_key,pages,recursive'; |
| 28 | 28 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_calendar'] = 'pi_flexform'; |
| 29 | 29 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_calendar', 'dlf_calendar'], 'list_type', 'dlf'); |
| 30 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_calendar', 'FILE:EXT:' . 'dlf/Configuration/Flexforms/Calendar.xml'); |
|
| 30 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_calendar', 'FILE:EXT:'.'dlf/Configuration/Flexforms/Calendar.xml'); |
|
| 31 | 31 | // Plugin "collection". |
| 32 | 32 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_collection'] = 'layout,select_key,pages,recursive'; |
| 33 | 33 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_collection'] = 'pi_flexform'; |
| 34 | 34 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_collection', 'dlf_collection'], 'list_type', 'dlf'); |
| 35 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_collection', 'FILE:EXT:' . 'dlf/Configuration/Flexforms/Collection.xml'); |
|
| 35 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_collection', 'FILE:EXT:'.'dlf/Configuration/Flexforms/Collection.xml'); |
|
| 36 | 36 | // Plugin "feeds". |
| 37 | 37 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_feeds'] = 'layout,select_key,pages,recursive'; |
| 38 | 38 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_feeds'] = 'pi_flexform'; |
| 39 | 39 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_feeds', 'dlf_feeds'], 'list_type', 'dlf'); |
| 40 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_feeds', 'FILE:EXT:' . 'dlf/Configuration/Flexforms/Feeds.xml'); |
|
| 40 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_feeds', 'FILE:EXT:'.'dlf/Configuration/Flexforms/Feeds.xml'); |
|
| 41 | 41 | // Plugin "listview". |
| 42 | 42 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_listview'] = 'layout,select_key,pages,recursive'; |
| 43 | 43 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_listview'] = 'pi_flexform'; |
| 44 | 44 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_listview', 'dlf_listview'], 'list_type', 'dlf'); |
| 45 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_listview', 'FILE:EXT:' . 'dlf/Configuration/Flexforms/ListView.xml'); |
|
| 45 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_listview', 'FILE:EXT:'.'dlf/Configuration/Flexforms/ListView.xml'); |
|
| 46 | 46 | // Plugin "metadata". |
| 47 | 47 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_metadata'] = 'layout,select_key,pages,recursive'; |
| 48 | 48 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_metadata'] = 'pi_flexform'; |
| 49 | 49 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_metadata', 'dlf_metadata'], 'list_type', 'dlf'); |
| 50 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_metadata', 'FILE:EXT:' . 'dlf/Configuration/Flexforms/Metadata.xml'); |
|
| 50 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_metadata', 'FILE:EXT:'.'dlf/Configuration/Flexforms/Metadata.xml'); |
|
| 51 | 51 | // Plugin "navigation". |
| 52 | 52 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_navigation'] = 'layout,select_key,pages,recursive'; |
| 53 | 53 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_navigation'] = 'pi_flexform'; |
| 54 | 54 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_navigation', 'dlf_navigation'], 'list_type', 'dlf'); |
| 55 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_navigation', 'FILE:EXT:' . 'dlf/Configuration/Flexforms/Navigation.xml'); |
|
| 55 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_navigation', 'FILE:EXT:'.'dlf/Configuration/Flexforms/Navigation.xml'); |
|
| 56 | 56 | // Plugin "oaipmh". |
| 57 | 57 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_oaipmh'] = 'layout,select_key,pages,recursive'; |
| 58 | 58 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_oaipmh'] = 'pi_flexform'; |
| 59 | 59 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_oaipmh', 'dlf_oaipmh'], 'list_type', 'dlf'); |
| 60 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_oaipmh', 'FILE:EXT:' . 'dlf/Configuration/Flexforms/OaiPmh.xml'); |
|
| 60 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_oaipmh', 'FILE:EXT:'.'dlf/Configuration/Flexforms/OaiPmh.xml'); |
|
| 61 | 61 | // Plugin "pagegrid". |
| 62 | 62 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_pagegrid'] = 'layout,select_key,pages,recursive'; |
| 63 | 63 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_pagegrid'] = 'pi_flexform'; |
| 64 | 64 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_pagegrid', 'dlf_pagegrid'], 'list_type', 'dlf'); |
| 65 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_pagegrid', 'FILE:EXT:' . 'dlf/Configuration/Flexforms/PageGrid.xml'); |
|
| 65 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_pagegrid', 'FILE:EXT:'.'dlf/Configuration/Flexforms/PageGrid.xml'); |
|
| 66 | 66 | // Plugin "pageview". |
| 67 | 67 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_pageview'] = 'layout,select_key,pages,recursive'; |
| 68 | 68 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_pageview'] = 'pi_flexform'; |
| 69 | 69 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_pageview', 'dlf_pageview'], 'list_type', 'dlf'); |
| 70 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_pageview', 'FILE:EXT:' . 'dlf/Configuration/Flexforms/PageView.xml'); |
|
| 70 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_pageview', 'FILE:EXT:'.'dlf/Configuration/Flexforms/PageView.xml'); |
|
| 71 | 71 | // Plugin "search". |
| 72 | 72 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_search'] = 'layout,select_key,pages,recursive'; |
| 73 | 73 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_search'] = 'pi_flexform'; |
| 74 | 74 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_search', 'dlf_search'], 'list_type', 'dlf'); |
| 75 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_search', 'FILE:EXT:' . 'dlf/Configuration/Flexforms/Search.xml'); |
|
| 75 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_search', 'FILE:EXT:'.'dlf/Configuration/Flexforms/Search.xml'); |
|
| 76 | 76 | // Plugin "statistics". |
| 77 | 77 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_statistics'] = 'layout,select_key,pages,recursive'; |
| 78 | 78 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_statistics'] = 'pi_flexform'; |
| 79 | 79 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_statistics', 'dlf_statistics'], 'list_type', 'dlf'); |
| 80 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_statistics', 'FILE:EXT:' . 'dlf/Configuration/Flexforms/Statistics.xml'); |
|
| 80 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_statistics', 'FILE:EXT:'.'dlf/Configuration/Flexforms/Statistics.xml'); |
|
| 81 | 81 | // Plugin "tableofcontents". |
| 82 | 82 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_tableofcontents'] = 'layout,select_key,pages,recursive'; |
| 83 | 83 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_tableofcontents'] = 'pi_flexform'; |
| 84 | 84 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_tableofcontents', 'dlf_tableofcontents'], 'list_type', 'dlf'); |
| 85 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_tableofcontents', 'FILE:EXT:' . 'dlf/Configuration/Flexforms/TableOfContents.xml'); |
|
| 85 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_tableofcontents', 'FILE:EXT:'.'dlf/Configuration/Flexforms/TableOfContents.xml'); |
|
| 86 | 86 | // Plugin "toolbox". |
| 87 | 87 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_toolbox'] = 'layout,select_key,pages,recursive'; |
| 88 | 88 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_toolbox'] = 'pi_flexform'; |
| 89 | 89 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_toolbox', 'dlf_toolbox'], 'list_type', 'dlf'); |
| 90 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_toolbox', 'FILE:EXT:' . 'dlf/Configuration/Flexforms/Toolbox.xml'); |
|
| 90 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_toolbox', 'FILE:EXT:'.'dlf/Configuration/Flexforms/Toolbox.xml'); |
|
| 91 | 91 | // Plugin "validator". |
| 92 | 92 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_validator'] = 'layout,select_key,pages,recursive'; |
| 93 | 93 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_validator'] = 'pi_flexform'; |
| 94 | 94 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(['LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tt_content.dlf_validator', 'dlf_validator'], 'list_type', 'dlf'); |
| 95 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_validator', 'FILE:EXT:' . 'dlf/Configuration/Flexforms/Validator.xml'); |
|
| 95 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_validator', 'FILE:EXT:'.'dlf/Configuration/Flexforms/Validator.xml'); |
|
@@ -157,14 +157,14 @@ |
||
| 157 | 157 | 'label' => 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_collections.description', |
| 158 | 158 | 'config' => [ |
| 159 | 159 | 'behaviour' => [ |
| 160 | - 'allowLanguageSynchronization' => true |
|
| 160 | + 'allowLanguageSynchronization' => TRUE |
|
| 161 | 161 | ], |
| 162 | 162 | 'type' => 'text', |
| 163 | 163 | 'cols' => 30, |
| 164 | 164 | 'rows' => 10, |
| 165 | 165 | 'wrap' => 'virtual', |
| 166 | 166 | 'default' => '', |
| 167 | - 'enableRichtext' => true, |
|
| 167 | + 'enableRichtext' => TRUE, |
|
| 168 | 168 | ], |
| 169 | 169 | ], |
| 170 | 170 | 'thumbnail' => [ |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | '', |
| 19 | 19 | '', |
| 20 | 20 | [ |
| 21 | - 'routeTarget' => \Kitodo\Dlf\Module\NewTenant::class . '::main', |
|
| 21 | + 'routeTarget' => \Kitodo\Dlf\Module\NewTenant::class.'::main', |
|
| 22 | 22 | 'access' => 'admin', |
| 23 | 23 | 'name' => 'tools_dlfNewTenantModule', |
| 24 | 24 | 'icon' => 'EXT:dlf/Resources/Public/Icons/Extension.svg', |
@@ -24,9 +24,9 @@ |
||
| 24 | 24 | 'suggests' => [] |
| 25 | 25 | ], |
| 26 | 26 | 'state' => 'stable', |
| 27 | - 'uploadfolder' => false, |
|
| 27 | + 'uploadfolder' => FALSE, |
|
| 28 | 28 | 'createDirs' => '', |
| 29 | - 'clearCacheOnLoad' => false, |
|
| 29 | + 'clearCacheOnLoad' => FALSE, |
|
| 30 | 30 | 'author' => 'Sebastian Meyer (Maintainer)', |
| 31 | 31 | 'author_email' => '[email protected]', |
| 32 | 32 | 'author_company' => 'Kitodo. Key to digital objects e. V.', |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | $tool = trim($tool); |
| 57 | 57 | $cObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class); |
| 58 | 58 | $cObj->data = $data; |
| 59 | - $content .= $this->templateService->substituteMarkerArray($subpart, ['###TOOL###' => $cObj->cObjGetSingle($GLOBALS['TSFE']->tmpl->setup['plugin.'][$tool], $GLOBALS['TSFE']->tmpl->setup['plugin.'][$tool . '.'])]); |
|
| 59 | + $content .= $this->templateService->substituteMarkerArray($subpart, ['###TOOL###' => $cObj->cObjGetSingle($GLOBALS['TSFE']->tmpl->setup['plugin.'][$tool], $GLOBALS['TSFE']->tmpl->setup['plugin.'][$tool.'.'])]); |
|
| 60 | 60 | } |
| 61 | 61 | return $this->pi_wrapInBaseClass($this->templateService->substituteSubpart($this->template, '###TOOLS###', $content, true)); |
| 62 | 62 | } |
@@ -20,8 +20,7 @@ discard block |
||
| 20 | 20 | * @subpackage dlf |
| 21 | 21 | * @access public |
| 22 | 22 | */ |
| 23 | -class Toolbox extends \Kitodo\Dlf\Common\AbstractPlugin |
|
| 24 | -{ |
|
| 23 | +class Toolbox extends \Kitodo\Dlf\Common\AbstractPlugin { |
|
| 25 | 24 | public $scriptRelPath = 'Classes/Plugin/Toolbox.php'; |
| 26 | 25 | |
| 27 | 26 | /** |
@@ -34,8 +33,7 @@ discard block |
||
| 34 | 33 | * |
| 35 | 34 | * @return string The content that is displayed on the website |
| 36 | 35 | */ |
| 37 | - public function main($content, $conf) |
|
| 38 | - { |
|
| 36 | + public function main($content, $conf) { |
|
| 39 | 37 | $this->init($conf); |
| 40 | 38 | // Quit without doing anything if required variable is not set. |
| 41 | 39 | if (empty($this->piVars['id'])) { |
@@ -58,6 +58,6 @@ |
||
| 58 | 58 | $cObj->data = $data; |
| 59 | 59 | $content .= $this->templateService->substituteMarkerArray($subpart, ['###TOOL###' => $cObj->cObjGetSingle($GLOBALS['TSFE']->tmpl->setup['plugin.'][$tool], $GLOBALS['TSFE']->tmpl->setup['plugin.'][$tool . '.'])]); |
| 60 | 60 | } |
| 61 | - return $this->pi_wrapInBaseClass($this->templateService->substituteSubpart($this->template, '###TOOLS###', $content, true)); |
|
| 61 | + return $this->pi_wrapInBaseClass($this->templateService->substituteSubpart($this->template, '###TOOLS###', $content, TRUE)); |
|
| 62 | 62 | } |
| 63 | 63 | } |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | // Delete expired resumption tokens. |
| 83 | 83 | $GLOBALS['TYPO3_DB']->exec_DELETEquery( |
| 84 | 84 | 'tx_dlf_tokens', |
| 85 | - 'tx_dlf_tokens.ident="oai" AND tx_dlf_tokens.tstamp<' . intval($GLOBALS['EXEC_TIME'] - $this->conf['expired']) |
|
| 85 | + 'tx_dlf_tokens.ident="oai" AND tx_dlf_tokens.tstamp<'.intval($GLOBALS['EXEC_TIME'] - $this->conf['expired']) |
|
| 86 | 86 | ); |
| 87 | 87 | if ($GLOBALS['TYPO3_DB']->sql_affected_rows() === -1) { |
| 88 | 88 | // Deletion failed. |
@@ -150,13 +150,13 @@ discard block |
||
| 150 | 150 | $oai_dc = $this->oai->createElementNS($this->formats['oai_dc']['namespace'], 'oai_dc:dc'); |
| 151 | 151 | $oai_dc->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:dc', 'http://purl.org/dc/elements/1.1/'); |
| 152 | 152 | $oai_dc->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance'); |
| 153 | - $oai_dc->setAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'xsi:schemaLocation', $this->formats['oai_dc']['namespace'] . ' ' . $this->formats['oai_dc']['schema']); |
|
| 153 | + $oai_dc->setAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'xsi:schemaLocation', $this->formats['oai_dc']['namespace'].' '.$this->formats['oai_dc']['schema']); |
|
| 154 | 154 | $oai_dc->appendChild($this->oai->createElementNS('http://purl.org/dc/elements/1.1/', 'dc:identifier', htmlspecialchars($metadata['record_id'], ENT_NOQUOTES, 'UTF-8'))); |
| 155 | 155 | if (!empty($metadata['purl'])) { |
| 156 | 156 | $oai_dc->appendChild($this->oai->createElementNS('http://purl.org/dc/elements/1.1/', 'dc:identifier', htmlspecialchars($metadata['purl'], ENT_NOQUOTES, 'UTF-8'))); |
| 157 | 157 | } |
| 158 | 158 | if (!empty($metadata['prod_id'])) { |
| 159 | - $oai_dc->appendChild($this->oai->createElementNS('http://purl.org/dc/elements/1.1/', 'dc:identifier', 'kitodo:production:' . htmlspecialchars($metadata['prod_id'], ENT_NOQUOTES, 'UTF-8'))); |
|
| 159 | + $oai_dc->appendChild($this->oai->createElementNS('http://purl.org/dc/elements/1.1/', 'dc:identifier', 'kitodo:production:'.htmlspecialchars($metadata['prod_id'], ENT_NOQUOTES, 'UTF-8'))); |
|
| 160 | 160 | } |
| 161 | 161 | if (!empty($metadata['urn'])) { |
| 162 | 162 | $oai_dc->appendChild($this->oai->createElementNS('http://purl.org/dc/elements/1.1/', 'dc:identifier', htmlspecialchars($metadata['urn'], ENT_NOQUOTES, 'UTF-8'))); |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | } |
| 254 | 254 | // Add attributes and build XML tree. |
| 255 | 255 | $epicur->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance'); |
| 256 | - $epicur->setAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'xsi:schemaLocation', $this->formats['epicur']['namespace'] . ' ' . $this->formats['epicur']['schema']); |
|
| 256 | + $epicur->setAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'xsi:schemaLocation', $this->formats['epicur']['namespace'].' '.$this->formats['epicur']['schema']); |
|
| 257 | 257 | // Do we update an URN or register a new one? |
| 258 | 258 | if ($metadata['tstamp'] == $metadata['crdate']) { |
| 259 | 259 | $update->setAttribute('type', 'urn_new'); |
@@ -300,10 +300,10 @@ discard block |
||
| 300 | 300 | // Import node into \DOMDocument. |
| 301 | 301 | $mets = $this->oai->importNode($root->item(0), true); |
| 302 | 302 | } else { |
| 303 | - Helper::devLog('No METS part found in document with location "' . $metadata['location'] . '"', DEVLOG_SEVERITY_ERROR); |
|
| 303 | + Helper::devLog('No METS part found in document with location "'.$metadata['location'].'"', DEVLOG_SEVERITY_ERROR); |
|
| 304 | 304 | } |
| 305 | 305 | } else { |
| 306 | - Helper::devLog('Could not load XML file from "' . $metadata['location'] . '"', DEVLOG_SEVERITY_ERROR); |
|
| 306 | + Helper::devLog('Could not load XML file from "'.$metadata['location'].'"', DEVLOG_SEVERITY_ERROR); |
|
| 307 | 307 | } |
| 308 | 308 | if ($mets === null) { |
| 309 | 309 | $mets = $this->oai->createElementNS('http://kitodo.org/', 'kitodo:error', htmlspecialchars($this->pi_getLL('error', 'Error!', false), ENT_NOQUOTES, 'UTF-8')); |
@@ -339,15 +339,15 @@ discard block |
||
| 339 | 339 | if (substr($this->conf['stylesheet'], 0, 4) == 'EXT:') { |
| 340 | 340 | list($extKey, $filePath) = explode('/', substr($this->conf['stylesheet'], 4), 2); |
| 341 | 341 | if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded($extKey)) { |
| 342 | - $this->conf['stylesheet'] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($extKey) . $filePath; |
|
| 342 | + $this->conf['stylesheet'] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($extKey).$filePath; |
|
| 343 | 343 | } |
| 344 | 344 | } |
| 345 | 345 | $stylesheet = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl($this->conf['stylesheet']); |
| 346 | 346 | } else { |
| 347 | 347 | // Use default stylesheet if no custom stylesheet is given. |
| 348 | - $stylesheet = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'Resources/Public/Stylesheets/OaiPmh.xsl'); |
|
| 348 | + $stylesheet = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'Resources/Public/Stylesheets/OaiPmh.xsl'); |
|
| 349 | 349 | } |
| 350 | - $this->oai->appendChild($this->oai->createProcessingInstruction('xml-stylesheet', 'type="text/xsl" href="' . htmlspecialchars($stylesheet, ENT_NOQUOTES, 'UTF-8') . '"')); |
|
| 350 | + $this->oai->appendChild($this->oai->createProcessingInstruction('xml-stylesheet', 'type="text/xsl" href="'.htmlspecialchars($stylesheet, ENT_NOQUOTES, 'UTF-8').'"')); |
|
| 351 | 351 | // Create root element. |
| 352 | 352 | $root = $this->oai->createElementNS('http://www.openarchives.org/OAI/2.0/', 'OAI-PMH'); |
| 353 | 353 | $root->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance'); |
@@ -397,10 +397,10 @@ discard block |
||
| 397 | 397 | // Send headers. |
| 398 | 398 | header('HTTP/1.1 200 OK'); |
| 399 | 399 | header('Cache-Control: no-cache'); |
| 400 | - header('Content-Length: ' . strlen($content)); |
|
| 400 | + header('Content-Length: '.strlen($content)); |
|
| 401 | 401 | header('Content-Type: text/xml; charset=utf-8'); |
| 402 | - header('Date: ' . date('r', $GLOBALS['EXEC_TIME'])); |
|
| 403 | - header('Expires: ' . date('r', $GLOBALS['EXEC_TIME'] + $this->conf['expired'])); |
|
| 402 | + header('Date: '.date('r', $GLOBALS['EXEC_TIME'])); |
|
| 403 | + header('Expires: '.date('r', $GLOBALS['EXEC_TIME'] + $this->conf['expired'])); |
|
| 404 | 404 | echo $content; |
| 405 | 405 | exit; |
| 406 | 406 | } |
@@ -464,10 +464,10 @@ discard block |
||
| 464 | 464 | 'tx_dlf_documents', |
| 465 | 465 | 'tx_dlf_relations', |
| 466 | 466 | 'tx_dlf_collections', |
| 467 | - 'AND tx_dlf_documents.record_id=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->piVars['identifier'], 'tx_dlf_documents') |
|
| 468 | - . ' AND tx_dlf_documents.pid=' . intval($this->conf['pages']) |
|
| 469 | - . ' AND tx_dlf_collections.pid=' . intval($this->conf['pages']) |
|
| 470 | - . ' AND tx_dlf_relations.ident=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations') |
|
| 467 | + 'AND tx_dlf_documents.record_id='.$GLOBALS['TYPO3_DB']->fullQuoteStr($this->piVars['identifier'], 'tx_dlf_documents') |
|
| 468 | + . ' AND tx_dlf_documents.pid='.intval($this->conf['pages']) |
|
| 469 | + . ' AND tx_dlf_collections.pid='.intval($this->conf['pages']) |
|
| 470 | + . ' AND tx_dlf_relations.ident='.$GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations') |
|
| 471 | 471 | . $where |
| 472 | 472 | . Helper::whereClause('tx_dlf_collections'), |
| 473 | 473 | '', |
@@ -584,7 +584,7 @@ discard block |
||
| 584 | 584 | $timestamp = $resArray['tstamp']; |
| 585 | 585 | $earliestDatestamp = gmdate('Y-m-d\TH:i:s\Z', $timestamp); |
| 586 | 586 | } else { |
| 587 | - Helper::devLog('No records found with PID ' . $this->conf['pages'], DEVLOG_SEVERITY_NOTICE); |
|
| 587 | + Helper::devLog('No records found with PID '.$this->conf['pages'], DEVLOG_SEVERITY_NOTICE); |
|
| 588 | 588 | } |
| 589 | 589 | $linkConf = [ |
| 590 | 590 | 'parameter' => $GLOBALS['TSFE']->id, |
@@ -844,9 +844,9 @@ discard block |
||
| 844 | 844 | } |
| 845 | 845 | $resArray = $allResults[0]; |
| 846 | 846 | if ($resArray['index_query'] != "") { |
| 847 | - $solr_query .= '(' . $resArray['index_query'] . ')'; |
|
| 847 | + $solr_query .= '('.$resArray['index_query'].')'; |
|
| 848 | 848 | } else { |
| 849 | - $solr_query .= 'collection:' . '"' . $resArray['index_name'] . '"'; |
|
| 849 | + $solr_query .= 'collection:'.'"'.$resArray['index_name'].'"'; |
|
| 850 | 850 | } |
| 851 | 851 | } else { |
| 852 | 852 | // If no set is specified we have to query for all collections |
@@ -854,7 +854,7 @@ discard block |
||
| 854 | 854 | } |
| 855 | 855 | // Check for required fields. |
| 856 | 856 | foreach ($this->formats[$this->piVars['metadataPrefix']]['requiredFields'] as $required) { |
| 857 | - $solr_query .= ' NOT ' . $required . ':""'; |
|
| 857 | + $solr_query .= ' NOT '.$required.':""'; |
|
| 858 | 858 | } |
| 859 | 859 | // toplevel="true" is always required |
| 860 | 860 | $solr_query .= ' AND toplevel:true'; |
@@ -867,7 +867,7 @@ discard block |
||
| 867 | 867 | || is_array($date_array = strptime($this->piVars['from'], '%Y-%m-%d')) |
| 868 | 868 | ) { |
| 869 | 869 | $timestamp = gmmktime($date_array['tm_hour'], $date_array['tm_min'], $date_array['tm_sec'], $date_array['tm_mon'] + 1, $date_array['tm_mday'], $date_array['tm_year'] + 1900); |
| 870 | - $from = date("Y-m-d", $timestamp) . 'T' . date("H:i:s", $timestamp) . '.000Z'; |
|
| 870 | + $from = date("Y-m-d", $timestamp).'T'.date("H:i:s", $timestamp).'.000Z'; |
|
| 871 | 871 | } else { |
| 872 | 872 | throw new \Exception('badArgument'); |
| 873 | 873 | } |
@@ -881,7 +881,7 @@ discard block |
||
| 881 | 881 | || is_array($date_array = strptime($this->piVars['until'], '%Y-%m-%d')) |
| 882 | 882 | ) { |
| 883 | 883 | $timestamp = gmmktime($date_array['tm_hour'], $date_array['tm_min'], $date_array['tm_sec'], $date_array['tm_mon'] + 1, $date_array['tm_mday'], $date_array['tm_year'] + 1900); |
| 884 | - $until = date("Y-m-d", $timestamp) . 'T' . date("H:i:s", $timestamp) . '.999Z'; |
|
| 884 | + $until = date("Y-m-d", $timestamp).'T'.date("H:i:s", $timestamp).'.999Z'; |
|
| 885 | 885 | if ($from != "*" && $from > $until) { |
| 886 | 886 | throw new \Exception('badArgument'); |
| 887 | 887 | } |
@@ -898,7 +898,7 @@ discard block |
||
| 898 | 898 | throw new \Exception('badArgument'); |
| 899 | 899 | } |
| 900 | 900 | } |
| 901 | - $solr_query .= ' AND timestamp:[' . $from . ' TO ' . $until . ']'; |
|
| 901 | + $solr_query .= ' AND timestamp:['.$from.' TO '.$until.']'; |
|
| 902 | 902 | $documentSet = []; |
| 903 | 903 | $solr = Solr::getInstance($this->conf['solrcore']); |
| 904 | 904 | if (intval($this->conf['solr_limit']) > 0) { |
@@ -938,10 +938,10 @@ discard block |
||
| 938 | 938 | 'tx_dlf_documents', |
| 939 | 939 | 'tx_dlf_relations', |
| 940 | 940 | 'tx_dlf_collections', |
| 941 | - 'AND tx_dlf_documents.uid IN (' . implode(',', $GLOBALS['TYPO3_DB']->cleanIntArray($documentsToProcess)) . ')' |
|
| 942 | - . ' AND tx_dlf_documents.pid=' . intval($this->conf['pages']) |
|
| 943 | - . ' AND tx_dlf_collections.pid=' . intval($this->conf['pages']) |
|
| 944 | - . ' AND tx_dlf_relations.ident=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations') |
|
| 941 | + 'AND tx_dlf_documents.uid IN ('.implode(',', $GLOBALS['TYPO3_DB']->cleanIntArray($documentsToProcess)).')' |
|
| 942 | + . ' AND tx_dlf_documents.pid='.intval($this->conf['pages']) |
|
| 943 | + . ' AND tx_dlf_collections.pid='.intval($this->conf['pages']) |
|
| 944 | + . ' AND tx_dlf_relations.ident='.$GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations') |
|
| 945 | 945 | . Helper::whereClause('tx_dlf_collections'), |
| 946 | 946 | 'tx_dlf_documents.uid', |
| 947 | 947 | 'tx_dlf_documents.tstamp', |
@@ -26,8 +26,7 @@ discard block |
||
| 26 | 26 | * @subpackage dlf |
| 27 | 27 | * @access public |
| 28 | 28 | */ |
| 29 | -class OaiPmh extends \Kitodo\Dlf\Common\AbstractPlugin |
|
| 30 | -{ |
|
| 29 | +class OaiPmh extends \Kitodo\Dlf\Common\AbstractPlugin { |
|
| 31 | 30 | public $scriptRelPath = 'Classes/Plugin/OaiPmh.php'; |
| 32 | 31 | |
| 33 | 32 | /** |
@@ -77,8 +76,7 @@ discard block |
||
| 77 | 76 | * |
| 78 | 77 | * @return void |
| 79 | 78 | */ |
| 80 | - protected function deleteExpiredTokens() |
|
| 81 | - { |
|
| 79 | + protected function deleteExpiredTokens() { |
|
| 82 | 80 | // Delete expired resumption tokens. |
| 83 | 81 | $GLOBALS['TYPO3_DB']->exec_DELETEquery( |
| 84 | 82 | 'tx_dlf_tokens', |
@@ -99,8 +97,7 @@ discard block |
||
| 99 | 97 | * |
| 100 | 98 | * @return \DOMElement XML node to add to the OAI response |
| 101 | 99 | */ |
| 102 | - protected function error($type) |
|
| 103 | - { |
|
| 100 | + protected function error($type) { |
|
| 104 | 101 | $this->error = true; |
| 105 | 102 | $error = $this->oai->createElementNS('http://www.openarchives.org/OAI/2.0/', 'error', htmlspecialchars($this->pi_getLL($type, $type, false), ENT_NOQUOTES, 'UTF-8')); |
| 106 | 103 | $error->setAttribute('code', $type); |
@@ -114,8 +111,7 @@ discard block |
||
| 114 | 111 | * |
| 115 | 112 | * @return void |
| 116 | 113 | */ |
| 117 | - protected function getUrlParams() |
|
| 118 | - { |
|
| 114 | + protected function getUrlParams() { |
|
| 119 | 115 | $allowedParams = [ |
| 120 | 116 | 'verb', |
| 121 | 117 | 'identifier', |
@@ -145,8 +141,7 @@ discard block |
||
| 145 | 141 | * |
| 146 | 142 | * @return \DOMElement XML node to add to the OAI response |
| 147 | 143 | */ |
| 148 | - protected function getDcData(array $metadata) |
|
| 149 | - { |
|
| 144 | + protected function getDcData(array $metadata) { |
|
| 150 | 145 | $oai_dc = $this->oai->createElementNS($this->formats['oai_dc']['namespace'], 'oai_dc:dc'); |
| 151 | 146 | $oai_dc->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:dc', 'http://purl.org/dc/elements/1.1/'); |
| 152 | 147 | $oai_dc->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance'); |
@@ -224,8 +219,7 @@ discard block |
||
| 224 | 219 | * |
| 225 | 220 | * @return \DOMElement XML node to add to the OAI response |
| 226 | 221 | */ |
| 227 | - protected function getEpicurData(array $metadata) |
|
| 228 | - { |
|
| 222 | + protected function getEpicurData(array $metadata) { |
|
| 229 | 223 | // Define all XML elements with or without qualified namespace. |
| 230 | 224 | if (empty($this->conf['unqualified_epicur'])) { |
| 231 | 225 | $epicur = $this->oai->createElementNS($this->formats['epicur']['namespace'], 'epicur:epicur'); |
@@ -288,8 +282,7 @@ discard block |
||
| 288 | 282 | * |
| 289 | 283 | * @return \DOMElement XML node to add to the OAI response |
| 290 | 284 | */ |
| 291 | - protected function getMetsData(array $metadata) |
|
| 292 | - { |
|
| 285 | + protected function getMetsData(array $metadata) { |
|
| 293 | 286 | $mets = null; |
| 294 | 287 | // Load METS file. |
| 295 | 288 | $xml = new \DOMDocument(); |
@@ -321,8 +314,7 @@ discard block |
||
| 321 | 314 | * |
| 322 | 315 | * @return void |
| 323 | 316 | */ |
| 324 | - public function main($content, $conf) |
|
| 325 | - { |
|
| 317 | + public function main($content, $conf) { |
|
| 326 | 318 | // Initialize plugin. |
| 327 | 319 | $this->init($conf); |
| 328 | 320 | // Turn cache off. |
@@ -412,8 +404,7 @@ discard block |
||
| 412 | 404 | * |
| 413 | 405 | * @return \DOMElement XML node to add to the OAI response |
| 414 | 406 | */ |
| 415 | - protected function resume() |
|
| 416 | - { |
|
| 407 | + protected function resume() { |
|
| 417 | 408 | $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class) |
| 418 | 409 | ->getQueryBuilderForTable('tx_dlf_tokens'); |
| 419 | 410 | |
@@ -447,8 +438,7 @@ discard block |
||
| 447 | 438 | * |
| 448 | 439 | * @return \DOMElement XML node to add to the OAI response |
| 449 | 440 | */ |
| 450 | - protected function verbGetRecord() |
|
| 451 | - { |
|
| 441 | + protected function verbGetRecord() { |
|
| 452 | 442 | if (count($this->piVars) != 3 || empty($this->piVars['metadataPrefix']) || empty($this->piVars['identifier'])) { |
| 453 | 443 | return $this->error('badArgument'); |
| 454 | 444 | } |
@@ -527,8 +517,7 @@ discard block |
||
| 527 | 517 | * |
| 528 | 518 | * @return \DOMElement XML node to add to the OAI response |
| 529 | 519 | */ |
| 530 | - protected function verbIdentify() |
|
| 531 | - { |
|
| 520 | + protected function verbIdentify() { |
|
| 532 | 521 | // Check for invalid arguments. |
| 533 | 522 | if (count($this->piVars) > 1) { |
| 534 | 523 | return $this->error('badArgument'); |
@@ -610,8 +599,7 @@ discard block |
||
| 610 | 599 | * |
| 611 | 600 | * @return \DOMElement XML node to add to the OAI response |
| 612 | 601 | */ |
| 613 | - protected function verbListIdentifiers() |
|
| 614 | - { |
|
| 602 | + protected function verbListIdentifiers() { |
|
| 615 | 603 | // If we have a resumption token we can continue our work |
| 616 | 604 | if (!empty($this->piVars['resumptionToken'])) { |
| 617 | 605 | // "resumptionToken" is an exclusive argument. |
@@ -650,8 +638,7 @@ discard block |
||
| 650 | 638 | * |
| 651 | 639 | * @return \DOMElement XML node to add to the OAI response |
| 652 | 640 | */ |
| 653 | - protected function verbListMetadataFormats() |
|
| 654 | - { |
|
| 641 | + protected function verbListMetadataFormats() { |
|
| 655 | 642 | $resArray = []; |
| 656 | 643 | // Check for invalid arguments. |
| 657 | 644 | if (count($this->piVars) > 1) { |
@@ -709,8 +696,7 @@ discard block |
||
| 709 | 696 | * |
| 710 | 697 | * @return \DOMElement XML node to add to the OAI response |
| 711 | 698 | */ |
| 712 | - protected function verbListRecords() |
|
| 713 | - { |
|
| 699 | + protected function verbListRecords() { |
|
| 714 | 700 | // Check for invalid arguments. |
| 715 | 701 | if (!empty($this->piVars['resumptionToken'])) { |
| 716 | 702 | // "resumptionToken" is an exclusive argument. |
@@ -750,8 +736,7 @@ discard block |
||
| 750 | 736 | * |
| 751 | 737 | * @return \DOMElement XML node to add to the OAI response |
| 752 | 738 | */ |
| 753 | - protected function verbListSets() |
|
| 754 | - { |
|
| 739 | + protected function verbListSets() { |
|
| 755 | 740 | $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class) |
| 756 | 741 | ->getQueryBuilderForTable('tx_dlf_collections'); |
| 757 | 742 | |
@@ -807,8 +792,7 @@ discard block |
||
| 807 | 792 | * @return array Array of matching records |
| 808 | 793 | * @throws \Exception |
| 809 | 794 | */ |
| 810 | - protected function fetchDocumentUIDs() |
|
| 811 | - { |
|
| 795 | + protected function fetchDocumentUIDs() { |
|
| 812 | 796 | $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class) |
| 813 | 797 | ->getQueryBuilderForTable('tx_dlf_collections'); |
| 814 | 798 | |
@@ -929,8 +913,7 @@ discard block |
||
| 929 | 913 | * |
| 930 | 914 | * @return \DOMElement XML of enriched records |
| 931 | 915 | */ |
| 932 | - protected function generateOutputForDocumentList(DocumentList $documentListSet) |
|
| 933 | - { |
|
| 916 | + protected function generateOutputForDocumentList(DocumentList $documentListSet) { |
|
| 934 | 917 | $documentsToProcess = $documentListSet->removeRange(0, intval($this->conf['limit'])); |
| 935 | 918 | $verb = $this->piVars['verb']; |
| 936 | 919 | $documents = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query( |
@@ -1016,8 +999,7 @@ discard block |
||
| 1016 | 999 | * |
| 1017 | 1000 | * @return \DOMElement XML for resumption token |
| 1018 | 1001 | */ |
| 1019 | - protected function generateResumptionTokenForDocumentListSet(DocumentList $documentListSet) |
|
| 1020 | - { |
|
| 1002 | + protected function generateResumptionTokenForDocumentListSet(DocumentList $documentListSet) { |
|
| 1021 | 1003 | if ($documentListSet->count() != 0) { |
| 1022 | 1004 | $token = uniqid(); |
| 1023 | 1005 | $GLOBALS['TYPO3_DB']->exec_INSERTquery( |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | * @var bool |
| 37 | 37 | * @access protected |
| 38 | 38 | */ |
| 39 | - protected $error = false; |
|
| 39 | + protected $error = FALSE; |
|
| 40 | 40 | |
| 41 | 41 | /** |
| 42 | 42 | * This holds the OAI DOM object |
@@ -101,8 +101,8 @@ discard block |
||
| 101 | 101 | */ |
| 102 | 102 | protected function error($type) |
| 103 | 103 | { |
| 104 | - $this->error = true; |
|
| 105 | - $error = $this->oai->createElementNS('http://www.openarchives.org/OAI/2.0/', 'error', htmlspecialchars($this->pi_getLL($type, $type, false), ENT_NOQUOTES, 'UTF-8')); |
|
| 104 | + $this->error = TRUE; |
|
| 105 | + $error = $this->oai->createElementNS('http://www.openarchives.org/OAI/2.0/', 'error', htmlspecialchars($this->pi_getLL($type, $type, FALSE), ENT_NOQUOTES, 'UTF-8')); |
|
| 106 | 106 | $error->setAttribute('code', $type); |
| 107 | 107 | return $error; |
| 108 | 108 | } |
@@ -290,7 +290,7 @@ discard block |
||
| 290 | 290 | */ |
| 291 | 291 | protected function getMetsData(array $metadata) |
| 292 | 292 | { |
| 293 | - $mets = null; |
|
| 293 | + $mets = NULL; |
|
| 294 | 294 | // Load METS file. |
| 295 | 295 | $xml = new \DOMDocument(); |
| 296 | 296 | if ($xml->load($metadata['location'])) { |
@@ -298,15 +298,15 @@ discard block |
||
| 298 | 298 | $root = $xml->getElementsByTagNameNS($this->formats['mets']['namespace'], 'mets'); |
| 299 | 299 | if ($root->item(0) instanceof \DOMNode) { |
| 300 | 300 | // Import node into \DOMDocument. |
| 301 | - $mets = $this->oai->importNode($root->item(0), true); |
|
| 301 | + $mets = $this->oai->importNode($root->item(0), TRUE); |
|
| 302 | 302 | } else { |
| 303 | 303 | Helper::devLog('No METS part found in document with location "' . $metadata['location'] . '"', DEVLOG_SEVERITY_ERROR); |
| 304 | 304 | } |
| 305 | 305 | } else { |
| 306 | 306 | Helper::devLog('Could not load XML file from "' . $metadata['location'] . '"', DEVLOG_SEVERITY_ERROR); |
| 307 | 307 | } |
| 308 | - if ($mets === null) { |
|
| 309 | - $mets = $this->oai->createElementNS('http://kitodo.org/', 'kitodo:error', htmlspecialchars($this->pi_getLL('error', 'Error!', false), ENT_NOQUOTES, 'UTF-8')); |
|
| 308 | + if ($mets === NULL) { |
|
| 309 | + $mets = $this->oai->createElementNS('http://kitodo.org/', 'kitodo:error', htmlspecialchars($this->pi_getLL('error', 'Error!', FALSE), ENT_NOQUOTES, 'UTF-8')); |
|
| 310 | 310 | } |
| 311 | 311 | return $mets; |
| 312 | 312 | } |
@@ -326,7 +326,7 @@ discard block |
||
| 326 | 326 | // Initialize plugin. |
| 327 | 327 | $this->init($conf); |
| 328 | 328 | // Turn cache off. |
| 329 | - $this->setCache(false); |
|
| 329 | + $this->setCache(FALSE); |
|
| 330 | 330 | // Get GET and POST variables. |
| 331 | 331 | $this->getUrlParams(); |
| 332 | 332 | // Delete expired resumption tokens. |