Make automatic publishing of new collections via OAI configurable

This commit is contained in:
Sebastian Meyer 2012-09-10 15:37:37 +02:00
parent 535ef0770b
commit e5512fbf71
4 changed files with 12 additions and 6 deletions

View File

@ -1164,6 +1164,9 @@ final class tx_dlf_document {
}
// Load plugin configuration.
$conf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$this->extKey]);
// Get UID for user "_cli_dlf".
$be_user = 0;
@ -1258,7 +1261,7 @@ final class tx_dlf_document {
'pid' => $pid,
'label' => $collection,
'index_name' => $collection,
'oai_name' => $collection,
'oai_name' => (!empty($conf['publishNewCollections']) ? $collection : ''),
'description' => '',
'documents' => 0,
'owner' => 0,
@ -1456,8 +1459,6 @@ final class tx_dlf_document {
}
// Unhide hidden documents.
$conf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$this->extKey]);
if (!empty($conf['unhideOnIndex'])) {
$data['tx_dlf_documents'][$this->uid][$GLOBALS['TCA']['tx_dlf_documents']['ctrl']['enablecolumns']['disabled']] = 0;

View File

@ -10,6 +10,9 @@ useragent = Goobi.Presentation
# cat=Basic; type=boolean; label=LLL:EXT:dlf/locallang.xml:config.caching
caching = 0
# cat=Basic; type=boolean; label=LLL:EXT:dlf/locallang.xml:config.publishNewCollections
publishNewCollections = 1
# cat=Basic; type=boolean; label=LLL:EXT:dlf/locallang.xml:config.unhideOnIndex
unhideOnIndex = 0

View File

@ -120,7 +120,8 @@
<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.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>
<label index="config.unhideOnIndex">Unhide hidden documents when re-indexing?: (default is "FALSE")</label>
<label index="config.publishNewCollections">Publish new collections?: Should new collections automatically be published in the OAI interface? (default is "TRUE")</label>
<label index="config.unhideOnIndex">Unhide indexed documents?: Should hidden documents be unhidden when re-indexing them? (default is "FALSE")</label>
<label index="config.fileGrps">METS fileGrps: comma-separated list of @USE attribute values in ascending order (default is "MIN,DEFAULT,MAX")</label>
<label index="config.fileGrpThumbs">Thumbnail fileGrp: @USE attribute value (default is "THUMBS")</label>
<label index="config.solrConnect">Solr Connection</label>
@ -275,7 +276,8 @@
<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.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>
<label index="config.unhideOnIndex">Ausgeblendete Dokumente beim Re-Indexieren wieder einblenden?: (Standard ist "FALSE")</label>
<label index="config.publishNewCollections">Neue Kollektionen publizieren?: Sollen neue Kollektionen automatisch in der OAI-Schnittstelle veröffentlicht werden? (Standard ist "TRUE")</label>
<label index="config.unhideOnIndex">Indexierte Dokumente einblenden?: Sollen ausgeblendete Dokumente bei der erneuten Indexierung wieder eingeblendet werden? (Standard ist "FALSE")</label>
<label index="config.fileGrps">METS fileGrps: Komma-getrennte Liste von @USE Attributwerten in aufsteigender Reihenfolge (Standard ist "MIN,DEFAULT,MAX")</label>
<label index="config.fileGrpThumbs">Vorschau fileGrp: @USE Attributwert der Vorschaubilder (Standard ist "THUMBS")</label>
<label index="config.solrConnect">Solr Verbindung</label>

View File

@ -1705,7 +1705,7 @@ class tx_dlf_oai extends tx_dlf_plugin {
$result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
'tx_dlf_collections.oai_name AS oai_name,tx_dlf_collections.label AS label',
'tx_dlf_collections',
'tx_dlf_collections.sys_language_uid IN (-1,0) AND tx_dlf_collections.pid='.intval($this->conf['pages']).$additionalWhere.tx_dlf_helper::whereClause('tx_dlf_collections'),
'tx_dlf_collections.sys_language_uid IN (-1,0) AND NOT tx_dlf_collections.oai_name="" AND tx_dlf_collections.pid='.intval($this->conf['pages']).$additionalWhere.tx_dlf_helper::whereClause('tx_dlf_collections'),
'tx_dlf_collections.oai_name',
'tx_dlf_collections.oai_name',
''