Unset default Solr core
This commit is contained in:
parent
5bb0b5d9ec
commit
48e1af02b7
|
@ -1031,7 +1031,7 @@ class tx_dlf_document {
|
||||||
*
|
*
|
||||||
* @return boolean TRUE on success or FALSE on failure
|
* @return boolean TRUE on success or FALSE on failure
|
||||||
*/
|
*/
|
||||||
public function save($pid = 0, $core = 1) {
|
public function save($pid = 0, $core = 0) {
|
||||||
|
|
||||||
if (TYPO3_MODE !== 'BE') {
|
if (TYPO3_MODE !== 'BE') {
|
||||||
|
|
||||||
|
@ -1044,6 +1044,9 @@ class tx_dlf_document {
|
||||||
// Make sure $pid is a non-negative integer.
|
// Make sure $pid is a non-negative integer.
|
||||||
$pid = max(intval($pid), 0);
|
$pid = max(intval($pid), 0);
|
||||||
|
|
||||||
|
// Make sure $core is a non-negative integer.
|
||||||
|
$core = max(intval($core), 0);
|
||||||
|
|
||||||
// If $pid is not given, try to get it elsewhere.
|
// If $pid is not given, try to get it elsewhere.
|
||||||
if (!$pid && $this->pid) {
|
if (!$pid && $this->pid) {
|
||||||
|
|
||||||
|
@ -1263,7 +1266,7 @@ class tx_dlf_document {
|
||||||
|
|
||||||
if ($superior->pid != $pid) {
|
if ($superior->pid != $pid) {
|
||||||
|
|
||||||
$superior->save($pid);
|
$superior->save($pid, $core);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1348,6 +1351,10 @@ class tx_dlf_document {
|
||||||
|
|
||||||
tx_dlf_indexing::add($this, $core);
|
tx_dlf_indexing::add($this, $core);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
trigger_error('Invalid UID for Solr core ('.$core.') given to index document', E_USER_NOTICE);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
|
@ -771,8 +771,8 @@ class tx_dlf_helper {
|
||||||
|
|
||||||
if (TYPO3_MODE === 'FE') {
|
if (TYPO3_MODE === 'FE') {
|
||||||
|
|
||||||
// Tables "tx_dlf_solrcores" and "tx_dlf_formats" always have PID 0.
|
// Table "tx_dlf_formats" always has PID 0.
|
||||||
if (in_array($table, array ('tx_dlf_solrcores', 'tx_dlf_formats'))) {
|
if ($table == 'tx_dlf_formats') {
|
||||||
|
|
||||||
return t3lib_BEfunc::deleteClause($table);
|
return t3lib_BEfunc::deleteClause($table);
|
||||||
|
|
||||||
|
|
|
@ -134,7 +134,7 @@ class tx_dlf_indexing {
|
||||||
*
|
*
|
||||||
* @return integer 0 on success or 1 on failure
|
* @return integer 0 on success or 1 on failure
|
||||||
*/
|
*/
|
||||||
public static function add(tx_dlf_document &$doc, $core = 1) {
|
public static function add(tx_dlf_document &$doc, $core = 0) {
|
||||||
|
|
||||||
if (in_array($doc->uid, self::$processedDocs)) {
|
if (in_array($doc->uid, self::$processedDocs)) {
|
||||||
|
|
||||||
|
@ -242,8 +242,8 @@ class tx_dlf_indexing {
|
||||||
$_message = t3lib_div::makeInstance(
|
$_message = t3lib_div::makeInstance(
|
||||||
't3lib_FlashMessage',
|
't3lib_FlashMessage',
|
||||||
$GLOBALS['LANG']->getLL('flash.solrNoConnection', TRUE),
|
$GLOBALS['LANG']->getLL('flash.solrNoConnection', TRUE),
|
||||||
$GLOBALS['LANG']->getLL('flash.error', TRUE),
|
$GLOBALS['LANG']->getLL('flash.warning', TRUE),
|
||||||
t3lib_FlashMessage::ERROR,
|
t3lib_FlashMessage::WARNING,
|
||||||
TRUE
|
TRUE
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -251,7 +251,7 @@ class tx_dlf_indexing {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
trigger_error('Could not connect to Apache Solr server', E_USER_ERROR);
|
trigger_error('Could not connect to Apache Solr server', E_USER_WARNING);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ class tx_dlf_solr {
|
||||||
*
|
*
|
||||||
* @return mixed Instance of Apache_Solr_Service or NULL on failure
|
* @return mixed Instance of Apache_Solr_Service or NULL on failure
|
||||||
*/
|
*/
|
||||||
public static function solrConnect($core = 1) {
|
public static function solrConnect($core = 0) {
|
||||||
|
|
||||||
// Load class.
|
// Load class.
|
||||||
if (!class_exists('Apache_Solr_Service')) {
|
if (!class_exists('Apache_Solr_Service')) {
|
||||||
|
@ -97,7 +97,7 @@ class tx_dlf_solr {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
trigger_error('Could not find Solr core with UID '.$core, E_USER_ERROR);
|
trigger_error('Could not find Solr core with UID '.$core, E_USER_NOTICE);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -129,7 +129,8 @@ $TCA['tx_dlf_solrcores'] = array (
|
||||||
'delete' => 'deleted',
|
'delete' => 'deleted',
|
||||||
'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY).'tca.php',
|
'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY).'tca.php',
|
||||||
'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY).'res/icon_txdlfsolrcores.png',
|
'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY).'res/icon_txdlfsolrcores.png',
|
||||||
'rootLevel' => 1,
|
'rootLevel' => 0,
|
||||||
|
'adminOnly' => 1,
|
||||||
'dividers2tabs' => 2,
|
'dividers2tabs' => 2,
|
||||||
),
|
),
|
||||||
'feInterface' => array (
|
'feInterface' => array (
|
||||||
|
|
|
@ -147,6 +147,61 @@ class tx_dlf_tceforms {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper to get flexform's items array for plugin "tx_dlf_search"
|
||||||
|
*
|
||||||
|
* @access public
|
||||||
|
*
|
||||||
|
* @param array &$params: An array with parameters
|
||||||
|
* @param t3lib_TCEforms &$pObj: The parent object
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function itemsProcFunc_solrList(&$params, &$pObj) {
|
||||||
|
|
||||||
|
if ($params['row']['pi_flexform']) {
|
||||||
|
|
||||||
|
$pi_flexform = t3lib_div::xml2array($params['row']['pi_flexform']);
|
||||||
|
|
||||||
|
$pages = $pi_flexform['data']['sDEF']['lDEF']['pages']['vDEF'];
|
||||||
|
|
||||||
|
// There is a strange behavior where the uid from the flexform is prepended by the table's name and appended by its title.
|
||||||
|
// i.e. instead of "18" it reads "pages_18|Title"
|
||||||
|
if (!t3lib_div::testInt($pages)) {
|
||||||
|
|
||||||
|
$_parts = explode('|', $pages);
|
||||||
|
|
||||||
|
$pages = array_pop(explode('_', $_parts[0]));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($pages > 0) {
|
||||||
|
|
||||||
|
$result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
|
||||||
|
'label,uid',
|
||||||
|
'tx_dlf_solrcores',
|
||||||
|
'pid IN ('.intval($pages).',0)'.tx_dlf_helper::whereClause('tx_dlf_solrcores'),
|
||||||
|
'',
|
||||||
|
'label',
|
||||||
|
''
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($GLOBALS['TYPO3_DB']->sql_num_rows($result) > 0) {
|
||||||
|
|
||||||
|
while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_row($result)) {
|
||||||
|
|
||||||
|
$params['items'][] = $resArray;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper to get flexform's items array for plugin "tx_dlf_toolbox"
|
* Helper to get flexform's items array for plugin "tx_dlf_toolbox"
|
||||||
*
|
*
|
||||||
|
|
|
@ -138,7 +138,7 @@
|
||||||
<label index="solr.notConnected">Connection failed!</label>
|
<label index="solr.notConnected">Connection failed!</label>
|
||||||
<label index="solr.error">Apache Solr was not reachable under <strong>%s</strong>.</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.usrRealName">Goobi.Presentation command line indexer</label>
|
||||||
<label index="cliUserGroup.usrOkay">User "_cli_dlf" configured and enabled!</label>
|
<label index="cliUserGroup.usrOkay">User "_cli_dlf" found!</label>
|
||||||
<label index="cliUserGroup.usrOkayMsg">The backend user for the command line indexer exists and is configured properly.</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.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.usrConfiguredMsg">The backend user for the command line indexer was configured properly.</label>
|
||||||
|
@ -146,10 +146,10 @@
|
||||||
<label index="cliUserGroup.usrNotConfiguredMsg">The backend user for the command line indexer exists, but is not configured properly.</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.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.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.usrNotCreated">User "_cli_dlf" not found!</label>
|
||||||
<label index="cliUserGroup.usrNotCreatedMsg">The backend user for the command line indexer does not exist.</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.grpDescription">Usergroup for the Goobi.Presentation command line indexer.</label>
|
||||||
<label index="cliUserGroup.grpOkay">Usergroup "_cli_dlf" configured and enabled!</label>
|
<label index="cliUserGroup.grpOkay">Usergroup "_cli_dlf" found!</label>
|
||||||
<label index="cliUserGroup.grpOkayMsg">The backend usergroup for the command line indexer exists and is configured properly.</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.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.grpConfiguredMsg">The backend usergroup for the command line indexer was configured properly.</label>
|
||||||
|
@ -157,7 +157,7 @@
|
||||||
<label index="cliUserGroup.grpNotConfiguredMsg">The backend usergroup for the command line indexer exists, but is not configured properly.</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.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.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.grpNotCreated">Usergroup "_cli_dlf" not found!</label>
|
||||||
<label index="cliUserGroup.grpNotCreatedMsg">The backend usergroup for the command line indexer does not exist.</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.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.cliOkayMsg">The TYPO3 command line interface is available for the indexer to use.</label>
|
||||||
|
@ -297,7 +297,7 @@
|
||||||
<label index="solr.notConnected">Verbindung fehlgeschlagen!</label>
|
<label index="solr.notConnected">Verbindung fehlgeschlagen!</label>
|
||||||
<label index="solr.error">Apache Solr ist unter <strong>%s</strong> nicht erreichbar.</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.usrRealName">Goobi.Presentation Kommandozeilen-Indexierungsdienst</label>
|
||||||
<label index="cliUserGroup.usrOkay">Nutzer "_cli_dlf" eingerichtet!</label>
|
<label index="cliUserGroup.usrOkay">Nutzer "_cli_dlf" gefunden!</label>
|
||||||
<label index="cliUserGroup.usrOkayMsg">Der Nutzer für den Kommandozeilen-Indexierungsdienst ist korrekt konfiguriert und aktiviert.</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.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.usrConfiguredMsg">Der Nutzer für den Kommandozeilen-Indexierungsdienst wurde erfolgreich konfiguriert.</label>
|
||||||
|
@ -305,10 +305,10 @@
|
||||||
<label index="cliUserGroup.usrNotConfiguredMsg">Der Nutzer für den Kommandozeilen-Indexierungsdienst existiert, ist aber nicht korrekt 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.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.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.usrNotCreated">Nutzer "_cli_dlf" nicht gefunden!</label>
|
||||||
<label index="cliUserGroup.usrNotCreatedMsg">Der Nutzer für den Kommandozeilen-Indexierungsdienst existiert nicht.</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.grpDescription">Nutzergruppe für den Goobi.Presentation Kommandozeilen-Indexierungsdienst.</label>
|
||||||
<label index="cliUserGroup.grpOkay">Nutzergruppe "_cli_dlf" eingerichtet!</label>
|
<label index="cliUserGroup.grpOkay">Nutzergruppe "_cli_dlf" gefunden!</label>
|
||||||
<label index="cliUserGroup.grpOkayMsg">Die Nutzergruppe für den Kommandozeilen-Indexierungsdienst ist korrekt konfiguriert und aktiviert.</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.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.grpConfiguredMsg">Die Nutzergruppe für den Kommandozeilen-Indexierungsdienst wurde erfolgreich konfiguriert.</label>
|
||||||
|
@ -316,7 +316,7 @@
|
||||||
<label index="cliUserGroup.grpNotConfiguredMsg">Die Nutzergruppe für den Kommandozeilen-Indexierungsdienst existiert, ist aber nicht korrekt 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.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.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.grpNotCreated">Nutzergruppe "_cli_dlf" nicht gefunden!</label>
|
||||||
<label index="cliUserGroup.grpNotCreatedMsg">Die Nutzergruppe für den Kommandozeilen-Indexierungsdienst existiert nicht.</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.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.cliOkayMsg">Die TYPO3-Kommandozeilenschnittstelle steht für den Indexierungsdienst zur Verfügung.</label>
|
||||||
|
|
|
@ -70,7 +70,7 @@ class tx_dlf_modIndexing extends tx_dlf_module {
|
||||||
$_cores = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
|
$_cores = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
|
||||||
'tx_dlf_solrcores.label AS label,tx_dlf_solrcores.uid AS uid',
|
'tx_dlf_solrcores.label AS label,tx_dlf_solrcores.uid AS uid',
|
||||||
'tx_dlf_solrcores',
|
'tx_dlf_solrcores',
|
||||||
'tx_dlf_solrcores.pid=0'.tx_dlf_helper::whereClause('tx_dlf_solrcores'),
|
'1=1'.tx_dlf_helper::whereClause('tx_dlf_solrcores'),
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
''
|
''
|
||||||
|
@ -134,7 +134,7 @@ class tx_dlf_modIndexing extends tx_dlf_module {
|
||||||
$_cores = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
|
$_cores = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
|
||||||
'tx_dlf_solrcores.label AS label,tx_dlf_solrcores.uid AS uid',
|
'tx_dlf_solrcores.label AS label,tx_dlf_solrcores.uid AS uid',
|
||||||
'tx_dlf_solrcores',
|
'tx_dlf_solrcores',
|
||||||
'tx_dlf_solrcores.pid=0'.tx_dlf_helper::whereClause('tx_dlf_solrcores'),
|
'1=1'.tx_dlf_helper::whereClause('tx_dlf_solrcores'),
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
''
|
''
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
<label index="form.submit">Start indexing</label>
|
<label index="form.submit">Start indexing</label>
|
||||||
<label index="flash.attention">Attention!</label>
|
<label index="flash.attention">Attention!</label>
|
||||||
<label index="flash.done">Done!</label>
|
<label index="flash.done">Done!</label>
|
||||||
|
<label index="flash.warning">Warning!</label>
|
||||||
<label index="flash.error">Error!</label>
|
<label index="flash.error">Error!</label>
|
||||||
<label index="flash.running">Please wait...</label>
|
<label index="flash.running">Please wait...</label>
|
||||||
<label index="flash.newCollection">New collection "%s" [%u] added to database.</label>
|
<label index="flash.newCollection">New collection "%s" [%u] added to database.</label>
|
||||||
|
@ -33,6 +34,7 @@
|
||||||
<label index="form.submit">Indexierung starten</label>
|
<label index="form.submit">Indexierung starten</label>
|
||||||
<label index="flash.attention">Achtung!</label>
|
<label index="flash.attention">Achtung!</label>
|
||||||
<label index="flash.done">Fertig!</label>
|
<label index="flash.done">Fertig!</label>
|
||||||
|
<label index="flash.warning">Warnung!</label>
|
||||||
<label index="flash.error">Fehler!</label>
|
<label index="flash.error">Fehler!</label>
|
||||||
<label index="flash.running">Indexierung läuft...</label>
|
<label index="flash.running">Indexierung läuft...</label>
|
||||||
<label index="flash.newCollection">Neue Sammlung "%s" [%u] zur Datenbank hinzugefügt.</label>
|
<label index="flash.newCollection">Neue Sammlung "%s" [%u] zur Datenbank hinzugefügt.</label>
|
||||||
|
|
|
@ -54,7 +54,9 @@ class tx_dlf_collection extends tx_dlf_plugin {
|
||||||
$this->init($conf);
|
$this->init($conf);
|
||||||
|
|
||||||
// Quit without doing anything if required configuration variables are not set.
|
// Quit without doing anything if required configuration variables are not set.
|
||||||
if (!$this->conf['pages']) {
|
if (empty($this->conf['pages'])) {
|
||||||
|
|
||||||
|
trigger_error('Incomplete configuration for plugin '.get_class($this), E_USER_NOTICE);
|
||||||
|
|
||||||
return $content;
|
return $content;
|
||||||
|
|
||||||
|
|
|
@ -13,9 +13,9 @@
|
||||||
<el>
|
<el>
|
||||||
<pages>
|
<pages>
|
||||||
<TCEforms>
|
<TCEforms>
|
||||||
<onChange>reload</onChange>
|
|
||||||
<exclude>1</exclude>
|
<exclude>1</exclude>
|
||||||
<label>LLL:EXT:lang/locallang_general.xml:LGL.startingpoint</label>
|
<label>LLL:EXT:lang/locallang_general.xml:LGL.startingpoint</label>
|
||||||
|
<onChange>reload</onChange>
|
||||||
<config>
|
<config>
|
||||||
<type>group</type>
|
<type>group</type>
|
||||||
<internal_type>db</internal_type>
|
<internal_type>db</internal_type>
|
||||||
|
|
|
@ -56,6 +56,15 @@ class tx_dlf_search extends tx_dlf_plugin {
|
||||||
// Disable caching for this plugin.
|
// Disable caching for this plugin.
|
||||||
$this->setCache(FALSE);
|
$this->setCache(FALSE);
|
||||||
|
|
||||||
|
// Quit without doing anything if required variables are not set.
|
||||||
|
if (empty($this->conf['solrcore'])) {
|
||||||
|
|
||||||
|
trigger_error('Incomplete configuration for plugin '.get_class($this), E_USER_NOTICE);
|
||||||
|
|
||||||
|
return $content;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (empty($this->piVars['query'])) {
|
if (empty($this->piVars['query'])) {
|
||||||
|
|
||||||
// Load template file.
|
// Load template file.
|
||||||
|
@ -83,12 +92,9 @@ class tx_dlf_search extends tx_dlf_plugin {
|
||||||
|
|
||||||
return $this->pi_wrapInBaseClass($content);
|
return $this->pi_wrapInBaseClass($content);
|
||||||
|
|
||||||
} else {
|
} elseif (($solr = tx_dlf_solr::solrConnect($this->conf['solrcore'])) !== NULL) {
|
||||||
|
|
||||||
// Get Solr instance...
|
// Perform search.
|
||||||
$solr = tx_dlf_solr::solrConnect($this->conf['solrcore']);
|
|
||||||
|
|
||||||
// ...and perform search.
|
|
||||||
$query = $solr->search($this->piVars['query'], 0, $this->conf['limit'], array ());
|
$query = $solr->search($this->piVars['query'], 0, $this->conf['limit'], array ());
|
||||||
|
|
||||||
$numHits = count($query->response->docs);
|
$numHits = count($query->response->docs);
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
<TCEforms>
|
<TCEforms>
|
||||||
<exclude>1</exclude>
|
<exclude>1</exclude>
|
||||||
<label>LLL:EXT:lang/locallang_general.xml:LGL.startingpoint</label>
|
<label>LLL:EXT:lang/locallang_general.xml:LGL.startingpoint</label>
|
||||||
|
<onChange>reload</onChange>
|
||||||
<config>
|
<config>
|
||||||
<type>group</type>
|
<type>group</type>
|
||||||
<internal_type>db</internal_type>
|
<internal_type>db</internal_type>
|
||||||
|
@ -28,15 +29,15 @@
|
||||||
<solrcore>
|
<solrcore>
|
||||||
<TCEforms>
|
<TCEforms>
|
||||||
<exclude>1</exclude>
|
<exclude>1</exclude>
|
||||||
|
<displayCond>FIELD:pages:REQ:true</displayCond>
|
||||||
<label>LLL:EXT:dlf/plugins/search/locallang.xml:tt_content.pi_flexform.solrcore</label>
|
<label>LLL:EXT:dlf/plugins/search/locallang.xml:tt_content.pi_flexform.solrcore</label>
|
||||||
<config>
|
<config>
|
||||||
<type>select</type>
|
<type>select</type>
|
||||||
<foreign_table>tx_dlf_solrcores</foreign_table>
|
<items type="array"></items>
|
||||||
<foreign_table_where>AND tx_dlf_solrcores.pid=0 ORDER BY tx_dlf_solrcores.label</foreign_table_where>
|
<itemsProcFunc>tx_dlf_tceforms->itemsProcFunc_solrList</itemsProcFunc>
|
||||||
<default>1</default>
|
|
||||||
<size>1</size>
|
<size>1</size>
|
||||||
<maxitems>1</maxitems>
|
<maxitems>1</maxitems>
|
||||||
<minitems>1</minitems>
|
<minitems>0</minitems>
|
||||||
</config>
|
</config>
|
||||||
</TCEforms>
|
</TCEforms>
|
||||||
</solrcore>
|
</solrcore>
|
||||||
|
|
|
@ -54,7 +54,9 @@ class tx_dlf_statistics extends tx_dlf_plugin {
|
||||||
$this->init($conf);
|
$this->init($conf);
|
||||||
|
|
||||||
// Quit without doing anything if required configuration variables are not set.
|
// Quit without doing anything if required configuration variables are not set.
|
||||||
if (!$this->conf['pages']) {
|
if (empty($this->conf['pages'])) {
|
||||||
|
|
||||||
|
trigger_error('Incomplete configuration for plugin '.get_class($this), E_USER_NOTICE);
|
||||||
|
|
||||||
return $content;
|
return $content;
|
||||||
|
|
||||||
|
|
|
@ -163,7 +163,7 @@ class tx_dlf_toc extends tx_dlf_plugin {
|
||||||
// Check for typoscript configuration to prevent fatal error.
|
// Check for typoscript configuration to prevent fatal error.
|
||||||
if (empty($this->conf['menuConf.'])) {
|
if (empty($this->conf['menuConf.'])) {
|
||||||
|
|
||||||
trigger_error('No typoscript configuration for table of contents available', E_USER_ERROR);
|
trigger_error('No typoscript configuration for table of contents available', E_USER_NOTICE);
|
||||||
|
|
||||||
return $content;
|
return $content;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue