Browse Source

Fix Bug #1021218: Refactor error reporting to use devlog extension

pull/1/head
Sebastian Meyer 11 years ago
parent
commit
c6f599c3c0
  1. 555
      dlf/common/class.tx_dlf_document.php
  2. 255
      dlf/common/class.tx_dlf_helper.php
  3. 197
      dlf/common/class.tx_dlf_indexing.php
  4. 58
      dlf/common/class.tx_dlf_list.php
  5. 12
      dlf/common/class.tx_dlf_mods.php
  6. 26
      dlf/common/class.tx_dlf_module.php
  7. 32
      dlf/common/class.tx_dlf_plugin.php
  8. 17
      dlf/common/class.tx_dlf_solr.php
  9. 60
      dlf/ext_autoload.php
  10. 290
      dlf/ext_tables.php
  11. 1
      dlf/ext_tables.sql
  12. 3
      dlf/ext_tables_static+adt.sql
  13. 316
      dlf/hooks/class.tx_dlf_em.php
  14. 48
      dlf/hooks/class.tx_dlf_tceforms.php
  15. 108
      dlf/hooks/class.tx_dlf_tcemain.php
  16. 2
      dlf/locallang.xml
  17. 28
      dlf/plugins/collection/class.tx_dlf_collection.php
  18. 8
      dlf/plugins/feeds/class.tx_dlf_feeds.php
  19. 110
      dlf/plugins/listview/class.tx_dlf_listview.php
  20. 118
      dlf/plugins/metadata/class.tx_dlf_metadata.php
  21. 4
      dlf/plugins/navigation/class.tx_dlf_navigation.php
  22. 169
      dlf/plugins/oai/class.tx_dlf_oai.php
  23. 43
      dlf/plugins/pageview/class.tx_dlf_pageview.php
  24. 22
      dlf/plugins/search/class.tx_dlf_search.php
  25. 6
      dlf/plugins/statistics/class.tx_dlf_statistics.php
  26. 16
      dlf/plugins/toc/class.tx_dlf_toc.php
  27. 16
      dlf/plugins/toolbox/class.tx_dlf_toolbox.php
  28. 9
      dlf/tca.php

555
dlf/common/class.tx_dlf_document.php

File diff suppressed because it is too large Load Diff

255
dlf/common/class.tx_dlf_helper.php

