We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -18,7 +18,8 @@ |
||
| 18 | 18 | * @access public |
| 19 | 19 | * @abstract |
| 20 | 20 | */ |
| 21 | -interface tx_dlf_format { |
|
| 21 | +interface tx_dlf_format |
|
| 22 | +{ |
|
| 22 | 23 | |
| 23 | 24 | /** |
| 24 | 25 | * This extracts metadata from XML |
@@ -17,7 +17,8 @@ discard block |
||
| 17 | 17 | * @subpackage tx_dlf |
| 18 | 18 | * @access public |
| 19 | 19 | */ |
| 20 | -class tx_dlf_indexing { |
|
| 20 | +class tx_dlf_indexing |
|
| 21 | +{ |
|
| 21 | 22 | |
| 22 | 23 | /** |
| 23 | 24 | * The extension key |
@@ -79,7 +80,8 @@ discard block |
||
| 79 | 80 | * |
| 80 | 81 | * @return integer 0 on success or 1 on failure |
| 81 | 82 | */ |
| 82 | - public static function add(tx_dlf_document &$doc, $core = 0) { |
|
| 83 | + public static function add(tx_dlf_document &$doc, $core = 0) |
|
| 84 | + { |
|
| 83 | 85 | |
| 84 | 86 | if (in_array($doc->uid, self::$processedDocs)) { |
| 85 | 87 | |
@@ -266,7 +268,8 @@ discard block |
||
| 266 | 268 | * |
| 267 | 269 | * @return integer 0 on success or 1 on failure |
| 268 | 270 | */ |
| 269 | - public static function delete($uid) { |
|
| 271 | + public static function delete($uid) |
|
| 272 | + { |
|
| 270 | 273 | |
| 271 | 274 | // Save parameter for logging purposes. |
| 272 | 275 | $_uid = $uid; |
@@ -391,7 +394,8 @@ discard block |
||
| 391 | 394 | * |
| 392 | 395 | * @return string The field's dynamic index name |
| 393 | 396 | */ |
| 394 | - public static function getIndexFieldName($index_name, $pid = 0) { |
|
| 397 | + public static function getIndexFieldName($index_name, $pid = 0) |
|
| 398 | + { |
|
| 395 | 399 | |
| 396 | 400 | // Save parameter for logging purposes. |
| 397 | 401 | $_pid = $pid; |
@@ -436,7 +440,8 @@ discard block |
||
| 436 | 440 | * |
| 437 | 441 | * @return void |
| 438 | 442 | */ |
| 439 | - protected static function loadIndexConf($pid) { |
|
| 443 | + protected static function loadIndexConf($pid) |
|
| 444 | + { |
|
| 440 | 445 | |
| 441 | 446 | if (!self::$fieldsLoaded) { |
| 442 | 447 | |
@@ -516,7 +521,8 @@ discard block |
||
| 516 | 521 | * |
| 517 | 522 | * @return integer 0 on success or 1 on failure |
| 518 | 523 | */ |
| 519 | - protected static function processLogical(tx_dlf_document &$doc, array $logicalUnit) { |
|
| 524 | + protected static function processLogical(tx_dlf_document &$doc, array $logicalUnit) |
|
| 525 | + { |
|
| 520 | 526 | |
| 521 | 527 | $errors = 0; |
| 522 | 528 | |
@@ -695,7 +701,8 @@ discard block |
||
| 695 | 701 | * |
| 696 | 702 | * @return integer 0 on success or 1 on failure |
| 697 | 703 | */ |
| 698 | - protected static function processPhysical(tx_dlf_document &$doc, $page, array $physicalUnit) { |
|
| 704 | + protected static function processPhysical(tx_dlf_document &$doc, $page, array $physicalUnit) |
|
| 705 | + { |
|
| 699 | 706 | |
| 700 | 707 | $errors = 0; |
| 701 | 708 | |
@@ -841,7 +848,8 @@ discard block |
||
| 841 | 848 | * |
| 842 | 849 | * @return boolean TRUE on success or FALSE on failure |
| 843 | 850 | */ |
| 844 | - protected static function solrConnect($core, $pid = 0) { |
|
| 851 | + protected static function solrConnect($core, $pid = 0) |
|
| 852 | + { |
|
| 845 | 853 | |
| 846 | 854 | // Get Solr instance. |
| 847 | 855 | if (!self::$solr) { |
@@ -873,6 +881,8 @@ discard block |
||
| 873 | 881 | * |
| 874 | 882 | * @access private |
| 875 | 883 | */ |
| 876 | - private function __construct() {} |
|
| 884 | + private function __construct() |
|
| 885 | + { |
|
| 886 | +} |
|
| 877 | 887 | |
| 878 | 888 | } |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | * @var boolean |
| 52 | 52 | * @access protected |
| 53 | 53 | */ |
| 54 | - protected static $fieldsLoaded = FALSE; |
|
| 54 | + protected static $fieldsLoaded = false; |
|
| 55 | 55 | |
| 56 | 56 | /** |
| 57 | 57 | * List of already processed documents |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | // Handle multi-volume documents. |
| 93 | 93 | if ($doc->parentId) { |
| 94 | 94 | |
| 95 | - $parent = & tx_dlf_document::getInstance($doc->parentId, 0, TRUE); |
|
| 95 | + $parent = & tx_dlf_document::getInstance($doc->parentId, 0, true); |
|
| 96 | 96 | |
| 97 | 97 | if ($parent->ready) { |
| 98 | 98 | |
@@ -180,9 +180,9 @@ discard block |
||
| 180 | 180 | $message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 181 | 181 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
| 182 | 182 | htmlspecialchars(sprintf(tx_dlf_helper::getLL('flash.documentIndexed'), $resArray['title'], $doc->uid)), |
| 183 | - tx_dlf_helper::getLL('flash.done', TRUE), |
|
| 183 | + tx_dlf_helper::getLL('flash.done', true), |
|
| 184 | 184 | \TYPO3\CMS\Core\Messaging\FlashMessage::OK, |
| 185 | - TRUE |
|
| 185 | + true |
|
| 186 | 186 | ); |
| 187 | 187 | |
| 188 | 188 | } else { |
@@ -190,9 +190,9 @@ discard block |
||
| 190 | 190 | $message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 191 | 191 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
| 192 | 192 | htmlspecialchars(sprintf(tx_dlf_helper::getLL('flash.documentNotIndexed'), $resArray['title'], $doc->uid)), |
| 193 | - tx_dlf_helper::getLL('flash.error', TRUE), |
|
| 193 | + tx_dlf_helper::getLL('flash.error', true), |
|
| 194 | 194 | \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, |
| 195 | - TRUE |
|
| 195 | + true |
|
| 196 | 196 | ); |
| 197 | 197 | |
| 198 | 198 | } |
@@ -209,10 +209,10 @@ discard block |
||
| 209 | 209 | |
| 210 | 210 | $message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 211 | 211 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
| 212 | - tx_dlf_helper::getLL('flash.solrException', TRUE).'<br />'.htmlspecialchars($e->getMessage()), |
|
| 213 | - tx_dlf_helper::getLL('flash.error', TRUE), |
|
| 212 | + tx_dlf_helper::getLL('flash.solrException', true).'<br />'.htmlspecialchars($e->getMessage()), |
|
| 213 | + tx_dlf_helper::getLL('flash.error', true), |
|
| 214 | 214 | \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, |
| 215 | - TRUE |
|
| 215 | + true |
|
| 216 | 216 | ); |
| 217 | 217 | |
| 218 | 218 | tx_dlf_helper::addMessage($message); |
@@ -235,10 +235,10 @@ discard block |
||
| 235 | 235 | |
| 236 | 236 | $message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 237 | 237 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
| 238 | - tx_dlf_helper::getLL('flash.solrNoConnection', TRUE), |
|
| 239 | - tx_dlf_helper::getLL('flash.warning', TRUE), |
|
| 238 | + tx_dlf_helper::getLL('flash.solrNoConnection', true), |
|
| 239 | + tx_dlf_helper::getLL('flash.warning', true), |
|
| 240 | 240 | \TYPO3\CMS\Core\Messaging\FlashMessage::WARNING, |
| 241 | - TRUE |
|
| 241 | + true |
|
| 242 | 242 | ); |
| 243 | 243 | |
| 244 | 244 | tx_dlf_helper::addMessage($message); |
@@ -305,10 +305,10 @@ discard block |
||
| 305 | 305 | |
| 306 | 306 | $message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 307 | 307 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
| 308 | - tx_dlf_helper::getLL('flash.solrException', TRUE).'<br />'.htmlspecialchars($e->getMessage()), |
|
| 309 | - tx_dlf_helper::getLL('flash.error', TRUE), |
|
| 308 | + tx_dlf_helper::getLL('flash.solrException', true).'<br />'.htmlspecialchars($e->getMessage()), |
|
| 309 | + tx_dlf_helper::getLL('flash.error', true), |
|
| 310 | 310 | \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, |
| 311 | - TRUE |
|
| 311 | + true |
|
| 312 | 312 | ); |
| 313 | 313 | |
| 314 | 314 | tx_dlf_helper::addMessage($message); |
@@ -331,10 +331,10 @@ discard block |
||
| 331 | 331 | |
| 332 | 332 | $message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 333 | 333 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
| 334 | - tx_dlf_helper::getLL('flash.solrNoConnection', TRUE), |
|
| 335 | - tx_dlf_helper::getLL('flash.error', TRUE), |
|
| 334 | + tx_dlf_helper::getLL('flash.solrNoConnection', true), |
|
| 335 | + tx_dlf_helper::getLL('flash.error', true), |
|
| 336 | 336 | \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, |
| 337 | - TRUE |
|
| 337 | + true |
|
| 338 | 338 | ); |
| 339 | 339 | |
| 340 | 340 | tx_dlf_helper::addMessage($message); |
@@ -356,9 +356,9 @@ discard block |
||
| 356 | 356 | $message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 357 | 357 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
| 358 | 358 | htmlspecialchars(sprintf(tx_dlf_helper::getLL('flash.documentDeleted'), $title, $uid)), |
| 359 | - tx_dlf_helper::getLL('flash.done', TRUE), |
|
| 359 | + tx_dlf_helper::getLL('flash.done', true), |
|
| 360 | 360 | \TYPO3\CMS\Core\Messaging\FlashMessage::OK, |
| 361 | - TRUE |
|
| 361 | + true |
|
| 362 | 362 | ); |
| 363 | 363 | |
| 364 | 364 | tx_dlf_helper::addMessage($message); |
@@ -494,13 +494,13 @@ discard block |
||
| 494 | 494 | |
| 495 | 495 | } else { |
| 496 | 496 | |
| 497 | - self::$fields['fieldboost'][$indexing['index_name']] = FALSE; |
|
| 497 | + self::$fields['fieldboost'][$indexing['index_name']] = false; |
|
| 498 | 498 | |
| 499 | 499 | } |
| 500 | 500 | |
| 501 | 501 | } |
| 502 | 502 | |
| 503 | - self::$fieldsLoaded = TRUE; |
|
| 503 | + self::$fieldsLoaded = true; |
|
| 504 | 504 | |
| 505 | 505 | } |
| 506 | 506 | |
@@ -567,7 +567,7 @@ discard block |
||
| 567 | 567 | $solrDoc->setField('sid', $logicalUnit['id']); |
| 568 | 568 | |
| 569 | 569 | // There can be only one toplevel unit per UID, independently of backend configuration |
| 570 | - $solrDoc->setField('toplevel', $logicalUnit['id'] == $doc->toplevelId ? TRUE : FALSE); |
|
| 570 | + $solrDoc->setField('toplevel', $logicalUnit['id'] == $doc->toplevelId ? true : false); |
|
| 571 | 571 | |
| 572 | 572 | $solrDoc->setField('type', $logicalUnit['type'], self::$fields['fieldboost']['type']); |
| 573 | 573 | |
@@ -644,10 +644,10 @@ discard block |
||
| 644 | 644 | |
| 645 | 645 | $message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 646 | 646 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
| 647 | - tx_dlf_helper::getLL('flash.solrException', TRUE).'<br />'.htmlspecialchars($e->getMessage()), |
|
| 648 | - tx_dlf_helper::getLL('flash.error', TRUE), |
|
| 647 | + tx_dlf_helper::getLL('flash.solrException', true).'<br />'.htmlspecialchars($e->getMessage()), |
|
| 648 | + tx_dlf_helper::getLL('flash.error', true), |
|
| 649 | 649 | \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, |
| 650 | - TRUE |
|
| 650 | + true |
|
| 651 | 651 | ); |
| 652 | 652 | |
| 653 | 653 | tx_dlf_helper::addMessage($message); |
@@ -717,10 +717,10 @@ discard block |
||
| 717 | 717 | } |
| 718 | 718 | |
| 719 | 719 | // Turn off libxml's error logging. |
| 720 | - $libxmlErrors = libxml_use_internal_errors(TRUE); |
|
| 720 | + $libxmlErrors = libxml_use_internal_errors(true); |
|
| 721 | 721 | |
| 722 | 722 | // disable entity loading |
| 723 | - $previousValueOfEntityLoader = libxml_disable_entity_loader(TRUE); |
|
| 723 | + $previousValueOfEntityLoader = libxml_disable_entity_loader(true); |
|
| 724 | 724 | |
| 725 | 725 | // Load XML from file. |
| 726 | 726 | $xml = simplexml_load_string(\TYPO3\CMS\Core\Utility\GeneralUtility::getUrl($file)); |
@@ -731,7 +731,7 @@ discard block |
||
| 731 | 731 | // Reset libxml's error logging. |
| 732 | 732 | libxml_use_internal_errors($libxmlErrors); |
| 733 | 733 | |
| 734 | - if ($xml === FALSE) { |
|
| 734 | + if ($xml === false) { |
|
| 735 | 735 | |
| 736 | 736 | return 1; |
| 737 | 737 | |
@@ -768,7 +768,7 @@ discard block |
||
| 768 | 768 | |
| 769 | 769 | $solrDoc->setField('sid', $physicalUnit['id']); |
| 770 | 770 | |
| 771 | - $solrDoc->setField('toplevel', FALSE); |
|
| 771 | + $solrDoc->setField('toplevel', false); |
|
| 772 | 772 | |
| 773 | 773 | $solrDoc->setField('type', $physicalUnit['type'], self::$fields['fieldboost']['type']); |
| 774 | 774 | |
@@ -811,10 +811,10 @@ discard block |
||
| 811 | 811 | |
| 812 | 812 | $message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 813 | 813 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
| 814 | - tx_dlf_helper::getLL('flash.solrException', TRUE).'<br />'.htmlspecialchars($e->getMessage()), |
|
| 815 | - tx_dlf_helper::getLL('flash.error', TRUE), |
|
| 814 | + tx_dlf_helper::getLL('flash.solrException', true).'<br />'.htmlspecialchars($e->getMessage()), |
|
| 815 | + tx_dlf_helper::getLL('flash.error', true), |
|
| 816 | 816 | \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, |
| 817 | - TRUE |
|
| 817 | + true |
|
| 818 | 818 | ); |
| 819 | 819 | |
| 820 | 820 | tx_dlf_helper::addMessage($message); |
@@ -858,13 +858,13 @@ discard block |
||
| 858 | 858 | |
| 859 | 859 | } else { |
| 860 | 860 | |
| 861 | - return FALSE; |
|
| 861 | + return false; |
|
| 862 | 862 | |
| 863 | 863 | } |
| 864 | 864 | |
| 865 | 865 | } |
| 866 | 866 | |
| 867 | - return TRUE; |
|
| 867 | + return true; |
|
| 868 | 868 | |
| 869 | 869 | } |
| 870 | 870 | |
@@ -34,14 +34,14 @@ discard block |
||
| 34 | 34 | * @var array |
| 35 | 35 | * @access protected |
| 36 | 36 | */ |
| 37 | - protected static $fields = array ( |
|
| 38 | - 'autocomplete' => array (), |
|
| 39 | - 'facets' => array (), |
|
| 40 | - 'sortables' => array (), |
|
| 41 | - 'indexed' => array (), |
|
| 42 | - 'stored' => array (), |
|
| 43 | - 'tokenized' => array (), |
|
| 44 | - 'fieldboost' => array () |
|
| 37 | + protected static $fields = array( |
|
| 38 | + 'autocomplete' => array(), |
|
| 39 | + 'facets' => array(), |
|
| 40 | + 'sortables' => array(), |
|
| 41 | + 'indexed' => array(), |
|
| 42 | + 'stored' => array(), |
|
| 43 | + 'tokenized' => array(), |
|
| 44 | + 'fieldboost' => array() |
|
| 45 | 45 | ); |
| 46 | 46 | |
| 47 | 47 | /** |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | * @var array |
| 60 | 60 | * @access protected |
| 61 | 61 | */ |
| 62 | - protected static $processedDocs = array (); |
|
| 62 | + protected static $processedDocs = array(); |
|
| 63 | 63 | |
| 64 | 64 | /** |
| 65 | 65 | * Instance of tx_dlf_solr class |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | |
| 103 | 103 | if (TYPO3_DLOG) { |
| 104 | 104 | |
| 105 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_indexing->add(['.$doc->uid.'], '.$core.')] Could not load parent document with UID "'.$doc->parentId.'"', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
| 105 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_indexing->add([' . $doc->uid . '], ' . $core . ')] Could not load parent document with UID "' . $doc->parentId . '"', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
| 106 | 106 | |
| 107 | 107 | } |
| 108 | 108 | |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | |
| 120 | 120 | // Delete old Solr documents. |
| 121 | 121 | $updateQuery = self::$solr->service->createUpdate(); |
| 122 | - $updateQuery->addDeleteQuery('uid:'.$doc->uid); |
|
| 122 | + $updateQuery->addDeleteQuery('uid:' . $doc->uid); |
|
| 123 | 123 | self::$solr->service->update($updateQuery); |
| 124 | 124 | |
| 125 | 125 | // Index every logical unit as separate Solr document. |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 166 | 166 | 'tx_dlf_documents.title AS title', |
| 167 | 167 | 'tx_dlf_documents', |
| 168 | - 'tx_dlf_documents.uid='.intval($doc->uid).tx_dlf_helper::whereClause('tx_dlf_documents'), |
|
| 168 | + 'tx_dlf_documents.uid=' . intval($doc->uid) . tx_dlf_helper::whereClause('tx_dlf_documents'), |
|
| 169 | 169 | '', |
| 170 | 170 | '', |
| 171 | 171 | '1' |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | |
| 210 | 210 | $message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 211 | 211 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
| 212 | - tx_dlf_helper::getLL('flash.solrException', TRUE).'<br />'.htmlspecialchars($e->getMessage()), |
|
| 212 | + tx_dlf_helper::getLL('flash.solrException', TRUE) . '<br />' . htmlspecialchars($e->getMessage()), |
|
| 213 | 213 | tx_dlf_helper::getLL('flash.error', TRUE), |
| 214 | 214 | \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, |
| 215 | 215 | TRUE |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | |
| 222 | 222 | if (TYPO3_DLOG) { |
| 223 | 223 | |
| 224 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_indexing->add(['.$doc->uid.'], '.$core.')] Apache Solr threw exception: "'.$e->getMessage().'"', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
| 224 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_indexing->add([' . $doc->uid . '], ' . $core . ')] Apache Solr threw exception: "' . $e->getMessage() . '"', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
| 225 | 225 | |
| 226 | 226 | } |
| 227 | 227 | |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | |
| 248 | 248 | if (TYPO3_DLOG) { |
| 249 | 249 | |
| 250 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_indexing->add(['.$doc->uid.'], '.$core.')] Could not connect to Apache Solr server', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
| 250 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_indexing->add([' . $doc->uid . '], ' . $core . ')] Could not connect to Apache Solr server', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
| 251 | 251 | |
| 252 | 252 | } |
| 253 | 253 | |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 279 | 279 | 'tx_dlf_solrcores.uid AS uid,tx_dlf_documents.title AS title', |
| 280 | 280 | 'tx_dlf_solrcores,tx_dlf_documents', |
| 281 | - 'tx_dlf_solrcores.uid=tx_dlf_documents.solrcore AND tx_dlf_documents.uid='.$uid.tx_dlf_helper::whereClause('tx_dlf_solrcores'), |
|
| 281 | + 'tx_dlf_solrcores.uid=tx_dlf_documents.solrcore AND tx_dlf_documents.uid=' . $uid . tx_dlf_helper::whereClause('tx_dlf_solrcores'), |
|
| 282 | 282 | '', |
| 283 | 283 | '', |
| 284 | 284 | '1' |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | |
| 296 | 296 | // Delete Solr document. |
| 297 | 297 | $updateQuery = self::$solr->service->createUpdate(); |
| 298 | - $updateQuery->addDeleteQuery('uid:'.$uid); |
|
| 298 | + $updateQuery->addDeleteQuery('uid:' . $uid); |
|
| 299 | 299 | $updateQuery->addCommit(); |
| 300 | 300 | self::$solr->service->update($updateQuery); |
| 301 | 301 | |
@@ -305,7 +305,7 @@ discard block |
||
| 305 | 305 | |
| 306 | 306 | $message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 307 | 307 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
| 308 | - tx_dlf_helper::getLL('flash.solrException', TRUE).'<br />'.htmlspecialchars($e->getMessage()), |
|
| 308 | + tx_dlf_helper::getLL('flash.solrException', TRUE) . '<br />' . htmlspecialchars($e->getMessage()), |
|
| 309 | 309 | tx_dlf_helper::getLL('flash.error', TRUE), |
| 310 | 310 | \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, |
| 311 | 311 | TRUE |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | |
| 318 | 318 | if (TYPO3_DLOG) { |
| 319 | 319 | |
| 320 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_indexing->delete('.$_uid.')] Apache Solr threw exception: "'.$e->getMessage().'"', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
| 320 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_indexing->delete(' . $_uid . ')] Apache Solr threw exception: "' . $e->getMessage() . '"', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
| 321 | 321 | |
| 322 | 322 | } |
| 323 | 323 | |
@@ -343,7 +343,7 @@ discard block |
||
| 343 | 343 | |
| 344 | 344 | if (TYPO3_DLOG) { |
| 345 | 345 | |
| 346 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_indexing->delete('.$_uid.')] Could not connect to Apache Solr server', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
| 346 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_indexing->delete(' . $_uid . ')] Could not connect to Apache Solr server', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
| 347 | 347 | |
| 348 | 348 | } |
| 349 | 349 | |
@@ -371,7 +371,7 @@ discard block |
||
| 371 | 371 | |
| 372 | 372 | if (TYPO3_DLOG) { |
| 373 | 373 | |
| 374 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_indexing->delete('.$_uid.')] Invalid UID "'.$uid.'" for document deletion', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
| 374 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_indexing->delete(' . $_uid . ')] Invalid UID "' . $uid . '" for document deletion', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
| 375 | 375 | |
| 376 | 376 | } |
| 377 | 377 | |
@@ -403,7 +403,7 @@ discard block |
||
| 403 | 403 | |
| 404 | 404 | if (TYPO3_DLOG) { |
| 405 | 405 | |
| 406 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_indexing->getIndexFieldName('.$index_name.', '.$_pid.')] Invalid PID "'.$pid.'" for metadata configuration', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
| 406 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_indexing->getIndexFieldName(' . $index_name . ', ' . $_pid . ')] Invalid PID "' . $pid . '" for metadata configuration', self::$extKey, SYSLOG_SEVERITY_ERROR); |
|
| 407 | 407 | |
| 408 | 408 | } |
| 409 | 409 | |
@@ -421,7 +421,7 @@ discard block |
||
| 421 | 421 | |
| 422 | 422 | $suffix .= (in_array($index_name, self::$fields['indexed']) ? 'i' : 'u'); |
| 423 | 423 | |
| 424 | - $index_name .= '_'.$suffix; |
|
| 424 | + $index_name .= '_' . $suffix; |
|
| 425 | 425 | |
| 426 | 426 | return $index_name; |
| 427 | 427 | |
@@ -444,7 +444,7 @@ discard block |
||
| 444 | 444 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 445 | 445 | 'tx_dlf_metadata.index_name AS index_name,tx_dlf_metadata.index_tokenized AS index_tokenized,tx_dlf_metadata.index_stored AS index_stored,tx_dlf_metadata.index_indexed AS index_indexed,tx_dlf_metadata.is_sortable AS is_sortable,tx_dlf_metadata.is_facet AS is_facet,tx_dlf_metadata.is_listed AS is_listed,tx_dlf_metadata.index_autocomplete AS index_autocomplete,tx_dlf_metadata.index_boost AS index_boost', |
| 446 | 446 | 'tx_dlf_metadata', |
| 447 | - 'tx_dlf_metadata.pid='.intval($pid).tx_dlf_helper::whereClause('tx_dlf_metadata'), |
|
| 447 | + 'tx_dlf_metadata.pid=' . intval($pid) . tx_dlf_helper::whereClause('tx_dlf_metadata'), |
|
| 448 | 448 | '', |
| 449 | 449 | '', |
| 450 | 450 | '' |
@@ -538,7 +538,7 @@ discard block |
||
| 538 | 538 | $solrDoc = $updateQuery->createDocument(); |
| 539 | 539 | |
| 540 | 540 | // Create unique identifier from document's UID and unit's XML ID. |
| 541 | - $solrDoc->setField('id', $doc->uid.$logicalUnit['id']); |
|
| 541 | + $solrDoc->setField('id', $doc->uid . $logicalUnit['id']); |
|
| 542 | 542 | |
| 543 | 543 | $solrDoc->setField('uid', $doc->uid); |
| 544 | 544 | |
@@ -585,7 +585,7 @@ discard block |
||
| 585 | 585 | |
| 586 | 586 | $solrDoc->setField('collection', $doc->metadataArray[$doc->toplevelId]['collection']); |
| 587 | 587 | |
| 588 | - $autocomplete = array (); |
|
| 588 | + $autocomplete = array(); |
|
| 589 | 589 | |
| 590 | 590 | foreach ($metadata as $index_name => $data) { |
| 591 | 591 | |
@@ -596,14 +596,14 @@ discard block |
||
| 596 | 596 | if (in_array($index_name, self::$fields['sortables'])) { |
| 597 | 597 | |
| 598 | 598 | // Add sortable fields to index. |
| 599 | - $solrDoc->setField($index_name.'_sorting', $metadata[$index_name.'_sorting'][0]); |
|
| 599 | + $solrDoc->setField($index_name . '_sorting', $metadata[$index_name . '_sorting'][0]); |
|
| 600 | 600 | |
| 601 | 601 | } |
| 602 | 602 | |
| 603 | 603 | if (in_array($index_name, self::$fields['facets'])) { |
| 604 | 604 | |
| 605 | 605 | // Add facets to index. |
| 606 | - $solrDoc->setField($index_name.'_faceting', $data); |
|
| 606 | + $solrDoc->setField($index_name . '_faceting', $data); |
|
| 607 | 607 | |
| 608 | 608 | } |
| 609 | 609 | |
@@ -644,7 +644,7 @@ discard block |
||
| 644 | 644 | |
| 645 | 645 | $message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 646 | 646 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
| 647 | - tx_dlf_helper::getLL('flash.solrException', TRUE).'<br />'.htmlspecialchars($e->getMessage()), |
|
| 647 | + tx_dlf_helper::getLL('flash.solrException', TRUE) . '<br />' . htmlspecialchars($e->getMessage()), |
|
| 648 | 648 | tx_dlf_helper::getLL('flash.error', TRUE), |
| 649 | 649 | \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, |
| 650 | 650 | TRUE |
@@ -748,7 +748,7 @@ discard block |
||
| 748 | 748 | $solrDoc = $updateQuery->createDocument(); |
| 749 | 749 | |
| 750 | 750 | // Create unique identifier from document's UID and unit's XML ID. |
| 751 | - $solrDoc->setField('id', $doc->uid.$physicalUnit['id']); |
|
| 751 | + $solrDoc->setField('id', $doc->uid . $physicalUnit['id']); |
|
| 752 | 752 | |
| 753 | 753 | $solrDoc->setField('uid', $doc->uid); |
| 754 | 754 | |
@@ -792,7 +792,7 @@ discard block |
||
| 792 | 792 | } |
| 793 | 793 | |
| 794 | 794 | // Add facets to index. |
| 795 | - $solrDoc->setField($index_name.'_faceting', $data); |
|
| 795 | + $solrDoc->setField($index_name . '_faceting', $data); |
|
| 796 | 796 | |
| 797 | 797 | } |
| 798 | 798 | |
@@ -819,7 +819,7 @@ discard block |
||
| 819 | 819 | |
| 820 | 820 | $message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 821 | 821 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
| 822 | - tx_dlf_helper::getLL('flash.solrException', TRUE).'<br />'.htmlspecialchars($e->getMessage()), |
|
| 822 | + tx_dlf_helper::getLL('flash.solrException', TRUE) . '<br />' . htmlspecialchars($e->getMessage()), |
|
| 823 | 823 | tx_dlf_helper::getLL('flash.error', TRUE), |
| 824 | 824 | \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, |
| 825 | 825 | TRUE |
@@ -11,46 +11,46 @@ |
||
| 11 | 11 | |
| 12 | 12 | $extensionPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('dlf'); |
| 13 | 13 | |
| 14 | -return array ( |
|
| 15 | - 'tx_dlf_cli' => $extensionPath.'cli/class.tx_dlf_cli.php', |
|
| 16 | - 'tx_dlf_alto' => $extensionPath.'common/class.tx_dlf_alto.php', |
|
| 17 | - 'tx_dlf_document' => $extensionPath.'common/class.tx_dlf_document.php', |
|
| 18 | - 'tx_dlf_format' => $extensionPath.'common/class.tx_dlf_format.php', |
|
| 19 | - 'tx_dlf_fulltext' => $extensionPath.'common/class.tx_dlf_fulltext.php', |
|
| 20 | - 'tx_dlf_helper' => $extensionPath.'common/class.tx_dlf_helper.php', |
|
| 21 | - 'tx_dlf_indexing' => $extensionPath.'common/class.tx_dlf_indexing.php', |
|
| 22 | - 'tx_dlf_list' => $extensionPath.'common/class.tx_dlf_list.php', |
|
| 23 | - 'tx_dlf_mods' => $extensionPath.'common/class.tx_dlf_mods.php', |
|
| 24 | - 'tx_dlf_module' => $extensionPath.'common/class.tx_dlf_module.php', |
|
| 25 | - 'tx_dlf_plugin' => $extensionPath.'common/class.tx_dlf_plugin.php', |
|
| 26 | - 'tx_dlf_solr' => $extensionPath.'common/class.tx_dlf_solr.php', |
|
| 27 | - 'tx_dlf_teihdr' => $extensionPath.'common/class.tx_dlf_teihdr.php', |
|
| 28 | - 'tx_dlf_doctype' => $extensionPath.'hooks/class.tx_dlf_doctype.php', |
|
| 29 | - 'tx_dlf_em' => $extensionPath.'hooks/class.tx_dlf_em.php', |
|
| 30 | - 'tx_dlf_hacks' => $extensionPath.'hooks/class.tx_dlf_hacks.php', |
|
| 31 | - 'tx_dlf_tceforms' => $extensionPath.'hooks/class.tx_dlf_tceforms.php', |
|
| 32 | - 'tx_dlf_tcemain' => $extensionPath.'hooks/class.tx_dlf_tcemain.php', |
|
| 33 | - 'tx_dlf_modIndexing' => $extensionPath.'modules/indexing/index.php', |
|
| 34 | - 'tx_dlf_modNewclient' => $extensionPath.'modules/newclient/index.php', |
|
| 35 | - 'tx_dlf_audioplayer' => $extensionPath.'plugins/audioplayer/class.tx_dlf_audioplayer.php', |
|
| 36 | - 'tx_dlf_basket' => $extensionPath.'plugins/basket/class.tx_dlf_basket.php', |
|
| 37 | - 'tx_dlf_collection' => $extensionPath.'plugins/collection/class.tx_dlf_collection.php', |
|
| 38 | - 'tx_dlf_feeds' => $extensionPath.'plugins/feeds/class.tx_dlf_feeds.php', |
|
| 39 | - 'tx_dlf_listview' => $extensionPath.'plugins/listview/class.tx_dlf_listview.php', |
|
| 40 | - 'tx_dlf_metadata' => $extensionPath.'plugins/metadata/class.tx_dlf_metadata.php', |
|
| 41 | - 'tx_dlf_navigation' => $extensionPath.'plugins/navigation/class.tx_dlf_navigation.php', |
|
| 42 | - 'tx_dlf_newspaper' => $extensionPath.'plugins/newspaper/class.tx_dlf_newspaper.php', |
|
| 43 | - 'tx_dlf_oai' => $extensionPath.'plugins/oai/class.tx_dlf_oai.php', |
|
| 44 | - 'tx_dlf_pagegrid' => $extensionPath.'plugins/pagegrid/class.tx_dlf_pagegrid.php', |
|
| 45 | - 'tx_dlf_pageview' => $extensionPath.'plugins/pageview/class.tx_dlf_pageview.php', |
|
| 46 | - 'tx_dlf_search' => $extensionPath.'plugins/search/class.tx_dlf_search.php', |
|
| 47 | - 'tx_dlf_search_suggest' => $extensionPath.'plugins/search/class.tx_dlf_search_suggest.php', |
|
| 48 | - 'tx_dlf_statistics' => $extensionPath.'plugins/statistics/class.tx_dlf_statistics.php', |
|
| 49 | - 'tx_dlf_toc' => $extensionPath.'plugins/toc/class.tx_dlf_toc.php', |
|
| 50 | - 'tx_dlf_toolbox' => $extensionPath.'plugins/toolbox/class.tx_dlf_toolbox.php', |
|
| 51 | - 'tx_dlf_toolsPdf' => $extensionPath.'plugins/toolbox/tools/pdf/class.tx_dlf_toolsPdf.php', |
|
| 52 | - 'tx_dlf_toolsFulltext' => $extensionPath.'plugins/toolbox/tools/fulltext/class.tx_dlf_toolsFulltext.php', |
|
| 53 | - 'tx_dlf_toolsImagemanipulation' => $extensionPath.'plugins/toolbox/tools/imagemanipulation/class.tx_dlf_toolsImagemanipulation.php', |
|
| 54 | - 'tx_dlf_toolsImagedownload' => $extensionPath.'plugins/toolbox/tools/imagedownload/class.tx_dlf_toolsImagedownload.php', |
|
| 55 | - 'tx_dlf_validator' => $extensionPath.'plugins/validator/class.tx_dlf_validator.php' |
|
| 14 | +return array( |
|
| 15 | + 'tx_dlf_cli' => $extensionPath . 'cli/class.tx_dlf_cli.php', |
|
| 16 | + 'tx_dlf_alto' => $extensionPath . 'common/class.tx_dlf_alto.php', |
|
| 17 | + 'tx_dlf_document' => $extensionPath . 'common/class.tx_dlf_document.php', |
|
| 18 | + 'tx_dlf_format' => $extensionPath . 'common/class.tx_dlf_format.php', |
|
| 19 | + 'tx_dlf_fulltext' => $extensionPath . 'common/class.tx_dlf_fulltext.php', |
|
| 20 | + 'tx_dlf_helper' => $extensionPath . 'common/class.tx_dlf_helper.php', |
|
| 21 | + 'tx_dlf_indexing' => $extensionPath . 'common/class.tx_dlf_indexing.php', |
|
| 22 | + 'tx_dlf_list' => $extensionPath . 'common/class.tx_dlf_list.php', |
|
| 23 | + 'tx_dlf_mods' => $extensionPath . 'common/class.tx_dlf_mods.php', |
|
| 24 | + 'tx_dlf_module' => $extensionPath . 'common/class.tx_dlf_module.php', |
|
| 25 | + 'tx_dlf_plugin' => $extensionPath . 'common/class.tx_dlf_plugin.php', |
|
| 26 | + 'tx_dlf_solr' => $extensionPath . 'common/class.tx_dlf_solr.php', |
|
| 27 | + 'tx_dlf_teihdr' => $extensionPath . 'common/class.tx_dlf_teihdr.php', |
|
| 28 | + 'tx_dlf_doctype' => $extensionPath . 'hooks/class.tx_dlf_doctype.php', |
|
| 29 | + 'tx_dlf_em' => $extensionPath . 'hooks/class.tx_dlf_em.php', |
|
| 30 | + 'tx_dlf_hacks' => $extensionPath . 'hooks/class.tx_dlf_hacks.php', |
|
| 31 | + 'tx_dlf_tceforms' => $extensionPath . 'hooks/class.tx_dlf_tceforms.php', |
|
| 32 | + 'tx_dlf_tcemain' => $extensionPath . 'hooks/class.tx_dlf_tcemain.php', |
|
| 33 | + 'tx_dlf_modIndexing' => $extensionPath . 'modules/indexing/index.php', |
|
| 34 | + 'tx_dlf_modNewclient' => $extensionPath . 'modules/newclient/index.php', |
|
| 35 | + 'tx_dlf_audioplayer' => $extensionPath . 'plugins/audioplayer/class.tx_dlf_audioplayer.php', |
|
| 36 | + 'tx_dlf_basket' => $extensionPath . 'plugins/basket/class.tx_dlf_basket.php', |
|
| 37 | + 'tx_dlf_collection' => $extensionPath . 'plugins/collection/class.tx_dlf_collection.php', |
|
| 38 | + 'tx_dlf_feeds' => $extensionPath . 'plugins/feeds/class.tx_dlf_feeds.php', |
|
| 39 | + 'tx_dlf_listview' => $extensionPath . 'plugins/listview/class.tx_dlf_listview.php', |
|
| 40 | + 'tx_dlf_metadata' => $extensionPath . 'plugins/metadata/class.tx_dlf_metadata.php', |
|
| 41 | + 'tx_dlf_navigation' => $extensionPath . 'plugins/navigation/class.tx_dlf_navigation.php', |
|
| 42 | + 'tx_dlf_newspaper' => $extensionPath . 'plugins/newspaper/class.tx_dlf_newspaper.php', |
|
| 43 | + 'tx_dlf_oai' => $extensionPath . 'plugins/oai/class.tx_dlf_oai.php', |
|
| 44 | + 'tx_dlf_pagegrid' => $extensionPath . 'plugins/pagegrid/class.tx_dlf_pagegrid.php', |
|
| 45 | + 'tx_dlf_pageview' => $extensionPath . 'plugins/pageview/class.tx_dlf_pageview.php', |
|
| 46 | + 'tx_dlf_search' => $extensionPath . 'plugins/search/class.tx_dlf_search.php', |
|
| 47 | + 'tx_dlf_search_suggest' => $extensionPath . 'plugins/search/class.tx_dlf_search_suggest.php', |
|
| 48 | + 'tx_dlf_statistics' => $extensionPath . 'plugins/statistics/class.tx_dlf_statistics.php', |
|
| 49 | + 'tx_dlf_toc' => $extensionPath . 'plugins/toc/class.tx_dlf_toc.php', |
|
| 50 | + 'tx_dlf_toolbox' => $extensionPath . 'plugins/toolbox/class.tx_dlf_toolbox.php', |
|
| 51 | + 'tx_dlf_toolsPdf' => $extensionPath . 'plugins/toolbox/tools/pdf/class.tx_dlf_toolsPdf.php', |
|
| 52 | + 'tx_dlf_toolsFulltext' => $extensionPath . 'plugins/toolbox/tools/fulltext/class.tx_dlf_toolsFulltext.php', |
|
| 53 | + 'tx_dlf_toolsImagemanipulation' => $extensionPath . 'plugins/toolbox/tools/imagemanipulation/class.tx_dlf_toolsImagemanipulation.php', |
|
| 54 | + 'tx_dlf_toolsImagedownload' => $extensionPath . 'plugins/toolbox/tools/imagedownload/class.tx_dlf_toolsImagedownload.php', |
|
| 55 | + 'tx_dlf_validator' => $extensionPath . 'plugins/validator/class.tx_dlf_validator.php' |
|
| 56 | 56 | ); |
@@ -21,11 +21,11 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | protected $modPath = 'indexing/'; |
| 23 | 23 | |
| 24 | - protected $buttonArray = array ( |
|
| 24 | + protected $buttonArray = array( |
|
| 25 | 25 | 'SHORTCUT' => '', |
| 26 | 26 | ); |
| 27 | 27 | |
| 28 | - protected $markerArray = array ( |
|
| 28 | + protected $markerArray = array( |
|
| 29 | 29 | 'CSH' => '', |
| 30 | 30 | 'MOD_MENU' => '', |
| 31 | 31 | 'CONTENT' => '', |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | $_cores = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 53 | 53 | 'tx_dlf_solrcores.label AS label,tx_dlf_solrcores.uid AS uid', |
| 54 | 54 | 'tx_dlf_solrcores', |
| 55 | - 'tx_dlf_solrcores.pid IN (0,'.intval($this->id).')'.tx_dlf_helper::whereClause('tx_dlf_solrcores'), |
|
| 55 | + 'tx_dlf_solrcores.pid IN (0,' . intval($this->id) . ')' . tx_dlf_helper::whereClause('tx_dlf_solrcores'), |
|
| 56 | 56 | '', |
| 57 | 57 | '', |
| 58 | 58 | '' |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | $_collections = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 63 | 63 | 'tx_dlf_collections.label AS label,tx_dlf_collections.uid AS uid', |
| 64 | 64 | 'tx_dlf_collections', |
| 65 | - 'tx_dlf_collections.fe_cruser_id=0 AND tx_dlf_collections.pid='.intval($this->id).' AND tx_dlf_collections.sys_language_uid IN (-1,0)'.tx_dlf_helper::whereClause('tx_dlf_collections'), |
|
| 65 | + 'tx_dlf_collections.fe_cruser_id=0 AND tx_dlf_collections.pid=' . intval($this->id) . ' AND tx_dlf_collections.sys_language_uid IN (-1,0)' . tx_dlf_helper::whereClause('tx_dlf_collections'), |
|
| 66 | 66 | '', |
| 67 | 67 | 'tx_dlf_collections.label ASC', |
| 68 | 68 | '' |
@@ -71,25 +71,25 @@ discard block |
||
| 71 | 71 | // TODO: Ändern! |
| 72 | 72 | $form = '<label for="tx-dlf-modIndexing-id">Kollektion:</label>'; |
| 73 | 73 | |
| 74 | - $form .= '<select id="tx-dlf-modIndexing-collection" name="'.$this->prefixId.'[collection]">'; |
|
| 74 | + $form .= '<select id="tx-dlf-modIndexing-collection" name="' . $this->prefixId . '[collection]">'; |
|
| 75 | 75 | |
| 76 | 76 | $form .= '<option value="0">Alle</option>'; |
| 77 | 77 | |
| 78 | 78 | while ($_collection = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($_collections)) { |
| 79 | 79 | |
| 80 | - $form .= '<option value="'.$_collection['uid'].'">'.htmlspecialchars($_collection['label']).'</option>'; |
|
| 80 | + $form .= '<option value="' . $_collection['uid'] . '">' . htmlspecialchars($_collection['label']) . '</option>'; |
|
| 81 | 81 | |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | $form .= '</select><br />'; |
| 85 | 85 | |
| 86 | - $form .= '<select id="tx-dlf-modIndexing-core" name="'.$this->prefixId.'[core]">'; |
|
| 86 | + $form .= '<select id="tx-dlf-modIndexing-core" name="' . $this->prefixId . '[core]">'; |
|
| 87 | 87 | |
| 88 | 88 | $form .= '<option value="0">---</option>'; |
| 89 | 89 | |
| 90 | 90 | while ($_core = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($_cores)) { |
| 91 | 91 | |
| 92 | - $form .= '<option value="'.$_core['uid'].'">'.htmlspecialchars($_core['label']).'</option>'; |
|
| 92 | + $form .= '<option value="' . $_core['uid'] . '">' . htmlspecialchars($_core['label']) . '</option>'; |
|
| 93 | 93 | |
| 94 | 94 | } |
| 95 | 95 | |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | |
| 98 | 98 | $form .= '<input type="hidden" name="CMD" value="reindexDocs" />'; |
| 99 | 99 | |
| 100 | - $form .= '<input type="submit" name="'.$this->prefixId.'[submit]" value="'.$GLOBALS['LANG']->getLL('form.submit').'" />'; |
|
| 100 | + $form .= '<input type="submit" name="' . $this->prefixId . '[submit]" value="' . $GLOBALS['LANG']->getLL('form.submit') . '" />'; |
|
| 101 | 101 | |
| 102 | 102 | return $form; |
| 103 | 103 | |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | $_cores = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 117 | 117 | 'tx_dlf_solrcores.label AS label,tx_dlf_solrcores.uid AS uid', |
| 118 | 118 | 'tx_dlf_solrcores', |
| 119 | - 'tx_dlf_solrcores.pid IN (0,'.intval($this->id).')'.tx_dlf_helper::whereClause('tx_dlf_solrcores'), |
|
| 119 | + 'tx_dlf_solrcores.pid IN (0,' . intval($this->id) . ')' . tx_dlf_helper::whereClause('tx_dlf_solrcores'), |
|
| 120 | 120 | '', |
| 121 | 121 | '', |
| 122 | 122 | '' |
@@ -125,15 +125,15 @@ discard block |
||
| 125 | 125 | // TODO: Ändern! |
| 126 | 126 | $form = '<label for="tx-dlf-modIndexing-id">METS-Datei:</label>'; |
| 127 | 127 | |
| 128 | - $form .= '<input type="text" id="tx-dlf-modIndexing-id" name="'.$this->prefixId.'[id]" value="" /><br />'; |
|
| 128 | + $form .= '<input type="text" id="tx-dlf-modIndexing-id" name="' . $this->prefixId . '[id]" value="" /><br />'; |
|
| 129 | 129 | |
| 130 | - $form .= '<select id="tx-dlf-modIndexing-core" name="'.$this->prefixId.'[core]">'; |
|
| 130 | + $form .= '<select id="tx-dlf-modIndexing-core" name="' . $this->prefixId . '[core]">'; |
|
| 131 | 131 | |
| 132 | 132 | $form .= '<option value="0">---</option>'; |
| 133 | 133 | |
| 134 | 134 | while ($_core = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($_cores)) { |
| 135 | 135 | |
| 136 | - $form .= '<option value="'.$_core['uid'].'">'.htmlspecialchars($_core['label']).'</option>'; |
|
| 136 | + $form .= '<option value="' . $_core['uid'] . '">' . htmlspecialchars($_core['label']) . '</option>'; |
|
| 137 | 137 | |
| 138 | 138 | } |
| 139 | 139 | |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | |
| 142 | 142 | $form .= '<input type="hidden" name="CMD" value="indexFile" />'; |
| 143 | 143 | |
| 144 | - $form .= '<input type="submit" name="'.$this->prefixId.'[submit]" value="'.$GLOBALS['LANG']->getLL('form.submit').'" />'; |
|
| 144 | + $form .= '<input type="submit" name="' . $this->prefixId . '[submit]" value="' . $GLOBALS['LANG']->getLL('form.submit') . '" />'; |
|
| 145 | 145 | |
| 146 | 146 | return $form; |
| 147 | 147 | |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | $this->markerArray['CONTENT'] .= $_message->render(); |
| 183 | 183 | |
| 184 | 184 | // Start next loop. |
| 185 | - $this->markerArray['CONTENT'] .= '<script type="text/javascript">window.location.href=unescape("'.\TYPO3\CMS\Core\Utility\GeneralUtility::rawUrlEncodeJS(\TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array ('id' => $this->id, 'CMD' => 'indexLoop', $this->prefixId => array ('core' => $this->data['core']), 'random' => uniqid())))).'");</script>'; |
|
| 185 | + $this->markerArray['CONTENT'] .= '<script type="text/javascript">window.location.href=unescape("' . \TYPO3\CMS\Core\Utility\GeneralUtility::rawUrlEncodeJS(\TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('id' => $this->id, 'CMD' => 'indexLoop', $this->prefixId => array('core' => $this->data['core']), 'random' => uniqid())))) . '");</script>'; |
|
| 186 | 186 | |
| 187 | 187 | $this->printContent(); |
| 188 | 188 | |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | 'tx_dlf_documents', |
| 256 | 256 | 'tx_dlf_relations', |
| 257 | 257 | 'tx_dlf_collections', |
| 258 | - 'AND tx_dlf_documents.pid='.intval($this->id).' AND tx_dlf_collections.uid='.intval($this->data['collection']).' AND tx_dlf_relations.ident='.$GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations').tx_dlf_helper::whereClause('tx_dlf_documents').tx_dlf_helper::whereClause('tx_dlf_collections'), |
|
| 258 | + 'AND tx_dlf_documents.pid=' . intval($this->id) . ' AND tx_dlf_collections.uid=' . intval($this->data['collection']) . ' AND tx_dlf_relations.ident=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations') . tx_dlf_helper::whereClause('tx_dlf_documents') . tx_dlf_helper::whereClause('tx_dlf_collections'), |
|
| 259 | 259 | 'tx_dlf_documents.uid', |
| 260 | 260 | '', |
| 261 | 261 | '' |
@@ -267,7 +267,7 @@ discard block |
||
| 267 | 267 | $_result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 268 | 268 | 'tx_dlf_documents.title AS title,tx_dlf_documents.uid AS uid', |
| 269 | 269 | 'tx_dlf_documents', |
| 270 | - 'tx_dlf_documents.pid='.intval($this->id).tx_dlf_helper::whereClause('tx_dlf_documents'), |
|
| 270 | + 'tx_dlf_documents.pid=' . intval($this->id) . tx_dlf_helper::whereClause('tx_dlf_documents'), |
|
| 271 | 271 | '', |
| 272 | 272 | '', |
| 273 | 273 | '' |
@@ -276,11 +276,11 @@ discard block |
||
| 276 | 276 | } |
| 277 | 277 | |
| 278 | 278 | // Save them as a list object in user's session. |
| 279 | - $elements = array (); |
|
| 279 | + $elements = array(); |
|
| 280 | 280 | |
| 281 | 281 | while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($_result)) { |
| 282 | 282 | |
| 283 | - $elements[] = array ($resArray['uid'], $resArray['title']); |
|
| 283 | + $elements[] = array($resArray['uid'], $resArray['title']); |
|
| 284 | 284 | |
| 285 | 285 | } |
| 286 | 286 | |
@@ -366,8 +366,8 @@ discard block |
||
| 366 | 366 | */ |
| 367 | 367 | protected function setMOD_MENU() { |
| 368 | 368 | |
| 369 | - $this->MOD_MENU = array ( |
|
| 370 | - 'function' => array ( |
|
| 369 | + $this->MOD_MENU = array( |
|
| 370 | + 'function' => array( |
|
| 371 | 371 | 'indexFile' => $GLOBALS['LANG']->getLL('function.indexFile'), |
| 372 | 372 | //'reindexDoc' => $GLOBALS['LANG']->getLL('function.reindexDoc'), |
| 373 | 373 | 'reindexDocs' => $GLOBALS['LANG']->getLL('function.reindexDocs'), |
@@ -17,7 +17,8 @@ discard block |
||
| 17 | 17 | * @subpackage tx_dlf |
| 18 | 18 | * @access public |
| 19 | 19 | */ |
| 20 | -class tx_dlf_modIndexing extends tx_dlf_module { |
|
| 20 | +class tx_dlf_modIndexing extends tx_dlf_module |
|
| 21 | +{ |
|
| 21 | 22 | |
| 22 | 23 | protected $modPath = 'indexing/'; |
| 23 | 24 | |
@@ -46,7 +47,8 @@ discard block |
||
| 46 | 47 | * |
| 47 | 48 | * @return string The HTML output |
| 48 | 49 | */ |
| 49 | - protected function getCollList() { |
|
| 50 | + protected function getCollList() |
|
| 51 | + { |
|
| 50 | 52 | |
| 51 | 53 | // Get all available Solr cores. |
| 52 | 54 | $_cores = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
@@ -110,7 +112,8 @@ discard block |
||
| 110 | 112 | * |
| 111 | 113 | * @return string The HTML output |
| 112 | 114 | */ |
| 113 | - protected function getFileForm() { |
|
| 115 | + protected function getFileForm() |
|
| 116 | + { |
|
| 114 | 117 | |
| 115 | 118 | // Get all available Solr cores. |
| 116 | 119 | $_cores = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
@@ -154,7 +157,8 @@ discard block |
||
| 154 | 157 | * |
| 155 | 158 | * @return void |
| 156 | 159 | */ |
| 157 | - protected function indexLoop() { |
|
| 160 | + protected function indexLoop() |
|
| 161 | + { |
|
| 158 | 162 | |
| 159 | 163 | // Get document from list. |
| 160 | 164 | list ($uid,) = $this->list->remove(0); |
@@ -195,7 +199,8 @@ discard block |
||
| 195 | 199 | * |
| 196 | 200 | * @return void |
| 197 | 201 | */ |
| 198 | - public function main() { |
|
| 202 | + public function main() |
|
| 203 | + { |
|
| 199 | 204 | |
| 200 | 205 | // Is the user allowed to access this page? |
| 201 | 206 | $access = is_array($this->pageInfo) || $GLOBALS['BE_USER']->isAdmin(); |
@@ -364,7 +369,8 @@ discard block |
||
| 364 | 369 | * |
| 365 | 370 | * @return void |
| 366 | 371 | */ |
| 367 | - protected function setMOD_MENU() { |
|
| 372 | + protected function setMOD_MENU() |
|
| 373 | + { |
|
| 368 | 374 | |
| 369 | 375 | $this->MOD_MENU = array ( |
| 370 | 376 | 'function' => array ( |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | $this->list->save(); |
| 163 | 163 | |
| 164 | 164 | // Save document to database and index. |
| 165 | - $doc = & tx_dlf_document::getInstance($uid, 0, TRUE); |
|
| 165 | + $doc = & tx_dlf_document::getInstance($uid, 0, true); |
|
| 166 | 166 | |
| 167 | 167 | if ($doc->ready) { |
| 168 | 168 | |
@@ -174,9 +174,9 @@ discard block |
||
| 174 | 174 | $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 175 | 175 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
| 176 | 176 | htmlspecialchars(sprintf(tx_dlf_helper::getLL('flash.documentsToGo'), count($this->list))), |
| 177 | - tx_dlf_helper::getLL('flash.running', TRUE), |
|
| 177 | + tx_dlf_helper::getLL('flash.running', true), |
|
| 178 | 178 | \TYPO3\CMS\Core\Messaging\FlashMessage::INFO, |
| 179 | - TRUE |
|
| 179 | + true |
|
| 180 | 180 | ); |
| 181 | 181 | |
| 182 | 182 | $this->markerArray['CONTENT'] .= $_message->render(); |
@@ -219,7 +219,7 @@ discard block |
||
| 219 | 219 | && \TYPO3\CMS\Core\Utility\GeneralUtility::isValidUrl($this->data['id'])) { |
| 220 | 220 | |
| 221 | 221 | // Save document to database and index. |
| 222 | - $doc = & tx_dlf_document::getInstance($this->data['id'], $this->id, TRUE); |
|
| 222 | + $doc = & tx_dlf_document::getInstance($this->data['id'], $this->id, true); |
|
| 223 | 223 | |
| 224 | 224 | if ($doc->ready) { |
| 225 | 225 | |
@@ -230,9 +230,9 @@ discard block |
||
| 230 | 230 | $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 231 | 231 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
| 232 | 232 | htmlspecialchars(sprintf(tx_dlf_helper::getLL('flash.fileNotLoaded'), $this->data['id'])), |
| 233 | - tx_dlf_helper::getLL('flash.error', TRUE), |
|
| 233 | + tx_dlf_helper::getLL('flash.error', true), |
|
| 234 | 234 | \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, |
| 235 | - TRUE |
|
| 235 | + true |
|
| 236 | 236 | ); |
| 237 | 237 | |
| 238 | 238 | tx_dlf_helper::addMessage($_message); |
@@ -314,10 +314,10 @@ discard block |
||
| 314 | 314 | |
| 315 | 315 | $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 316 | 316 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
| 317 | - tx_dlf_helper::getLL('flash.seeLog', TRUE), |
|
| 318 | - tx_dlf_helper::getLL('flash.done', TRUE), |
|
| 317 | + tx_dlf_helper::getLL('flash.seeLog', true), |
|
| 318 | + tx_dlf_helper::getLL('flash.done', true), |
|
| 319 | 319 | \TYPO3\CMS\Core\Messaging\FlashMessage::OK, |
| 320 | - TRUE |
|
| 320 | + true |
|
| 321 | 321 | ); |
| 322 | 322 | |
| 323 | 323 | tx_dlf_helper::addMessage($_message); |
@@ -11,9 +11,9 @@ discard block |
||
| 11 | 11 | |
| 12 | 12 | // Define metadata elements. |
| 13 | 13 | // @see http://dfg-viewer.de/en/profile-of-the-metadata/ |
| 14 | -$metadata = array ( |
|
| 15 | - 'type' => array ( |
|
| 16 | - 'format' => array (), |
|
| 14 | +$metadata = array( |
|
| 15 | + 'type' => array( |
|
| 16 | + 'format' => array(), |
|
| 17 | 17 | 'default_value' => '', |
| 18 | 18 | 'wrap' => '', |
| 19 | 19 | 'index_tokenized' => 0, |
@@ -25,14 +25,14 @@ discard block |
||
| 25 | 25 | 'is_listed' => 1, |
| 26 | 26 | 'index_autocomplete' => 0, |
| 27 | 27 | ), |
| 28 | - 'title' => array ( |
|
| 29 | - 'format' => array ( |
|
| 30 | - array ( |
|
| 28 | + 'title' => array( |
|
| 29 | + 'format' => array( |
|
| 30 | + array( |
|
| 31 | 31 | 'encoded' => 1, |
| 32 | 32 | 'xpath' => 'concat(./mods:titleInfo/mods:nonSort," ",./mods:titleInfo/mods:title)', |
| 33 | 33 | 'xpath_sorting' => './mods:titleInfo/mods:title', |
| 34 | 34 | ), |
| 35 | - array ( |
|
| 35 | + array( |
|
| 36 | 36 | 'encoded' => 2, |
| 37 | 37 | 'xpath' => './teihdr:fileDesc/teihdr:sourceDesc/teihdr:msDesc/teihdr:head/teihdr:note[@type="caption"]', |
| 38 | 38 | 'xpath_sorting' => '', |
@@ -49,9 +49,9 @@ discard block |
||
| 49 | 49 | 'is_listed' => 1, |
| 50 | 50 | 'index_autocomplete' => 1, |
| 51 | 51 | ), |
| 52 | - 'volume' => array ( |
|
| 53 | - 'format' => array ( |
|
| 54 | - array ( |
|
| 52 | + 'volume' => array( |
|
| 53 | + 'format' => array( |
|
| 54 | + array( |
|
| 55 | 55 | 'encoded' => 1, |
| 56 | 56 | 'xpath' => './mods:part/mods:detail/mods:number', |
| 57 | 57 | 'xpath_sorting' => './mods:part[@type="host"]/@order', |
@@ -68,9 +68,9 @@ discard block |
||
| 68 | 68 | 'is_listed' => 1, |
| 69 | 69 | 'index_autocomplete' => 0, |
| 70 | 70 | ), |
| 71 | - 'author' => array ( |
|
| 72 | - 'format' => array ( |
|
| 73 | - array ( |
|
| 71 | + 'author' => array( |
|
| 72 | + 'format' => array( |
|
| 73 | + array( |
|
| 74 | 74 | 'encoded' => 2, |
| 75 | 75 | 'xpath' => './teihdr:fileDesc/teihdr:sourceDesc/teihdr:msDesc/teihdr:head/teihdr:name', |
| 76 | 76 | 'xpath_sorting' => '', |
@@ -87,9 +87,9 @@ discard block |
||
| 87 | 87 | 'is_listed' => 1, |
| 88 | 88 | 'index_autocomplete' => 1, |
| 89 | 89 | ), |
| 90 | - 'place' => array ( |
|
| 91 | - 'format' => array ( |
|
| 92 | - array ( |
|
| 90 | + 'place' => array( |
|
| 91 | + 'format' => array( |
|
| 92 | + array( |
|
| 93 | 93 | 'encoded' => 2, |
| 94 | 94 | 'xpath' => './teihdr:fileDesc/teihdr:sourceDesc/teihdr:msDesc/teihdr:head/teihdr:origPlace', |
| 95 | 95 | 'xpath_sorting' => '', |
@@ -106,9 +106,9 @@ discard block |
||
| 106 | 106 | 'is_listed' => 1, |
| 107 | 107 | 'index_autocomplete' => 0, |
| 108 | 108 | ), |
| 109 | - 'year' => array ( |
|
| 110 | - 'format' => array ( |
|
| 111 | - array ( |
|
| 109 | + 'year' => array( |
|
| 110 | + 'format' => array( |
|
| 111 | + array( |
|
| 112 | 112 | 'encoded' => 2, |
| 113 | 113 | 'xpath' => './teihdr:fileDesc/teihdr:sourceDesc/teihdr:msDesc/teihdr:head/teihdr:origDate', |
| 114 | 114 | 'xpath_sorting' => './teihdr:fileDesc/teihdr:sourceDesc/teihdr:msDesc/teihdr:head/teihdr:origDate/@when', |
@@ -125,9 +125,9 @@ discard block |
||
| 125 | 125 | 'is_listed' => 1, |
| 126 | 126 | 'index_autocomplete' => 0, |
| 127 | 127 | ), |
| 128 | - 'language' => array ( |
|
| 129 | - 'format' => array ( |
|
| 130 | - array ( |
|
| 128 | + 'language' => array( |
|
| 129 | + 'format' => array( |
|
| 130 | + array( |
|
| 131 | 131 | 'encoded' => 1, |
| 132 | 132 | 'xpath' => './mods:language/mods:languageTerm', |
| 133 | 133 | 'xpath_sorting' => '', |
@@ -144,14 +144,14 @@ discard block |
||
| 144 | 144 | 'is_listed' => 0, |
| 145 | 145 | 'index_autocomplete' => 0, |
| 146 | 146 | ), |
| 147 | - 'collection' => array ( |
|
| 148 | - 'format' => array ( |
|
| 149 | - array ( |
|
| 147 | + 'collection' => array( |
|
| 148 | + 'format' => array( |
|
| 149 | + array( |
|
| 150 | 150 | 'encoded' => 1, |
| 151 | 151 | 'xpath' => './mods:classification', |
| 152 | 152 | 'xpath_sorting' => '', |
| 153 | 153 | ), |
| 154 | - array ( |
|
| 154 | + array( |
|
| 155 | 155 | 'encoded' => 2, |
| 156 | 156 | 'xpath' => './teihdr:fileDesc/teihdr:sourceDesc/teihdr:msDesc/teihdr:msIdentifier/teihdr:collection', |
| 157 | 157 | 'xpath_sorting' => '', |
@@ -168,14 +168,14 @@ discard block |
||
| 168 | 168 | 'is_listed' => 0, |
| 169 | 169 | 'index_autocomplete' => 0, |
| 170 | 170 | ), |
| 171 | - 'owner' => array ( |
|
| 172 | - 'format' => array ( |
|
| 173 | - array ( |
|
| 171 | + 'owner' => array( |
|
| 172 | + 'format' => array( |
|
| 173 | + array( |
|
| 174 | 174 | 'encoded' => 1, |
| 175 | 175 | 'xpath' => './mods:name[./mods:role/mods:roleTerm="own"]/mods:displayForm', |
| 176 | 176 | 'xpath_sorting' => '', |
| 177 | 177 | ), |
| 178 | - array ( |
|
| 178 | + array( |
|
| 179 | 179 | 'encoded' => 2, |
| 180 | 180 | 'xpath' => './teihdr:fileDesc/teihdr:publicationStmt/teihdr:publisher', |
| 181 | 181 | 'xpath_sorting' => '', |
@@ -192,14 +192,14 @@ discard block |
||
| 192 | 192 | 'is_listed' => 0, |
| 193 | 193 | 'index_autocomplete' => 0, |
| 194 | 194 | ), |
| 195 | - 'purl' => array ( |
|
| 196 | - 'format' => array ( |
|
| 197 | - array ( |
|
| 195 | + 'purl' => array( |
|
| 196 | + 'format' => array( |
|
| 197 | + array( |
|
| 198 | 198 | 'encoded' => 1, |
| 199 | 199 | 'xpath' => './mods:identifier[@type="purl"]', |
| 200 | 200 | 'xpath_sorting' => '', |
| 201 | 201 | ), |
| 202 | - array ( |
|
| 202 | + array( |
|
| 203 | 203 | 'encoded' => 2, |
| 204 | 204 | 'xpath' => './teihdr:fileDesc/teihdr:publicationStmt/teihdr:idno[@type="purl"]', |
| 205 | 205 | 'xpath_sorting' => '', |
@@ -216,14 +216,14 @@ discard block |
||
| 216 | 216 | 'is_listed' => 0, |
| 217 | 217 | 'index_autocomplete' => 0, |
| 218 | 218 | ), |
| 219 | - 'urn' => array ( |
|
| 220 | - 'format' => array ( |
|
| 221 | - array ( |
|
| 219 | + 'urn' => array( |
|
| 220 | + 'format' => array( |
|
| 221 | + array( |
|
| 222 | 222 | 'encoded' => 1, |
| 223 | 223 | 'xpath' => './mods:identifier[@type="urn"]', |
| 224 | 224 | 'xpath_sorting' => '', |
| 225 | 225 | ), |
| 226 | - array ( |
|
| 226 | + array( |
|
| 227 | 227 | 'encoded' => 2, |
| 228 | 228 | 'xpath' => './teihdr:fileDesc/teihdr:publicationStmt/teihdr:idno[@type="urn"]', |
| 229 | 229 | 'xpath_sorting' => '', |
@@ -240,14 +240,14 @@ discard block |
||
| 240 | 240 | 'is_listed' => 0, |
| 241 | 241 | 'index_autocomplete' => 0, |
| 242 | 242 | ), |
| 243 | - 'opac_id' => array ( |
|
| 244 | - 'format' => array ( |
|
| 245 | - array ( |
|
| 243 | + 'opac_id' => array( |
|
| 244 | + 'format' => array( |
|
| 245 | + array( |
|
| 246 | 246 | 'encoded' => 1, |
| 247 | 247 | 'xpath' => './mods:identifier[@type="opac"]', |
| 248 | 248 | 'xpath_sorting' => '', |
| 249 | 249 | ), |
| 250 | - array ( |
|
| 250 | + array( |
|
| 251 | 251 | 'encoded' => 2, |
| 252 | 252 | 'xpath' => './teihdr:fileDesc/teihdr:publicationStmt/teihdr:idno[@type="opac"]', |
| 253 | 253 | 'xpath_sorting' => '', |
@@ -264,14 +264,14 @@ discard block |
||
| 264 | 264 | 'is_listed' => 0, |
| 265 | 265 | 'index_autocomplete' => 0, |
| 266 | 266 | ), |
| 267 | - 'union_id' => array ( |
|
| 268 | - 'format' => array ( |
|
| 269 | - array ( |
|
| 267 | + 'union_id' => array( |
|
| 268 | + 'format' => array( |
|
| 269 | + array( |
|
| 270 | 270 | 'encoded' => 1, |
| 271 | 271 | 'xpath' => './mods:identifier[@type="ppn"]', |
| 272 | 272 | 'xpath_sorting' => '', |
| 273 | 273 | ), |
| 274 | - array ( |
|
| 274 | + array( |
|
| 275 | 275 | 'encoded' => 2, |
| 276 | 276 | 'xpath' => './teihdr:fileDesc/teihdr:publicationStmt/teihdr:idno[@type="mmid"]', |
| 277 | 277 | 'xpath_sorting' => '', |
@@ -288,14 +288,14 @@ discard block |
||
| 288 | 288 | 'is_listed' => 0, |
| 289 | 289 | 'index_autocomplete' => 0, |
| 290 | 290 | ), |
| 291 | - 'record_id' => array ( |
|
| 292 | - 'format' => array ( |
|
| 293 | - array ( |
|
| 291 | + 'record_id' => array( |
|
| 292 | + 'format' => array( |
|
| 293 | + array( |
|
| 294 | 294 | 'encoded' => 1, |
| 295 | 295 | 'xpath' => './mods:recordInfo/mods:recordIdentifier', |
| 296 | 296 | 'xpath_sorting' => '', |
| 297 | 297 | ), |
| 298 | - array ( |
|
| 298 | + array( |
|
| 299 | 299 | 'encoded' => 2, |
| 300 | 300 | 'xpath' => './teihdr:fileDesc/teihdr:publicationStmt/teihdr:idno[@type="recordIdentifier"]', |
| 301 | 301 | 'xpath_sorting' => '', |
@@ -312,14 +312,14 @@ discard block |
||
| 312 | 312 | 'is_listed' => 0, |
| 313 | 313 | 'index_autocomplete' => 0, |
| 314 | 314 | ), |
| 315 | - 'prod_id' => array ( |
|
| 316 | - 'format' => array ( |
|
| 317 | - array ( |
|
| 315 | + 'prod_id' => array( |
|
| 316 | + 'format' => array( |
|
| 317 | + array( |
|
| 318 | 318 | 'encoded' => 1, |
| 319 | 319 | 'xpath' => './mods:identifier[@type="kitodo"]', |
| 320 | 320 | 'xpath_sorting' => '', |
| 321 | 321 | ), |
| 322 | - array ( |
|
| 322 | + array( |
|
| 323 | 323 | 'encoded' => 2, |
| 324 | 324 | 'xpath' => './teihdr:fileDesc/teihdr:publicationStmt/teihdr:idno[@type="kitodo"]', |
| 325 | 325 | 'xpath_sorting' => '', |
@@ -21,11 +21,11 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | protected $modPath = 'newclient/'; |
| 23 | 23 | |
| 24 | - protected $buttonArray = array ( |
|
| 24 | + protected $buttonArray = array( |
|
| 25 | 25 | 'SHORTCUT' => '', |
| 26 | 26 | ); |
| 27 | 27 | |
| 28 | - protected $markerArray = array ( |
|
| 28 | + protected $markerArray = array( |
|
| 29 | 29 | 'CSH' => '', |
| 30 | 30 | 'MOD_MENU' => '', |
| 31 | 31 | 'CONTENT' => '', |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 45 | 45 | 'uid,db_mountpoints', |
| 46 | 46 | 'be_groups', |
| 47 | - 'title='.$GLOBALS['TYPO3_DB']->fullQuoteStr('_cli_dlf', 'be_groups').' AND '.$GLOBALS['TCA']['be_groups']['ctrl']['enablecolumns']['disabled'].'=0'.\TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('be_groups') |
|
| 47 | + 'title=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('_cli_dlf', 'be_groups') . ' AND ' . $GLOBALS['TCA']['be_groups']['ctrl']['enablecolumns']['disabled'] . '=0' . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('be_groups') |
|
| 48 | 48 | ); |
| 49 | 49 | |
| 50 | 50 | if ($GLOBALS['TYPO3_DB']->sql_num_rows($result)) { |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | // Add current page to mountpoints. |
| 55 | 55 | if (!\TYPO3\CMS\Core\Utility\GeneralUtility::inList($resArray['db_mountpoints'], $this->id)) { |
| 56 | 56 | |
| 57 | - $data['be_groups'][$resArray['uid']]['db_mountpoints'] = $resArray['db_mountpoints'].','.$this->id; |
|
| 57 | + $data['be_groups'][$resArray['uid']]['db_mountpoints'] = $resArray['db_mountpoints'] . ',' . $this->id; |
|
| 58 | 58 | |
| 59 | 59 | tx_dlf_helper::processDBasAdmin($data); |
| 60 | 60 | |
@@ -85,14 +85,14 @@ discard block |
||
| 85 | 85 | protected function cmdAddMetadata() { |
| 86 | 86 | |
| 87 | 87 | // Include metadata definition file. |
| 88 | - include_once(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey).'modules/'.$this->modPath.'metadata.inc.php'); |
|
| 88 | + include_once(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey) . 'modules/' . $this->modPath . 'metadata.inc.php'); |
|
| 89 | 89 | |
| 90 | 90 | $i = 0; |
| 91 | 91 | |
| 92 | 92 | // Build data array. |
| 93 | 93 | foreach ($metadata as $index_name => $values) { |
| 94 | 94 | |
| 95 | - $formatIds = array (); |
|
| 95 | + $formatIds = array(); |
|
| 96 | 96 | |
| 97 | 97 | foreach ($values['format'] as $format) { |
| 98 | 98 | |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | - $data['tx_dlf_metadata'][uniqid('NEW')] = array ( |
|
| 109 | + $data['tx_dlf_metadata'][uniqid('NEW')] = array( |
|
| 110 | 110 | 'pid' => intval($this->id), |
| 111 | 111 | 'label' => $GLOBALS['LANG']->getLL($index_name), |
| 112 | 112 | 'index_name' => $index_name, |
@@ -168,9 +168,9 @@ discard block |
||
| 168 | 168 | protected function cmdAddSolrCore() { |
| 169 | 169 | |
| 170 | 170 | // Build data array. |
| 171 | - $data['tx_dlf_solrcores'][uniqid('NEW')] = array ( |
|
| 171 | + $data['tx_dlf_solrcores'][uniqid('NEW')] = array( |
|
| 172 | 172 | 'pid' => intval($this->id), |
| 173 | - 'label' => $GLOBALS['LANG']->getLL('solrcore').' (PID '.$this->id.')', |
|
| 173 | + 'label' => $GLOBALS['LANG']->getLL('solrcore') . ' (PID ' . $this->id . ')', |
|
| 174 | 174 | 'index_name' => '', |
| 175 | 175 | ); |
| 176 | 176 | |
@@ -215,12 +215,12 @@ discard block |
||
| 215 | 215 | protected function cmdAddStructure() { |
| 216 | 216 | |
| 217 | 217 | // Include structure definition file. |
| 218 | - include_once(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey).'modules/'.$this->modPath.'structures.inc.php'); |
|
| 218 | + include_once(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey) . 'modules/' . $this->modPath . 'structures.inc.php'); |
|
| 219 | 219 | |
| 220 | 220 | // Build data array. |
| 221 | 221 | foreach ($structures as $index_name => $values) { |
| 222 | 222 | |
| 223 | - $data['tx_dlf_structures'][uniqid('NEW')] = array ( |
|
| 223 | + $data['tx_dlf_structures'][uniqid('NEW')] = array( |
|
| 224 | 224 | 'pid' => intval($this->id), |
| 225 | 225 | 'toplevel' => $values['toplevel'], |
| 226 | 226 | 'label' => $GLOBALS['LANG']->getLL($index_name), |
@@ -301,7 +301,7 @@ discard block |
||
| 301 | 301 | if (!empty($this->CMD)) { |
| 302 | 302 | |
| 303 | 303 | // Sanitize input... |
| 304 | - $_method = 'cmd'.ucfirst($this->CMD); |
|
| 304 | + $_method = 'cmd' . ucfirst($this->CMD); |
|
| 305 | 305 | |
| 306 | 306 | // ...and unset to prevent infinite looping. |
| 307 | 307 | unset ($this->CMD); |
@@ -318,7 +318,7 @@ discard block |
||
| 318 | 318 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 319 | 319 | 'uid', |
| 320 | 320 | 'tx_dlf_structures', |
| 321 | - 'pid='.intval($this->id).tx_dlf_helper::whereClause('tx_dlf_structures') |
|
| 321 | + 'pid=' . intval($this->id) . tx_dlf_helper::whereClause('tx_dlf_structures') |
|
| 322 | 322 | ); |
| 323 | 323 | |
| 324 | 324 | if ($GLOBALS['TYPO3_DB']->sql_num_rows($result)) { |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | } else { |
| 336 | 336 | |
| 337 | 337 | // Configuration missing. |
| 338 | - $_url = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array ('id' => $this->id, 'CMD' => 'addStructure'))); |
|
| 338 | + $_url = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('id' => $this->id, 'CMD' => 'addStructure'))); |
|
| 339 | 339 | |
| 340 | 340 | $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 341 | 341 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
@@ -353,7 +353,7 @@ discard block |
||
| 353 | 353 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 354 | 354 | 'uid', |
| 355 | 355 | 'tx_dlf_metadata', |
| 356 | - 'pid='.intval($this->id).tx_dlf_helper::whereClause('tx_dlf_metadata') |
|
| 356 | + 'pid=' . intval($this->id) . tx_dlf_helper::whereClause('tx_dlf_metadata') |
|
| 357 | 357 | ); |
| 358 | 358 | |
| 359 | 359 | if ($GLOBALS['TYPO3_DB']->sql_num_rows($result)) { |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | } else { |
| 371 | 371 | |
| 372 | 372 | // Configuration missing. |
| 373 | - $_url = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array ('id' => $this->id, 'CMD' => 'addMetadata'))); |
|
| 373 | + $_url = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('id' => $this->id, 'CMD' => 'addMetadata'))); |
|
| 374 | 374 | |
| 375 | 375 | $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 376 | 376 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
@@ -388,7 +388,7 @@ discard block |
||
| 388 | 388 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 389 | 389 | 'uid,db_mountpoints', |
| 390 | 390 | 'be_groups', |
| 391 | - 'title='.$GLOBALS['TYPO3_DB']->fullQuoteStr('_cli_dlf', 'be_groups').' AND '.$GLOBALS['TCA']['be_groups']['ctrl']['enablecolumns']['disabled'].'=0'.\TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('be_groups') |
|
| 391 | + 'title=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('_cli_dlf', 'be_groups') . ' AND ' . $GLOBALS['TCA']['be_groups']['ctrl']['enablecolumns']['disabled'] . '=0' . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('be_groups') |
|
| 392 | 392 | ); |
| 393 | 393 | |
| 394 | 394 | if ($GLOBALS['TYPO3_DB']->sql_num_rows($result)) { |
@@ -409,7 +409,7 @@ discard block |
||
| 409 | 409 | } else { |
| 410 | 410 | |
| 411 | 411 | // Configuration missing. |
| 412 | - $_url = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array ('id' => $this->id, 'CMD' => 'addAccessRights'))); |
|
| 412 | + $_url = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('id' => $this->id, 'CMD' => 'addAccessRights'))); |
|
| 413 | 413 | |
| 414 | 414 | $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 415 | 415 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
@@ -440,7 +440,7 @@ discard block |
||
| 440 | 440 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 441 | 441 | 'uid,pid', |
| 442 | 442 | 'tx_dlf_solrcores', |
| 443 | - 'pid IN ('.intval($this->id).',0)'.tx_dlf_helper::whereClause('tx_dlf_solrcores') |
|
| 443 | + 'pid IN (' . intval($this->id) . ',0)' . tx_dlf_helper::whereClause('tx_dlf_solrcores') |
|
| 444 | 444 | ); |
| 445 | 445 | |
| 446 | 446 | if ($GLOBALS['TYPO3_DB']->sql_num_rows($result)) { |
@@ -461,7 +461,7 @@ discard block |
||
| 461 | 461 | } else { |
| 462 | 462 | |
| 463 | 463 | // Default core available, but this is deprecated. |
| 464 | - $_url = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array ('id' => $this->id, 'CMD' => 'addSolrcore'))); |
|
| 464 | + $_url = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('id' => $this->id, 'CMD' => 'addSolrcore'))); |
|
| 465 | 465 | |
| 466 | 466 | $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 467 | 467 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
@@ -476,7 +476,7 @@ discard block |
||
| 476 | 476 | } else { |
| 477 | 477 | |
| 478 | 478 | // Solr core missing. |
| 479 | - $_url = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array ('id' => $this->id, 'CMD' => 'addSolrcore'))); |
|
| 479 | + $_url = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('id' => $this->id, 'CMD' => 'addSolrcore'))); |
|
| 480 | 480 | |
| 481 | 481 | $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 482 | 482 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
@@ -17,7 +17,8 @@ discard block |
||
| 17 | 17 | * @subpackage tx_dlf |
| 18 | 18 | * @access public |
| 19 | 19 | */ |
| 20 | -class tx_dlf_modNewclient extends tx_dlf_module { |
|
| 20 | +class tx_dlf_modNewclient extends tx_dlf_module |
|
| 21 | +{ |
|
| 21 | 22 | |
| 22 | 23 | protected $modPath = 'newclient/'; |
| 23 | 24 | |
@@ -38,7 +39,8 @@ discard block |
||
| 38 | 39 | * |
| 39 | 40 | * @return void |
| 40 | 41 | */ |
| 41 | - protected function cmdAddAccessRights() { |
|
| 42 | + protected function cmdAddAccessRights() |
|
| 43 | + { |
|
| 42 | 44 | |
| 43 | 45 | // Get command line indexer's usergroup. |
| 44 | 46 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
@@ -82,7 +84,8 @@ discard block |
||
| 82 | 84 | * |
| 83 | 85 | * @return void |
| 84 | 86 | */ |
| 85 | - protected function cmdAddMetadata() { |
|
| 87 | + protected function cmdAddMetadata() |
|
| 88 | + { |
|
| 86 | 89 | |
| 87 | 90 | // Include metadata definition file. |
| 88 | 91 | include_once(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey).'modules/'.$this->modPath.'metadata.inc.php'); |
@@ -165,7 +168,8 @@ discard block |
||
| 165 | 168 | * |
| 166 | 169 | * @return void |
| 167 | 170 | */ |
| 168 | - protected function cmdAddSolrCore() { |
|
| 171 | + protected function cmdAddSolrCore() |
|
| 172 | + { |
|
| 169 | 173 | |
| 170 | 174 | // Build data array. |
| 171 | 175 | $data['tx_dlf_solrcores'][uniqid('NEW')] = array ( |
@@ -212,7 +216,8 @@ discard block |
||
| 212 | 216 | * |
| 213 | 217 | * @return void |
| 214 | 218 | */ |
| 215 | - protected function cmdAddStructure() { |
|
| 219 | + protected function cmdAddStructure() |
|
| 220 | + { |
|
| 216 | 221 | |
| 217 | 222 | // Include structure definition file. |
| 218 | 223 | include_once(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey).'modules/'.$this->modPath.'structures.inc.php'); |
@@ -269,7 +274,8 @@ discard block |
||
| 269 | 274 | * |
| 270 | 275 | * @return void |
| 271 | 276 | */ |
| 272 | - public function main() { |
|
| 277 | + public function main() |
|
| 278 | + { |
|
| 273 | 279 | |
| 274 | 280 | // Is the user allowed to access this page? |
| 275 | 281 | $access = is_array($this->pageInfo) && $GLOBALS['BE_USER']->isAdmin(); |
@@ -62,9 +62,9 @@ discard block |
||
| 62 | 62 | $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 63 | 63 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
| 64 | 64 | tx_dlf_helper::getLL('flash.usergroupAddedMsg'), |
| 65 | - tx_dlf_helper::getLL('flash.usergroupAdded', TRUE), |
|
| 65 | + tx_dlf_helper::getLL('flash.usergroupAdded', true), |
|
| 66 | 66 | \TYPO3\CMS\Core\Messaging\FlashMessage::OK, |
| 67 | - FALSE |
|
| 67 | + false |
|
| 68 | 68 | ); |
| 69 | 69 | |
| 70 | 70 | tx_dlf_helper::addMessage($_message); |
@@ -136,9 +136,9 @@ discard block |
||
| 136 | 136 | $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 137 | 137 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
| 138 | 138 | tx_dlf_helper::getLL('flash.metadataAddedMsg'), |
| 139 | - tx_dlf_helper::getLL('flash.metadataAdded', TRUE), |
|
| 139 | + tx_dlf_helper::getLL('flash.metadataAdded', true), |
|
| 140 | 140 | \TYPO3\CMS\Core\Messaging\FlashMessage::OK, |
| 141 | - FALSE |
|
| 141 | + false |
|
| 142 | 142 | ); |
| 143 | 143 | |
| 144 | 144 | } else { |
@@ -147,9 +147,9 @@ discard block |
||
| 147 | 147 | $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 148 | 148 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
| 149 | 149 | tx_dlf_helper::getLL('flash.metadataNotAddedMsg'), |
| 150 | - tx_dlf_helper::getLL('flash.metadataNotAdded', TRUE), |
|
| 150 | + tx_dlf_helper::getLL('flash.metadataNotAdded', true), |
|
| 151 | 151 | \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, |
| 152 | - FALSE |
|
| 152 | + false |
|
| 153 | 153 | ); |
| 154 | 154 | |
| 155 | 155 | } |
@@ -183,9 +183,9 @@ discard block |
||
| 183 | 183 | $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 184 | 184 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
| 185 | 185 | tx_dlf_helper::getLL('flash.solrcoreAddedMsg'), |
| 186 | - tx_dlf_helper::getLL('flash.solrcoreAdded', TRUE), |
|
| 186 | + tx_dlf_helper::getLL('flash.solrcoreAdded', true), |
|
| 187 | 187 | \TYPO3\CMS\Core\Messaging\FlashMessage::OK, |
| 188 | - FALSE |
|
| 188 | + false |
|
| 189 | 189 | ); |
| 190 | 190 | |
| 191 | 191 | } else { |
@@ -194,9 +194,9 @@ discard block |
||
| 194 | 194 | $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 195 | 195 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
| 196 | 196 | tx_dlf_helper::getLL('flash.solrcoreNotAddedMsg'), |
| 197 | - tx_dlf_helper::getLL('flash.solrcoreNotAdded', TRUE), |
|
| 197 | + tx_dlf_helper::getLL('flash.solrcoreNotAdded', true), |
|
| 198 | 198 | \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, |
| 199 | - FALSE |
|
| 199 | + false |
|
| 200 | 200 | ); |
| 201 | 201 | |
| 202 | 202 | } |
@@ -240,9 +240,9 @@ discard block |
||
| 240 | 240 | $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 241 | 241 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
| 242 | 242 | tx_dlf_helper::getLL('flash.structureAddedMsg'), |
| 243 | - tx_dlf_helper::getLL('flash.structureAdded', TRUE), |
|
| 243 | + tx_dlf_helper::getLL('flash.structureAdded', true), |
|
| 244 | 244 | \TYPO3\CMS\Core\Messaging\FlashMessage::OK, |
| 245 | - FALSE |
|
| 245 | + false |
|
| 246 | 246 | ); |
| 247 | 247 | |
| 248 | 248 | } else { |
@@ -251,9 +251,9 @@ discard block |
||
| 251 | 251 | $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 252 | 252 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
| 253 | 253 | tx_dlf_helper::getLL('flash.structureNotAddedMsg'), |
| 254 | - tx_dlf_helper::getLL('flash.structureNotAdded', TRUE), |
|
| 254 | + tx_dlf_helper::getLL('flash.structureNotAdded', true), |
|
| 255 | 255 | \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, |
| 256 | - FALSE |
|
| 256 | + false |
|
| 257 | 257 | ); |
| 258 | 258 | |
| 259 | 259 | } |
@@ -282,9 +282,9 @@ discard block |
||
| 282 | 282 | $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 283 | 283 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
| 284 | 284 | tx_dlf_helper::getLL('flash.wrongPageTypeMsg'), |
| 285 | - tx_dlf_helper::getLL('flash.wrongPageType', TRUE), |
|
| 285 | + tx_dlf_helper::getLL('flash.wrongPageType', true), |
|
| 286 | 286 | \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, |
| 287 | - FALSE |
|
| 287 | + false |
|
| 288 | 288 | ); |
| 289 | 289 | |
| 290 | 290 | tx_dlf_helper::addMessage($_message); |
@@ -327,9 +327,9 @@ discard block |
||
| 327 | 327 | $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 328 | 328 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
| 329 | 329 | tx_dlf_helper::getLL('flash.structureOkayMsg'), |
| 330 | - tx_dlf_helper::getLL('flash.structureOkay', TRUE), |
|
| 330 | + tx_dlf_helper::getLL('flash.structureOkay', true), |
|
| 331 | 331 | \TYPO3\CMS\Core\Messaging\FlashMessage::OK, |
| 332 | - FALSE |
|
| 332 | + false |
|
| 333 | 333 | ); |
| 334 | 334 | |
| 335 | 335 | } else { |
@@ -340,9 +340,9 @@ discard block |
||
| 340 | 340 | $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 341 | 341 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
| 342 | 342 | sprintf(tx_dlf_helper::getLL('flash.structureNotOkayMsg'), $_url), |
| 343 | - tx_dlf_helper::getLL('flash.structureNotOkay', TRUE), |
|
| 343 | + tx_dlf_helper::getLL('flash.structureNotOkay', true), |
|
| 344 | 344 | \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, |
| 345 | - FALSE |
|
| 345 | + false |
|
| 346 | 346 | ); |
| 347 | 347 | |
| 348 | 348 | } |
@@ -362,9 +362,9 @@ discard block |
||
| 362 | 362 | $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 363 | 363 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
| 364 | 364 | tx_dlf_helper::getLL('flash.metadataOkayMsg'), |
| 365 | - tx_dlf_helper::getLL('flash.metadataOkay', TRUE), |
|
| 365 | + tx_dlf_helper::getLL('flash.metadataOkay', true), |
|
| 366 | 366 | \TYPO3\CMS\Core\Messaging\FlashMessage::OK, |
| 367 | - FALSE |
|
| 367 | + false |
|
| 368 | 368 | ); |
| 369 | 369 | |
| 370 | 370 | } else { |
@@ -375,9 +375,9 @@ discard block |
||
| 375 | 375 | $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 376 | 376 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
| 377 | 377 | sprintf(tx_dlf_helper::getLL('flash.metadataNotOkayMsg'), $_url), |
| 378 | - tx_dlf_helper::getLL('flash.metadataNotOkay', TRUE), |
|
| 378 | + tx_dlf_helper::getLL('flash.metadataNotOkay', true), |
|
| 379 | 379 | \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, |
| 380 | - FALSE |
|
| 380 | + false |
|
| 381 | 381 | ); |
| 382 | 382 | |
| 383 | 383 | } |
@@ -401,9 +401,9 @@ discard block |
||
| 401 | 401 | $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 402 | 402 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
| 403 | 403 | tx_dlf_helper::getLL('flash.usergroupOkayMsg'), |
| 404 | - tx_dlf_helper::getLL('flash.usergroupOkay', TRUE), |
|
| 404 | + tx_dlf_helper::getLL('flash.usergroupOkay', true), |
|
| 405 | 405 | \TYPO3\CMS\Core\Messaging\FlashMessage::OK, |
| 406 | - FALSE |
|
| 406 | + false |
|
| 407 | 407 | ); |
| 408 | 408 | |
| 409 | 409 | } else { |
@@ -414,9 +414,9 @@ discard block |
||
| 414 | 414 | $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 415 | 415 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
| 416 | 416 | sprintf(tx_dlf_helper::getLL('flash.usergroupNotOkayMsg'), $_url), |
| 417 | - tx_dlf_helper::getLL('flash.usergroupNotOkay', TRUE), |
|
| 417 | + tx_dlf_helper::getLL('flash.usergroupNotOkay', true), |
|
| 418 | 418 | \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, |
| 419 | - FALSE |
|
| 419 | + false |
|
| 420 | 420 | ); |
| 421 | 421 | |
| 422 | 422 | } |
@@ -427,9 +427,9 @@ discard block |
||
| 427 | 427 | $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 428 | 428 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
| 429 | 429 | tx_dlf_helper::getLL('flash.usergroupMissingMsg'), |
| 430 | - tx_dlf_helper::getLL('flash.usergroupMissing', TRUE), |
|
| 430 | + tx_dlf_helper::getLL('flash.usergroupMissing', true), |
|
| 431 | 431 | \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, |
| 432 | - FALSE |
|
| 432 | + false |
|
| 433 | 433 | ); |
| 434 | 434 | |
| 435 | 435 | } |
@@ -453,9 +453,9 @@ discard block |
||
| 453 | 453 | $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 454 | 454 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
| 455 | 455 | tx_dlf_helper::getLL('flash.solrcoreOkayMsg'), |
| 456 | - tx_dlf_helper::getLL('flash.solrcoreOkay', TRUE), |
|
| 456 | + tx_dlf_helper::getLL('flash.solrcoreOkay', true), |
|
| 457 | 457 | \TYPO3\CMS\Core\Messaging\FlashMessage::OK, |
| 458 | - FALSE |
|
| 458 | + false |
|
| 459 | 459 | ); |
| 460 | 460 | |
| 461 | 461 | } else { |
@@ -466,9 +466,9 @@ discard block |
||
| 466 | 466 | $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 467 | 467 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
| 468 | 468 | sprintf(tx_dlf_helper::getLL('flash.solrcoreDeprecatedMsg'), $_url), |
| 469 | - tx_dlf_helper::getLL('flash.solrcoreDeprecatedOkay', TRUE), |
|
| 469 | + tx_dlf_helper::getLL('flash.solrcoreDeprecatedOkay', true), |
|
| 470 | 470 | \TYPO3\CMS\Core\Messaging\FlashMessage::NOTICE, |
| 471 | - FALSE |
|
| 471 | + false |
|
| 472 | 472 | ); |
| 473 | 473 | |
| 474 | 474 | } |
@@ -481,9 +481,9 @@ discard block |
||
| 481 | 481 | $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( |
| 482 | 482 | 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', |
| 483 | 483 | sprintf(tx_dlf_helper::getLL('flash.solrcoreMissingMsg'), $_url), |
| 484 | - tx_dlf_helper::getLL('flash.solrcoreMissing', TRUE), |
|
| 484 | + tx_dlf_helper::getLL('flash.solrcoreMissing', true), |
|
| 485 | 485 | \TYPO3\CMS\Core\Messaging\FlashMessage::WARNING, |
| 486 | - FALSE |
|
| 486 | + false |
|
| 487 | 487 | ); |
| 488 | 488 | |
| 489 | 489 | } |
@@ -11,352 +11,352 @@ |
||
| 11 | 11 | |
| 12 | 12 | // Define structure elements. |
| 13 | 13 | // @see http://dfg-viewer.de/en/structural-data-set/ |
| 14 | -$structures = array ( |
|
| 15 | - 'act' => array ( |
|
| 14 | +$structures = array( |
|
| 15 | + 'act' => array( |
|
| 16 | 16 | 'toplevel' => 1, |
| 17 | 17 | 'oai_name' => '', |
| 18 | 18 | ), |
| 19 | - 'additional' => array ( |
|
| 19 | + 'additional' => array( |
|
| 20 | 20 | 'toplevel' => 0, |
| 21 | 21 | 'oai_name' => '' |
| 22 | 22 | ), |
| 23 | - 'address' => array ( |
|
| 23 | + 'address' => array( |
|
| 24 | 24 | 'toplevel' => 0, |
| 25 | 25 | 'oai_name' => '' |
| 26 | 26 | ), |
| 27 | - 'album' => array ( |
|
| 27 | + 'album' => array( |
|
| 28 | 28 | 'toplevel' => 1, |
| 29 | 29 | 'oai_name' => '', |
| 30 | 30 | ), |
| 31 | - 'annotation' => array ( |
|
| 31 | + 'annotation' => array( |
|
| 32 | 32 | 'toplevel' => 0, |
| 33 | 33 | 'oai_name' => '' |
| 34 | 34 | ), |
| 35 | - 'article' => array ( |
|
| 35 | + 'article' => array( |
|
| 36 | 36 | 'toplevel' => 0, |
| 37 | 37 | 'oai_name' => '' |
| 38 | 38 | ), |
| 39 | - 'atlas' => array ( |
|
| 39 | + 'atlas' => array( |
|
| 40 | 40 | 'toplevel' => 1, |
| 41 | 41 | 'oai_name' => '', |
| 42 | 42 | ), |
| 43 | - 'bachelor_thesis' => array ( |
|
| 43 | + 'bachelor_thesis' => array( |
|
| 44 | 44 | 'toplevel' => 1, |
| 45 | 45 | 'oai_name' => '', |
| 46 | 46 | ), |
| 47 | - 'binding' => array ( |
|
| 47 | + 'binding' => array( |
|
| 48 | 48 | 'toplevel' => 0, |
| 49 | 49 | 'oai_name' => '' |
| 50 | 50 | ), |
| 51 | - 'bookplate' => array ( |
|
| 51 | + 'bookplate' => array( |
|
| 52 | 52 | 'toplevel' => 0, |
| 53 | 53 | 'oai_name' => '' |
| 54 | 54 | ), |
| 55 | - 'cartulary' => array ( |
|
| 55 | + 'cartulary' => array( |
|
| 56 | 56 | 'toplevel' => 1, |
| 57 | 57 | 'oai_name' => '', |
| 58 | 58 | ), |
| 59 | - 'chapter' => array ( |
|
| 59 | + 'chapter' => array( |
|
| 60 | 60 | 'toplevel' => 0, |
| 61 | 61 | 'oai_name' => '' |
| 62 | 62 | ), |
| 63 | - 'collation' => array ( |
|
| 63 | + 'collation' => array( |
|
| 64 | 64 | 'toplevel' => 0, |
| 65 | 65 | 'oai_name' => '' |
| 66 | 66 | ), |
| 67 | - 'colophon' => array ( |
|
| 67 | + 'colophon' => array( |
|
| 68 | 68 | 'toplevel' => 0, |
| 69 | 69 | 'oai_name' => '' |
| 70 | 70 | ), |
| 71 | - 'contained_work' => array ( |
|
| 71 | + 'contained_work' => array( |
|
| 72 | 72 | 'toplevel' => 0, |
| 73 | 73 | 'oai_name' => '' |
| 74 | 74 | ), |
| 75 | - 'contents' => array ( |
|
| 75 | + 'contents' => array( |
|
| 76 | 76 | 'toplevel' => 0, |
| 77 | 77 | 'oai_name' => '' |
| 78 | 78 | ), |
| 79 | - 'corrigenda' => array ( |
|
| 79 | + 'corrigenda' => array( |
|
| 80 | 80 | 'toplevel' => 0, |
| 81 | 81 | 'oai_name' => '' |
| 82 | 82 | ), |
| 83 | - 'cover' => array ( |
|
| 83 | + 'cover' => array( |
|
| 84 | 84 | 'toplevel' => 0, |
| 85 | 85 | 'oai_name' => '' |
| 86 | 86 | ), |
| 87 | - 'cover_front' => array ( |
|
| 87 | + 'cover_front' => array( |
|
| 88 | 88 | 'toplevel' => 0, |
| 89 | 89 | 'oai_name' => '' |
| 90 | 90 | ), |
| 91 | - 'cover_back' => array ( |
|
| 91 | + 'cover_back' => array( |
|
| 92 | 92 | 'toplevel' => 0, |
| 93 | 93 | 'oai_name' => '' |
| 94 | 94 | ), |
| 95 | - 'day' => array ( |
|
| 95 | + 'day' => array( |
|
| 96 | 96 | 'toplevel' => 0, |
| 97 | 97 | 'oai_name' => '' |
| 98 | 98 | ), |
| 99 | - 'dedication' => array ( |
|
| 99 | + 'dedication' => array( |
|
| 100 | 100 | 'toplevel' => 0, |
| 101 | 101 | 'oai_name' => '' |
| 102 | 102 | ), |
| 103 | - 'diploma_thesis' => array ( |
|
| 103 | + 'diploma_thesis' => array( |
|
| 104 | 104 | 'toplevel' => 1, |
| 105 | 105 | 'oai_name' => '', |
| 106 | 106 | ), |
| 107 | - 'doctoral_thesis' => array ( |
|
| 107 | + 'doctoral_thesis' => array( |
|
| 108 | 108 | 'toplevel' => 1, |
| 109 | 109 | 'oai_name' => '', |
| 110 | 110 | ), |
| 111 | - 'document' => array ( |
|
| 111 | + 'document' => array( |
|
| 112 | 112 | 'toplevel' => 1, |
| 113 | 113 | 'oai_name' => '', |
| 114 | 114 | ), |
| 115 | - 'dossier' => array ( |
|
| 115 | + 'dossier' => array( |
|
| 116 | 116 | 'toplevel' => 1, |
| 117 | 117 | 'oai_name' => '', |
| 118 | 118 | ), |
| 119 | - 'edge' => array ( |
|
| 119 | + 'edge' => array( |
|
| 120 | 120 | 'toplevel' => 0, |
| 121 | 121 | 'oai_name' => '' |
| 122 | 122 | ), |
| 123 | - 'endsheet' => array ( |
|
| 123 | + 'endsheet' => array( |
|
| 124 | 124 | 'toplevel' => 0, |
| 125 | 125 | 'oai_name' => '' |
| 126 | 126 | ), |
| 127 | - 'engraved_titlepage' => array ( |
|
| 127 | + 'engraved_titlepage' => array( |
|
| 128 | 128 | 'toplevel' => 0, |
| 129 | 129 | 'oai_name' => '' |
| 130 | 130 | ), |
| 131 | - 'entry' => array ( |
|
| 131 | + 'entry' => array( |
|
| 132 | 132 | 'toplevel' => 0, |
| 133 | 133 | 'oai_name' => '' |
| 134 | 134 | ), |
| 135 | - 'fascicle' => array ( |
|
| 135 | + 'fascicle' => array( |
|
| 136 | 136 | 'toplevel' => 0, |
| 137 | 137 | 'oai_name' => '' |
| 138 | 138 | ), |
| 139 | - 'file' => array ( |
|
| 139 | + 'file' => array( |
|
| 140 | 140 | 'toplevel' => 1, |
| 141 | 141 | 'oai_name' => '', |
| 142 | 142 | ), |
| 143 | - 'folder' => array ( |
|
| 143 | + 'folder' => array( |
|
| 144 | 144 | 'toplevel' => 1, |
| 145 | 145 | 'oai_name' => '', |
| 146 | 146 | ), |
| 147 | - 'fragment' => array ( |
|
| 147 | + 'fragment' => array( |
|
| 148 | 148 | 'toplevel' => 1, |
| 149 | 149 | 'oai_name' => '' |
| 150 | 150 | ), |
| 151 | - 'ground_plan' => array ( |
|
| 151 | + 'ground_plan' => array( |
|
| 152 | 152 | 'toplevel' => 1, |
| 153 | 153 | 'oai_name' => '', |
| 154 | 154 | ), |
| 155 | - 'habilitation_thesis' => array ( |
|
| 155 | + 'habilitation_thesis' => array( |
|
| 156 | 156 | 'toplevel' => 1, |
| 157 | 157 | 'oai_name' => '', |
| 158 | 158 | ), |
| 159 | - 'illustration' => array ( |
|
| 159 | + 'illustration' => array( |
|
| 160 | 160 | 'toplevel' => 0, |
| 161 | 161 | 'oai_name' => '' |
| 162 | 162 | ), |
| 163 | - 'image' => array ( |
|
| 163 | + 'image' => array( |
|
| 164 | 164 | 'toplevel' => 1, |
| 165 | 165 | 'oai_name' => '', |
| 166 | 166 | ), |
| 167 | - 'imprint' => array ( |
|
| 167 | + 'imprint' => array( |
|
| 168 | 168 | 'toplevel' => 0, |
| 169 | 169 | 'oai_name' => '' |
| 170 | 170 | ), |
| 171 | - 'index' => array ( |
|
| 171 | + 'index' => array( |
|
| 172 | 172 | 'toplevel' => 0, |
| 173 | 173 | 'oai_name' => '' |
| 174 | 174 | ), |
| 175 | - 'initial_decoration' => array ( |
|
| 175 | + 'initial_decoration' => array( |
|
| 176 | 176 | 'toplevel' => 0, |
| 177 | 177 | 'oai_name' => '' |
| 178 | 178 | ), |
| 179 | - 'issue' => array ( |
|
| 179 | + 'issue' => array( |
|
| 180 | 180 | 'toplevel' => 0, |
| 181 | 181 | 'oai_name' => '' |
| 182 | 182 | ), |
| 183 | - 'judgement' => array ( |
|
| 183 | + 'judgement' => array( |
|
| 184 | 184 | 'toplevel' => 1, |
| 185 | 185 | 'oai_name' => '', |
| 186 | 186 | ), |
| 187 | - 'land_register' => array ( |
|
| 187 | + 'land_register' => array( |
|
| 188 | 188 | 'toplevel' => 1, |
| 189 | 189 | 'oai_name' => '', |
| 190 | 190 | ), |
| 191 | - 'leaflet' => array ( |
|
| 191 | + 'leaflet' => array( |
|
| 192 | 192 | 'toplevel' => 1, |
| 193 | 193 | 'oai_name' => '', |
| 194 | 194 | ), |
| 195 | - 'lecture' => array ( |
|
| 195 | + 'lecture' => array( |
|
| 196 | 196 | 'toplevel' => 1, |
| 197 | 197 | 'oai_name' => '', |
| 198 | 198 | ), |
| 199 | - 'letter' => array ( |
|
| 199 | + 'letter' => array( |
|
| 200 | 200 | 'toplevel' => 0, |
| 201 | 201 | 'oai_name' => '', |
| 202 | 202 | ), |
| 203 | - 'magister_thesis' => array ( |
|
| 203 | + 'magister_thesis' => array( |
|
| 204 | 204 | 'toplevel' => 1, |
| 205 | 205 | 'oai_name' => '', |
| 206 | 206 | ), |
| 207 | - 'master_thesis' => array ( |
|
| 207 | + 'master_thesis' => array( |
|
| 208 | 208 | 'toplevel' => 1, |
| 209 | 209 | 'oai_name' => '', |
| 210 | 210 | ), |
| 211 | - 'manuscript' => array ( |
|
| 211 | + 'manuscript' => array( |
|
| 212 | 212 | 'toplevel' => 1, |
| 213 | 213 | 'oai_name' => '' |
| 214 | 214 | ), |
| 215 | - 'map' => array ( |
|
| 215 | + 'map' => array( |
|
| 216 | 216 | 'toplevel' => 0, |
| 217 | 217 | 'oai_name' => '' |
| 218 | 218 | ), |
| 219 | - 'monograph' => array ( |
|
| 219 | + 'monograph' => array( |
|
| 220 | 220 | 'toplevel' => 1, |
| 221 | 221 | 'oai_name' => '' |
| 222 | 222 | ), |
| 223 | - 'month' => array ( |
|
| 223 | + 'month' => array( |
|
| 224 | 224 | 'toplevel' => 0, |
| 225 | 225 | 'oai_name' => '' |
| 226 | 226 | ), |
| 227 | - 'multivolume_work' => array ( |
|
| 227 | + 'multivolume_work' => array( |
|
| 228 | 228 | 'toplevel' => 1, |
| 229 | 229 | 'oai_name' => '' |
| 230 | 230 | ), |
| 231 | - 'musical_notation' => array ( |
|
| 231 | + 'musical_notation' => array( |
|
| 232 | 232 | 'toplevel' => 0, |
| 233 | 233 | 'oai_name' => '' |
| 234 | 234 | ), |
| 235 | - 'newspaper' => array ( |
|
| 235 | + 'newspaper' => array( |
|
| 236 | 236 | 'toplevel' => 1, |
| 237 | 237 | 'oai_name' => '' |
| 238 | 238 | ), |
| 239 | - 'note' => array ( |
|
| 239 | + 'note' => array( |
|
| 240 | 240 | 'toplevel' => 0, |
| 241 | 241 | 'oai_name' => '', |
| 242 | 242 | ), |
| 243 | - 'official_notification' => array ( |
|
| 243 | + 'official_notification' => array( |
|
| 244 | 244 | 'toplevel' => 1, |
| 245 | 245 | 'oai_name' => '', |
| 246 | 246 | ), |
| 247 | - 'ornament' => array ( |
|
| 247 | + 'ornament' => array( |
|
| 248 | 248 | 'toplevel' => 0, |
| 249 | 249 | 'oai_name' => '' |
| 250 | 250 | ), |
| 251 | - 'paper' => array ( |
|
| 251 | + 'paper' => array( |
|
| 252 | 252 | 'toplevel' => 1, |
| 253 | 253 | 'oai_name' => '', |
| 254 | 254 | ), |
| 255 | - 'paste_down' => array ( |
|
| 255 | + 'paste_down' => array( |
|
| 256 | 256 | 'toplevel' => 0, |
| 257 | 257 | 'oai_name' => '' |
| 258 | 258 | ), |
| 259 | - 'periodical' => array ( |
|
| 259 | + 'periodical' => array( |
|
| 260 | 260 | 'toplevel' => 1, |
| 261 | 261 | 'oai_name' => '' |
| 262 | 262 | ), |
| 263 | - 'photograph' => array ( |
|
| 263 | + 'photograph' => array( |
|
| 264 | 264 | 'toplevel' => 1, |
| 265 | 265 | 'oai_name' => '', |
| 266 | 266 | ), |
| 267 | - 'plan' => array ( |
|
| 267 | + 'plan' => array( |
|
| 268 | 268 | 'toplevel' => 1, |
| 269 | 269 | 'oai_name' => '', |
| 270 | 270 | ), |
| 271 | - 'poster' => array ( |
|
| 271 | + 'poster' => array( |
|
| 272 | 272 | 'toplevel' => 1, |
| 273 | 273 | 'oai_name' => '', |
| 274 | 274 | ), |
| 275 | - 'preface' => array ( |
|
| 275 | + 'preface' => array( |
|
| 276 | 276 | 'toplevel' => 0, |
| 277 | 277 | 'oai_name' => '' |
| 278 | 278 | ), |
| 279 | - 'preprint' => array ( |
|
| 279 | + 'preprint' => array( |
|
| 280 | 280 | 'toplevel' => 1, |
| 281 | 281 | 'oai_name' => '', |
| 282 | 282 | ), |
| 283 | - 'printed_archives' => array ( |
|
| 283 | + 'printed_archives' => array( |
|
| 284 | 284 | 'toplevel' => 1, |
| 285 | 285 | 'oai_name' => '', |
| 286 | 286 | ), |
| 287 | - 'printers_mark' => array ( |
|
| 287 | + 'printers_mark' => array( |
|
| 288 | 288 | 'toplevel' => 0, |
| 289 | 289 | 'oai_name' => '' |
| 290 | 290 | ), |
| 291 | - 'privileges' => array ( |
|
| 291 | + 'privileges' => array( |
|
| 292 | 292 | 'toplevel' => 0, |
| 293 | 293 | 'oai_name' => '' |
| 294 | 294 | ), |
| 295 | - 'proceeding' => array ( |
|
| 295 | + 'proceeding' => array( |
|
| 296 | 296 | 'toplevel' => 1, |
| 297 | 297 | 'oai_name' => '', |
| 298 | 298 | ), |
| 299 | - 'provenance' => array ( |
|
| 299 | + 'provenance' => array( |
|
| 300 | 300 | 'toplevel' => 0, |
| 301 | 301 | 'oai_name' => '' |
| 302 | 302 | ), |
| 303 | - 'register' => array ( |
|
| 303 | + 'register' => array( |
|
| 304 | 304 | 'toplevel' => 1, |
| 305 | 305 | 'oai_name' => '', |
| 306 | 306 | ), |
| 307 | - 'report' => array ( |
|
| 307 | + 'report' => array( |
|
| 308 | 308 | 'toplevel' => 1, |
| 309 | 309 | 'oai_name' => '', |
| 310 | 310 | ), |
| 311 | - 'research_paper' => array ( |
|
| 311 | + 'research_paper' => array( |
|
| 312 | 312 | 'toplevel' => 1, |
| 313 | 313 | 'oai_name' => '', |
| 314 | 314 | ), |
| 315 | - 'scheme' => array ( |
|
| 315 | + 'scheme' => array( |
|
| 316 | 316 | 'toplevel' => 0, |
| 317 | 317 | 'oai_name' => '' |
| 318 | 318 | ), |
| 319 | - 'seal' => array ( |
|
| 319 | + 'seal' => array( |
|
| 320 | 320 | 'toplevel' => 0, |
| 321 | 321 | 'oai_name' => '', |
| 322 | 322 | ), |
| 323 | - 'section' => array ( |
|
| 323 | + 'section' => array( |
|
| 324 | 324 | 'toplevel' => 0, |
| 325 | 325 | 'oai_name' => '' |
| 326 | 326 | ), |
| 327 | - 'spine' => array ( |
|
| 327 | + 'spine' => array( |
|
| 328 | 328 | 'toplevel' => 0, |
| 329 | 329 | 'oai_name' => '' |
| 330 | 330 | ), |
| 331 | - 'stamp' => array ( |
|
| 331 | + 'stamp' => array( |
|
| 332 | 332 | 'toplevel' => 0, |
| 333 | 333 | 'oai_name' => '' |
| 334 | 334 | ), |
| 335 | - 'study' => array ( |
|
| 335 | + 'study' => array( |
|
| 336 | 336 | 'toplevel' => 1, |
| 337 | 337 | 'oai_name' => '', |
| 338 | 338 | ), |
| 339 | - 'table' => array ( |
|
| 339 | + 'table' => array( |
|
| 340 | 340 | 'toplevel' => 0, |
| 341 | 341 | 'oai_name' => '' |
| 342 | 342 | ), |
| 343 | - 'text' => array ( |
|
| 343 | + 'text' => array( |
|
| 344 | 344 | 'toplevel' => 0, |
| 345 | 345 | 'oai_name' => '' |
| 346 | 346 | ), |
| 347 | - 'title_page' => array ( |
|
| 347 | + 'title_page' => array( |
|
| 348 | 348 | 'toplevel' => 0, |
| 349 | 349 | 'oai_name' => '' |
| 350 | 350 | ), |
| 351 | - 'verse' => array ( |
|
| 351 | + 'verse' => array( |
|
| 352 | 352 | 'toplevel' => 0, |
| 353 | 353 | 'oai_name' => '' |
| 354 | 354 | ), |
| 355 | - 'volume' => array ( |
|
| 355 | + 'volume' => array( |
|
| 356 | 356 | 'toplevel' => 1, |
| 357 | 357 | 'oai_name' => '' |
| 358 | 358 | ), |
| 359 | - 'year' => array ( |
|
| 359 | + 'year' => array( |
|
| 360 | 360 | 'toplevel' => 1, |
| 361 | 361 | 'oai_name' => '' |
| 362 | 362 | ) |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | $query = $GLOBALS['TYPO3_DB']->SELECTquery( |
| 64 | 64 | '*', |
| 65 | 65 | 'tx_dlf_basket', |
| 66 | - 'tx_dlf_basket.fe_user_id='.intval($insertArray['fe_user_id']).tx_dlf_helper::whereClause('tx_dlf_basket'), |
|
| 66 | + 'tx_dlf_basket.fe_user_id=' . intval($insertArray['fe_user_id']) . tx_dlf_helper::whereClause('tx_dlf_basket'), |
|
| 67 | 67 | '', |
| 68 | 68 | '', |
| 69 | 69 | '1' |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | $query = $GLOBALS['TYPO3_DB']->SELECTquery( |
| 81 | 81 | '*', |
| 82 | 82 | 'tx_dlf_basket', |
| 83 | - 'tx_dlf_basket.session_id='.$GLOBALS['TYPO3_DB']->fullQuoteStr($sessionId, 'tx_dlf_basket').tx_dlf_helper::whereClause('tx_dlf_basket'), |
|
| 83 | + 'tx_dlf_basket.session_id=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($sessionId, 'tx_dlf_basket') . tx_dlf_helper::whereClause('tx_dlf_basket'), |
|
| 84 | 84 | '', |
| 85 | 85 | '', |
| 86 | 86 | '1' |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | $resultMail = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 203 | 203 | '*', |
| 204 | 204 | 'tx_dlf_mail', |
| 205 | - '1'.tx_dlf_helper::whereClause('tx_dlf_mail'), |
|
| 205 | + '1' . tx_dlf_helper::whereClause('tx_dlf_mail'), |
|
| 206 | 206 | '', |
| 207 | 207 | 'tx_dlf_mail.sorting', |
| 208 | 208 | '' |
@@ -212,11 +212,11 @@ discard block |
||
| 212 | 212 | |
| 213 | 213 | $mailForm = '<select name="tx_dlf[mail_action]">'; |
| 214 | 214 | |
| 215 | - $mailForm .= '<option value="">'.$this->pi_getLL('chooseMail', '', TRUE).'</option>'; |
|
| 215 | + $mailForm .= '<option value="">' . $this->pi_getLL('chooseMail', '', TRUE) . '</option>'; |
|
| 216 | 216 | |
| 217 | 217 | while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resultMail)) { |
| 218 | 218 | |
| 219 | - $mailForm .= '<option value="'.$row['uid'].'">'.$row['name'].' ('.$row['mail'].')</option>'; |
|
| 219 | + $mailForm .= '<option value="' . $row['uid'] . '">' . $row['name'] . ' (' . $row['mail'] . ')</option>'; |
|
| 220 | 220 | |
| 221 | 221 | } |
| 222 | 222 | |
@@ -230,9 +230,9 @@ discard block |
||
| 230 | 230 | // remove action form |
| 231 | 231 | $markerArray['###REMOVEACTION###'] = ' |
| 232 | 232 | <select name="tx_dlf[basket_action]"> |
| 233 | - <option value="">'.$this->pi_getLL('chooseAction', '', TRUE).'</option> |
|
| 234 | - <option value="open">'.$this->pi_getLL('download', '', TRUE).'</option> |
|
| 235 | - <option value="remove">'.$this->pi_getLL('remove', '', TRUE).'</option> |
|
| 233 | + <option value="">'.$this->pi_getLL('chooseAction', '', TRUE) . '</option> |
|
| 234 | + <option value="open">'.$this->pi_getLL('download', '', TRUE) . '</option> |
|
| 235 | + <option value="remove">'.$this->pi_getLL('remove', '', TRUE) . '</option> |
|
| 236 | 236 | </select> |
| 237 | 237 | <input type="submit"> |
| 238 | 238 | '; |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | $resultPrinter = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 242 | 242 | '*', |
| 243 | 243 | 'tx_dlf_printer', |
| 244 | - '1'.tx_dlf_helper::whereClause('tx_dlf_printer'), |
|
| 244 | + '1' . tx_dlf_helper::whereClause('tx_dlf_printer'), |
|
| 245 | 245 | '', |
| 246 | 246 | '', |
| 247 | 247 | '' |
@@ -253,11 +253,11 @@ discard block |
||
| 253 | 253 | |
| 254 | 254 | $printForm = '<select name="tx_dlf[print_action]">'; |
| 255 | 255 | |
| 256 | - $printForm .= '<option value="">'.$this->pi_getLL('choosePrinter', '', TRUE).'</option>'; |
|
| 256 | + $printForm .= '<option value="">' . $this->pi_getLL('choosePrinter', '', TRUE) . '</option>'; |
|
| 257 | 257 | |
| 258 | 258 | while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resultPrinter)) { |
| 259 | 259 | |
| 260 | - $printForm .= '<option value="'.$row['uid'].'">'.$row['label'].'</option>'; |
|
| 260 | + $printForm .= '<option value="' . $row['uid'] . '">' . $row['label'] . '</option>'; |
|
| 261 | 261 | |
| 262 | 262 | } |
| 263 | 263 | |
@@ -290,7 +290,7 @@ discard block |
||
| 290 | 290 | |
| 291 | 291 | $label = $this->pi_getLL('goBasket', '', TRUE); |
| 292 | 292 | |
| 293 | - $basketConf = array ( |
|
| 293 | + $basketConf = array( |
|
| 294 | 294 | 'parameter' => $this->conf['targetBasket'], |
| 295 | 295 | 'title' => $label |
| 296 | 296 | ); |
@@ -343,38 +343,38 @@ discard block |
||
| 343 | 343 | |
| 344 | 344 | $markerArray['###BASKETDATA###'] = $docData['downloadLink']; |
| 345 | 345 | |
| 346 | - $arrayKey = $id.'_'.$startpage; |
|
| 346 | + $arrayKey = $id . '_' . $startpage; |
|
| 347 | 347 | |
| 348 | 348 | if (isset($startX)) { |
| 349 | 349 | |
| 350 | - $arrayKey .= '_'.$startX; |
|
| 350 | + $arrayKey .= '_' . $startX; |
|
| 351 | 351 | |
| 352 | 352 | } |
| 353 | 353 | |
| 354 | 354 | if (isset($endX)) { |
| 355 | 355 | |
| 356 | - $arrayKey .= '_'.$endX; |
|
| 356 | + $arrayKey .= '_' . $endX; |
|
| 357 | 357 | |
| 358 | 358 | } |
| 359 | 359 | |
| 360 | - $controlMark = '<input value="'.$id.'" name="tx_dlf[selected]['.$arrayKey.'][id]" type="checkbox">'; |
|
| 360 | + $controlMark = '<input value="' . $id . '" name="tx_dlf[selected][' . $arrayKey . '][id]" type="checkbox">'; |
|
| 361 | 361 | |
| 362 | - $controlMark .= '<input value="'.$startpage.'" name="tx_dlf[selected]['.$arrayKey.'][startpage]" type="hidden">'; |
|
| 362 | + $controlMark .= '<input value="' . $startpage . '" name="tx_dlf[selected][' . $arrayKey . '][startpage]" type="hidden">'; |
|
| 363 | 363 | |
| 364 | - $controlMark .= '<input value="'.$endpage.'" name="tx_dlf[selected]['.$arrayKey.'][endpage]" type="hidden">'; |
|
| 364 | + $controlMark .= '<input value="' . $endpage . '" name="tx_dlf[selected][' . $arrayKey . '][endpage]" type="hidden">'; |
|
| 365 | 365 | |
| 366 | 366 | // add hidden fields for detail information |
| 367 | 367 | if ($startX) { |
| 368 | 368 | |
| 369 | - $controlMark .= '<input type="hidden" name="tx_dlf[selected]['.$arrayKey.'][startX]" value="'.$startX.'">'; |
|
| 369 | + $controlMark .= '<input type="hidden" name="tx_dlf[selected][' . $arrayKey . '][startX]" value="' . $startX . '">'; |
|
| 370 | 370 | |
| 371 | - $controlMark .= '<input type="hidden" name="tx_dlf[selected]['.$arrayKey.'][startY]" value="'.$startY.'">'; |
|
| 371 | + $controlMark .= '<input type="hidden" name="tx_dlf[selected][' . $arrayKey . '][startY]" value="' . $startY . '">'; |
|
| 372 | 372 | |
| 373 | - $controlMark .= '<input type="hidden" name="tx_dlf[selected]['.$arrayKey.'][endX]" value="'.$endX.'">'; |
|
| 373 | + $controlMark .= '<input type="hidden" name="tx_dlf[selected][' . $arrayKey . '][endX]" value="' . $endX . '">'; |
|
| 374 | 374 | |
| 375 | - $controlMark .= '<input type="hidden" name="tx_dlf[selected]['.$arrayKey.'][endY]" value="'.$endY.'">'; |
|
| 375 | + $controlMark .= '<input type="hidden" name="tx_dlf[selected][' . $arrayKey . '][endY]" value="' . $endY . '">'; |
|
| 376 | 376 | |
| 377 | - $controlMark .= '<input type="hidden" name="tx_dlf[selected]['.$arrayKey.'][rotation]" value="'.$rotation.'">'; |
|
| 377 | + $controlMark .= '<input type="hidden" name="tx_dlf[selected][' . $arrayKey . '][rotation]" value="' . $rotation . '">'; |
|
| 378 | 378 | |
| 379 | 379 | } |
| 380 | 380 | |
@@ -408,7 +408,7 @@ discard block |
||
| 408 | 408 | |
| 409 | 409 | if ($page != NULL || $_piVars['addToBasket'] == 'list') { |
| 410 | 410 | |
| 411 | - $documentItem = array ( |
|
| 411 | + $documentItem = array( |
|
| 412 | 412 | 'id' => intval($_piVars['id']), |
| 413 | 413 | 'startpage' => intval($_piVars['startpage']), |
| 414 | 414 | 'endpage' => !isset($_piVars['endpage']) || $_piVars['endpage'] === "" ? "" : intval($_piVars['endpage']), |
@@ -428,7 +428,7 @@ discard block |
||
| 428 | 428 | |
| 429 | 429 | } else { |
| 430 | 430 | |
| 431 | - $items = array (); |
|
| 431 | + $items = array(); |
|
| 432 | 432 | |
| 433 | 433 | } |
| 434 | 434 | |
@@ -453,17 +453,17 @@ discard block |
||
| 453 | 453 | |
| 454 | 454 | } |
| 455 | 455 | |
| 456 | - $arrayKey = $documentItem['id'].'_'.$page; |
|
| 456 | + $arrayKey = $documentItem['id'] . '_' . $page; |
|
| 457 | 457 | |
| 458 | 458 | if (!empty($documentItem['startX'])) { |
| 459 | 459 | |
| 460 | - $arrayKey .= '_'.$documentItem['startX']; |
|
| 460 | + $arrayKey .= '_' . $documentItem['startX']; |
|
| 461 | 461 | |
| 462 | 462 | } |
| 463 | 463 | |
| 464 | 464 | if (!empty($documentItem['endX'])) { |
| 465 | 465 | |
| 466 | - $arrayKey .= '_'.$documentItem['endX']; |
|
| 466 | + $arrayKey .= '_' . $documentItem['endX']; |
|
| 467 | 467 | |
| 468 | 468 | } |
| 469 | 469 | |
@@ -498,7 +498,7 @@ discard block |
||
| 498 | 498 | |
| 499 | 499 | } |
| 500 | 500 | |
| 501 | - $pdfGenerateUrl = $this->conf['pdfgenerate'].$pdfParams; |
|
| 501 | + $pdfGenerateUrl = $this->conf['pdfgenerate'] . $pdfParams; |
|
| 502 | 502 | |
| 503 | 503 | if ($this->conf['pregeneration']) { |
| 504 | 504 | |
@@ -507,7 +507,7 @@ discard block |
||
| 507 | 507 | <script> |
| 508 | 508 | $(document).ready(function(){ |
| 509 | 509 | $.ajax({ |
| 510 | - url: "'.$pdfGenerateUrl.'", |
|
| 510 | + url: "'.$pdfGenerateUrl . '", |
|
| 511 | 511 | }).done(function() { |
| 512 | 512 | }); |
| 513 | 513 | }); |
@@ -517,15 +517,15 @@ discard block |
||
| 517 | 517 | |
| 518 | 518 | } |
| 519 | 519 | |
| 520 | - $update = array ('doc_ids' => json_encode($items)); |
|
| 520 | + $update = array('doc_ids' => json_encode($items)); |
|
| 521 | 521 | |
| 522 | - $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_dlf_basket', 'uid='.intval($basketData['uid']), $update); |
|
| 522 | + $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_dlf_basket', 'uid=' . intval($basketData['uid']), $update); |
|
| 523 | 523 | |
| 524 | 524 | $basketData['doc_ids'] = $items; |
| 525 | 525 | |
| 526 | 526 | } |
| 527 | 527 | |
| 528 | - return array ('basketData' => $basketData, 'jsOutput' => $output); |
|
| 528 | + return array('basketData' => $basketData, 'jsOutput' => $output); |
|
| 529 | 529 | |
| 530 | 530 | } |
| 531 | 531 | |
@@ -549,17 +549,17 @@ discard block |
||
| 549 | 549 | |
| 550 | 550 | if (isset($value['id'])) { |
| 551 | 551 | |
| 552 | - $arrayKey = $value['id'].'_'.$value['startpage']; |
|
| 552 | + $arrayKey = $value['id'] . '_' . $value['startpage']; |
|
| 553 | 553 | |
| 554 | 554 | if (isset($value['startX'])) { |
| 555 | 555 | |
| 556 | - $arrayKey .= '_'.$value['startX']; |
|
| 556 | + $arrayKey .= '_' . $value['startX']; |
|
| 557 | 557 | |
| 558 | 558 | } |
| 559 | 559 | |
| 560 | 560 | if (isset($value['endX'])) { |
| 561 | 561 | |
| 562 | - $arrayKey .= '_'.$value['endX']; |
|
| 562 | + $arrayKey .= '_' . $value['endX']; |
|
| 563 | 563 | |
| 564 | 564 | } |
| 565 | 565 | |
@@ -575,15 +575,15 @@ discard block |
||
| 575 | 575 | |
| 576 | 576 | if (empty($items)) { |
| 577 | 577 | |
| 578 | - $update = array ('doc_ids' => ''); |
|
| 578 | + $update = array('doc_ids' => ''); |
|
| 579 | 579 | |
| 580 | 580 | } else { |
| 581 | 581 | |
| 582 | - $update = array ('doc_ids' => json_encode($items)); |
|
| 582 | + $update = array('doc_ids' => json_encode($items)); |
|
| 583 | 583 | |
| 584 | 584 | } |
| 585 | 585 | |
| 586 | - $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_dlf_basket', 'uid='.intval($basketData['uid']), $update); |
|
| 586 | + $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_dlf_basket', 'uid=' . intval($basketData['uid']), $update); |
|
| 587 | 587 | |
| 588 | 588 | $basketData['doc_ids'] = $items; |
| 589 | 589 | |
@@ -607,13 +607,13 @@ discard block |
||
| 607 | 607 | |
| 608 | 608 | $docData = $this->getDocumentData($docValue['id'], $docValue); |
| 609 | 609 | |
| 610 | - $pdfUrl .= $docData['urlParams'].$this->conf['pdfparamseparator']; |
|
| 610 | + $pdfUrl .= $docData['urlParams'] . $this->conf['pdfparamseparator']; |
|
| 611 | 611 | |
| 612 | 612 | } |
| 613 | 613 | |
| 614 | 614 | } |
| 615 | 615 | |
| 616 | - header('Location: '.$pdfUrl); |
|
| 616 | + header('Location: ' . $pdfUrl); |
|
| 617 | 617 | |
| 618 | 618 | ob_end_flush(); |
| 619 | 619 | |
@@ -661,7 +661,7 @@ discard block |
||
| 661 | 661 | |
| 662 | 662 | $urlParams = str_replace("##rotation##", $data['rotation'] === "" ? "" : intval($data['rotation']), $urlParams); |
| 663 | 663 | |
| 664 | - $downloadUrl = $this->conf['pdfgenerate'].$urlParams; |
|
| 664 | + $downloadUrl = $this->conf['pdfgenerate'] . $urlParams; |
|
| 665 | 665 | |
| 666 | 666 | $title = $document->getTitle($id, TRUE); |
| 667 | 667 | |
@@ -677,22 +677,22 @@ discard block |
||
| 677 | 677 | if ($data['startX'] != '' && $data['endX'] != '') { |
| 678 | 678 | |
| 679 | 679 | // cutout |
| 680 | - $info .= $this->pi_getLL('cutout', '', TRUE).' '; |
|
| 680 | + $info .= $this->pi_getLL('cutout', '', TRUE) . ' '; |
|
| 681 | 681 | |
| 682 | 682 | } |
| 683 | 683 | |
| 684 | 684 | if ($data['startpage'] == $data['endpage']) { |
| 685 | 685 | |
| 686 | 686 | // One page |
| 687 | - $info .= $this->pi_getLL('page', '', TRUE).' '.$data['startpage']; |
|
| 687 | + $info .= $this->pi_getLL('page', '', TRUE) . ' ' . $data['startpage']; |
|
| 688 | 688 | |
| 689 | 689 | } else { |
| 690 | 690 | |
| 691 | - $info .= $this->pi_getLL('page', '', TRUE).' '.$data['startpage'].'-'.$data['endpage']; |
|
| 691 | + $info .= $this->pi_getLL('page', '', TRUE) . ' ' . $data['startpage'] . '-' . $data['endpage']; |
|
| 692 | 692 | |
| 693 | 693 | } |
| 694 | 694 | |
| 695 | - $downloadLink = '<a href="'.$downloadUrl.'" target="_blank">'.$title.'</a> ('.$info.')'; |
|
| 695 | + $downloadLink = '<a href="' . $downloadUrl . '" target="_blank">' . $title . '</a> (' . $info . ')'; |
|
| 696 | 696 | |
| 697 | 697 | if ($data['startpage'] == $data['endpage']) { |
| 698 | 698 | |
@@ -704,7 +704,7 @@ discard block |
||
| 704 | 704 | |
| 705 | 705 | } |
| 706 | 706 | |
| 707 | - return array ( |
|
| 707 | + return array( |
|
| 708 | 708 | 'downloadUrl' => $downloadUrl, |
| 709 | 709 | 'downloadLink' => $downloadLink, |
| 710 | 710 | 'pageNums' => $pageNums, |
@@ -730,7 +730,7 @@ discard block |
||
| 730 | 730 | $resultMail = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 731 | 731 | '*', |
| 732 | 732 | 'tx_dlf_mail', |
| 733 | - 'tx_dlf_mail.uid="'.intval($mailId).'"'.tx_dlf_helper::whereClause('tx_dlf_mail'), |
|
| 733 | + 'tx_dlf_mail.uid="' . intval($mailId) . '"' . tx_dlf_helper::whereClause('tx_dlf_mail'), |
|
| 734 | 734 | '', |
| 735 | 735 | '', |
| 736 | 736 | '1' |
@@ -738,7 +738,7 @@ discard block |
||
| 738 | 738 | |
| 739 | 739 | $mailData = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resultMail); |
| 740 | 740 | |
| 741 | - $mailText = $this->pi_getLL('mailBody', '', TRUE)."\n"; |
|
| 741 | + $mailText = $this->pi_getLL('mailBody', '', TRUE) . "\n"; |
|
| 742 | 742 | |
| 743 | 743 | $numberOfPages = 0; |
| 744 | 744 | |
@@ -753,7 +753,7 @@ discard block |
||
| 753 | 753 | |
| 754 | 754 | $docData = $this->getDocumentData($explodeId[0], $docValue); |
| 755 | 755 | |
| 756 | - $pdfUrl .= $docData['urlParams'].$this->conf['pdfparamseparator']; |
|
| 756 | + $pdfUrl .= $docData['urlParams'] . $this->conf['pdfparamseparator']; |
|
| 757 | 757 | |
| 758 | 758 | $pages = (abs(intval($docValue['startpage']) - intval($docValue['endpage']))); |
| 759 | 759 | |
@@ -774,7 +774,7 @@ discard block |
||
| 774 | 774 | // Remove leading/tailing pdfparamseperator |
| 775 | 775 | $pdfUrl = trim($pdfUrl, $this->conf['pdfparamseparator']); |
| 776 | 776 | |
| 777 | - $mailBody = $mailText.$pdfUrl; |
|
| 777 | + $mailBody = $mailText . $pdfUrl; |
|
| 778 | 778 | |
| 779 | 779 | // Get hook objects. |
| 780 | 780 | $hookObjects = tx_dlf_helper::getHookObjects($this->scriptRelPath); |
@@ -804,7 +804,7 @@ discard block |
||
| 804 | 804 | ->setFrom($from) |
| 805 | 805 | |
| 806 | 806 | // Set the To addresses with an associative array |
| 807 | - ->setTo(array ($mailData['mail'] => $mailData['name'])) |
|
| 807 | + ->setTo(array($mailData['mail'] => $mailData['name'])) |
|
| 808 | 808 | |
| 809 | 809 | ->setBody($mailBody, 'text/html') |
| 810 | 810 | |
@@ -812,7 +812,7 @@ discard block |
||
| 812 | 812 | ; |
| 813 | 813 | |
| 814 | 814 | // protocol |
| 815 | - $insertArray = array ( |
|
| 815 | + $insertArray = array( |
|
| 816 | 816 | 'pid' => $this->conf['pages'], |
| 817 | 817 | 'file_name' => $pdfUrl, |
| 818 | 818 | 'count_pages' => $numberOfPages, |
@@ -826,7 +826,7 @@ discard block |
||
| 826 | 826 | |
| 827 | 827 | $insertArray['name'] = $GLOBALS["TSFE"]->fe_user->user['username']; |
| 828 | 828 | |
| 829 | - $insertArray['label'] = 'Mail: '.$mailData['mail']; |
|
| 829 | + $insertArray['label'] = 'Mail: ' . $mailData['mail']; |
|
| 830 | 830 | |
| 831 | 831 | } else { |
| 832 | 832 | |
@@ -835,7 +835,7 @@ discard block |
||
| 835 | 835 | |
| 836 | 836 | $insertArray['name'] = 'n/a'; |
| 837 | 837 | |
| 838 | - $insertArray['label'] = 'Mail: '.$mailData['mail']; |
|
| 838 | + $insertArray['label'] = 'Mail: ' . $mailData['mail']; |
|
| 839 | 839 | |
| 840 | 840 | } |
| 841 | 841 | |
@@ -859,7 +859,7 @@ discard block |
||
| 859 | 859 | |
| 860 | 860 | $docData = $this->getDocumentData($docValue['id'], $docValue); |
| 861 | 861 | |
| 862 | - $pdfUrl .= $docData['urlParams'].$this->conf['pdfparamseparator']; |
|
| 862 | + $pdfUrl .= $docData['urlParams'] . $this->conf['pdfparamseparator']; |
|
| 863 | 863 | |
| 864 | 864 | $numberOfPages += $docData['pageNums']; |
| 865 | 865 | |
@@ -874,7 +874,7 @@ discard block |
||
| 874 | 874 | $resultPrinter = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 875 | 875 | '*', |
| 876 | 876 | 'tx_dlf_printer', |
| 877 | - 'tx_dlf_printer.uid="'.intval($printerId).'"'.tx_dlf_helper::whereClause('tx_dlf_basket'), |
|
| 877 | + 'tx_dlf_printer.uid="' . intval($printerId) . '"' . tx_dlf_helper::whereClause('tx_dlf_basket'), |
|
| 878 | 878 | '', |
| 879 | 879 | '', |
| 880 | 880 | '1' |
@@ -897,7 +897,7 @@ discard block |
||
| 897 | 897 | |
| 898 | 898 | $docData = $this->getDocumentData($explodeId[0], $docValue); |
| 899 | 899 | |
| 900 | - $pdfUrl .= $docData['urlParams'].$this->conf['pdfparamseparator']; |
|
| 900 | + $pdfUrl .= $docData['urlParams'] . $this->conf['pdfparamseparator']; |
|
| 901 | 901 | |
| 902 | 902 | $numberOfPages += $docData['pageNums']; |
| 903 | 903 | |
@@ -910,7 +910,7 @@ discard block |
||
| 910 | 910 | } |
| 911 | 911 | |
| 912 | 912 | // protocol |
| 913 | - $insertArray = array ( |
|
| 913 | + $insertArray = array( |
|
| 914 | 914 | 'pid' => $this->conf['pages'], |
| 915 | 915 | 'file_name' => $pdfUrl, |
| 916 | 916 | 'count_pages' => $numberOfPages, |
@@ -924,7 +924,7 @@ discard block |
||
| 924 | 924 | |
| 925 | 925 | $insertArray['name'] = $GLOBALS["TSFE"]->fe_user->user['username']; |
| 926 | 926 | |
| 927 | - $insertArray['label'] = 'Print: '.$printerData['label']; |
|
| 927 | + $insertArray['label'] = 'Print: ' . $printerData['label']; |
|
| 928 | 928 | |
| 929 | 929 | } else { |
| 930 | 930 | |
@@ -933,14 +933,14 @@ discard block |
||
| 933 | 933 | |
| 934 | 934 | $insertArray['name'] = 'n/a'; |
| 935 | 935 | |
| 936 | - $insertArray['label'] = 'Print: '.$printerData['label']; |
|
| 936 | + $insertArray['label'] = 'Print: ' . $printerData['label']; |
|
| 937 | 937 | |
| 938 | 938 | } |
| 939 | 939 | |
| 940 | 940 | // add action to protocol |
| 941 | 941 | $GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_dlf_actionlog', $insertArray); |
| 942 | 942 | |
| 943 | - header('Location: '.$pdfUrl); |
|
| 943 | + header('Location: ' . $pdfUrl); |
|
| 944 | 944 | |
| 945 | 945 | ob_end_flush(); |
| 946 | 946 | |
@@ -17,7 +17,8 @@ discard block |
||
| 17 | 17 | * @subpackage tx_dlf |
| 18 | 18 | * @access public |
| 19 | 19 | */ |
| 20 | -class tx_dlf_basket extends tx_dlf_plugin { |
|
| 20 | +class tx_dlf_basket extends tx_dlf_plugin |
|
| 21 | +{ |
|
| 21 | 22 | |
| 22 | 23 | public $scriptRelPath = 'plugins/basket/class.tx_dlf_basket.php'; |
| 23 | 24 | |
@@ -31,7 +32,8 @@ discard block |
||
| 31 | 32 | * |
| 32 | 33 | * @return string The content that is displayed on the website |
| 33 | 34 | */ |
| 34 | - public function main($content, $conf) { |
|
| 35 | + public function main($content, $conf) |
|
| 36 | + { |
|
| 35 | 37 | |
| 36 | 38 | $this->init($conf); |
| 37 | 39 | |
@@ -315,7 +317,8 @@ discard block |
||
| 315 | 317 | * @param array $template Template information |
| 316 | 318 | * @return string |
| 317 | 319 | */ |
| 318 | - public function getEntry($data, $template) { |
|
| 320 | + public function getEntry($data, $template) |
|
| 321 | + { |
|
| 319 | 322 | |
| 320 | 323 | if (is_object($data)) { |
| 321 | 324 | |
@@ -392,7 +395,8 @@ discard block |
||
| 392 | 395 | * @param array $_piVars piVars |
| 393 | 396 | * @param array $basketData basket data |
| 394 | 397 | */ |
| 395 | - public function addToBasket($_piVars, $basketData) { |
|
| 398 | + public function addToBasket($_piVars, $basketData) |
|
| 399 | + { |
|
| 396 | 400 | |
| 397 | 401 | $output = ''; |
| 398 | 402 | |
@@ -535,7 +539,8 @@ discard block |
||
| 535 | 539 | * @param array $basketData array with document information |
| 536 | 540 | * @return array basket data |
| 537 | 541 | */ |
| 538 | - public function removeFromBasket($_piVars, $basketData) { |
|
| 542 | + public function removeFromBasket($_piVars, $basketData) |
|
| 543 | + { |
|
| 539 | 544 | |
| 540 | 545 | if (!empty($basketData['doc_ids'])) { |
| 541 | 546 | |
@@ -597,7 +602,8 @@ discard block |
||
| 597 | 602 | * @param array $basketData array with document information |
| 598 | 603 | * @return array basket data |
| 599 | 604 | */ |
| 600 | - public function openFromBasket($_piVars, $basketData) { |
|
| 605 | + public function openFromBasket($_piVars, $basketData) |
|
| 606 | + { |
|
| 601 | 607 | |
| 602 | 608 | $pdfUrl = $this->conf['pdfgenerate']; |
| 603 | 609 | |
@@ -626,7 +632,8 @@ discard block |
||
| 626 | 632 | * @param integer $id Document id |
| 627 | 633 | * @return mixed download url or false |
| 628 | 634 | */ |
| 629 | - public function getDocumentData($id, $data) { |
|
| 635 | + public function getDocumentData($id, $data) |
|
| 636 | + { |
|
| 630 | 637 | |
| 631 | 638 | // get document instance to load further information |
| 632 | 639 | $document = tx_dlf_document::getInstance($id, 0); |
@@ -721,7 +728,8 @@ discard block |
||
| 721 | 728 | /** |
| 722 | 729 | * Send mail with pdf download url |
| 723 | 730 | */ |
| 724 | - public function sendMail() { |
|
| 731 | + public function sendMail() |
|
| 732 | + { |
|
| 725 | 733 | |
| 726 | 734 | // send mail |
| 727 | 735 | $mailId = $this->piVars['mail_action']; |
@@ -847,7 +855,8 @@ discard block |
||
| 847 | 855 | /** |
| 848 | 856 | * Sends document information to an external printer (url) |
| 849 | 857 | */ |
| 850 | - public function printDocument() { |
|
| 858 | + public function printDocument() |
|
| 859 | + { |
|
| 851 | 860 | |
| 852 | 861 | $pdfUrl = $this->conf['pdfprint']; |
| 853 | 862 | |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | $this->init($conf); |
| 37 | 37 | |
| 38 | 38 | // Don't cache the output. |
| 39 | - $this->setCache(FALSE); |
|
| 39 | + $this->setCache(false); |
|
| 40 | 40 | |
| 41 | 41 | // Load template file. |
| 42 | 42 | if (!empty($this->conf['templateFile'])) { |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | |
| 74 | 74 | $GLOBALS['TSFE']->fe_user->setKey('ses', 'tx_dlf_basket', ''); |
| 75 | 75 | |
| 76 | - $GLOBALS['TSFE']->fe_user->sesData_change = TRUE; |
|
| 76 | + $GLOBALS['TSFE']->fe_user->sesData_change = true; |
|
| 77 | 77 | |
| 78 | 78 | $GLOBALS['TSFE']->fe_user->storeSessionData(); |
| 79 | 79 | |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | // set marker |
| 181 | 181 | $markerArray['###ACTION###'] = $this->pi_getPageLink($GLOBALS['TSFE']->id); |
| 182 | 182 | |
| 183 | - $markerArray['###LISTTITLE###'] = $this->pi_getLL('basket', '', TRUE); |
|
| 183 | + $markerArray['###LISTTITLE###'] = $this->pi_getLL('basket', '', true); |
|
| 184 | 184 | |
| 185 | 185 | if ($basketData['doc_ids']) { |
| 186 | 186 | |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | |
| 213 | 213 | $mailForm = '<select name="tx_dlf[mail_action]">'; |
| 214 | 214 | |
| 215 | - $mailForm .= '<option value="">'.$this->pi_getLL('chooseMail', '', TRUE).'</option>'; |
|
| 215 | + $mailForm .= '<option value="">'.$this->pi_getLL('chooseMail', '', true).'</option>'; |
|
| 216 | 216 | |
| 217 | 217 | while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resultMail)) { |
| 218 | 218 | |
@@ -230,9 +230,9 @@ discard block |
||
| 230 | 230 | // remove action form |
| 231 | 231 | $markerArray['###REMOVEACTION###'] = ' |
| 232 | 232 | <select name="tx_dlf[basket_action]"> |
| 233 | - <option value="">'.$this->pi_getLL('chooseAction', '', TRUE).'</option> |
|
| 234 | - <option value="open">'.$this->pi_getLL('download', '', TRUE).'</option> |
|
| 235 | - <option value="remove">'.$this->pi_getLL('remove', '', TRUE).'</option> |
|
| 233 | + <option value="">'.$this->pi_getLL('chooseAction', '', true).'</option> |
|
| 234 | + <option value="open">'.$this->pi_getLL('download', '', true).'</option> |
|
| 235 | + <option value="remove">'.$this->pi_getLL('remove', '', true).'</option> |
|
| 236 | 236 | </select> |
| 237 | 237 | <input type="submit"> |
| 238 | 238 | '; |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | |
| 254 | 254 | $printForm = '<select name="tx_dlf[print_action]">'; |
| 255 | 255 | |
| 256 | - $printForm .= '<option value="">'.$this->pi_getLL('choosePrinter', '', TRUE).'</option>'; |
|
| 256 | + $printForm .= '<option value="">'.$this->pi_getLL('choosePrinter', '', true).'</option>'; |
|
| 257 | 257 | |
| 258 | 258 | while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resultPrinter)) { |
| 259 | 259 | |
@@ -288,7 +288,7 @@ discard block |
||
| 288 | 288 | // basket go to |
| 289 | 289 | if ($this->conf['targetBasket'] && $this->conf['basketGoToButton'] && $this->piVars['id']) { |
| 290 | 290 | |
| 291 | - $label = $this->pi_getLL('goBasket', '', TRUE); |
|
| 291 | + $label = $this->pi_getLL('goBasket', '', true); |
|
| 292 | 292 | |
| 293 | 293 | $basketConf = array ( |
| 294 | 294 | 'parameter' => $this->conf['targetBasket'], |
@@ -303,7 +303,7 @@ discard block |
||
| 303 | 303 | |
| 304 | 304 | } |
| 305 | 305 | |
| 306 | - $content = $this->cObj->substituteMarkerArray($this->cObj->substituteSubpart($this->template, '###ENTRY###', $entries, TRUE), $markerArray); |
|
| 306 | + $content = $this->cObj->substituteMarkerArray($this->cObj->substituteSubpart($this->template, '###ENTRY###', $entries, true), $markerArray); |
|
| 307 | 307 | |
| 308 | 308 | return $this->pi_wrapInBaseClass($content); |
| 309 | 309 | |
@@ -383,7 +383,7 @@ discard block |
||
| 383 | 383 | |
| 384 | 384 | $markerArray['###NUMBER###'] = $docData['record_id']; |
| 385 | 385 | |
| 386 | - return $this->cObj->substituteMarkerArray($this->cObj->substituteSubpart($template['entry'], '###ENTRY###', '', TRUE), $markerArray); |
|
| 386 | + return $this->cObj->substituteMarkerArray($this->cObj->substituteSubpart($template['entry'], '###ENTRY###', '', true), $markerArray); |
|
| 387 | 387 | |
| 388 | 388 | } |
| 389 | 389 | |
@@ -406,7 +406,7 @@ discard block |
||
| 406 | 406 | |
| 407 | 407 | } |
| 408 | 408 | |
| 409 | - if ($page != NULL || $_piVars['addToBasket'] == 'list') { |
|
| 409 | + if ($page != null || $_piVars['addToBasket'] == 'list') { |
|
| 410 | 410 | |
| 411 | 411 | $documentItem = array ( |
| 412 | 412 | 'id' => intval($_piVars['id']), |
@@ -663,11 +663,11 @@ discard block |
||
| 663 | 663 | |
| 664 | 664 | $downloadUrl = $this->conf['pdfgenerate'].$urlParams; |
| 665 | 665 | |
| 666 | - $title = $document->getTitle($id, TRUE); |
|
| 666 | + $title = $document->getTitle($id, true); |
|
| 667 | 667 | |
| 668 | 668 | if (empty($title)) { |
| 669 | 669 | |
| 670 | - $title = $this->pi_getLL('noTitle', '', TRUE); |
|
| 670 | + $title = $this->pi_getLL('noTitle', '', true); |
|
| 671 | 671 | |
| 672 | 672 | } |
| 673 | 673 | |
@@ -677,18 +677,18 @@ discard block |
||
| 677 | 677 | if ($data['startX'] != '' && $data['endX'] != '') { |
| 678 | 678 | |
| 679 | 679 | // cutout |
| 680 | - $info .= $this->pi_getLL('cutout', '', TRUE).' '; |
|
| 680 | + $info .= $this->pi_getLL('cutout', '', true).' '; |
|
| 681 | 681 | |
| 682 | 682 | } |
| 683 | 683 | |
| 684 | 684 | if ($data['startpage'] == $data['endpage']) { |
| 685 | 685 | |
| 686 | 686 | // One page |
| 687 | - $info .= $this->pi_getLL('page', '', TRUE).' '.$data['startpage']; |
|
| 687 | + $info .= $this->pi_getLL('page', '', true).' '.$data['startpage']; |
|
| 688 | 688 | |
| 689 | 689 | } else { |
| 690 | 690 | |
| 691 | - $info .= $this->pi_getLL('page', '', TRUE).' '.$data['startpage'].'-'.$data['endpage']; |
|
| 691 | + $info .= $this->pi_getLL('page', '', true).' '.$data['startpage'].'-'.$data['endpage']; |
|
| 692 | 692 | |
| 693 | 693 | } |
| 694 | 694 | |
@@ -714,7 +714,7 @@ discard block |
||
| 714 | 714 | |
| 715 | 715 | } |
| 716 | 716 | |
| 717 | - return FALSE; |
|
| 717 | + return false; |
|
| 718 | 718 | |
| 719 | 719 | } |
| 720 | 720 | |
@@ -738,7 +738,7 @@ discard block |
||
| 738 | 738 | |
| 739 | 739 | $mailData = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resultMail); |
| 740 | 740 | |
| 741 | - $mailText = $this->pi_getLL('mailBody', '', TRUE)."\n"; |
|
| 741 | + $mailText = $this->pi_getLL('mailBody', '', true)."\n"; |
|
| 742 | 742 | |
| 743 | 743 | $numberOfPages = 0; |
| 744 | 744 | |
@@ -798,7 +798,7 @@ discard block |
||
| 798 | 798 | // Prepare and send the message |
| 799 | 799 | |
| 800 | 800 | // subject |
| 801 | - ->setSubject($this->pi_getLL('mailSubject', '', TRUE)) |
|
| 801 | + ->setSubject($this->pi_getLL('mailSubject', '', true)) |
|
| 802 | 802 | |
| 803 | 803 | // Set the From address with an associative array |
| 804 | 804 | ->setFrom($from) |
@@ -43,21 +43,21 @@ discard block |
||
| 43 | 43 | * @var array |
| 44 | 44 | * @access protected |
| 45 | 45 | */ |
| 46 | - protected $formats = array ( |
|
| 47 | - 'oai_dc' => array ( |
|
| 46 | + protected $formats = array( |
|
| 47 | + 'oai_dc' => array( |
|
| 48 | 48 | 'schema' => 'http://www.openarchives.org/OAI/2.0/oai_dc.xsd', |
| 49 | 49 | 'namespace' => 'http://www.openarchives.org/OAI/2.0/oai_dc/', |
| 50 | - 'requiredFields' => array ('record_id'), |
|
| 50 | + 'requiredFields' => array('record_id'), |
|
| 51 | 51 | ), |
| 52 | - 'epicur' => array ( |
|
| 52 | + 'epicur' => array( |
|
| 53 | 53 | 'schema' => 'http://www.persistent-identifier.de/xepicur/version1.0/xepicur.xsd', |
| 54 | 54 | 'namespace' => 'urn:nbn:de:1111-2004033116', |
| 55 | - 'requiredFields' => array ('purl', 'urn'), |
|
| 55 | + 'requiredFields' => array('purl', 'urn'), |
|
| 56 | 56 | ), |
| 57 | - 'mets' => array ( |
|
| 57 | + 'mets' => array( |
|
| 58 | 58 | 'schema' => 'http://www.loc.gov/standards/mets/version17/mets.v1-7.xsd', |
| 59 | 59 | 'namespace' => 'http://www.loc.gov/METS/', |
| 60 | - 'requiredFields' => array ('location'), |
|
| 60 | + 'requiredFields' => array('location'), |
|
| 61 | 61 | ) |
| 62 | 62 | ); |
| 63 | 63 | |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | // Delete expired resumption tokens. |
| 74 | 74 | $result = $GLOBALS['TYPO3_DB']->exec_DELETEquery( |
| 75 | 75 | 'tx_dlf_tokens', |
| 76 | - 'tx_dlf_tokens.ident="oai" AND tx_dlf_tokens.tstamp<'.intval($GLOBALS['EXEC_TIME'] - $this->conf['expired']) |
|
| 76 | + 'tx_dlf_tokens.ident="oai" AND tx_dlf_tokens.tstamp<' . intval($GLOBALS['EXEC_TIME'] - $this->conf['expired']) |
|
| 77 | 77 | ); |
| 78 | 78 | |
| 79 | 79 | if ($GLOBALS['TYPO3_DB']->sql_affected_rows() === -1) { |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | */ |
| 110 | 110 | protected function getUrlParams() { |
| 111 | 111 | |
| 112 | - $allowedParams = array ( |
|
| 112 | + $allowedParams = array( |
|
| 113 | 113 | 'verb', |
| 114 | 114 | 'identifier', |
| 115 | 115 | 'metadataPrefix', |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | ); |
| 121 | 121 | |
| 122 | 122 | // Clear plugin variables. |
| 123 | - $this->piVars = array (); |
|
| 123 | + $this->piVars = array(); |
|
| 124 | 124 | |
| 125 | 125 | // Set only allowed parameters. |
| 126 | 126 | foreach ($allowedParams as $param) { |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | |
| 147 | 147 | $oai_dc->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:dc', 'http://purl.org/dc/elements/1.1/'); |
| 148 | 148 | $oai_dc->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance'); |
| 149 | - $oai_dc->setAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'xsi:schemaLocation', $this->formats['oai_dc']['namespace'].' '.$this->formats['oai_dc']['schema']); |
|
| 149 | + $oai_dc->setAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'xsi:schemaLocation', $this->formats['oai_dc']['namespace'] . ' ' . $this->formats['oai_dc']['schema']); |
|
| 150 | 150 | |
| 151 | 151 | $oai_dc->appendChild($this->oai->createElementNS('http://purl.org/dc/elements/1.1/', 'dc:identifier', htmlspecialchars($metadata['record_id'], ENT_NOQUOTES, 'UTF-8'))); |
| 152 | 152 | |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 182 | 182 | 'tx_dlf_documents.record_id', |
| 183 | 183 | 'tx_dlf_documents', |
| 184 | - 'tx_dlf_documents.uid='.intval($metadata['partof']).tx_dlf_helper::whereClause('tx_dlf_documents'), |
|
| 184 | + 'tx_dlf_documents.uid=' . intval($metadata['partof']) . tx_dlf_helper::whereClause('tx_dlf_documents'), |
|
| 185 | 185 | '', |
| 186 | 186 | '', |
| 187 | 187 | '1' |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | |
| 257 | 257 | // Add attributes and build XML tree. |
| 258 | 258 | $epicur->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance'); |
| 259 | - $epicur->setAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'xsi:schemaLocation', $this->formats['epicur']['namespace'].' '.$this->formats['epicur']['schema']); |
|
| 259 | + $epicur->setAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'xsi:schemaLocation', $this->formats['epicur']['namespace'] . ' ' . $this->formats['epicur']['schema']); |
|
| 260 | 260 | |
| 261 | 261 | // Do we update an URN or register a new one? |
| 262 | 262 | if ($metadata['tstamp'] == $metadata['crdate']) { |
@@ -321,10 +321,10 @@ discard block |
||
| 321 | 321 | // Import node into DOMDocument. |
| 322 | 322 | $mets = $this->oai->importNode($root->item(0), TRUE); |
| 323 | 323 | } else { |
| 324 | - $this->devLog('[tx_dlf_oai->getMetsData([data])] No METS part found in document with location "'.$metadata['location'].'"', SYSLOG_SEVERITY_ERROR, $metadata); |
|
| 324 | + $this->devLog('[tx_dlf_oai->getMetsData([data])] No METS part found in document with location "' . $metadata['location'] . '"', SYSLOG_SEVERITY_ERROR, $metadata); |
|
| 325 | 325 | } |
| 326 | 326 | } else { |
| 327 | - $this->devLog('[tx_dlf_oai->getMetsData([data])] Could not load XML file from "'.$metadata['location'].'"', SYSLOG_SEVERITY_ERROR, $metadata); |
|
| 327 | + $this->devLog('[tx_dlf_oai->getMetsData([data])] Could not load XML file from "' . $metadata['location'] . '"', SYSLOG_SEVERITY_ERROR, $metadata); |
|
| 328 | 328 | } |
| 329 | 329 | |
| 330 | 330 | if ($mets === NULL) { |
@@ -369,7 +369,7 @@ discard block |
||
| 369 | 369 | list ($extKey, $filePath) = explode('/', substr($this->conf['stylesheet'], 4), 2); |
| 370 | 370 | |
| 371 | 371 | if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded($extKey)) { |
| 372 | - $this->conf['stylesheet'] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($extKey).$filePath; |
|
| 372 | + $this->conf['stylesheet'] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($extKey) . $filePath; |
|
| 373 | 373 | } |
| 374 | 374 | } |
| 375 | 375 | |
@@ -377,10 +377,10 @@ discard block |
||
| 377 | 377 | |
| 378 | 378 | } else { |
| 379 | 379 | // Use default stylesheet if no custom stylesheet is given. |
| 380 | - $stylesheet = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'plugins/oai/transform.xsl'); |
|
| 380 | + $stylesheet = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'plugins/oai/transform.xsl'); |
|
| 381 | 381 | } |
| 382 | 382 | |
| 383 | - $this->oai->appendChild($this->oai->createProcessingInstruction('xml-stylesheet', 'type="text/xsl" href="'.htmlspecialchars($stylesheet, ENT_NOQUOTES, 'UTF-8').'"')); |
|
| 383 | + $this->oai->appendChild($this->oai->createProcessingInstruction('xml-stylesheet', 'type="text/xsl" href="' . htmlspecialchars($stylesheet, ENT_NOQUOTES, 'UTF-8') . '"')); |
|
| 384 | 384 | |
| 385 | 385 | // Create root element. |
| 386 | 386 | $root = $this->oai->createElementNS('http://www.openarchives.org/OAI/2.0/', 'OAI-PMH'); |
@@ -422,7 +422,7 @@ discard block |
||
| 422 | 422 | } |
| 423 | 423 | |
| 424 | 424 | // Add request. |
| 425 | - $linkConf = array ( |
|
| 425 | + $linkConf = array( |
|
| 426 | 426 | 'parameter' => $GLOBALS['TSFE']->id, |
| 427 | 427 | 'forceAbsoluteUrl' => 1 |
| 428 | 428 | ); |
@@ -448,10 +448,10 @@ discard block |
||
| 448 | 448 | // Send headers. |
| 449 | 449 | header('HTTP/1.1 200 OK'); |
| 450 | 450 | header('Cache-Control: no-cache'); |
| 451 | - header('Content-Length: '.strlen($content)); |
|
| 451 | + header('Content-Length: ' . strlen($content)); |
|
| 452 | 452 | header('Content-Type: text/xml; charset=utf-8'); |
| 453 | - header('Date: '.date('r', $GLOBALS['EXEC_TIME'])); |
|
| 454 | - header('Expires: '.date('r', $GLOBALS['EXEC_TIME'] + $this->conf['expired'])); |
|
| 453 | + header('Date: ' . date('r', $GLOBALS['EXEC_TIME'])); |
|
| 454 | + header('Expires: ' . date('r', $GLOBALS['EXEC_TIME'] + $this->conf['expired'])); |
|
| 455 | 455 | |
| 456 | 456 | echo $content; |
| 457 | 457 | |
@@ -473,7 +473,7 @@ discard block |
||
| 473 | 473 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 474 | 474 | 'tx_dlf_tokens.options AS options', |
| 475 | 475 | 'tx_dlf_tokens', |
| 476 | - 'tx_dlf_tokens.ident="oai" AND tx_dlf_tokens.token='.$GLOBALS['TYPO3_DB']->fullQuoteStr($this->piVars['resumptionToken'], 'tx_dlf_tokens'), |
|
| 476 | + 'tx_dlf_tokens.ident="oai" AND tx_dlf_tokens.token=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->piVars['resumptionToken'], 'tx_dlf_tokens'), |
|
| 477 | 477 | '', |
| 478 | 478 | '', |
| 479 | 479 | '1' |
@@ -520,7 +520,7 @@ discard block |
||
| 520 | 520 | 'tx_dlf_documents', |
| 521 | 521 | 'tx_dlf_relations', |
| 522 | 522 | 'tx_dlf_collections', |
| 523 | - 'AND tx_dlf_documents.record_id='.$GLOBALS['TYPO3_DB']->fullQuoteStr($this->piVars['identifier'], 'tx_dlf_documents').' AND tx_dlf_documents.pid='.intval($this->conf['pages']).' AND tx_dlf_collections.pid='.intval($this->conf['pages']).' AND tx_dlf_relations.ident='.$GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations').$where.tx_dlf_helper::whereClause('tx_dlf_collections'), |
|
| 523 | + 'AND tx_dlf_documents.record_id=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->piVars['identifier'], 'tx_dlf_documents') . ' AND tx_dlf_documents.pid=' . intval($this->conf['pages']) . ' AND tx_dlf_collections.pid=' . intval($this->conf['pages']) . ' AND tx_dlf_relations.ident=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations') . $where . tx_dlf_helper::whereClause('tx_dlf_collections'), |
|
| 524 | 524 | '', |
| 525 | 525 | '', |
| 526 | 526 | '1' |
@@ -608,7 +608,7 @@ discard block |
||
| 608 | 608 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 609 | 609 | 'tx_dlf_libraries.oai_label AS oai_label,tx_dlf_libraries.contact AS contact', |
| 610 | 610 | 'tx_dlf_libraries', |
| 611 | - 'tx_dlf_libraries.pid='.intval($this->conf['pages']).' AND tx_dlf_libraries.uid='.intval($this->conf['library']).tx_dlf_helper::whereClause('tx_dlf_libraries'), |
|
| 611 | + 'tx_dlf_libraries.pid=' . intval($this->conf['pages']) . ' AND tx_dlf_libraries.uid=' . intval($this->conf['library']) . tx_dlf_helper::whereClause('tx_dlf_libraries'), |
|
| 612 | 612 | '', |
| 613 | 613 | '', |
| 614 | 614 | '' |
@@ -631,7 +631,7 @@ discard block |
||
| 631 | 631 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 632 | 632 | 'tx_dlf_documents.tstamp AS tstamp', |
| 633 | 633 | 'tx_dlf_documents', |
| 634 | - 'tx_dlf_documents.pid='.intval($this->conf['pages']), |
|
| 634 | + 'tx_dlf_documents.pid=' . intval($this->conf['pages']), |
|
| 635 | 635 | '', |
| 636 | 636 | 'tx_dlf_documents.tstamp ASC', |
| 637 | 637 | '1' |
@@ -641,10 +641,10 @@ discard block |
||
| 641 | 641 | list ($timestamp) = $GLOBALS['TYPO3_DB']->sql_fetch_row($result); |
| 642 | 642 | $earliestDatestamp = gmdate('Y-m-d\TH:i:s\Z', $timestamp); |
| 643 | 643 | } else { |
| 644 | - $this->devLog('[tx_dlf_oai->verbIdentify()] No records found with PID "'.$this->conf['pages'].'"', SYSLOG_SEVERITY_NOTICE); |
|
| 644 | + $this->devLog('[tx_dlf_oai->verbIdentify()] No records found with PID "' . $this->conf['pages'] . '"', SYSLOG_SEVERITY_NOTICE); |
|
| 645 | 645 | } |
| 646 | 646 | |
| 647 | - $linkConf = array ( |
|
| 647 | + $linkConf = array( |
|
| 648 | 648 | 'parameter' => $GLOBALS['TSFE']->id, |
| 649 | 649 | 'forceAbsoluteUrl' => 1 |
| 650 | 650 | ); |
@@ -701,7 +701,7 @@ discard block |
||
| 701 | 701 | |
| 702 | 702 | $resultSet->reset(); |
| 703 | 703 | $resultSet->add($documentSet); |
| 704 | - $resultSet->metadata = array ( |
|
| 704 | + $resultSet->metadata = array( |
|
| 705 | 705 | 'completeListSize' => count($documentSet), |
| 706 | 706 | 'metadataPrefix' => $this->piVars['metadataPrefix'], |
| 707 | 707 | ); |
@@ -719,7 +719,7 @@ discard block |
||
| 719 | 719 | */ |
| 720 | 720 | protected function verbListMetadataFormats() { |
| 721 | 721 | |
| 722 | - $resArray = array (); |
|
| 722 | + $resArray = array(); |
|
| 723 | 723 | |
| 724 | 724 | // Check for invalid arguments. |
| 725 | 725 | if (count($this->piVars) > 1) { |
@@ -731,7 +731,7 @@ discard block |
||
| 731 | 731 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 732 | 732 | 'tx_dlf_documents.*', |
| 733 | 733 | 'tx_dlf_documents', |
| 734 | - 'tx_dlf_documents.pid='.intval($this->conf['pages']).' AND tx_dlf_documents.record_id='.$GLOBALS['TYPO3_DB']->fullQuoteStr($this->piVars['identifier'], 'tx_dlf_documents'), |
|
| 734 | + 'tx_dlf_documents.pid=' . intval($this->conf['pages']) . ' AND tx_dlf_documents.record_id=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->piVars['identifier'], 'tx_dlf_documents'), |
|
| 735 | 735 | '', |
| 736 | 736 | '', |
| 737 | 737 | '1' |
@@ -810,7 +810,7 @@ discard block |
||
| 810 | 810 | |
| 811 | 811 | $resultSet->reset(); |
| 812 | 812 | $resultSet->add($documentSet); |
| 813 | - $resultSet->metadata = array ( |
|
| 813 | + $resultSet->metadata = array( |
|
| 814 | 814 | 'completeListSize' => count($documentSet), |
| 815 | 815 | 'metadataPrefix' => $this->piVars['metadataPrefix'], |
| 816 | 816 | ); |
@@ -845,7 +845,7 @@ discard block |
||
| 845 | 845 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 846 | 846 | 'tx_dlf_collections.oai_name AS oai_name,tx_dlf_collections.label AS label', |
| 847 | 847 | 'tx_dlf_collections', |
| 848 | - 'tx_dlf_collections.sys_language_uid IN (-1,0) AND NOT tx_dlf_collections.oai_name=\'\' AND tx_dlf_collections.pid='.intval($this->conf['pages']).$where.tx_dlf_helper::whereClause('tx_dlf_collections'), |
|
| 848 | + 'tx_dlf_collections.sys_language_uid IN (-1,0) AND NOT tx_dlf_collections.oai_name=\'\' AND tx_dlf_collections.pid=' . intval($this->conf['pages']) . $where . tx_dlf_helper::whereClause('tx_dlf_collections'), |
|
| 849 | 849 | 'tx_dlf_collections.oai_name', |
| 850 | 850 | 'tx_dlf_collections.oai_name', |
| 851 | 851 | '' |
@@ -891,8 +891,8 @@ discard block |
||
| 891 | 891 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 892 | 892 | 'tx_dlf_collections.index_name AS index_name, tx_dlf_collections.uid AS uid, tx_dlf_collections.index_search as index_query ', |
| 893 | 893 | 'tx_dlf_collections', |
| 894 | - 'tx_dlf_collections.pid='.intval($this->conf['pages']).' AND tx_dlf_collections.oai_name='.$GLOBALS['TYPO3_DB']->fullQuoteStr($this->piVars['set'], |
|
| 895 | - 'tx_dlf_collections').$where.tx_dlf_helper::whereClause('tx_dlf_collections'), |
|
| 894 | + 'tx_dlf_collections.pid=' . intval($this->conf['pages']) . ' AND tx_dlf_collections.oai_name=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->piVars['set'], |
|
| 895 | + 'tx_dlf_collections') . $where . tx_dlf_helper::whereClause('tx_dlf_collections'), |
|
| 896 | 896 | '', |
| 897 | 897 | '', |
| 898 | 898 | '1' |
@@ -905,9 +905,9 @@ discard block |
||
| 905 | 905 | $resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result); |
| 906 | 906 | |
| 907 | 907 | if ($resArray['index_query'] != "") { |
| 908 | - $solr_query .= '('.$resArray['index_query'].')'; |
|
| 908 | + $solr_query .= '(' . $resArray['index_query'] . ')'; |
|
| 909 | 909 | } else { |
| 910 | - $solr_query .= 'collection:'.'"'.$resArray['index_name'].'"'; |
|
| 910 | + $solr_query .= 'collection:' . '"' . $resArray['index_name'] . '"'; |
|
| 911 | 911 | } |
| 912 | 912 | |
| 913 | 913 | } else { |
@@ -918,7 +918,7 @@ discard block |
||
| 918 | 918 | |
| 919 | 919 | // Check for required fields. |
| 920 | 920 | foreach ($this->formats[$this->piVars['metadataPrefix']]['requiredFields'] as $required) { |
| 921 | - $solr_query .= ' NOT '.$required.':""'; |
|
| 921 | + $solr_query .= ' NOT ' . $required . ':""'; |
|
| 922 | 922 | } |
| 923 | 923 | |
| 924 | 924 | // toplevel="true" is always required |
@@ -935,7 +935,7 @@ discard block |
||
| 935 | 935 | $timestamp = gmmktime($date_array['tm_hour'], $date_array['tm_min'], $date_array['tm_sec'], $date_array['tm_mon'] + 1, |
| 936 | 936 | $date_array['tm_mday'], $date_array['tm_year'] + 1900); |
| 937 | 937 | |
| 938 | - $from = date("Y-m-d", $timestamp).'T'.date("H:i:s", $timestamp).'.000Z'; |
|
| 938 | + $from = date("Y-m-d", $timestamp) . 'T' . date("H:i:s", $timestamp) . '.000Z'; |
|
| 939 | 939 | |
| 940 | 940 | } else { |
| 941 | 941 | throw new Exception('badArgument'); |
@@ -953,7 +953,7 @@ discard block |
||
| 953 | 953 | $timestamp = gmmktime($date_array['tm_hour'], $date_array['tm_min'], $date_array['tm_sec'], $date_array['tm_mon'] + 1, |
| 954 | 954 | $date_array['tm_mday'], $date_array['tm_year'] + 1900); |
| 955 | 955 | |
| 956 | - $until = date("Y-m-d", $timestamp).'T'.date("H:i:s", $timestamp).'.999Z'; |
|
| 956 | + $until = date("Y-m-d", $timestamp) . 'T' . date("H:i:s", $timestamp) . '.999Z'; |
|
| 957 | 957 | |
| 958 | 958 | if ($from != "*" && $from > $until) { |
| 959 | 959 | throw new Exception('badArgument'); |
@@ -971,9 +971,9 @@ discard block |
||
| 971 | 971 | } |
| 972 | 972 | } |
| 973 | 973 | |
| 974 | - $solr_query .= ' AND timestamp:['.$from.' TO '.$until.']'; |
|
| 974 | + $solr_query .= ' AND timestamp:[' . $from . ' TO ' . $until . ']'; |
|
| 975 | 975 | |
| 976 | - $documentSet = array (); |
|
| 976 | + $documentSet = array(); |
|
| 977 | 977 | |
| 978 | 978 | $solr = tx_dlf_solr::getInstance($this->conf['solrcore']); |
| 979 | 979 | |
@@ -982,9 +982,9 @@ discard block |
||
| 982 | 982 | } |
| 983 | 983 | |
| 984 | 984 | // We only care about the UID in the results and want them sorted |
| 985 | - $parameters = array ( |
|
| 985 | + $parameters = array( |
|
| 986 | 986 | "fields" => "uid", |
| 987 | - "sort" => array ( |
|
| 987 | + "sort" => array( |
|
| 988 | 988 | "uid" => "asc" |
| 989 | 989 | ) |
| 990 | 990 | ); |
@@ -1016,7 +1016,7 @@ discard block |
||
| 1016 | 1016 | 'tx_dlf_documents', |
| 1017 | 1017 | 'tx_dlf_relations', |
| 1018 | 1018 | 'tx_dlf_collections', |
| 1019 | - 'AND tx_dlf_documents.uid IN ('.implode(',', $GLOBALS['TYPO3_DB']->cleanIntArray($documentsToProcess)).') AND tx_dlf_documents.pid='.intval($this->conf['pages']).' AND tx_dlf_collections.pid='.intval($this->conf['pages']).' AND tx_dlf_relations.ident='.$GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations').tx_dlf_helper::whereClause('tx_dlf_collections'), |
|
| 1019 | + 'AND tx_dlf_documents.uid IN (' . implode(',', $GLOBALS['TYPO3_DB']->cleanIntArray($documentsToProcess)) . ') AND tx_dlf_documents.pid=' . intval($this->conf['pages']) . ' AND tx_dlf_collections.pid=' . intval($this->conf['pages']) . ' AND tx_dlf_relations.ident=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations') . tx_dlf_helper::whereClause('tx_dlf_collections'), |
|
| 1020 | 1020 | 'tx_dlf_documents.uid', |
| 1021 | 1021 | 'tx_dlf_documents.tstamp', |
| 1022 | 1022 | $this->conf['limit'] |
@@ -1109,7 +1109,7 @@ discard block |
||
| 1109 | 1109 | |
| 1110 | 1110 | $GLOBALS['TYPO3_DB']->exec_INSERTquery( |
| 1111 | 1111 | 'tx_dlf_tokens', |
| 1112 | - array ( |
|
| 1112 | + array( |
|
| 1113 | 1113 | 'tstamp' => $GLOBALS['EXEC_TIME'], |
| 1114 | 1114 | 'token' => $token, |
| 1115 | 1115 | 'options' => serialize($documentListSet), |
@@ -1122,7 +1122,7 @@ discard block |
||
| 1122 | 1122 | $resumptionToken = $this->oai->createElementNS('http://www.openarchives.org/OAI/2.0/', 'resumptionToken', htmlspecialchars($token, ENT_NOQUOTES, 'UTF-8')); |
| 1123 | 1123 | |
| 1124 | 1124 | } else { |
| 1125 | - $this->devLog('[tx_dlf_oai->verb'.$this->piVars['verb'].'()] Could not create resumption token', SYSLOG_SEVERITY_ERROR); |
|
| 1125 | + $this->devLog('[tx_dlf_oai->verb' . $this->piVars['verb'] . '()] Could not create resumption token', SYSLOG_SEVERITY_ERROR); |
|
| 1126 | 1126 | |
| 1127 | 1127 | } |
| 1128 | 1128 | } else { |
@@ -17,7 +17,8 @@ discard block |
||
| 17 | 17 | * @subpackage tx_dlf |
| 18 | 18 | * @access public |
| 19 | 19 | */ |
| 20 | -class tx_dlf_oai extends tx_dlf_plugin { |
|
| 20 | +class tx_dlf_oai extends tx_dlf_plugin |
|
| 21 | +{ |
|
| 21 | 22 | |
| 22 | 23 | public $scriptRelPath = 'plugins/oai/class.tx_dlf_oai.php'; |
| 23 | 24 | |
@@ -68,7 +69,8 @@ discard block |
||
| 68 | 69 | * |
| 69 | 70 | * @return void |
| 70 | 71 | */ |
| 71 | - protected function deleteExpiredTokens() { |
|
| 72 | + protected function deleteExpiredTokens() |
|
| 73 | + { |
|
| 72 | 74 | |
| 73 | 75 | // Delete expired resumption tokens. |
| 74 | 76 | $result = $GLOBALS['TYPO3_DB']->exec_DELETEquery( |
@@ -91,7 +93,8 @@ discard block |
||
| 91 | 93 | * |
| 92 | 94 | * @return DOMElement XML node to add to the OAI response |
| 93 | 95 | */ |
| 94 | - protected function error($type) { |
|
| 96 | + protected function error($type) |
|
| 97 | + { |
|
| 95 | 98 | $this->error = TRUE; |
| 96 | 99 | |
| 97 | 100 | $error = $this->oai->createElementNS('http://www.openarchives.org/OAI/2.0/', 'error', htmlspecialchars($this->pi_getLL($type, $type, FALSE), ENT_NOQUOTES, 'UTF-8')); |
@@ -107,7 +110,8 @@ discard block |
||
| 107 | 110 | * |
| 108 | 111 | * @return void |
| 109 | 112 | */ |
| 110 | - protected function getUrlParams() { |
|
| 113 | + protected function getUrlParams() |
|
| 114 | + { |
|
| 111 | 115 | |
| 112 | 116 | $allowedParams = array ( |
| 113 | 117 | 'verb', |
@@ -140,7 +144,8 @@ discard block |
||
| 140 | 144 | * |
| 141 | 145 | * @return DOMElement XML node to add to the OAI response |
| 142 | 146 | */ |
| 143 | - protected function getDcData(array $metadata) { |
|
| 147 | + protected function getDcData(array $metadata) |
|
| 148 | + { |
|
| 144 | 149 | |
| 145 | 150 | $oai_dc = $this->oai->createElementNS($this->formats['oai_dc']['namespace'], 'oai_dc:dc'); |
| 146 | 151 | |
@@ -207,7 +212,8 @@ discard block |
||
| 207 | 212 | * |
| 208 | 213 | * @return DOMElement XML node to add to the OAI response |
| 209 | 214 | */ |
| 210 | - protected function getEpicurData(array $metadata) { |
|
| 215 | + protected function getEpicurData(array $metadata) |
|
| 216 | + { |
|
| 211 | 217 | |
| 212 | 218 | // Define all XML elements with or without qualified namespace. |
| 213 | 219 | if (empty($this->conf['unqualified_epicur'])) { |
@@ -306,7 +312,8 @@ discard block |
||
| 306 | 312 | * |
| 307 | 313 | * @return DOMElement XML node to add to the OAI response |
| 308 | 314 | */ |
| 309 | - protected function getMetsData(array $metadata) { |
|
| 315 | + protected function getMetsData(array $metadata) |
|
| 316 | + { |
|
| 310 | 317 | |
| 311 | 318 | $mets = NULL; |
| 312 | 319 | |
@@ -344,7 +351,8 @@ discard block |
||
| 344 | 351 | * |
| 345 | 352 | * @return void |
| 346 | 353 | */ |
| 347 | - public function main($content, $conf) { |
|
| 354 | + public function main($content, $conf) |
|
| 355 | + { |
|
| 348 | 356 | |
| 349 | 357 | // Initialize plugin. |
| 350 | 358 | $this->init($conf); |
@@ -468,7 +476,8 @@ discard block |
||
| 468 | 476 | * |
| 469 | 477 | * @return string Substitution for subpart "###RESPONSE###" |
| 470 | 478 | */ |
| 471 | - protected function resume() { |
|
| 479 | + protected function resume() |
|
| 480 | + { |
|
| 472 | 481 | // Get resumption token. |
| 473 | 482 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
| 474 | 483 | 'tx_dlf_tokens.options AS options', |
@@ -499,7 +508,8 @@ discard block |
||
| 499 | 508 | * |
| 500 | 509 | * @return string Substitution for subpart "###RESPONSE###" |
| 501 | 510 | */ |
| 502 | - protected function verbGetRecord() { |
|
| 511 | + protected function verbGetRecord() |
|
| 512 | + { |
|
| 503 | 513 | |
| 504 | 514 | if (count($this->piVars) != 3 || empty($this->piVars['metadataPrefix']) || empty($this->piVars['identifier'])) { |
| 505 | 515 | return $this->error('badArgument'); |
@@ -592,7 +602,8 @@ discard block |
||
| 592 | 602 | * |
| 593 | 603 | * @return DOMElement XML node to add to the OAI response |
| 594 | 604 | */ |
| 595 | - protected function verbIdentify() { |
|
| 605 | + protected function verbIdentify() |
|
| 606 | + { |
|
| 596 | 607 | |
| 597 | 608 | // Check for invalid arguments. |
| 598 | 609 | if (count($this->piVars) > 1) { |
@@ -670,7 +681,8 @@ discard block |
||
| 670 | 681 | * |
| 671 | 682 | * @return string Substitution for subpart "###RESPONSE###" |
| 672 | 683 | */ |
| 673 | - protected function verbListIdentifiers() { |
|
| 684 | + protected function verbListIdentifiers() |
|
| 685 | + { |
|
| 674 | 686 | |
| 675 | 687 | // If we have a resumption token we can continue our work |
| 676 | 688 | if (!empty($this->piVars['resumptionToken'])) { |
@@ -717,7 +729,8 @@ discard block |
||
| 717 | 729 | * |
| 718 | 730 | * @return DOMElement XML node to add to the OAI response |
| 719 | 731 | */ |
| 720 | - protected function verbListMetadataFormats() { |
|
| 732 | + protected function verbListMetadataFormats() |
|
| 733 | + { |
|
| 721 | 734 | |
| 722 | 735 | $resArray = array (); |
| 723 | 736 | |
@@ -777,7 +790,8 @@ discard block |
||
| 777 | 790 | * |
| 778 | 791 | * @return string Substitution for subpart "###RESPONSE###" |
| 779 | 792 | */ |
| 780 | - protected function verbListRecords() { |
|
| 793 | + protected function verbListRecords() |
|
| 794 | + { |
|
| 781 | 795 | |
| 782 | 796 | // Check for invalid arguments. |
| 783 | 797 | if (!empty($this->piVars['resumptionToken'])) { |
@@ -825,7 +839,8 @@ discard block |
||
| 825 | 839 | * |
| 826 | 840 | * @return string Substitution for subpart "###RESPONSE###" |
| 827 | 841 | */ |
| 828 | - protected function verbListSets() { |
|
| 842 | + protected function verbListSets() |
|
| 843 | + { |
|
| 829 | 844 | |
| 830 | 845 | // Check for invalid arguments. |
| 831 | 846 | if (count($this->piVars) > 1) { |
@@ -876,7 +891,8 @@ discard block |
||
| 876 | 891 | * @return array |
| 877 | 892 | * @throws Exception |
| 878 | 893 | */ |
| 879 | - private function fetchDocumentUIDs() { |
|
| 894 | + private function fetchDocumentUIDs() |
|
| 895 | + { |
|
| 880 | 896 | $solr_query = ''; |
| 881 | 897 | |
| 882 | 898 | if (!$this->conf['show_userdefined']) { |
@@ -1006,7 +1022,8 @@ discard block |
||
| 1006 | 1022 | * @param tx_dlf_list $documentListSet |
| 1007 | 1023 | * @return DOMElement |
| 1008 | 1024 | */ |
| 1009 | - private function generateOutputForDocumentList($documentListSet) { |
|
| 1025 | + private function generateOutputForDocumentList($documentListSet) |
|
| 1026 | + { |
|
| 1010 | 1027 | |
| 1011 | 1028 | $documentsToProcess = $documentListSet->removeRange(0, intval($this->conf['limit'])); |
| 1012 | 1029 | $verb = $this->piVars['verb']; |
@@ -1101,7 +1118,8 @@ discard block |
||
| 1101 | 1118 | * @param tx_dlf_list $documentListSet |
| 1102 | 1119 | * @return DOMElement |
| 1103 | 1120 | */ |
| 1104 | - private function generateResumptionTokenForDocumentListSet($documentListSet) { |
|
| 1121 | + private function generateResumptionTokenForDocumentListSet($documentListSet) |
|
| 1122 | + { |
|
| 1105 | 1123 | |
| 1106 | 1124 | if ($documentListSet->count() != 0) { |
| 1107 | 1125 | |
@@ -1137,7 +1155,8 @@ discard block |
||
| 1137 | 1155 | return $resumptionToken; |
| 1138 | 1156 | } |
| 1139 | 1157 | |
| 1140 | - private function devLog($message, $severity, $data = NULL) { |
|
| 1158 | + private function devLog($message, $severity, $data = NULL) |
|
| 1159 | + { |
|
| 1141 | 1160 | if (TYPO3_DLOG) { |
| 1142 | 1161 | \TYPO3\CMS\Core\Utility\GeneralUtility::devLog($message, $this->extKey, $severity, $data); |
| 1143 | 1162 | } |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | * @var boolean |
| 28 | 28 | * @access protected |
| 29 | 29 | */ |
| 30 | - protected $error = FALSE; |
|
| 30 | + protected $error = false; |
|
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | 33 | * This holds the OAI DOM object |
@@ -92,9 +92,9 @@ discard block |
||
| 92 | 92 | * @return DOMElement XML node to add to the OAI response |
| 93 | 93 | */ |
| 94 | 94 | protected function error($type) { |
| 95 | - $this->error = TRUE; |
|
| 95 | + $this->error = true; |
|
| 96 | 96 | |
| 97 | - $error = $this->oai->createElementNS('http://www.openarchives.org/OAI/2.0/', 'error', htmlspecialchars($this->pi_getLL($type, $type, FALSE), ENT_NOQUOTES, 'UTF-8')); |
|
| 97 | + $error = $this->oai->createElementNS('http://www.openarchives.org/OAI/2.0/', 'error', htmlspecialchars($this->pi_getLL($type, $type, false), ENT_NOQUOTES, 'UTF-8')); |
|
| 98 | 98 | $error->setAttribute('code', $type); |
| 99 | 99 | |
| 100 | 100 | return $error; |
@@ -308,7 +308,7 @@ discard block |
||
| 308 | 308 | */ |
| 309 | 309 | protected function getMetsData(array $metadata) { |
| 310 | 310 | |
| 311 | - $mets = NULL; |
|
| 311 | + $mets = null; |
|
| 312 | 312 | |
| 313 | 313 | // Load METS file. |
| 314 | 314 | $xml = new DOMDocument(); |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | |
| 320 | 320 | if ($root->item(0) instanceof DOMNode) { |
| 321 | 321 | // Import node into DOMDocument. |
| 322 | - $mets = $this->oai->importNode($root->item(0), TRUE); |
|
| 322 | + $mets = $this->oai->importNode($root->item(0), true); |
|
| 323 | 323 | } else { |
| 324 | 324 | $this->devLog('[tx_dlf_oai->getMetsData([data])] No METS part found in document with location "'.$metadata['location'].'"', SYSLOG_SEVERITY_ERROR, $metadata); |
| 325 | 325 | } |
@@ -327,8 +327,8 @@ discard block |
||
| 327 | 327 | $this->devLog('[tx_dlf_oai->getMetsData([data])] Could not load XML file from "'.$metadata['location'].'"', SYSLOG_SEVERITY_ERROR, $metadata); |
| 328 | 328 | } |
| 329 | 329 | |
| 330 | - if ($mets === NULL) { |
|
| 331 | - $mets = $this->oai->createElementNS('http://kitodo.org/', 'kitodo:error', htmlspecialchars($this->pi_getLL('error', 'Error!', FALSE), ENT_NOQUOTES, 'UTF-8')); |
|
| 330 | + if ($mets === null) { |
|
| 331 | + $mets = $this->oai->createElementNS('http://kitodo.org/', 'kitodo:error', htmlspecialchars($this->pi_getLL('error', 'Error!', false), ENT_NOQUOTES, 'UTF-8')); |
|
| 332 | 332 | } |
| 333 | 333 | |
| 334 | 334 | return $mets; |
@@ -350,7 +350,7 @@ discard block |
||
| 350 | 350 | $this->init($conf); |
| 351 | 351 | |
| 352 | 352 | // Turn cache off. |
| 353 | - $this->setCache(FALSE); |
|
| 353 | + $this->setCache(false); |
|
| 354 | 354 | |
| 355 | 355 | // Get GET and POST variables. |
| 356 | 356 | $this->getUrlParams(); |
@@ -1137,7 +1137,7 @@ discard block |
||
| 1137 | 1137 | return $resumptionToken; |
| 1138 | 1138 | } |
| 1139 | 1139 | |
| 1140 | - private function devLog($message, $severity, $data = NULL) { |
|
| 1140 | + private function devLog($message, $severity, $data = null) { |
|
| 1141 | 1141 | if (TYPO3_DLOG) { |
| 1142 | 1142 | \TYPO3\CMS\Core\Utility\GeneralUtility::devLog($message, $this->extKey, $severity, $data); |
| 1143 | 1143 | } |