Merge lp:~henrik-lochmann/goobi-presentation/bug-956155 into lp:~slub.team/goobi-presentation/old-bzr-trunk

Proposed by Henrik Lochmann
Status: Merged
Approved by: Sebastian Meyer
Approved revision: 105
Merged at revision: 116
Proposed branch: lp:~henrik-lochmann/goobi-presentation/bug-956155
Merge into: lp:~slub.team/goobi-presentation/old-bzr-trunk
Diff against target: 451 lines (+232/-10)
10 files modified
dlf/common/class.tx_dlf_document.php (+159/-1)
dlf/common/class.tx_dlf_indexing.php (+7/-0)
dlf/ext_conf_template.txt (+3/-0)
dlf/ext_tables.sql (+4/-1)
dlf/locallang.xml (+7/-1)
dlf/plugins/collection/class.tx_dlf_collection.php (+3/-2)
dlf/plugins/listview/class.tx_dlf_listview.php (+12/-1)
dlf/plugins/listview/template.tmpl (+1/-0)
dlf/plugins/search/class.tx_dlf_search.php (+5/-3)
dlf/tca.php (+31/-1)
To merge this branch: bzr merge lp:~henrik-lochmann/goobi-presentation/bug-956155
Reviewer Review Type Date Requested Status
Sebastian Meyer Approve
Review via email: mp+117030@code.launchpad.net

Description of the change

- fixing after internal review