@ -231,15 +231,25 @@ class tx_dlf_helper {
// Check for PHP extension "mcrypt".
if (!extension_loaded('mcrypt')) {
trigger_error('PHP extension "mcrypt" not available', E_USER_WARNING);
if (TYPO3_DLOG) {
return NULL;
t3lib_div::devLog('[tx_dlf_helper->decrypt('.$encrypted.', '.$hash.')] PHP extension "mcrypt" not available', $this->extKey, SYSLOG_SEVERITY_WARNING);
}
return;
}
if (empty($encrypted) || empty($hash)) {
return NULL;
if (TYPO3_DLOG) {
t3lib_div::devLog('[tx_dlf_helper->decrypt('.$encrypted.', '.$hash.')] Invalid parameters given for decryption', $this->extKey, SYSLOG_SEVERITY_ERROR);
}
return;
}
@ -253,7 +263,13 @@ class tx_dlf_helper {
if ($hashed !== $hash) {
return NULL;
if (TYPO3_DLOG) {
t3lib_div::devLog('[tx_dlf_helper->decrypt('.$encrypted.', '.$hash.')] Invalid hash "'.$hash.'" given for decryption', $this->extKey, SYSLOG_SEVERITY_WARNING);
}
return;
}
@ -276,9 +292,13 @@ class tx_dlf_helper {
// Check for PHP extension "mcrypt".
if (!extension_loaded('mcrypt')) {
trigger_error('PHP extension "mcrypt" not available', E_USER_WARNING);
if (TYPO3_DLOG) {
return NULL;
t3lib_div::devLog('[tx_dlf_helper->encrypt('.$string.')] PHP extension "mcrypt" not available', $this->extKey, SYSLOG_SEVERITY_WARNING);
}
return;
}
@ -316,11 +336,16 @@ class tx_dlf_helper {
} elseif (TYPO3_MODE === 'BE') {
// Return current backend user.
return $GLOBALS['BE_USER'];
} else {
trigger_error('Unexpected TYPO3_MODE', E_USER_WARNING);
if (TYPO3_DLOG) {
t3lib_div::devLog('[tx_dlf_helper->getBeUser()] Unexpected TYPO3_MODE "'.TYPO3_MODE.'"', $this->extKey, SYSLOG_SEVERITY_ERROR);
}
return;
@ -341,11 +366,21 @@ class tx_dlf_helper {
*/
public static function getIndexName($uid, $table, $pid = -1) {
// Save parameters for logging purposes.
$_uid = $uid;
$_pid = $pid;
// Sanitize input.
$uid = max(intval($uid), 0);
if (!$uid || !in_array($table, array ('tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_structures', 'tx_dlf_solrcores'))) {
trigger_error('At least one argument is not valid: UID='.$uid.' or TABLE='.$table, E_USER_WARNING);
if (TYPO3_DLOG) {
t3lib_div::devLog('[tx_dlf_helper->getIndexName('.$_uid.', '.$table.', '.$_pid.')] Invalid UID "'.$uid.'" or table "'.$table.'"', $this->extKey, SYSLOG_SEVERITY_ERROR);
}
return '';
@ -353,6 +388,7 @@ class tx_dlf_helper {
$where = '';
// Should we check for a specific PID, too?
if ($pid !== -1) {
$pid = max(intval($pid), 0);
@ -361,7 +397,8 @@ class tx_dlf_helper {
}
$_result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
// Get index_name from database.
$result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
$table.'.index_name AS index_name',
$table,
$table.'.uid='.$uid.$where.self::whereClause($table),
@ -370,17 +407,23 @@ class tx_dlf_helper {
'1'
);
if ($GLOBALS['TYPO3_DB']->sql_num_rows($_result) > 0) {
if ($GLOBALS['TYPO3_DB']->sql_num_rows($result) > 0) {
$resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($_result);
$resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);
return $resArray['index_name'];
}
} else {
trigger_error('No "index_name" with UID '.$uid.' found for PID '.$pid.' in TABLE '.$table, E_USER_WARNING);
if (TYPO3_DLOG) {
return '';
t3lib_div::devLog('[tx_dlf_helper->getIndexName('.$_uid.', '.$table.', '.$_pid.')] No "index_name" with UID "'.$uid.'" and PID "'.$pid.'" found in table "'.$table.'"', $this->extKey, SYSLOG_SEVERITY_WARNING);
}
return '';
}
}
@ -395,45 +438,52 @@ class tx_dlf_helper {
*/
public static function getLanguageName($code) {
$_code = strtolower(trim($code));
// Analyze code and set appropriate ISO table.
$isoCode = strtolower(trim($code));
if (preg_match('/^[a-z]{3}$/', $_code)) {
if (preg_match('/^[a-z]{3}$/', $isoCode)) {
$_file = t3lib_extMgm::extPath(self::$extKey).'lib/ISO-639/iso-639-2b.xml';
$file = t3lib_extMgm::extPath(self::$extKey).'lib/ISO-639/iso-639-2b.xml';
} elseif (preg_match('/^[a-z]{2}$/', $_code)) {
} elseif (preg_match('/^[a-z]{2}$/', $isoCode)) {
$_file = t3lib_extMgm::extPath(self::$extKey).'lib/ISO-639/iso-639-1.xml';
$file = t3lib_extMgm::extPath(self::$extKey).'lib/ISO-639/iso-639-1.xml';
} else {
// No ISO code, return unchanged.
return $code;
}
// Load ISO table and get localized full name of language.
if (TYPO3_MODE === 'FE') {
$iso639 = $GLOBALS['TSFE']->readLLfile($_file);
$iso639 = $GLOBALS['TSFE']->readLLfile($file);
if (!empty($iso639['default'][$_code])) {
if (!empty($iso639['default'][$isoCode])) {
$lang = $GLOBALS['TSFE']->getLLL($_code, $iso639);
$lang = $GLOBALS['TSFE']->getLLL($isoCode, $iso639);
}
} elseif (TYPO3_MODE === 'BE') {
$iso639 = $GLOBALS['LANG']->includeLLFile($_file, FALSE, TRUE);
$iso639 = $GLOBALS['LANG']->includeLLFile($file, FALSE, TRUE);
if (!empty($iso639['default'][$_code])) {
if (!empty($iso639['default'][$isoCode])) {
$lang = $GLOBALS['LANG']->getLLL($_code, $iso639, FALSE);
$lang = $GLOBALS['LANG']->getLLL($isoCode, $iso639, FALSE);
}
} else {
trigger_error('Unexpected TYPO3_MODE', E_USER_WARNING);
if (TYPO3_DLOG) {
t3lib_div::devLog('[tx_dlf_helper->getLanguageName('.$code.')] Unexpected TYPO3_MODE "'.TYPO3_MODE.'"', $this->extKey, SYSLOG_SEVERITY_ERROR);
}
return $code;
@ -445,7 +495,11 @@ class tx_dlf_helper {
} else {
trigger_error('Language code "'.$code.'" not found', E_USER_WARNING);
if (TYPO3_DLOG) {
t3lib_div::devLog('[tx_dlf_helper->getLanguageName('.$code.')] Language code "'.$code.'" not found in ISO-639 table', $this->extKey, SYSLOG_SEVERITY_NOTICE);
}
return $code;
@ -466,7 +520,7 @@ class tx_dlf_helper {
*/
public static function getURN($base, $id) {
$concordance = array(
$concordance = array (
'0' => 1,
'1' => 2,
'2' => 3,
@ -511,7 +565,11 @@ class tx_dlf_helper {
if (preg_match('/[^a-z0-9:-]/', $urn)) {
trigger_error('Invalid chars in URN', E_USER_WARNING);
if (TYPO3_DLOG) {
t3lib_div::devLog('[tx_dlf_helper->getURN('.$base.', '.$id.')] Invalid chars in given parameters', $this->extKey, SYSLOG_SEVERITY_WARNING);
}
return '';
@ -559,23 +617,31 @@ class tx_dlf_helper {
*
* @access public
*
* @param string $key: Session key for retrieval
* @param string $key: Session data key for retrieval
*
* @return mixed Session value for given key or NULL on failure
*/
public static function loadFromSession($key) {
// Save parameter for logging purposes.
$_key = $key;
// Cast to string for security reasons.
$key = (string) $key;
if (!$key) {
trigger_error('No session key given', E_USER_WARNING);
if (TYPO3_DLOG) {
t3lib_div::devLog('[tx_dlf_helper->loadFromSession('.$_key.')] Invalid key "'.$key.'" for session data retrieval', $this->extKey, SYSLOG_SEVERITY_WARNING);
}
return;
}
// Get the session data.
if (TYPO3_MODE === 'FE') {
return $GLOBALS['TSFE']->fe_user->getKey('ses', $key);
@ -586,7 +652,11 @@ class tx_dlf_helper {
} else {
trigger_error('Unexpected TYPO3_MODE', E_USER_WARNING);
if (TYPO3_DLOG) {
t3lib_div::devLog('[tx_dlf_helper->loadFromSession('.$_key.')] Unexpected TYPO3_MODE "'.TYPO3_MODE.'"', $this->extKey, SYSLOG_SEVERITY_ERROR);
}
return;
@ -647,23 +717,31 @@ class tx_dlf_helper {
* @access public
*
* @param string $value: Value to save
* @param string $key: Session key for retrieval
* @param string $key: Session data key for saving
*
* @return boolean TRUE on success, FALSE on failure
*/
public static function saveToSession($value, $key) {
// Save parameter for logging purposes.
$_key = $key;
// Cast to string for security reasons.
$key = (string) $key;
if (!$key) {
trigger_error('No session key given', E_USER_WARNING);
if (TYPO3_DLOG) {
t3lib_div::devLog('[tx_dlf_helper->saveToSession('.$value.', '.$_key.')] Invalid key "'.$key.'" for session data saving', $this->extKey, SYSLOG_SEVERITY_WARNING);
}
return FALSE;
}
// Save value in session data.
if (TYPO3_MODE === 'FE') {
$GLOBALS['TSFE']->fe_user->setKey('ses', $key, $value);
@ -680,88 +758,16 @@ class tx_dlf_helper {
} else {
trigger_error('Unexpected TYPO3_MODE', E_USER_WARNING);
if (TYPO3_DLOG) {
return FALSE;
}
}
/**
* This validates a METS file against its schemas
* TODO: nicht funktionst├╝chtig!
*
* @access public
*
* @param SimpleXMLElement $xml:
*
* @return void
*/
public static function schemaValidate(SimpleXMLElement $xml) {
$_libxmlErrors = libxml_use_internal_errors(TRUE);
// Get schema locations.
$xml->registerXPathNamespace('xsi', 'http://www.w3.org/2001/XMLSchema-instance');
$_schemaLocations = $xml->xpath('//*[@xsi:schemaLocation]');
foreach ($_schemaLocations as $_schemaLocation) {
$_schemas = explode(' ', (string) $_schemaLocation->attributes('http://www.w3.org/2001/XMLSchema-instance')->schemaLocation);
for ($i = 1, $j = count($_schemas); $i <= $j; $i++) {
if ($_schemas[$i] == 'http://www.loc.gov/METS/') {
$schema['mets'] = $_schemas[$i + 1];
} elseif ($_schemas[$i] == 'http://www.loc.gov/mods/v3') {
$schema['mods'] = $_schemas[$i + 1];
}
t3lib_div::devLog('[tx_dlf_helper->saveToSession('.$value.', '.$_key.')] Unexpected TYPO3_MODE "'.TYPO3_MODE.'"', $this->extKey, SYSLOG_SEVERITY_ERROR);
}
}
// TODO: Error-Handling (keine Schemas gefunden)
// Validate METS part against schema.
$dom = new DOMDocument('1.0', 'UTF-8');
$dom->appendChild($dom->importNode(dom_import_simplexml($this->mets), TRUE));
$dom->schemaValidate($schema['mets']);
// TODO: Error-Handling (invalider METS-Part)
// libxml_get_last_error() || libxml_get_errors() || libxml_clear_errors()
// Validate dmdSec parts against schema.
foreach ($this->dmdSec as $dmdSec) {
switch ($dmdSec['type']) {
case 'MODS':
$dom = new DOMDocument('1.0', 'UTF-8');
$dom->appendChild($dom->importNode(dom_import_simplexml($dmdSec['xml']), TRUE));
$dom->schemaValidate($schema['mods']);
// TODO: Error-Handling (invalider MODS-Part)
// libxml_get_last_error() || libxml_get_errors() || libxml_clear_errors()
break;
}
return FALSE;
}
libxml_use_internal_errors($_libxmlErrors);
}
/**
@ -777,13 +783,24 @@ class tx_dlf_helper {
*/
public static function translate($index_name, $table, $pid) {
// Save parameters for logging purposes.
$_index_name = $index_name;
$_pid = $pid;
// Load labels into static variable for future use.
static $labels = array ();
// Sanitize input.
$pid = max(intval($pid), 0);
if (!$pid) {
trigger_error('No PID given for translations', E_USER_WARNING);
if (TYPO3_DLOG) {
t3lib_div::devLog('[tx_dlf_helper->translate('.$_index_name.', '.$table.', '.$_pid.')] Invalid PID "'.$pid.'" for translation', $this->extKey, SYSLOG_SEVERITY_WARNING);
}
return $index_name;
@ -841,13 +858,21 @@ class tx_dlf_helper {
} else {
trigger_error('There are no entries with PID '.$pid.' in table '.$table.' or you are not allowed to access them', E_USER_ERROR);
if (TYPO3_DLOG) {
t3lib_div::devLog('[tx_dlf_helper->translate('.$_index_name.', '.$table.', '.$_pid.')] No translation with PID "'.$pid.'" available in table "'.$table.'" or translation not accessible', $this->extKey, SYSLOG_SEVERITY_NOTICE);
}
}
} else {
trigger_error('The table '.$table.' is not allowed for translation', E_USER_ERROR);
if (TYPO3_DLOG) {
t3lib_div::devLog('[tx_dlf_helper->translate('.$_index_name.', '.$table.', '.$_pid.')] No translations available for table "'.$table.'"', $this->extKey, SYSLOG_SEVERITY_WARNING);
}
}
@ -916,7 +941,11 @@ class tx_dlf_helper {
} else {
trigger_error('Unexpected TYPO3_MODE', E_USER_ERROR);
if (TYPO3_DLOG) {
t3lib_div::devLog('[tx_dlf_helper->whereClause('.$table.', ['.($showHidden ? 'TRUE' : 'FALSE').'])] Unexpected TYPO3_MODE "'.TYPO3_MODE.'"', $this->extKey, SYSLOG_SEVERITY_ERROR);
}
return ' AND 1=-1';

197
dlf/common/class.tx_dlf_indexing.php

@ -37,15 +37,6 @@
*/
class tx_dlf_indexing {
/**
* Array of autocompletable metadata
* @see loadIndexConf()
*
* @var array
* @access protected
*/
protected static $autocompleted = array ();
/**
* The extension key
*
@ -55,31 +46,21 @@ class tx_dlf_indexing {
public static $extKey = 'dlf';
/**
* Array of facets
* @see loadIndexConf()
*
* @var array
* @access protected
*/
protected static $facets = array ();
/**
* Array of fields' boost values
* @see loadIndexConf()
*
* @var array
* @access protected
*/
protected static $fieldboost = array ();
/**
* Array of indexed metadata
* Array of metadata fields' configuration
* @see loadIndexConf()
*
* @var array
* @access protected
*/
protected static $indexed = array ();
protected static $fields = array (
'autocompleted' => array (),
'facets' => array (),
'sortables' => array (),
'indexed' => array (),
'stored' => array (),
'tokenized' => array (),
'fieldboost' => array ()
);
/**
* List of already processed documents
@ -97,33 +78,6 @@ class tx_dlf_indexing {
*/
protected static $solr;
/**
* Array of sortable metadata
* @see loadIndexConf()
*
* @var array
* @access protected
*/
protected static $sortables = array ();
/**
* Array of stored metadata
* @see loadIndexConf()
*
* @var array
* @access protected
*/
protected static $stored = array ();
/**
* Array of tokenized metadata
* @see loadIndexConf()
*
* @var array
* @access protected
*/
protected static $tokenized = array ();
/**
* Array of toplevel structure elements
* @see loadIndexConf()
@ -164,7 +118,11 @@ class tx_dlf_indexing {
} else {
trigger_error('Could not load multi-volume work with UID '.$doc->parentid, E_USER_ERROR);
if (TYPO3_DLOG) {
t3lib_div::devLog('[tx_dlf_indexing->add(['.$doc->uid.'], '.$core.')] Could not load parent document with UID "'.$doc->parentid.'"', $this->extKey, SYSLOG_SEVERITY_ERROR);
}
return 1;
@ -195,7 +153,7 @@ class tx_dlf_indexing {
self::$solr->commit();
// Get document title from database.
$_result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
$result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
'tx_dlf_documents.title AS title',
'tx_dlf_documents',
'tx_dlf_documents.uid='.intval($doc->uid).tx_dlf_helper::whereClause('tx_dlf_documents'),
@ -204,11 +162,11 @@ class tx_dlf_indexing {
'1'
);
$resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($_result);
$resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);
if (!defined('TYPO3_cliMode')) {
$_message = t3lib_div::makeInstance(
$message = t3lib_div::makeInstance(
't3lib_FlashMessage',
htmlspecialchars(sprintf($GLOBALS['LANG']->getLL('flash.documentIndexed'), $resArray['title'], $doc->uid)),
$GLOBALS['LANG']->getLL('flash.done', TRUE),
@ -216,7 +174,7 @@ class tx_dlf_indexing {
TRUE
);
t3lib_FlashMessageQueue::addMessage($_message);
t3lib_FlashMessageQueue::addMessage($message);
}
@ -226,7 +184,7 @@ class tx_dlf_indexing {
if (!defined('TYPO3_cliMode')) {
$_message = t3lib_div::makeInstance(
$message = t3lib_div::makeInstance(
't3lib_FlashMessage',
$GLOBALS['LANG']->getLL('flash.solrException', TRUE).'<br />'.htmlspecialchars($e->getMessage()),
$GLOBALS['LANG']->getLL('flash.error', TRUE),
@ -234,11 +192,15 @@ class tx_dlf_indexing {
TRUE
);
t3lib_FlashMessageQueue::addMessage($_message);
t3lib_FlashMessageQueue::addMessage($message);
}
trigger_error('Apache Solr exception thrown: '.$e->getMessage(), E_USER_ERROR);
if (TYPO3_DLOG) {
t3lib_div::devLog('[tx_dlf_indexing->add(['.$doc->uid.'], '.$core.')] Apache Solr threw exception: "'.$e->getMessage().'"', $this->extKey, SYSLOG_SEVERITY_ERROR);
}
return 1;
@ -248,7 +210,7 @@ class tx_dlf_indexing {
if (!defined('TYPO3_cliMode')) {
$_message = t3lib_div::makeInstance(
$message = t3lib_div::makeInstance(
't3lib_FlashMessage',
$GLOBALS['LANG']->getLL('flash.solrNoConnection', TRUE),
$GLOBALS['LANG']->getLL('flash.warning', TRUE),
@ -256,11 +218,15 @@ class tx_dlf_indexing {
TRUE
);
t3lib_FlashMessageQueue::addMessage($_message);
t3lib_FlashMessageQueue::addMessage($message);
}
trigger_error('Could not connect to Apache Solr server', E_USER_WARNING);
if (TYPO3_DLOG) {
t3lib_div::devLog('[tx_dlf_indexing->add(['.$doc->uid.'], '.$core.')] Could not connect to Apache Solr server', $this->extKey, SYSLOG_SEVERITY_ERROR);
}
return 1;
@ -279,6 +245,9 @@ class tx_dlf_indexing {
*/
public static function delete($uid) {
// Save parameter for logging purposes.
$_uid = $uid;
// Sanitize input.
$uid = max(intval($uid), 0);
@ -310,7 +279,7 @@ class tx_dlf_indexing {
if (!defined('TYPO3_cliMode')) {
$_message = t3lib_div::makeInstance(
$message = t3lib_div::makeInstance(
't3lib_FlashMessage',
$GLOBALS['LANG']->getLL('flash.solrException', TRUE).'<br />'.htmlspecialchars($e->getMessage()),
$GLOBALS['LANG']->getLL('flash.error', TRUE),
@ -318,11 +287,15 @@ class tx_dlf_indexing {
TRUE
);
t3lib_FlashMessageQueue::addMessage($_message);
t3lib_FlashMessageQueue::addMessage($message);
}
trigger_error('Apache Solr exception thrown: '.$e->getMessage(), E_USER_ERROR);
if (TYPO3_DLOG) {
t3lib_div::devLog('[tx_dlf_indexing->delete('.$_uid.')] Apache Solr threw exception: "'.$e->getMessage().'"', $this->extKey, SYSLOG_SEVERITY_ERROR);
}
return 1;
@ -332,7 +305,7 @@ class tx_dlf_indexing {
if (!defined('TYPO3_cliMode')) {
$_message = t3lib_div::makeInstance(
$message = t3lib_div::makeInstance(
't3lib_FlashMessage',
$GLOBALS['LANG']->getLL('flash.solrNoConnection', TRUE),
$GLOBALS['LANG']->getLL('flash.error', TRUE),
@ -340,11 +313,15 @@ class tx_dlf_indexing {
TRUE
);
t3lib_FlashMessageQueue::addMessage($_message);
t3lib_FlashMessageQueue::addMessage($message);
}
trigger_error('Could not connect to Apache Solr server', E_USER_ERROR);
if (TYPO3_DLOG) {
t3lib_div::devLog('[tx_dlf_indexing->delete('.$_uid.')] Could not connect to Apache Solr server', $this->extKey, SYSLOG_SEVERITY_ERROR);
}
return 1;
@ -352,7 +329,7 @@ class tx_dlf_indexing {
if (!defined('TYPO3_cliMode')) {
$_message = t3lib_div::makeInstance(
$message = t3lib_div::makeInstance(
't3lib_FlashMessage',
htmlspecialchars(sprintf($GLOBALS['LANG']->getLL('flash.documentDeleted'), $title, $uid)),
$GLOBALS['LANG']->getLL('flash.done', TRUE),
@ -360,7 +337,7 @@ class tx_dlf_indexing {
TRUE
);
t3lib_FlashMessageQueue::addMessage($_message);
t3lib_FlashMessageQueue::addMessage($message);
}
@ -368,7 +345,11 @@ class tx_dlf_indexing {
} else {
trigger_error('Could not find document with UID '.$uid, E_USER_ERROR);
if (TYPO3_DLOG) {
t3lib_div::devLog('[tx_dlf_indexing->delete('.$_uid.')] Invalid UID "'.$uid.'" for document deletion', $this->extKey, SYSLOG_SEVERITY_ERROR);
}
return 1;
@ -388,7 +369,7 @@ class tx_dlf_indexing {
protected static function loadIndexConf($pid) {
// Get the list of toplevel structures.
$_result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
$result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
'tx_dlf_structures.index_name AS index_name',
'tx_dlf_structures',
'tx_dlf_structures.toplevel=1 AND tx_dlf_structures.pid='.intval($pid).tx_dlf_helper::whereClause('tx_dlf_structures'),
@ -397,14 +378,14 @@ class tx_dlf_indexing {
''
);
while ($_toplevel = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($_result)) {
while ($toplevel = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {
self::$toplevel[] = $_toplevel['index_name'];
self::$toplevel[] = $toplevel['index_name'];
}
// Get the metadata indexing options.
$_result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
$result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
'tx_dlf_metadata.index_name AS index_name,tx_dlf_metadata.tokenized AS tokenized,tx_dlf_metadata.stored AS stored,tx_dlf_metadata.indexed AS 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.autocomplete AS autocomplete,tx_dlf_metadata.boost AS boost',
'tx_dlf_metadata',
'tx_dlf_metadata.pid='.intval($pid).tx_dlf_helper::whereClause('tx_dlf_metadata'),
@ -413,51 +394,51 @@ class tx_dlf_indexing {
''
);
while ($_indexing = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($_result)) {
while ($indexing = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {
if ($_indexing['tokenized']) {
if ($indexing['tokenized']) {
self::$tokenized[] = $_indexing['index_name'];
self::$fields['tokenized'][] = $indexing['index_name'];
}
if ($_indexing['stored'] || $_indexing['is_listed']) {
if ($indexing['stored'] || $indexing['is_listed']) {
self::$stored[] = $_indexing['index_name'];
self::$fields['stored'][] = $indexing['index_name'];
}
if ($_indexing['indexed']) {
if ($indexing['indexed']) {
self::$indexed[] = $_indexing['index_name'];
self::$fields['indexed'][] = $indexing['index_name'];
}
if ($_indexing['is_sortable']) {
if ($indexing['is_sortable']) {
self::$sortables[] = $_indexing['index_name'];
self::$fields['sortables'][] = $indexing['index_name'];
}
if ($_indexing['is_facet']) {
if ($indexing['is_facet']) {
self::$facets[] = $_indexing['index_name'];
self::$fields['facets'][] = $indexing['index_name'];
}
if ($_indexing['autocomplete']) {
if ($indexing['autocomplete']) {
self::$autocompleted[] = $_indexing['index_name'];
self::$fields['autocompleted'][] = $indexing['index_name'];
}
if ($_indexing['boost'] > 0.0) {
if ($indexing['boost'] > 0.0) {
self::$fieldboost[$_indexing['index_name']] = floatval($_indexing['boost']);
self::$fields['fieldboost'][$indexing['index_name']] = floatval($indexing['boost']);
} else {
self::$fieldboost[$_indexing['index_name']] = FALSE;
self::$fields['fieldboost'][$indexing['index_name']] = FALSE;
}
@ -513,39 +494,39 @@ class tx_dlf_indexing {
$solrDoc->setField('toplevel', in_array($logicalUnit['type'], self::$toplevel));
$solrDoc->setField('type', $logicalUnit['type'], self::$fieldboost['type']);
$solrDoc->setField('type', $logicalUnit['type'], self::$fields['fieldboost']['type']);
$solrDoc->setField('title', $metadata['title'][0], self::$fieldboost['title']);
$solrDoc->setField('title', $metadata['title'][0], self::$fields['fieldboost']['title']);
$solrDoc->setField('volume', $metadata['volume'][0], self::$fieldboost['volume']);
$solrDoc->setField('volume', $metadata['volume'][0], self::$fields['fieldboost']['volume']);
foreach ($metadata as $index_name => $data) {
if (!empty($data) && substr($index_name, -8) !== '_sorting') {
$suffix = (in_array($index_name, self::$tokenized) ? 't' : 'u');
$suffix = (in_array($index_name, self::$fields['tokenized']) ? 't' : 'u');
$suffix .= (in_array($index_name, self::$stored) ? 's' : 'u');
$suffix .= (in_array($index_name, self::$fields['stored']) ? 's' : 'u');
$suffix .= (in_array($index_name, self::$indexed) ? 'i' : 'u');
$suffix .= (in_array($index_name, self::$fields['indexed']) ? 'i' : 'u');
$solrDoc->setField($index_name.'_'.$suffix, $data, self::$fieldboost[$index_name]);
$solrDoc->setField($index_name.'_'.$suffix, $data, self::$fields['fieldboost'][$index_name]);
if (in_array($index_name, self::$sortables)) {
if (in_array($index_name, self::$fields['sortables'])) {
// Add sortable fields to index.
$solrDoc->setField($index_name.'_sorting', $metadata[$index_name.'_sorting'][0]);
}
if (in_array($index_name, self::$facets)) {
if (in_array($index_name, self::$fields['facets'])) {
// Add facets to index.
$solrDoc->setField($index_name.'_faceting', $data);
}
if (in_array($index_name, self::$autocompleted)) {
if (in_array($index_name, self::$fields['autocompleted'])) {
// Add autocomplete values to index.
$solrDoc->setField($index_name.'_suggest', $data);
@ -564,7 +545,7 @@ class tx_dlf_indexing {
if (!defined('TYPO3_cliMode')) {
$_message = t3lib_div::makeInstance(
$message = t3lib_div::makeInstance(
't3lib_FlashMessage',
$GLOBALS['LANG']->getLL('flash.solrException', TRUE).'<br />'.htmlspecialchars($e->getMessage()),
$GLOBALS['LANG']->getLL('flash.error', TRUE),
@ -572,7 +553,7 @@ class tx_dlf_indexing {
TRUE
);
t3lib_FlashMessageQueue::addMessage($_message);
t3lib_FlashMessageQueue::addMessage($message);
}

58
dlf/common/class.tx_dlf_list.php

@ -92,11 +92,18 @@ class tx_dlf_list implements t3lib_Singleton {
*/
public function remove($position) {
// Save parameter for logging purposes.
$_position = $position;
$position = intval($position);
if ($position < 0 || $position >= $this->count) {
trigger_error('No valid list position for removal', E_USER_WARNING);
if (TYPO3_DLOG) {
t3lib_div::devLog('[tx_dlf_list->remove('.$_position.')] Invalid position "'.$position.'" for element removing', $this->extKey, SYSLOG_SEVERITY_WARNING);
}
return;
@ -122,12 +129,21 @@ class tx_dlf_list implements t3lib_Singleton {
*/
public function move($position, $steps) {
// Save parameters for logging purposes.
$_position = $position;
$_steps = $steps;
$position = intval($position);
// Check if list position is valid.
if ($position < 0 || $position >= $this->count) {
trigger_error('Invalid list position '.$position, E_USER_WARNING);
if (TYPO3_DLOG) {
t3lib_div::devLog('[tx_dlf_list->move('.$_position.', '.$_steps.')] Invalid position "'.$position.'" for element moving', $this->extKey, SYSLOG_SEVERITY_WARNING);
}
return;
@ -138,7 +154,11 @@ class tx_dlf_list implements t3lib_Singleton {
// Check if moving given amount of steps is possible.
if (($position + $steps) < 0 || ($position + $steps) >= $this->count) {
trigger_error('Element at position '.$position.' can not be moved '.$steps.' steps', E_USER_WARNING);
if (TYPO3_DLOG) {
t3lib_div::devLog('[tx_dlf_list->move('.$_position.', '.$_steps.')] Invalid steps "'.$steps.'" for moving element at position "'.$position.'"', $this->extKey, SYSLOG_SEVERITY_WARNING);
}
return;
@ -273,6 +293,14 @@ class tx_dlf_list implements t3lib_Singleton {
$this->elements = $newOrder;
} else {
if (TYPO3_DLOG) {
t3lib_div::devLog('[tx_dlf_list->sort('.$by.', ['.($asc ? 'TRUE' : 'FALSE').'])] Sorted list elements do not match unsorted elements', $this->extKey, SYSLOG_SEVERITY_ERROR);
}
}
}
@ -400,17 +428,21 @@ class tx_dlf_list implements t3lib_Singleton {
*/
public function __get($var) {
$_method = '_get'.ucfirst($var);
$method = '_get'.ucfirst($var);
if (!property_exists($this, $var) || !method_exists($this, $method)) {
if (!property_exists($this, $var) || !method_exists($this, $_method)) {
if (TYPO3_DLOG) {
trigger_error('There is no get function for property '.$var, E_USER_ERROR);
t3lib_div::devLog('[tx_dlf_list->__get('.$var.')] There is no getter function for property "'.$var.'"', $this->extKey, SYSLOG_SEVERITY_WARNING);
}
return;
} else {
return $this->$_method();
return $this->$method();
}
@ -428,15 +460,19 @@ class tx_dlf_list implements t3lib_Singleton {
*/
public function __set($var, $value) {
$_method = '_set'.ucfirst($var);
$method = '_set'.ucfirst($var);
if (!property_exists($this, $var) || !method_exists($this, $method)) {
if (!property_exists($this, $var) || !method_exists($this, $_method)) {
if (TYPO3_DLOG) {
trigger_error('There is no set function for property '.$var, E_USER_ERROR);
t3lib_div::devLog('[tx_dlf_list->__set('.$var.', '.$value.')] There is no setter function for property "'.$var.'"', $this->extKey, SYSLOG_SEVERITY_WARNING);
}
} else {
$this->$_method($value);
$this->$method($value);
}

12
dlf/common/class.tx_dlf_mods.php

@ -107,12 +107,6 @@ class tx_dlf_mods implements tx_dlf_format {
$metadata['author'][$i] = trim(implode(', ', $name));
if (!$metadata['author_sorting'][0]) {
$metadata['author_sorting'][0] = trim(implode(', ', $name));
}
}
// Check if there is a display form.
@ -120,12 +114,6 @@ class tx_dlf_mods implements tx_dlf_format {
$metadata['author'][$i] = (string) $displayForm[0];
if (!$metadata['author_sorting'][0]) {
$metadata['author_sorting'][0] = (string) $displayForm[0];
}
}
}

26
dlf/common/class.tx_dlf_module.php

@ -147,13 +147,13 @@ abstract class tx_dlf_module extends t3lib_SCbase {
// Set $this->MOD_MENU array here or leave empty.
/* Example code:
$this->MOD_MENU = array (
'function' => array (
'1' => $GLOBALS['LANG']->getLL('function1'),
'2' => $GLOBALS['LANG']->getLL('function2'),
'3' => $GLOBALS['LANG']->getLL('function3'),
)
); */
$this->MOD_MENU = array (
'function' => array (
'1' => $GLOBALS['LANG']->getLL('function1'),
'2' => $GLOBALS['LANG']->getLL('function2'),
'3' => $GLOBALS['LANG']->getLL('function3'),
)
); */
}
@ -182,17 +182,15 @@ abstract class tx_dlf_module extends t3lib_SCbase {
<script type="text/javascript">
script_ended = 0;
function jumpToUrl(URL) {
document.location = URL;
}
</script>
';
document.location = URL;
}
</script>';
// Add Javascript for convenient module switch.
$this->doc->postCode .= '
<script type="text/javascript">
script_ended = 1;
</script>
';
</script>';
// Render output.
$this->content .= $this->doc->startPage($GLOBALS['LANG']->getLL('title'));
@ -233,7 +231,7 @@ abstract class tx_dlf_module extends t3lib_SCbase {
}
/* No xclasses for abstract classes!
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dlf/common/class.tx_dlf_module.php']) {
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dlf/common/class.tx_dlf_module.php']) {
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dlf/common/class.tx_dlf_module.php']);
}
*/

32
dlf/common/class.tx_dlf_plugin.php

@ -155,7 +155,11 @@ abstract class tx_dlf_plugin extends tslib_pibase {
if (!$this->doc->ready) {
// Destroy the incomplete object.
trigger_error('Failed to load document with UID '.$this->piVars['id'], E_USER_ERROR);
if (TYPO3_DLOG) {
t3lib_div::devLog('[tx_dlf_plugin->loadDocument()] Failed to load document with UID "'.$this->piVars['id'].'"', $this->extKey, SYSLOG_SEVERITY_ERROR);
}
$this->doc = NULL;
@ -170,12 +174,12 @@ abstract class tx_dlf_plugin extends tslib_pibase {
// Get UID of document with given record identifier.
$result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
'tx_dlf_documents.uid',
'tx_dlf_documents',
'tx_dlf_documents.record_id='.$GLOBALS['TYPO3_DB']->fullQuoteStr($this->piVars['recordId'], 'tx_dlf_documents').tx_dlf_helper::whereClause('tx_dlf_documents'),
'',
'',
'1'
'tx_dlf_documents.uid',
'tx_dlf_documents',
'tx_dlf_documents.record_id='.$GLOBALS['TYPO3_DB']->fullQuoteStr($this->piVars['recordId'], 'tx_dlf_documents').tx_dlf_helper::whereClause('tx_dlf_documents'),
'',
'',
'1'
);
if ($GLOBALS['TYPO3_DB']->sql_num_rows($result) == 1) {
@ -193,13 +197,21 @@ abstract class tx_dlf_plugin extends tslib_pibase {
} else {
trigger_error('Failed to load document with record ID '.$this->piVars['recordId'], E_USER_ERROR);
if (TYPO3_DLOG) {
t3lib_div::devLog('[tx_dlf_plugin->loadDocument()] Failed to load document with record ID "'.$this->piVars['recordId'].'"', $this->extKey, SYSLOG_SEVERITY_ERROR);
}
}
} else {
trigger_error('No UID or PID given for document', E_USER_ERROR);
if (TYPO3_DLOG) {
t3lib_div::devLog('[tx_dlf_plugin->loadDocument()] Invalid UID "'.$this->piVars['id'].'" or PID "'.$this->conf['pages'].'" for document loading', $this->extKey, SYSLOG_SEVERITY_ERROR);
}
}
@ -304,7 +316,7 @@ abstract class tx_dlf_plugin extends tslib_pibase {
}
/* No xclasses for abstract classes!
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dlf/common/class.tx_dlf_plugin.php']) {
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dlf/common/class.tx_dlf_plugin.php']) {
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dlf/common/class.tx_dlf_plugin.php']);
}
*/

17
dlf/common/class.tx_dlf_solr.php

@ -93,6 +93,9 @@ class tx_dlf_solr {
*/
public static function solrConnect($core = 0) {
// Save parameter for logging purposes.
$_core = $core;
// Load class.
if (!class_exists('Apache_Solr_Service')) {
@ -122,7 +125,11 @@ class tx_dlf_solr {
if (empty($core)) {
trigger_error('Could not find Solr core with UID '.$core, E_USER_NOTICE);
if (TYPO3_DLOG) {
t3lib_div::devLog('[tx_dlf_solr->solrConnect('.$_core.')] Invalid UID "'.$_core.'" for Apache Solr core', $this->extKey, SYSLOG_SEVERITY_ERROR);
}
return;
@ -146,7 +153,11 @@ class tx_dlf_solr {
} else {
trigger_error('Could not connect to Solr server with core "'.$core.'"', E_USER_ERROR);
if (TYPO3_DLOG) {
t3lib_div::devLog('[tx_dlf_solr->solrConnect('.$_core.')] Could not connect to Apache Solr server with core "'.$core.'"', $this->extKey, SYSLOG_SEVERITY_ERROR);
}
return;
@ -191,7 +202,7 @@ class tx_dlf_solr {
}
/* No xclasses for static classes!
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dlf/common/class.tx_dlf_solr.php']) {
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dlf/common/class.tx_dlf_solr.php']) {
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dlf/common/class.tx_dlf_solr.php']);
}
*/

60
dlf/ext_autoload.php

@ -25,36 +25,36 @@
$extensionPath = t3lib_extMgm::extPath('dlf');
return array (
'tx_dlf_cli' => $extensionPath.'cli/class.tx_dlf_cli.php',
'tx_dlf_document' => $extensionPath.'common/class.tx_dlf_document.php',
'tx_dlf_format' => $extensionPath.'common/class.tx_dlf_format.php',
'tx_dlf_helper' => $extensionPath.'common/class.tx_dlf_helper.php',
'tx_dlf_indexing' => $extensionPath.'common/class.tx_dlf_indexing.php',
'tx_dlf_list' => $extensionPath.'common/class.tx_dlf_list.php',
'tx_dlf_mods' => $extensionPath.'common/class.tx_dlf_mods.php',
'tx_dlf_module' => $extensionPath.'common/class.tx_dlf_module.php',
'tx_dlf_plugin' => $extensionPath.'common/class.tx_dlf_plugin.php',
'tx_dlf_solr' => $extensionPath.'common/class.tx_dlf_solr.php',
'tx_dlf_em' => $extensionPath.'hooks/class.tx_dlf_em.php',
'tx_dlf_hacks' => $extensionPath.'hooks/class.tx_dlf_hacks.php',
'tx_dlf_tceforms' => $extensionPath.'hooks/class.tx_dlf_tceforms.php',
'tx_dlf_tcemain' => $extensionPath.'hooks/class.tx_dlf_tcemain.php',
'tx_dlf_modIndexing' => $extensionPath.'modules/indexing/index.php',
'tx_dlf_modNewclient' => $extensionPath.'modules/newclient/index.php',
'tx_dlf_collection' => $extensionPath.'plugins/collection/class.tx_dlf_collection.php',
'tx_dlf_feeds' => $extensionPath.'plugins/feeds/class.tx_dlf_feeds.php',
'tx_dlf_listview' => $extensionPath.'plugins/listview/class.tx_dlf_listview.php',
'tx_dlf_metadata' => $extensionPath.'plugins/metadata/class.tx_dlf_metadata.php',
'tx_dlf_navigation' => $extensionPath.'plugins/navigation/class.tx_dlf_navigation.php',
'tx_dlf_oai' => $extensionPath.'plugins/oai/class.tx_dlf_oai.php',
'tx_dlf_pageview' => $extensionPath.'plugins/pageview/class.tx_dlf_pageview.php',
'tx_dlf_search' => $extensionPath.'plugins/search/class.tx_dlf_search.php',
'tx_dlf_search_suggest' => $extensionPath.'plugins/search/class.tx_dlf_search_suggest.php',
'tx_dlf_statistics' => $extensionPath.'plugins/statistics/class.tx_dlf_statistics.php',
'tx_dlf_toc' => $extensionPath.'plugins/toc/class.tx_dlf_toc.php',
'tx_dlf_toolbox' => $extensionPath.'plugins/toolbox/class.tx_dlf_toolbox.php',
'tx_dlf_toolsDfgviewer' => $extensionPath.'plugins/toolbox/tools/dfgviewer/class.tx_dlf_toolsDfgviewer.php',
'tx_dlf_toolsPdf' => $extensionPath.'plugins/toolbox/tools/pdf/class.tx_dlf_toolsPdf.php'
'tx_dlf_cli' => $extensionPath.'cli/class.tx_dlf_cli.php',
'tx_dlf_document' => $extensionPath.'common/class.tx_dlf_document.php',
'tx_dlf_format' => $extensionPath.'common/class.tx_dlf_format.php',
'tx_dlf_helper' => $extensionPath.'common/class.tx_dlf_helper.php',
'tx_dlf_indexing' => $extensionPath.'common/class.tx_dlf_indexing.php',
'tx_dlf_list' => $extensionPath.'common/class.tx_dlf_list.php',
'tx_dlf_mods' => $extensionPath.'common/class.tx_dlf_mods.php',
'tx_dlf_module' => $extensionPath.'common/class.tx_dlf_module.php',
'tx_dlf_plugin' => $extensionPath.'common/class.tx_dlf_plugin.php',
'tx_dlf_solr' => $extensionPath.'common/class.tx_dlf_solr.php',
'tx_dlf_em' => $extensionPath.'hooks/class.tx_dlf_em.php',
'tx_dlf_hacks' => $extensionPath.'hooks/class.tx_dlf_hacks.php',
'tx_dlf_tceforms' => $extensionPath.'hooks/class.tx_dlf_tceforms.php',
'tx_dlf_tcemain' => $extensionPath.'hooks/class.tx_dlf_tcemain.php',
'tx_dlf_modIndexing' => $extensionPath.'modules/indexing/index.php',
'tx_dlf_modNewclient' => $extensionPath.'modules/newclient/index.php',
'tx_dlf_collection' => $extensionPath.'plugins/collection/class.tx_dlf_collection.php',
'tx_dlf_feeds' => $extensionPath.'plugins/feeds/class.tx_dlf_feeds.php',
'tx_dlf_listview' => $extensionPath.'plugins/listview/class.tx_dlf_listview.php',
'tx_dlf_metadata' => $extensionPath.'plugins/metadata/class.tx_dlf_metadata.php',
'tx_dlf_navigation' => $extensionPath.'plugins/navigation/class.tx_dlf_navigation.php',
'tx_dlf_oai' => $extensionPath.'plugins/oai/class.tx_dlf_oai.php',
'tx_dlf_pageview' => $extensionPath.'plugins/pageview/class.tx_dlf_pageview.php',
'tx_dlf_search' => $extensionPath.'plugins/search/class.tx_dlf_search.php',
'tx_dlf_search_suggest' => $extensionPath.'plugins/search/class.tx_dlf_search_suggest.php',
'tx_dlf_statistics' => $extensionPath.'plugins/statistics/class.tx_dlf_statistics.php',
'tx_dlf_toc' => $extensionPath.'plugins/toc/class.tx_dlf_toc.php',
'tx_dlf_toolbox' => $extensionPath.'plugins/toolbox/class.tx_dlf_toolbox.php',
'tx_dlf_toolsDfgviewer' => $extensionPath.'plugins/toolbox/tools/dfgviewer/class.tx_dlf_toolsDfgviewer.php',
'tx_dlf_toolsPdf' => $extensionPath.'plugins/toolbox/tools/pdf/class.tx_dlf_toolsPdf.php'
);
?>

290
dlf/ext_tables.php

@ -26,173 +26,173 @@ if (!defined ('TYPO3_MODE')) die ('Access denied.');
// Register database tables.
$TCA['tx_dlf_documents'] = array (
'ctrl' => array (
'title' => 'LLL:EXT:dlf/locallang.xml:tx_dlf_documents',
'label' => 'title',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'default_sortby' => 'ORDER BY title_sorting',
'delete' => 'deleted',
'enablecolumns' => array (
'disabled' => 'hidden',
'fe_group' => 'fe_group',
),
'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY).'tca.php',
'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY).'res/icons/txdlfdocuments.png',
'rootLevel' => 0,
'dividers2tabs' => 2,
'searchFields' => 'title,volume,author,year,place,uid,prod_id,location,oai_id,opac_id,union_id,urn',
'ctrl' => array (
'title' => 'LLL:EXT:dlf/locallang.xml:tx_dlf_documents',
'label' => 'title',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'default_sortby' => 'ORDER BY title_sorting',
'delete' => 'deleted',
'enablecolumns' => array (
'disabled' => 'hidden',
'fe_group' => 'fe_group',
),
'feInterface' => array (
'fe_admin_fieldList' => '',
)
'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY).'tca.php',
'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY).'res/icons/txdlfdocuments.png',
'rootLevel' => 0,
'dividers2tabs' => 2,
'searchFields' => 'title,volume,author,year,place,uid,prod_id,location,oai_id,opac_id,union_id,urn',
),
'feInterface' => array (
'fe_admin_fieldList' => '',
)
);
$TCA['tx_dlf_structures'] = array (
'ctrl' => array (
'title' => 'LLL:EXT:dlf/locallang.xml:tx_dlf_structures',
'label' => 'label',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l18n_parent',
'transOrigDiffSourceField' => 'l18n_diffsource',
'default_sortby' => 'ORDER BY label',
'delete' => 'deleted',
'enablecolumns' => array (
'disabled' => 'hidden',
),
'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY).'tca.php',
'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY).'res/icons/txdlfstructures.png',
'rootLevel' => 0,
'dividers2tabs' => 2,
'searchFields' => 'label,index_name,oai_name',
'ctrl' => array (
'title' => 'LLL:EXT:dlf/locallang.xml:tx_dlf_structures',
'label' => 'label',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l18n_parent',
'transOrigDiffSourceField' => 'l18n_diffsource',
'default_sortby' => 'ORDER BY label',
'delete' => 'deleted',
'enablecolumns' => array (
'disabled' => 'hidden',
),
'feInterface' => array (
'fe_admin_fieldList' => '',
)
'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY).'tca.php',
'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY).'res/icons/txdlfstructures.png',
'rootLevel' => 0,
'dividers2tabs' => 2,
'searchFields' => 'label,index_name,oai_name',
),
'feInterface' => array (
'fe_admin_fieldList' => '',
)
);
$TCA['tx_dlf_metadata'] = array (
'ctrl' => array (
'title' => 'LLL:EXT:dlf/locallang.xml:tx_dlf_metadata',
'label' => 'label',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l18n_parent',
'transOrigDiffSourceField' => 'l18n_diffsource',
'sortby' => 'sorting',
'delete' => 'deleted',
'enablecolumns' => array (
'disabled' => 'hidden',
),
'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY).'tca.php',
'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY).'res/icons/txdlfmetadata.png',
'rootLevel' => 0,
'dividers2tabs' => 2,
'searchFields' => 'label,index_name,encoding,xpath,xpath_sorting,default',
'requestUpdate' => 'is_sortable',
'ctrl' => array (
'title' => 'LLL:EXT:dlf/locallang.xml:tx_dlf_metadata',
'label' => 'label',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l18n_parent',
'transOrigDiffSourceField' => 'l18n_diffsource',
'sortby' => 'sorting',
'delete' => 'deleted',
'enablecolumns' => array (
'disabled' => 'hidden',
),
'feInterface' => array (
'fe_admin_fieldList' => '',
)
'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY).'tca.php',
'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY).'res/icons/txdlfmetadata.png',
'rootLevel' => 0,
'dividers2tabs' => 2,
'searchFields' => 'label,index_name,encoding,xpath,xpath_sorting,default',
'requestUpdate' => 'is_sortable',
),
'feInterface' => array (
'fe_admin_fieldList' => '',
)
);
$TCA['tx_dlf_formats'] = array (
'ctrl' => array (
'title' => 'LLL:EXT:dlf/locallang.xml:tx_dlf_formats',
'label' => 'type',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'default_sortby' => 'ORDER BY type',
'delete' => 'deleted',
'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY).'tca.php',
'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY).'res/icons/txdlfformats.png',
'rootLevel' => 1,
'dividers2tabs' => 2,
'searchFields' => 'type,class',
),
'feInterface' => array (
'fe_admin_fieldList' => '',
)
'ctrl' => array (
'title' => 'LLL:EXT:dlf/locallang.xml:tx_dlf_formats',
'label' => 'type',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',