Fix Bug #909383: Make installation more easy
This commit is contained in:
parent
dcf48d8538
commit
422e4f345d
|
@ -290,11 +290,11 @@ class tx_dlf_helper {
|
|||
|
||||
if (preg_match('/^[a-z]{3}$/', $_code)) {
|
||||
|
||||
$iso639 = $GLOBALS['LANG']->includeLLFile(t3lib_extMgm::extPath(self::$extKey).'/lib/ISO-639/iso-639-2b.xml', FALSE, TRUE);
|
||||
$iso639 = $GLOBALS['LANG']->includeLLFile(t3lib_extMgm::extPath(self::$extKey).'lib/ISO-639/iso-639-2b.xml', FALSE, TRUE);
|
||||
|
||||
} elseif (preg_match('/^[a-z]{2}$/', $_code)) {
|
||||
|
||||
$iso639 = $GLOBALS['LANG']->includeLLFile(t3lib_extMgm::extPath(self::$extKey).'/lib/ISO-639/iso-639-1.xml', FALSE, TRUE);
|
||||
$iso639 = $GLOBALS['LANG']->includeLLFile(t3lib_extMgm::extPath(self::$extKey).'lib/ISO-639/iso-639-1.xml', FALSE, TRUE);
|
||||
|
||||
} else {
|
||||
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
# cat=Basic; type=user[EXT:dlf/hooks/class.tx_dlf_em.php:tx_dlf_em->checkCliUserGroup]; label=LLL:EXT:dlf/locallang.xml:config.cliUserGroup
|
||||
cliUserGroup = 0
|
||||
|
||||
# cat=Basic; type=boolean; label=LLL:EXT:dlf/locallang.xml:config.makeCliUserGroup
|
||||
makeCliUserGroup = 0
|
||||
|
||||
# cat=Basic; type=string; label=LLL:EXT:dlf/locallang.xml:config.useragent
|
||||
useragent = Goobi.Presentation
|
||||
|
||||
|
|
|
@ -37,6 +37,14 @@
|
|||
*/
|
||||
class tx_dlf_em {
|
||||
|
||||
/**
|
||||
* This holds the output ready to return
|
||||
*
|
||||
* @var string
|
||||
* @access protected
|
||||
*/
|
||||
protected $content = '';
|
||||
|
||||
/**
|
||||
* Check if a connection to a Solr server could be established with the given credentials.
|
||||
*
|
||||
|
@ -53,30 +61,24 @@ class tx_dlf_em {
|
|||
$GLOBALS['LANG']->includeLLFile('EXT:dlf/locallang.xml');
|
||||
|
||||
// Get Solr credentials.
|
||||
$conf = t3lib_div::_POST('data');
|
||||
|
||||
if (empty($conf)) {
|
||||
|
||||
$conf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['dlf']);
|
||||
|
||||
}
|
||||
$conf = array_merge((array) unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['dlf']), (array) t3lib_div::_POST('data'));
|
||||
|
||||
// Prepend username and password to hostname.
|
||||
if ($conf['solrUser'] && $conf['solrPass']) {
|
||||
if (!empty($conf['solrUser']) && !empty($conf['solrPass'])) {
|
||||
|
||||
$host = $conf['solrUser'].':'.$conf['solrPass'].'@'.($conf['solrHost'] ? $conf['solrHost'] : 'localhost');
|
||||
|
||||
} else {
|
||||
|
||||
$host = ($conf['solrHost'] ? $conf['solrHost'] : 'localhost');
|
||||
$host = (!empty($conf['solrHost']) ? $conf['solrHost'] : 'localhost');
|
||||
|
||||
}
|
||||
|
||||
// Set port if not set.
|
||||
$port = t3lib_div::intInRange($conf['solrPort'], 0, 65535, 8180);
|
||||
$port = (!empty($conf['solrPort']) ? t3lib_div::intInRange($conf['solrPort'], 0, 65535, 8180) : 8180);
|
||||
|
||||
// Trim path and append trailing slash.
|
||||
$path = (trim($conf['solrPath'], '/') ? trim($conf['solrPath'], '/').'/' : '');
|
||||
$path = (!empty($conf['solrPath']) ? trim($conf['solrPath'], '/').'/' : '');
|
||||
|
||||
// Build request URI.
|
||||
$url = 'http://'.$host.':'.$port.'/'.$path.'admin/cores';
|
||||
|
@ -84,7 +86,7 @@ class tx_dlf_em {
|
|||
$context = stream_context_create(array (
|
||||
'http' => array (
|
||||
'method' => 'GET',
|
||||
'user_agent' => ($conf['useragent'] ? $conf['useragent'] : ini_get('user_agent'))
|
||||
'user_agent' => (!empty($conf['useragent']) ? $conf['useragent'] : ini_get('user_agent'))
|
||||
)
|
||||
));
|
||||
|
||||
|
@ -106,7 +108,9 @@ class tx_dlf_em {
|
|||
FALSE
|
||||
);
|
||||
|
||||
return $message->render();
|
||||
$this->content .= $message->render();
|
||||
|
||||
return $this->content;
|
||||
|
||||
}
|
||||
|
||||
|
@ -120,7 +124,453 @@ class tx_dlf_em {
|
|||
FALSE
|
||||
);
|
||||
|
||||
return $message->render();
|
||||
$this->content .= $message->render();
|
||||
|
||||
return $this->content;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Make sure a backend user exists and is configured properly.
|
||||
*
|
||||
* @access protected
|
||||
*
|
||||
* @param boolean $checkOnly: Just check the user or change it, too?
|
||||
* @param integer $groupUid: UID of the corresponding usergroup
|
||||
*
|
||||
* @return integer UID of user or 0 if something is wrong
|
||||
*/
|
||||
protected function checkCliUser($checkOnly, $groupUid) {
|
||||
|
||||
// Set default return value.
|
||||
$usrUid = 0;
|
||||
|
||||
// Check if user "_cli_dlf" exists, is no admin and is not disabled.
|
||||
$result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
|
||||
'uid,admin,usergroup',
|
||||
'be_users',
|
||||
'username='.$GLOBALS['TYPO3_DB']->fullQuoteStr('_cli_dlf', 'be_users').t3lib_BEfunc::deleteClause('be_users')
|
||||
);
|
||||
|
||||
if ($GLOBALS['TYPO3_DB']->sql_num_rows($result) > 0) {
|
||||
|
||||
$resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);
|
||||
|
||||
// Explode comma-separated list.
|
||||
$resArray['usergroup'] = explode(',', $resArray['usergroup']);
|
||||
|
||||
// Check if user is not disabled.
|
||||
$_result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
|
||||
'1',
|
||||
'be_users',
|
||||
'uid='.intval($resArray['uid']).t3lib_BEfunc::BEenableFields('be_users')
|
||||
);
|
||||
|
||||
// Check if user is configured properly.
|
||||
if (count(array_diff(array ($groupUid), $resArray['usergroup'])) == 0
|
||||
&& !$resArray['admin']
|
||||
&& $GLOBALS['TYPO3_DB']->sql_num_rows($_result) > 0) {
|
||||
|
||||
$usrUid = $resArray['uid'];
|
||||
|
||||
$message = t3lib_div::makeInstance(
|
||||
't3lib_FlashMessage',
|
||||
$GLOBALS['LANG']->getLL('cliUserGroup.usrOkayMsg'),
|
||||
$GLOBALS['LANG']->getLL('cliUserGroup.usrOkay'),
|
||||
t3lib_FlashMessage::OK,
|
||||
FALSE
|
||||
);
|
||||
|
||||
} else {
|
||||
|
||||
if (!$checkOnly && $groupUid) {
|
||||
|
||||
// Keep exisiting values and add the new ones.
|
||||
$_usergroup = array_unique(array_merge(array ($groupUid), $resArray['usergroup']));
|
||||
|
||||
// Try to configure user.
|
||||
$data['be_users'][$resArray['uid']] = array (
|
||||
'admin' => 0,
|
||||
'usergroup' => implode(',', $_usergroup),
|
||||
$GLOBALS['TCA']['be_users']['ctrl']['enablecolumns']['disabled'] => 0,
|
||||
$GLOBALS['TCA']['be_users']['ctrl']['enablecolumns']['starttime'] => 0,
|
||||
$GLOBALS['TCA']['be_users']['ctrl']['enablecolumns']['endtime'] => 0
|
||||
);
|
||||
|
||||
tx_dlf_helper::processDB($data);
|
||||
|
||||
// Check if configuration was successful.
|
||||
if ($this->checkCliUser(TRUE, $groupUid)) {
|
||||
|
||||
$usrUid = $resArray['uid'];
|
||||
|
||||
$message = t3lib_div::makeInstance(
|
||||
't3lib_FlashMessage',
|
||||
$GLOBALS['LANG']->getLL('cliUserGroup.usrConfiguredMsg'),
|
||||
$GLOBALS['LANG']->getLL('cliUserGroup.usrConfigured'),
|
||||
t3lib_FlashMessage::INFO,
|
||||
FALSE
|
||||
);
|
||||
|
||||
} else {
|
||||
|
||||
$message = t3lib_div::makeInstance(
|
||||
't3lib_FlashMessage',
|
||||
$GLOBALS['LANG']->getLL('cliUserGroup.usrNotConfiguredMsg'),
|
||||
$GLOBALS['LANG']->getLL('cliUserGroup.usrNotConfigured'),
|
||||
t3lib_FlashMessage::WARNING,
|
||||
FALSE
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
$message = t3lib_div::makeInstance(
|
||||
't3lib_FlashMessage',
|
||||
$GLOBALS['LANG']->getLL('cliUserGroup.usrNotConfiguredMsg'),
|
||||
$GLOBALS['LANG']->getLL('cliUserGroup.usrNotConfigured'),
|
||||
t3lib_FlashMessage::WARNING,
|
||||
FALSE
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
if (!$checkOnly && $groupUid) {
|
||||
|
||||
// Try to create user.
|
||||
$_tempUid = uniqid('NEW');
|
||||
|
||||
$data['be_users'][$_tempUid] = array (
|
||||
'pid' => 0,
|
||||
'username' => '_cli_dlf',
|
||||
'password' => md5($_tempUid),
|
||||
'realName' => $GLOBALS['LANG']->getLL('cliUserGroup.usrRealName'),
|
||||
'usergroup' => intval($groupUid)
|
||||
);
|
||||
|
||||
$_substUid = tx_dlf_helper::processDB($data);
|
||||
|
||||
// Check if creation was successful.
|
||||
if (!empty($_substUid[$_tempUid])) {
|
||||
|
||||
$usrUid = $_substUid[$_tempUid];
|
||||
|
||||
$message = t3lib_div::makeInstance(
|
||||
't3lib_FlashMessage',
|
||||
$GLOBALS['LANG']->getLL('cliUserGroup.usrCreatedMsg'),
|
||||
$GLOBALS['LANG']->getLL('cliUserGroup.usrCreated'),
|
||||
t3lib_FlashMessage::INFO,
|
||||
FALSE
|
||||
);
|
||||
|
||||
} else {
|
||||
|
||||
$message = t3lib_div::makeInstance(
|
||||
't3lib_FlashMessage',
|
||||
$GLOBALS['LANG']->getLL('cliUserGroup.usrNotCreatedMsg'),
|
||||
$GLOBALS['LANG']->getLL('cliUserGroup.usrNotCreated'),
|
||||
t3lib_FlashMessage::ERROR,
|
||||
FALSE
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
$message = t3lib_div::makeInstance(
|
||||
't3lib_FlashMessage',
|
||||
$GLOBALS['LANG']->getLL('cliUserGroup.usrNotCreatedMsg'),
|
||||
$GLOBALS['LANG']->getLL('cliUserGroup.usrNotCreated'),
|
||||
t3lib_FlashMessage::ERROR,
|
||||
FALSE
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$this->content = $message->render();
|
||||
|
||||
return $usrUid;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Make sure a backend usergroup exists and is configured properly.
|
||||
*
|
||||
* @access protected
|
||||
*
|
||||
* @param boolean $checkOnly: Just check the usergroup or change it, too?
|
||||
* @param array $settings: Array with default settings
|
||||
*
|
||||
* @return integer UID of usergroup or 0 if something is wrong
|
||||
*/
|
||||
protected function checkCliGroup($checkOnly, $settings = array ()) {
|
||||
|
||||
// Set default return value.
|
||||
$grpUid = 0;
|
||||
|
||||
// Set default configuration for usergroup.
|
||||
if (empty($settings)) {
|
||||
|
||||
$settings = array (
|
||||
'non_exclude_fields' => array (),
|
||||
'tables_select' => array (
|
||||
'tx_dlf_documents',
|
||||
'tx_dlf_collections',
|
||||
'tx_dlf_libraries',
|
||||
'tx_dlf_structures',
|
||||
'tx_dlf_metadata',
|
||||
'tx_dlf_formats',
|
||||
'tx_dlf_solrcores'
|
||||
),
|
||||
'tables_modify' => array (
|
||||
'tx_dlf_documents',
|
||||
'tx_dlf_collections',
|
||||
'tx_dlf_libraries'
|
||||
)
|
||||
);
|
||||
|
||||
// Set allowed exclude fields.
|
||||
foreach ($settings['tables_modify'] as $table) {
|
||||
|
||||
t3lib_div::loadTCA($table);
|
||||
|
||||
foreach ($GLOBALS['TCA'][$table]['columns'] as $field => $fieldConf) {
|
||||
|
||||
if (!empty($fieldConf['exclude'])) {
|
||||
|
||||
$settings['non_exclude_fields'][] = $table.':'.$field;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Check if group "_cli_dlf" exists and is not disabled.
|
||||
$result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
|
||||
'uid,non_exclude_fields,tables_select,tables_modify,inc_access_lists,'.$GLOBALS['TCA']['be_groups']['ctrl']['enablecolumns']['disabled'],
|
||||
'be_groups',
|
||||
'title='.$GLOBALS['TYPO3_DB']->fullQuoteStr('_cli_dlf', 'be_groups').t3lib_BEfunc::deleteClause('be_groups')
|
||||
);
|
||||
|
||||
if ($GLOBALS['TYPO3_DB']->sql_num_rows($result) > 0) {
|
||||
|
||||
$resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);
|
||||
|
||||
// Explode comma-separated lists.
|
||||
$resArray['non_exclude_fields'] = explode(',', $resArray['non_exclude_fields']);
|
||||
|
||||
$resArray['tables_select'] = explode(',', $resArray['tables_select']);
|
||||
|
||||
$resArray['tables_modify'] = explode(',', $resArray['tables_modify']);
|
||||
|
||||
// Check if usergroup is configured properly.
|
||||
if (count(array_diff($settings['non_exclude_fields'], $resArray['non_exclude_fields'])) == 0
|
||||
&& count(array_diff($settings['tables_select'], $resArray['tables_select'])) == 0
|
||||
&& count(array_diff($settings['tables_modify'], $resArray['tables_modify'])) == 0
|
||||
&& $resArray['inc_access_lists'] == 1
|
||||
&& $resArray[$GLOBALS['TCA']['be_groups']['ctrl']['enablecolumns']['disabled']] == 0) {
|
||||
|
||||
$grpUid = $resArray['uid'];
|
||||
|
||||
$message = t3lib_div::makeInstance(
|
||||
't3lib_FlashMessage',
|
||||
$GLOBALS['LANG']->getLL('cliUserGroup.grpOkayMsg'),
|
||||
$GLOBALS['LANG']->getLL('cliUserGroup.grpOkay'),
|
||||
t3lib_FlashMessage::OK,
|
||||
FALSE
|
||||
);
|
||||
|
||||
} else {
|
||||
|
||||
if (!$checkOnly) {
|
||||
|
||||
// Keep exisiting values and add the new ones.
|
||||
$_non_exclude_fields = array_unique(array_merge($settings['non_exclude_fields'], $resArray['non_exclude_fields']));
|
||||
|
||||
$_tables_select = array_unique(array_merge($settings['tables_select'], $resArray['tables_select']));
|
||||
|
||||
$_tables_modify = array_unique(array_merge($settings['tables_modify'], $resArray['tables_modify']));
|
||||
|
||||
// Try to configure usergroup.
|
||||
$data['be_groups'][$resArray['uid']] = array (
|
||||
'non_exclude_fields' => implode(',', $_non_exclude_fields),
|
||||
'tables_select' => implode(',', $_tables_select),
|
||||
'tables_modify' => implode(',', $_tables_modify),
|
||||
'inc_access_lists' => 1,
|
||||
$GLOBALS['TCA']['be_groups']['ctrl']['enablecolumns']['disabled'] => 0
|
||||
);
|
||||
|
||||
tx_dlf_helper::processDB($data);
|
||||
|
||||
// Check if configuration was successful.
|
||||
if ($this->checkCliGroup(TRUE, $settings)) {
|
||||
|
||||
$grpUid = $resArray['uid'];
|
||||
|
||||
$message = t3lib_div::makeInstance(
|
||||
't3lib_FlashMessage',
|
||||
$GLOBALS['LANG']->getLL('cliUserGroup.grpConfiguredMsg'),
|
||||
$GLOBALS['LANG']->getLL('cliUserGroup.grpConfigured'),
|
||||
t3lib_FlashMessage::INFO,
|
||||
FALSE
|
||||
);
|
||||
|
||||
} else {
|
||||
|
||||
$message = t3lib_div::makeInstance(
|
||||
't3lib_FlashMessage',
|
||||
$GLOBALS['LANG']->getLL('cliUserGroup.grpNotConfiguredMsg'),
|
||||
$GLOBALS['LANG']->getLL('cliUserGroup.grpNotConfigured'),
|
||||
t3lib_FlashMessage::WARNING,
|
||||
FALSE
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
$message = t3lib_div::makeInstance(
|
||||
't3lib_FlashMessage',
|
||||
$GLOBALS['LANG']->getLL('cliUserGroup.grpNotConfiguredMsg'),
|
||||
$GLOBALS['LANG']->getLL('cliUserGroup.grpNotConfigured'),
|
||||
t3lib_FlashMessage::WARNING,
|
||||
FALSE
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
if (!$checkOnly) {
|
||||
|
||||
// Try to create usergroup.
|
||||
$_tempUid = uniqid('NEW');
|
||||
|
||||
$data['be_groups'][$_tempUid] = array (
|
||||
'pid' => 0,
|
||||
'title' => '_cli_dlf',
|
||||
'description' => $GLOBALS['LANG']->getLL('cliUserGroup.grpDescription'),
|
||||
'non_exclude_fields' => implode(',', $settings['non_exclude_fields']),
|
||||
'tables_select' => implode(',', $settings['tables_select']),
|
||||
'tables_modify' => implode(',', $settings['tables_modify']),
|
||||
'inc_access_lists' => 1
|
||||
);
|
||||
|
||||
$_substUid = tx_dlf_helper::processDB($data);
|
||||
|
||||
// Check if creation was successful.
|
||||
if (!empty($_substUid[$_tempUid])) {
|
||||
|
||||
$grpUid = $_substUid[$_tempUid];
|
||||
|
||||
$message = t3lib_div::makeInstance(
|
||||
't3lib_FlashMessage',
|
||||
$GLOBALS['LANG']->getLL('cliUserGroup.grpCreatedMsg'),
|
||||
$GLOBALS['LANG']->getLL('cliUserGroup.grpCreated'),
|
||||
t3lib_FlashMessage::INFO,
|
||||
FALSE
|
||||
);
|
||||
|
||||
} else {
|
||||
|
||||
$message = t3lib_div::makeInstance(
|
||||
't3lib_FlashMessage',
|
||||
$GLOBALS['LANG']->getLL('cliUserGroup.grpNotCreatedMsg'),
|
||||
$GLOBALS['LANG']->getLL('cliUserGroup.grpNotCreated'),
|
||||
t3lib_FlashMessage::ERROR,
|
||||
FALSE
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
$message = t3lib_div::makeInstance(
|
||||
't3lib_FlashMessage',
|
||||
$GLOBALS['LANG']->getLL('cliUserGroup.grpNotCreatedMsg'),
|
||||
$GLOBALS['LANG']->getLL('cliUserGroup.grpNotCreated'),
|
||||
t3lib_FlashMessage::ERROR,
|
||||
FALSE
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$this->content = $message->render();
|
||||
|
||||
return $grpUid;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Make sure a CLI user and group exist.
|
||||
*
|
||||
* @access public
|
||||
*
|
||||
* @param array &$params: An array with parameters
|
||||
* @param t3lib_tsStyleConfig &$pObj: The parent object
|
||||
*
|
||||
* @return string Message informing the user of success or failure
|
||||
*/
|
||||
public function checkCliUserGroup(&$params, &$pObj) {
|
||||
|
||||
// Load localization file.
|
||||
$GLOBALS['LANG']->includeLLFile('EXT:dlf/locallang.xml');
|
||||
|
||||
// Get current configuration.
|
||||
$conf = array_merge((array) unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['dlf']), (array) t3lib_div::_POST('data'));
|
||||
|
||||
// Check if usergroup "_cli_dlf" exists and is configured properly.
|
||||
$groupUid = $this->checkCliGroup(empty($conf['makeCliUserGroup']));
|
||||
|
||||
// Save output because it will be overwritten by the user check method.
|
||||
$content = $this->content;
|
||||
|
||||
// Check if user "_cli_dlf" exists and is configured properly.
|
||||
$userUid = $this->checkCliUser(empty($conf['makeCliUserGroup']), $groupUid);
|
||||
|
||||
// Merge output from usergroup and user checks.
|
||||
$this->content .= $content;
|
||||
|
||||
// Check if CLI dispatcher is executable.
|
||||
if (is_executable(PATH_typo3.'cli_dispatch.phpsh')) {
|
||||
|
||||
$message = t3lib_div::makeInstance(
|
||||
't3lib_FlashMessage',
|
||||
$GLOBALS['LANG']->getLL('cliUserGroup.cliOkayMsg'),
|
||||
$GLOBALS['LANG']->getLL('cliUserGroup.cliOkay'),
|
||||
t3lib_FlashMessage::OK,
|
||||
FALSE
|
||||
);
|
||||
|
||||
} else {
|
||||
|
||||
$message = t3lib_div::makeInstance(
|
||||
't3lib_FlashMessage',
|
||||
$GLOBALS['LANG']->getLL('cliUserGroup.cliNotOkayMsg'),
|
||||
$GLOBALS['LANG']->getLL('cliUserGroup.cliNotOkay'),
|
||||
t3lib_FlashMessage::ERROR,
|
||||
FALSE
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
$this->content .= $message->render();
|
||||
|
||||
return $this->content;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -122,6 +122,8 @@
|
|||
<label index="tt_content.dlf_statistics">DLF: Statistics</label>
|
||||
<label index="tt_content.dlf_toc">DLF: Table of Contents</label>
|
||||
<label index="tt_content.dlf_toolbox">DLF: Toolbox</label>
|
||||
<label index="config.cliUserGroup">CLI user/group</label>
|
||||
<label index="config.makeCliUserGroup">Create and configure CLI user/group automatically?: (default is "FALSE")</label>
|
||||
<label index="config.useragent">DLF User-Agent: (default is "Goobi.Presentation")</label>
|
||||
<label index="config.fileGrps">Additional METS fileGrps: comma-separated list of @USE attribute values (default is "DEFAULT,MIN,MAX,THUMBS")</label>
|
||||
<label index="config.caching">Cache parsed METS files: caching improves performance a little bit but can result in a very large "fe_session_data" table (default is "FALSE")</label>
|
||||
|
@ -135,6 +137,32 @@
|
|||
<label index="solr.status">The status code returned by Apache Solr is <strong>%s</strong>.</label>
|
||||
<label index="solr.notConnected">Connection failed!</label>
|
||||
<label index="solr.error">Apache Solr was not reachable under <strong>%s</strong>.</label>
|
||||
<label index="cliUserGroup.usrRealName">Goobi.Presentation command line indexer</label>
|
||||
<label index="cliUserGroup.usrOkay">User "_cli_dlf" configured and enabled!</label>
|
||||
<label index="cliUserGroup.usrOkayMsg">The backend user for the command line indexer exists and is configured properly.</label>
|
||||
<label index="cliUserGroup.usrConfigured">User "_cli_dlf" configured successfully!</label>
|
||||
<label index="cliUserGroup.usrConfiguredMsg">The backend user for the command line indexer was configured properly.</label>
|
||||
<label index="cliUserGroup.usrNotConfigured">User "_cli_dlf" not configured!</label>
|
||||
<label index="cliUserGroup.usrNotConfiguredMsg">The backend user for the command line indexer exists, but is not configured properly.</label>
|
||||
<label index="cliUserGroup.usrCreated">User "_cli_dlf" created successfully!</label>
|
||||
<label index="cliUserGroup.usrCreatedMsg">The backend user for the command line indexer was created and configured properly.</label>
|
||||
<label index="cliUserGroup.usrNotCreated">User "_cli_dlf" not created!</label>
|
||||
<label index="cliUserGroup.usrNotCreatedMsg">The backend user for the command line indexer does not exist.</label>
|
||||
<label index="cliUserGroup.grpDescription">Usergroup for the Goobi.Presentation command line indexer.</label>
|
||||
<label index="cliUserGroup.grpOkay">Usergroup "_cli_dlf" configured and enabled!</label>
|
||||
<label index="cliUserGroup.grpOkayMsg">The backend usergroup for the command line indexer exists and is configured properly.</label>
|
||||
<label index="cliUserGroup.grpConfigured">Usergroup "_cli_dlf" configured successfully!</label>
|
||||
<label index="cliUserGroup.grpConfiguredMsg">The backend usergroup for the command line indexer was configured properly.</label>
|
||||
<label index="cliUserGroup.grpNotConfigured">Usergroup "_cli_dlf" not configured!</label>
|
||||
<label index="cliUserGroup.grpNotConfiguredMsg">The backend usergroup for the command line indexer exists, but is not configured properly.</label>
|
||||
<label index="cliUserGroup.grpCreated">Usergroup "_cli_dlf" created successfully!</label>
|
||||
<label index="cliUserGroup.grpCreatedMsg">The backend usergroup for the command line indexer was created and configured properly.</label>
|
||||
<label index="cliUserGroup.grpNotCreated">Usergroup "_cli_dlf" not created!</label>
|
||||
<label index="cliUserGroup.grpNotCreatedMsg">The backend usergroup for the command line indexer does not exist.</label>
|
||||
<label index="cliUserGroup.cliOkay">Command Line Interface available!</label>
|
||||
<label index="cliUserGroup.cliOkayMsg">The TYPO3 command line interface is available for the indexer to use.</label>
|
||||
<label index="cliUserGroup.cliNotOkay">Command Line Interface not available!</label>
|
||||
<label index="cliUserGroup.cliNotOkayMsg">The TYPO3 command line interface is not available for the indexer to use.</label>
|
||||
</languageKey>
|
||||
<languageKey index="de" type="array">
|
||||
<label index="tx_dlf_documents">Dokumente</label>
|
||||
|
@ -253,6 +281,8 @@
|
|||
<label index="tt_content.dlf_statistics">DLF: Statistik</label>
|
||||
<label index="tt_content.dlf_toc">DLF: Inhaltsverzeichnis</label>
|
||||
<label index="tt_content.dlf_toolbox">DLF: Werkzeugkasten</label>
|
||||
<label index="config.cliUserGroup">CLI Benutzer/Gruppe</label>
|
||||
<label index="config.makeCliUserGroup">CLI Benutzer/Gruppe automatisch anlegen?: (Standard ist "FALSE")</label>
|
||||
<label index="config.useragent">DLF User-Agent: (Standard ist "Goobi.Presentation")</label>
|
||||
<label index="config.fileGrps">Zusätzliche METS fileGrps: Komma-getrennte Liste von @USE Attributwerten (Standard ist "DEFAULT,MIN,MAX,THUMBS")</label>
|
||||
<label index="config.caching">Eingelesene METS Dateien zwischenspeichern: Dies kann die Geschwindigkeit geringfügig verbessern, führt aber zu einer sehr großen "fe_session_data" Tabelle (Standard ist "FALSE")</label>
|
||||
|
@ -266,6 +296,32 @@
|
|||
<label index="solr.status">Apache Solr gibt den Statuscode <strong>%s</strong> zurück.</label>
|
||||
<label index="solr.notConnected">Verbindung fehlgeschlagen!</label>
|
||||
<label index="solr.error">Apache Solr ist unter <strong>%s</strong> nicht erreichbar.</label>
|
||||
<label index="cliUserGroup.usrRealName">Goobi.Presentation Kommandozeilen-Indexierungsdienst</label>
|
||||
<label index="cliUserGroup.usrOkay">Nutzer "_cli_dlf" eingerichtet!</label>
|
||||
<label index="cliUserGroup.usrOkayMsg">Der Nutzer für den Kommandozeilen-Indexierungsdienst ist korrekt konfiguriert und aktiviert.</label>
|
||||
<label index="cliUserGroup.usrConfigured">Nutzer "_cli_dlf" erfolgreich konfiguriert!</label>
|
||||
<label index="cliUserGroup.usrConfiguredMsg">Der Nutzer für den Kommandozeilen-Indexierungsdienst wurde erfolgreich konfiguriert.</label>
|
||||
<label index="cliUserGroup.usrNotConfigured">Nutzer "_cli_dlf" nicht konfiguriert!</label>
|
||||
<label index="cliUserGroup.usrNotConfiguredMsg">Der Nutzer für den Kommandozeilen-Indexierungsdienst existiert, ist aber nicht korrekt konfiguriert.</label>
|
||||
<label index="cliUserGroup.usrCreated">Nutzer "_cli_dlf" erfolgreich angelegt!</label>
|
||||
<label index="cliUserGroup.usrCreatedMsg">Der Nutzer für den Kommandozeilen-Indexierungsdienst wurde erfolgreich angelegt und konfiguriert.</label>
|
||||
<label index="cliUserGroup.usrNotCreated">Nutzer "_cli_dlf" nicht angelegt!</label>
|
||||
<label index="cliUserGroup.usrNotCreatedMsg">Der Nutzer für den Kommandozeilen-Indexierungsdienst existiert nicht.</label>
|
||||
<label index="cliUserGroup.grpDescription">Nutzergruppe für den Goobi.Presentation Kommandozeilen-Indexierungsdienst.</label>
|
||||
<label index="cliUserGroup.grpOkay">Nutzergruppe "_cli_dlf" eingerichtet!</label>
|
||||
<label index="cliUserGroup.grpOkayMsg">Die Nutzergruppe für den Kommandozeilen-Indexierungsdienst ist korrekt konfiguriert und aktiviert.</label>
|
||||
<label index="cliUserGroup.grpConfigured">Nutzergruppe "_cli_dlf" erfolgreich konfiguriert!</label>
|
||||
<label index="cliUserGroup.grpConfiguredMsg">Die Nutzergruppe für den Kommandozeilen-Indexierungsdienst wurde erfolgreich konfiguriert.</label>
|
||||
<label index="cliUserGroup.grpNotConfigured">Nutzergruppe "_cli_dlf" nicht konfiguriert!</label>
|
||||
<label index="cliUserGroup.grpNotConfiguredMsg">Die Nutzergruppe für den Kommandozeilen-Indexierungsdienst existiert, ist aber nicht korrekt konfiguriert.</label>
|
||||
<label index="cliUserGroup.grpCreated">Nutzergruppe "_cli_dlf" erfolgreich angelegt!</label>
|
||||
<label index="cliUserGroup.grpCreatedMsg">Die Nutzergruppe für den Kommandozeilen-Indexierungsdienst wurde erfolgreich angelegt und konfiguriert.</label>
|
||||
<label index="cliUserGroup.grpNotCreated">Nutzergruppe "_cli_dlf" nicht angelegt!</label>
|
||||
<label index="cliUserGroup.grpNotCreatedMsg">Die Nutzergruppe für den Kommandozeilen-Indexierungsdienst existiert nicht.</label>
|
||||
<label index="cliUserGroup.cliOkay">Kommandozeilen-Schnittstelle verfügbar!</label>
|
||||
<label index="cliUserGroup.cliOkayMsg">Die TYPO3-Kommandozeilenschnittstelle steht für den Indexierungsdienst zur Verfügung.</label>
|
||||
<label index="cliUserGroup.cliNotOkay">Kommandozeilen-Schnittstelle nicht verfügbar!</label>
|
||||
<label index="cliUserGroup.cliNotOkayMsg">Die TYPO3-Kommandozeilenschnittstelle steht für den Indexierungsdienst nicht zur Verfügung.</label>
|
||||
</languageKey>
|
||||
</data>
|
||||
</T3locallang>
|
|
@ -210,8 +210,16 @@ class tx_dlf_metadata extends tx_dlf_plugin {
|
|||
// Load all the metadata values into the content object's data array.
|
||||
foreach ($_metadata as $_index_name => $_value) {
|
||||
|
||||
if (is_array($_value)) {
|
||||
|
||||
$this->cObj->data[$_index_name] = implode($this->conf['separator'], $_value);
|
||||
|
||||
} else {
|
||||
|
||||
$this->cObj->data[$_index_name] = $_value;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Process each metadate.
|
||||
|
|
Loading…
Reference in New Issue