To post a comment you must log in.
Revision history for this message
Sebastian Meyer (sebastian-meyer) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'dlf/common/class.tx_dlf_document.php'
--- dlf/common/class.tx_dlf_document.php 2012-05-15 07:43:50 +0000
+++ dlf/common/class.tx_dlf_document.php 2012-07-27 10:23:21 +0000
@@ -29,7 +29,7 @@
29/**29/**
30 * Document class 'tx_dlf_document' for the 'dlf' extension.30 * Document class 'tx_dlf_document' for the 'dlf' extension.
31 *31 *
32 * @author Sebastian Meyer <sebastian.meyer@slub-dresden.de>32 * @author Sebastian Meyer <sebastian.meyer@slub-dresden.de>, Henrik Lochmann <dev@mentalmotive.com>
33 * @copyright Copyright (c) 2011, Sebastian Meyer, SLUB Dresden33 * @copyright Copyright (c) 2011, Sebastian Meyer, SLUB Dresden
34 * @package TYPO334 * @package TYPO3
35 * @subpackage tx_dlf35 * @subpackage tx_dlf
@@ -248,6 +248,23 @@
248 */248 */
249 protected $tableOfContentsLoaded = FALSE;249 protected $tableOfContentsLoaded = FALSE;
250250
251 /**
252 * This holds the document's thumbnail.
253 *
254 * @var string
255 * @access protected
256 */
257 protected $thumbnail = NULL;
258
259 /**
260 * Is the thumbnail loaded?
261 * @see $thumbnail
262 *
263 * @var boolean
264 * @access protected
265 */
266 protected $thumbnailLoaded = FALSE;
267
251 /**268 /**
252 * This holds the UID or the URL of the document269 * This holds the UID or the URL of the document
253 *270 *
@@ -798,6 +815,146 @@
798815
799 }816 }
800817
818 /**
819 * Returns a document thumbnail depending on ext configuration and structure element settings.
820 *
821 * @access public
822 *
823 * @param integer $pid: The PID for the metadata definitions
824 *
825 * @return mixed The thumbnail url or FALSE, if none could be found.
826 */
827 public function getThumbnail($pid = -1) {
828
829 if (!$this->thumbnailLoaded) {
830
831 if ($pid === -1) {
832
833 $pid = $this->pid;
834
835 }
836
837 $logicalUnitId = $this->getToplevelId();
838
839 $metadata = $this->getMetadata($logicalUnitId, $pid);
840
841 $structureType = $metadata['type'][0];
842
843 // Check if for this structure/document type thumbnails shall be rendered.
844 $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
845 'tx_dlf_structures.thumbnail AS thumbnail, tx_dlf_structures.thumbnail_source AS thumbnail_source',
846 'tx_dlf_structures',
847 'tx_dlf_structures.pid='.intval($pid).' AND tx_dlf_structures.index_name='.$GLOBALS['TYPO3_DB']->fullQuoteStr($structureType, 'tx_dlf_structures').tx_dlf_helper::whereClause('tx_dlf_structures'),
848 '',
849 '',
850 '1'
851 );
852
853 $resArray = array();
854
855 if (!($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result))) {
856
857 t3lib_div::devLog('[tx_dlf_document.getThumbnail] could not get thumbnail settings from DB', 'dlf', t3lib_div::SYSLOG_SEVERITY_ERROR);
858
859 return FALSE;
860
861 }
862
863 if ($resArray['thumbnail'] != '1') {
864
865 t3lib_div::devLog('[tx_dlf_document.getThumbnail] no thumbnail generation for '.$logicalUnitId, 'dlf', t3lib_div::SYSLOG_SEVERITY_NOTICE);
866
867 return FALSE;
868
869 }
870
871 // Check desired thumbnail source.
872 if (!empty($resArray['thumbnail_source'])) {
873
874 $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
875 'tx_dlf_structures.index_name AS index_name',
876 'tx_dlf_structures',
877 'tx_dlf_structures.uid='.intval($resArray['thumbnail_source']).tx_dlf_helper::whereClause('tx_dlf_structures'),
878 '',
879 '',
880 '1'
881 );
882
883 if (!($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result))) {
884
885 t3lib_div::devLog('[tx_dlf_document.getThumbnail] could not get thumbnail source index name from DB', 'dlf', t3lib_div::SYSLOG_SEVERITY_ERROR);
886
887 return FALSE;
888
889 }
890
891 // Check if this document has a sub element of the desired type.
892 $nodes = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@TYPE="'.$resArray['index_name'].'"]/@ID');
893
894 if (is_array($nodes) && count($nodes) > 0) {
895
896 $subId = (string) $nodes[0];
897
898 t3lib_div::devLog('[tx_dlf_document.getThumbnail] thumb source element changed: oldId='.$logicalUnitId.', newId='.$subId, 'dlf', t3lib_div::SYSLOG_SEVERITY_NOTICE);
899
900 $logicalUnitId = $subId;
901
902 } else {
903
904 t3lib_div::devLog('[tx_dlf_document.getThumbnail] no sub element found, taking toplevel element as thumb source', 'dlf', t3lib_div::SYSLOG_SEVERITY_NOTICE);
905
906 }
907
908 }
909
910 // Extract and set thumbnail, if desired.
911 t3lib_div::devLog('[tx_dlf_document.getThumbnail] thumbnails desired for '.$logicalUnitId, 'dlf', t3lib_div::SYSLOG_SEVERITY_NOTICE);
912
913 $extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['dlf']);
914
915 $fileGrp = $extConf['thumbFileGrp'];
916
917 $this->thumbnail = 'not found';
918
919 $firstPageNode = $this->mets->xpath('./mets:structLink/mets:smLink[@xlink:from="'.$logicalUnitId.'"][1]/@xlink:to');
920
921 if (is_array($firstPageNode) && count($firstPageNode) > 0) {
922
923 $firstPageId = $firstPageNode[0];
924
925 // den rest via physical pages
926 t3lib_div::devLog('[tx_dlf_document.getThumbnail] first page='.$firstPageId, 'dlf', t3lib_div::SYSLOG_SEVERITY_NOTICE);
927
928 $thumbnailNode = $this->mets->xpath('./mets:structMap[@TYPE="PHYSICAL"]/mets:div[@TYPE="physSequence"]/mets:div[@ID="'.$firstPageId.'"]/mets:fptr[substring(@FILEID, string-length(@FILEID) - '.(strlen($fileGrp) - 1).') = "'.$fileGrp.'"]/@FILEID');
929
930 if (is_array($firstPageNode) && count($thumbnailNode) > 0) {
931
932 $thumbnailFileId = (string) $thumbnailNode[0];
933
934 $this->thumbnail = $this->getFileLocation($thumbnailFileId);
935
936 t3lib_div::devLog('[tx_dlf_document.getThumbnail] thumbnail found, logicalUnit='.$logicalUnitId.', page='.$firstPageId.', thumb='.$thumbnailFileId.', thumb_url='.$this->thumbnail, 'dlf', t3lib_div::SYSLOG_SEVERITY_NOTICE);
937
938 } else {
939
940 t3lib_div::devLog('[tx_dlf_document.getThumbnail] no thumbnail found on first page (fileGrp='.$fileGrp.')', 'dlf', t3lib_div::SYSLOG_SEVERITY_NOTICE);
941
942 }
943
944 } else {
945
946 t3lib_div::devLog('[tx_dlf_document.getThumbnail] no first page found', 'dlf', t3lib_div::SYSLOG_SEVERITY_NOTICE);
947
948 }
949
950 $this->thumbnailLoaded = TRUE;
951
952 }
953
954 return $this->thumbnail;
955
956 }
957
801 /**958 /**
802 * This returns the ID of the toplevel logical structure node959 * This returns the ID of the toplevel logical structure node
803 *960 *
@@ -1343,6 +1500,7 @@
1343 'owner' => $owner,1500 'owner' => $owner,
1344 'solrcore' => $core,1501 'solrcore' => $core,
1345 'status' => 0,1502 'status' => 0,
1503 'thumbnail' => $this->getThumbnail($pid),
1346 );1504 );
13471505
1348 if ($location) {1506 if ($location) {
13491507
=== modified file 'dlf/common/class.tx_dlf_indexing.php'
--- dlf/common/class.tx_dlf_indexing.php 2012-04-30 16:05:21 +0000
+++ dlf/common/class.tx_dlf_indexing.php 2012-07-27 10:23:21 +0000
@@ -500,6 +500,13 @@
500500
501 $solrDoc->setField('type', $logicalUnit['type'], self::$fieldboost['type']);501 $solrDoc->setField('type', $logicalUnit['type'], self::$fieldboost['type']);
502502
503 // Index thumbnails for toplevel elements.
504 if (in_array($logicalUnit['type'], self::$toplevel)) {
505
506 $solrDoc->setField('thumbnail', $doc->getThumbnail($doc->pid));
507
508 }
509
503 $solrDoc->setField('title', $metadata['title'][0], self::$fieldboost['title']);510 $solrDoc->setField('title', $metadata['title'][0], self::$fieldboost['title']);
504511
505 $solrDoc->setField('author', $metadata['author'], self::$fieldboost['author']);512 $solrDoc->setField('author', $metadata['author'], self::$fieldboost['author']);
506513
=== modified file 'dlf/ext_conf_template.txt'
--- dlf/ext_conf_template.txt 2012-03-29 08:32:14 +0000
+++ dlf/ext_conf_template.txt 2012-07-27 10:23:21 +0000
@@ -10,6 +10,9 @@
10# cat=Basic; type=string; label=LLL:EXT:dlf/locallang.xml:config.fileGrps10# cat=Basic; type=string; label=LLL:EXT:dlf/locallang.xml:config.fileGrps
11fileGrps = DEFAULT,MIN,MAX,THUMBS11fileGrps = DEFAULT,MIN,MAX,THUMBS
1212
13# cat=Basic; type=string; label=LLL:EXT:dlf/locallang.xml:config.thumbFileGrp
14thumbFileGrp = THUMBS
15
13# cat=Basic; type=boolean; label=LLL:EXT:dlf/locallang.xml:config.caching16# cat=Basic; type=boolean; label=LLL:EXT:dlf/locallang.xml:config.caching
14caching = 017caching = 0
1518
1619
=== modified file 'dlf/ext_tables.sql'
--- dlf/ext_tables.sql 2012-03-24 12:06:31 +0000
+++ dlf/ext_tables.sql 2012-07-27 10:23:21 +0000
@@ -34,7 +34,8 @@
34 owner int(11) DEFAULT '0' NOT NULL,34 owner int(11) DEFAULT '0' NOT NULL,
35 solrcore int(11) DEFAULT '0' NOT NULL,35 solrcore int(11) DEFAULT '0' NOT NULL,
36 status tinyint(4) unsigned DEFAULT '0' NOT NULL,36 status tinyint(4) unsigned DEFAULT '0' NOT NULL,
3737 thumbnail tinytext NOT NULL,
38
38 PRIMARY KEY (uid),39 PRIMARY KEY (uid),
39 KEY parent (pid),40 KEY parent (pid),
40 INDEX partof (partof)41 INDEX partof (partof)
@@ -58,6 +59,8 @@
58 label tinytext NOT NULL,59 label tinytext NOT NULL,
59 index_name tinytext NOT NULL,60 index_name tinytext NOT NULL,
60 oai_name tinytext NOT NULL,61 oai_name tinytext NOT NULL,
62 thumbnail tinyint(4) DEFAULT '0' NOT NULL,
63 thumbnail_source int(11) DEFAULT '0' NOT NULL,
61 status tinyint(4) unsigned DEFAULT '0' NOT NULL,64 status tinyint(4) unsigned DEFAULT '0' NOT NULL,
6265
63 PRIMARY KEY (uid),66 PRIMARY KEY (uid),
6467
=== modified file 'dlf/locallang.xml'
--- dlf/locallang.xml 2012-04-20 08:23:36 +0000
+++ dlf/locallang.xml 2012-07-27 10:23:21 +0000
@@ -21,7 +21,7 @@
21 <label index="tx_dlf_documents.year">Year of Publication</label>21 <label index="tx_dlf_documents.year">Year of Publication</label>
22 <label index="tx_dlf_documents.year_sorting">Year of Publication (Sorting)</label>22 <label index="tx_dlf_documents.year_sorting">Year of Publication (Sorting)</label>
23 <label index="tx_dlf_documents.place">Place of Publication</label>23 <label index="tx_dlf_documents.place">Place of Publication</label>
24 <label index="tx_dlf_documents.place_sorting">Place of Publication</label>24 <label index="tx_dlf_documents.place_sorting">Place of Publication (Sorting)</label>
25 <label index="tx_dlf_documents.structure">Typ of Document</label>25 <label index="tx_dlf_documents.structure">Typ of Document</label>
26 <label index="tx_dlf_documents.partof">Part of ...</label>26 <label index="tx_dlf_documents.partof">Part of ...</label>
27 <label index="tx_dlf_documents.partof.none">none</label>27 <label index="tx_dlf_documents.partof.none">none</label>
@@ -39,6 +39,8 @@
39 <label index="tx_dlf_structures.label">Display Label</label>39 <label index="tx_dlf_structures.label">Display Label</label>
40 <label index="tx_dlf_structures.index_name">Index Name</label>40 <label index="tx_dlf_structures.index_name">Index Name</label>
41 <label index="tx_dlf_structures.oai_name">OAI Mapping</label>41 <label index="tx_dlf_structures.oai_name">OAI Mapping</label>
42 <label index="tx_dlf_structures.thumbnail">Show Thumbnail</label>
43 <label index="tx_dlf_structures.thumbnail_source">Thumbnail Source</label>
42 <label index="tx_dlf_structures.status">Status</label>44 <label index="tx_dlf_structures.status">Status</label>
43 <label index="tx_dlf_structures.status.default">default</label>45 <label index="tx_dlf_structures.status.default">default</label>
44 <label index="tx_dlf_structures.tab1">General</label>46 <label index="tx_dlf_structures.tab1">General</label>
@@ -124,6 +126,7 @@
124 <label index="config.makeCliUserGroup">Create and configure CLI user/group automatically?: (default is "FALSE")</label>126 <label index="config.makeCliUserGroup">Create and configure CLI user/group automatically?: (default is "FALSE")</label>
125 <label index="config.useragent">DLF User-Agent: (default is "Goobi.Presentation")</label>127 <label index="config.useragent">DLF User-Agent: (default is "Goobi.Presentation")</label>
126 <label index="config.fileGrps">Additional METS fileGrps: comma-separated list of @USE attribute values (default is "DEFAULT,MIN,MAX,THUMBS")</label>128 <label index="config.fileGrps">Additional METS fileGrps: comma-separated list of @USE attribute values (default is "DEFAULT,MIN,MAX,THUMBS")</label>
129 <label index="config.thumbFileGrp">Thumbnails METS fileGrp: selects the fileGrp with by this @USE attribute value for thumbnail extraction</label>
127 <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>130 <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>
128 <label index="config.solrConnect">Solr Connection</label>131 <label index="config.solrConnect">Solr Connection</label>
129 <label index="config.solrHost">Solr Server Host: (default is "localhost")</label>132 <label index="config.solrHost">Solr Server Host: (default is "localhost")</label>
@@ -196,6 +199,8 @@
196 <label index="tx_dlf_structures.label">Anzeigeform</label>199 <label index="tx_dlf_structures.label">Anzeigeform</label>
197 <label index="tx_dlf_structures.index_name">Index-Bezeichnung</label>200 <label index="tx_dlf_structures.index_name">Index-Bezeichnung</label>
198 <label index="tx_dlf_structures.oai_name">OAI-Mapping</label>201 <label index="tx_dlf_structures.oai_name">OAI-Mapping</label>
202 <label index="tx_dlf_structures.thumbnail">Vorschau zeigen</label>
203 <label index="tx_dlf_structures.thumbnail_source">Vorschau-Quelle</label>
199 <label index="tx_dlf_structures.status">Status</label>204 <label index="tx_dlf_structures.status">Status</label>
200 <label index="tx_dlf_structures.status.default">Standard</label>205 <label index="tx_dlf_structures.status.default">Standard</label>
201 <label index="tx_dlf_structures.tab1">Allgemein</label>206 <label index="tx_dlf_structures.tab1">Allgemein</label>
@@ -281,6 +286,7 @@
281 <label index="config.makeCliUserGroup">CLI Benutzer/Gruppe automatisch anlegen?: (Standard ist "FALSE")</label>286 <label index="config.makeCliUserGroup">CLI Benutzer/Gruppe automatisch anlegen?: (Standard ist "FALSE")</label>
282 <label index="config.useragent">DLF User-Agent: (Standard ist "Goobi.Presentation")</label>287 <label index="config.useragent">DLF User-Agent: (Standard ist "Goobi.Presentation")</label>
283 <label index="config.fileGrps">Zusätzliche METS fileGrps: Komma-getrennte Liste von @USE Attributwerten (Standard ist "DEFAULT,MIN,MAX,THUMBS")</label>288 <label index="config.fileGrps">Zusätzliche METS fileGrps: Komma-getrennte Liste von @USE Attributwerten (Standard ist "DEFAULT,MIN,MAX,THUMBS")</label>
289 <label index="config.thumbFileGrp">Vorschau METS fileGrp: wählt die fileGrp mit diesem @USE Attributwert für die Thumbnail-Extraktion aus</label>
284 <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>290 <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>
285 <label index="config.solrConnect">Solr Verbindung</label>291 <label index="config.solrConnect">Solr Verbindung</label>
286 <label index="config.solrHost">Solr Server Host: (Standard ist "localhost")</label>292 <label index="config.solrHost">Solr Server Host: (Standard ist "localhost")</label>
287293
=== modified file 'dlf/plugins/collection/class.tx_dlf_collection.php'
--- dlf/plugins/collection/class.tx_dlf_collection.php 2012-05-15 07:51:09 +0000
+++ dlf/plugins/collection/class.tx_dlf_collection.php 2012-07-27 10:23:21 +0000
@@ -254,7 +254,7 @@
254254
255 // Get all documents in collection.255 // Get all documents in collection.
256 $result = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query(256 $result = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query(
257 'tx_dlf_collections.label AS collLabel,tx_dlf_collections.description AS collDesc,tx_dlf_documents.uid AS uid,tx_dlf_documents.title AS title,tx_dlf_documents.volume AS volume,tx_dlf_documents.volume_sorting AS volume_sorting,tx_dlf_documents.author AS author,tx_dlf_documents.place AS place,tx_dlf_documents.year AS year,tx_dlf_documents.structure AS type,tx_dlf_documents.partof AS partof',257 'tx_dlf_collections.label AS collLabel,tx_dlf_collections.description AS collDesc,tx_dlf_documents.uid AS uid,tx_dlf_documents.title AS title,tx_dlf_documents.volume AS volume,tx_dlf_documents.volume_sorting AS volume_sorting,tx_dlf_documents.author AS author,tx_dlf_documents.place AS place,tx_dlf_documents.year AS year,tx_dlf_documents.structure AS type,tx_dlf_documents.partof AS partof,tx_dlf_documents.thumbnail AS thumbnail',
258 'tx_dlf_documents',258 'tx_dlf_documents',
259 'tx_dlf_relations',259 'tx_dlf_relations',
260 'tx_dlf_collections',260 'tx_dlf_collections',
@@ -297,7 +297,8 @@
297 'year' => array ($resArray['year']),297 'year' => array ($resArray['year']),
298 'place' => array ($resArray['place']),298 'place' => array ($resArray['place']),
299 'type' => array (tx_dlf_helper::getIndexName($resArray['type'], 'tx_dlf_structures', $this->conf['pages'])),299 'type' => array (tx_dlf_helper::getIndexName($resArray['type'], 'tx_dlf_structures', $this->conf['pages'])),
300 'subparts' => array ()300 'subparts' => array (),
301 'thumbnail' => $resArray['thumbnail']
301 );302 );
302303
303 } else {304 } else {
304305
=== modified file 'dlf/plugins/listview/class.tx_dlf_listview.php'
--- dlf/plugins/listview/class.tx_dlf_listview.php 2012-05-15 07:51:09 +0000
+++ dlf/plugins/listview/class.tx_dlf_listview.php 2012-07-27 10:23:21 +0000
@@ -29,7 +29,7 @@
29/**29/**
30 * Plugin 'DLF: List View' for the 'dlf' extension.30 * Plugin 'DLF: List View' for the 'dlf' extension.
31 *31 *
32 * @author Sebastian Meyer <sebastian.meyer@slub-dresden.de>32 * @author Sebastian Meyer <sebastian.meyer@slub-dresden.de>, Henrik Lochmann <dev@mentalmotive.com>
33 * @copyright Copyright (c) 2011, Sebastian Meyer, SLUB Dresden33 * @copyright Copyright (c) 2011, Sebastian Meyer, SLUB Dresden
34 * @package TYPO334 * @package TYPO3
35 * @subpackage tx_dlf35 * @subpackage tx_dlf
@@ -232,6 +232,17 @@
232232
233 }233 }
234234
235 // Add thumbnail.
236 if (!empty($this->list->elements[$number]['thumbnail'])) {
237
238 $markerArray['###THUMBNAIL###'] = '<img title="" alt="" src="'.$this->list->elements[$number]['thumbnail'].'"/>';
239
240 } else {
241
242 $markerArray['###THUMBNAIL###'] = '';
243
244 }
245
235 if (!empty($this->list->elements[$number]['subparts'])) {246 if (!empty($this->list->elements[$number]['subparts'])) {
236247
237 $subpart = $this->getSubEntries($number, $template);248 $subpart = $this->getSubEntries($number, $template);
238249
=== modified file 'dlf/plugins/listview/template.tmpl'
--- dlf/plugins/listview/template.tmpl 2012-03-16 09:06:25 +0000
+++ dlf/plugins/listview/template.tmpl 2012-07-27 10:23:21 +0000
@@ -6,6 +6,7 @@
6<ol class="tx-dlf-listview-list">6<ol class="tx-dlf-listview-list">
7 <!-- ###ENTRY### -->7 <!-- ###ENTRY### -->
8 <li value="###NUMBER###">8 <li value="###NUMBER###">
9 <span>###THUMBNAIL###</span>
9 <dl>10 <dl>
10 ###METADATA###11 ###METADATA###
11 </dl>12 </dl>
1213
=== modified file 'dlf/plugins/search/class.tx_dlf_search.php'
--- dlf/plugins/search/class.tx_dlf_search.php 2012-05-05 11:10:37 +0000
+++ dlf/plugins/search/class.tx_dlf_search.php 2012-07-27 10:23:21 +0000
@@ -142,7 +142,8 @@
142 'year' => (is_array($doc->year) ? $doc->year : array ($doc->year)),142 'year' => (is_array($doc->year) ? $doc->year : array ($doc->year)),
143 'place' => (is_array($doc->place) ? $doc->place : array ($doc->place)),143 'place' => (is_array($doc->place) ? $doc->place : array ($doc->place)),
144 'type' => (is_array($doc->type) ? $doc->type : array ($doc->type)),144 'type' => (is_array($doc->type) ? $doc->type : array ($doc->type)),
145 'subparts' => (!empty($toplevel[$doc->uid]['subparts']) ? $toplevel[$doc->uid]['subparts'] : array ())145 'subparts' => (!empty($toplevel[$doc->uid]['subparts']) ? $toplevel[$doc->uid]['subparts'] : array ()),
146 'thumbnail' => $doc->thumbnail
146 );147 );
147148
148 } else {149 } else {
@@ -175,7 +176,7 @@
175176
176 // Get information for toplevel document.177 // Get information for toplevel document.
177 $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(178 $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
178 'tx_dlf_documents.uid AS uid,tx_dlf_documents.title AS title,tx_dlf_documents.volume AS volume,tx_dlf_documents.author AS author,tx_dlf_documents.place AS place,tx_dlf_documents.year AS year,tx_dlf_documents.structure AS type',179 'tx_dlf_documents.uid AS uid,tx_dlf_documents.title AS title,tx_dlf_documents.volume AS volume,tx_dlf_documents.author AS author,tx_dlf_documents.place AS place,tx_dlf_documents.year AS year,tx_dlf_documents.structure AS type,tx_dlf_documents.thumbnail AS thumbnail',
179 'tx_dlf_documents',180 'tx_dlf_documents',
180 'tx_dlf_documents.uid='.intval($_check).tx_dlf_helper::whereClause('tx_dlf_documents'),181 'tx_dlf_documents.uid='.intval($_check).tx_dlf_helper::whereClause('tx_dlf_documents'),
181 '',182 '',
@@ -197,7 +198,8 @@
197 'year' => array ($resArray['year']),198 'year' => array ($resArray['year']),
198 'place' => array ($resArray['place']),199 'place' => array ($resArray['place']),
199 'type' => array (tx_dlf_helper::getIndexName($resArray['type'], 'tx_dlf_structures', $this->conf['pages'])),200 'type' => array (tx_dlf_helper::getIndexName($resArray['type'], 'tx_dlf_structures', $this->conf['pages'])),
200 'subparts' => $toplevel[$_check]['subparts']201 'subparts' => $toplevel[$_check]['subparts'],
202 'thumbnail' => $resArray['thumbnail']
201 );203 );
202204
203 } else {205 } else {
204206
=== modified file 'dlf/tca.php'
--- dlf/tca.php 2012-04-30 16:11:07 +0000
+++ dlf/tca.php 2012-07-27 10:23:21 +0000
@@ -314,6 +314,12 @@
314 'default' => 0,314 'default' => 0,
315 ),315 ),
316 ),316 ),
317 'thumbnail' => array (
318 'exclude' => 1,
319 'config' => array (
320 'type' => 'passthrough',
321 ),
322 ),
317 ),323 ),
318 'types' => array (324 'types' => array (
319 '0' => array ('showitem' => '--div--;LLL:EXT:dlf/locallang.xml:tx_dlf_documents.tab1, title;;1;;1-1-1, author;;2, year;;3, place;;4, structure;;5;;2-2-2, collections;;;;3-3-3, --div--;LLL:EXT:dlf/locallang.xml:tx_dlf_documents.tab2, location;;;;1-1-1, record_id, prod_id;;;;2-2-2, oai_id;;;;3-3-3, opac_id, union_id, urn, purl;;;;4-4-4, --div--;LLL:EXT:dlf/locallang.xml:tx_dlf_documents.tab3, hidden;;;;1-1-1, fe_group;;;;2-2-2, status;;;;3-3-3, owner;;;;4-4-4'),325 '0' => array ('showitem' => '--div--;LLL:EXT:dlf/locallang.xml:tx_dlf_documents.tab1, title;;1;;1-1-1, author;;2, year;;3, place;;4, structure;;5;;2-2-2, collections;;;;3-3-3, --div--;LLL:EXT:dlf/locallang.xml:tx_dlf_documents.tab2, location;;;;1-1-1, record_id, prod_id;;;;2-2-2, oai_id;;;;3-3-3, opac_id, union_id, urn, purl;;;;4-4-4, --div--;LLL:EXT:dlf/locallang.xml:tx_dlf_documents.tab3, hidden;;;;1-1-1, fe_group;;;;2-2-2, status;;;;3-3-3, owner;;;;4-4-4'),
@@ -411,6 +417,29 @@
411 'eval' => 'trim',417 'eval' => 'trim',
412 ),418 ),
413 ),419 ),
420 'thumbnail' => array (
421 'exclude' => 1,
422 'label' => 'LLL:EXT:dlf/locallang.xml:tx_dlf_structures.thumbnail',
423 'config' => array (
424 'type' => 'check',
425 'default' => 0,
426 ),
427 ),
428 'thumbnail_source' => array (
429 'exclude' => 1,
430 'label' => 'LLL:EXT:dlf/locallang.xml:tx_dlf_structures.thumbnail_source',
431 'config' => array (
432 'type' => 'select',
433 'items' => array (
434 array ('[This Element]', 0),
435 ),
436 'foreign_table' => 'tx_dlf_structures',
437 'foreign_table_where' => 'AND tx_dlf_structures.pid=###CURRENT_PID### AND tx_dlf_structures.toplevel=0 AND tx_dlf_structures.sys_language_uid IN (-1,0) ORDER BY tx_dlf_structures.label ',
438 ),
439 'minitems' => 0,
440 'maxitems' => 1,
441 'default' => 0,
442 ),
414 'status' => array (443 'status' => array (
415 'exclude' => 1,444 'exclude' => 1,
416 'label' => 'LLL:EXT:dlf/locallang.xml:tx_dlf_structures.status',445 'label' => 'LLL:EXT:dlf/locallang.xml:tx_dlf_structures.status',
@@ -427,10 +456,11 @@
427 ),456 ),
428 ),457 ),
429 'types' => array (458 'types' => array (
430 '0' => array ('showitem' => '--div--;LLL:EXT:dlf/locallang.xml:tx_dlf_structures.tab1, toplevel;;;;1-1-1, label;;1, --div--;LLL:EXT:dlf/locallang.xml:tx_dlf_structures.tab2, sys_language_uid;;;;1-1-1, l18n_parent, l18n_diffsource, --div--;LLL:EXT:dlf/locallang.xml:tx_dlf_structures.tab3, hidden;;;;1-1-1, status;;;;2-2-2'),459 '0' => array ('showitem' => '--div--;LLL:EXT:dlf/locallang.xml:tx_dlf_structures.tab1, toplevel;;;;1-1-1, label;;1, thumbnail;;2, --div--;LLL:EXT:dlf/locallang.xml:tx_dlf_structures.tab2, sys_language_uid;;;;1-1-1, l18n_parent, l18n_diffsource, --div--;LLL:EXT:dlf/locallang.xml:tx_dlf_structures.tab3, hidden;;;;1-1-1, status;;;;2-2-2'),
431 ),460 ),
432 'palettes' => array (461 'palettes' => array (
433 '1' => array ('showitem' => 'index_name, --linebreak--, oai_name', 'canNotCollapse' => 1),462 '1' => array ('showitem' => 'index_name, --linebreak--, oai_name', 'canNotCollapse' => 1),
463 '2' => array ('showitem' => 'thumbnail_source'),
434 ),464 ),
435);465);
436466

Subscribers

People subscribed via source and target branches