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

Proposed by Henrik Lochmann
Status: Needs review
Proposed branch: lp:~henrik-lochmann/goobi-presentation/bug-855618
Merge into: lp:~slub.team/goobi-presentation/old-bzr-trunk
Diff against target: 3800 lines (+3296/-38) (has conflicts)
14 files modified
dlf/common/class.tx_dlf_document.php (+43/-0)
dlf/common/class.tx_dlf_helper.php (+127/-11)
dlf/ext_autoload.php (+1/-0)
dlf/ext_localconf.php (+3/-0)
dlf/hooks/class.tx_dlf_collection_hook.php (+1229/-0)
dlf/lib/ISO-639/iso-639-1.xml (+298/-0)
dlf/lib/ISO-639/iso-639-2b.xml (+986/-0)
dlf/modules/newclient/metadata.inc.php (+200/-0)
dlf/plugins/collection/class.tx_dlf_collection.php (+88/-26)
dlf/plugins/collection/edit_collection.tmpl (+32/-0)
dlf/plugins/collection/locallang.xml (+26/-0)
dlf/plugins/listview/class.tx_dlf_listview.php (+225/-1)
dlf/plugins/listview/template.tmpl (+2/-0)
dlf/plugins/search/class.tx_dlf_search.php (+36/-0)
Text conflict in dlf/common/class.tx_dlf_document.php
Text conflict in dlf/common/class.tx_dlf_helper.php
Text conflict in dlf/lib/ISO-639/iso-639-1.xml
Text conflict in dlf/lib/ISO-639/iso-639-2b.xml
Text conflict in dlf/modules/newclient/metadata.inc.php
Text conflict in dlf/plugins/collection/class.tx_dlf_collection.php
Text conflict in dlf/plugins/listview/class.tx_dlf_listview.php
Text conflict in dlf/plugins/search/class.tx_dlf_search.php
To merge this branch: bzr merge lp:~henrik-lochmann/goobi-presentation/bug-855618
Reviewer Review Type Date Requested Status
Sebastian Meyer Approve
Review via email: mp+117029@code.launchpad.net

Description of the change

- code comments and fixing

To post a comment you must log in.
103. By Henrik Lochmann

- bug fixes

Revision history for this message
Sebastian Meyer (sebastian-meyer) :
review: Approve

Unmerged revisions

103. By Henrik Lochmann

- bug fixes

102. By Henrik Lochmann

- moved to tx_dlf_collection_hook to hooks directory
- commented methods and class
- respected TCA constraints of the tx_dlf_collections table

101. By Henrik Lochmann

- tx_dlf_collection_hook moved to hooks directory

100. By Henrik Lochmann

- twisted language constants

99. By Henrik Lochmann

- now, also collection lists contain +-menus

98. By Henrik Lochmann

- moved back to simple DB based data management from FE
- slightly changed list entry menus

97. By Henrik Lochmann

- cleaned code

96. By Henrik Lochmann

- l18n in/for edit_collection.tmpl

95. By Henrik Lochmann

- changes made in context of TCE-in-FE tryouts: just to not loose them and to not create a whole new branch, we check them in

94. By Henrik Lochmann

- recreated old getBeUser method

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'dlf/cli/class.tx_dlf_cli.php'
=== modified file 'dlf/common/class.tx_dlf_document.php'
--- dlf/common/class.tx_dlf_document.php 2012-10-02 12:30:10 +0000
+++ dlf/common/class.tx_dlf_document.php 2012-10-10 09:08:30 +0000
@@ -746,6 +746,7 @@
746 while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {746 while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {
747747
748 // Set metadata field's value(s).748 // Set metadata field's value(s).
749<<<<<<< TREE
749 if ($resArray['format'] > 0 && !empty($resArray['xpath']) && ($values = $domXPath->evaluate($resArray['xpath'], $domNode))) {750 if ($resArray['format'] > 0 && !empty($resArray['xpath']) && ($values = $domXPath->evaluate($resArray['xpath'], $domNode))) {
750751
751 if ($values instanceof DOMNodeList && $values->length > 0) {752 if ($values instanceof DOMNodeList && $values->length > 0) {
@@ -755,13 +756,31 @@
755 foreach ($values as $value) {756 foreach ($values as $value) {
756757
757 $metadata[$resArray['index_name']][] = trim((string) $value->nodeValue);758 $metadata[$resArray['index_name']][] = trim((string) $value->nodeValue);
759=======
760 if ($resArray['xpath'] && ($_values = $_domXPath->evaluate($resArray['xpath'], $_domNode))) {
761
762 if ($_values instanceof DOMNodeList && $_values->length > 0) {
763
764 $_metadata[$resArray['index_name']] = array ();
765
766 foreach ($_values as $_value) {
767
768 $_metadata[$resArray['index_name']][] = trim((string) $_value->nodeValue);
769>>>>>>> MERGE-SOURCE
758770
759 }771 }
760772
773<<<<<<< TREE
761 } elseif (!($values instanceof DOMNodeList)) {774 } elseif (!($values instanceof DOMNodeList)) {
762775
763 $metadata[$resArray['index_name']] = array (trim((string) $values));776 $metadata[$resArray['index_name']] = array (trim((string) $values));
764777
778=======
779 } elseif (!($_values instanceof DOMNodeList)) {
780
781 $_metadata[$resArray['index_name']] = array (trim((string) $_values));
782
783>>>>>>> MERGE-SOURCE
765 }784 }
766785
767 }786 }
@@ -774,6 +793,7 @@
774 }793 }
775794
776 // Set sorting value if applicable.795 // Set sorting value if applicable.
796<<<<<<< TREE
777 if (!empty($metadata[$resArray['index_name']]) && $resArray['is_sortable']) {797 if (!empty($metadata[$resArray['index_name']]) && $resArray['is_sortable']) {
778798
779 if ($resArray['format'] > 0 && !empty($resArray['xpath_sorting']) && ($values = $domXPath->evaluate($resArray['xpath_sorting'], $domNode))) {799 if ($resArray['format'] > 0 && !empty($resArray['xpath_sorting']) && ($values = $domXPath->evaluate($resArray['xpath_sorting'], $domNode))) {
@@ -795,6 +815,29 @@
795 $metadata[$resArray['index_name'].'_sorting'][0] = $metadata[$resArray['index_name']][0];815 $metadata[$resArray['index_name'].'_sorting'][0] = $metadata[$resArray['index_name']][0];
796816
797 }817 }
818=======
819 if (!empty($_metadata[$resArray['index_name']]) && $resArray['is_sortable']) {
820
821 if ($resArray['xpath_sorting'] && ($_values = $_domXPath->evaluate($resArray['xpath_sorting'], $_domNode))) {
822
823 if ($_values instanceof DOMNodeList && $_values->length > 0) {
824
825 $_metadata[$resArray['index_name'].'_sorting'][0] = trim((string) $_values->item(0)->nodeValue);
826
827 } elseif (!($_values instanceof DOMNodeList)) {
828
829 $_metadata[$resArray['index_name'].'_sorting'][0] = trim((string) $_values);
830
831 }
832
833 }
834
835 if (empty($_metadata[$resArray['index_name'].'_sorting'][0])) {
836
837 $_metadata[$resArray['index_name'].'_sorting'][0] = $_metadata[$resArray['index_name']][0];
838
839 }
840>>>>>>> MERGE-SOURCE
798841
799 }842 }
800843
801844
=== modified file 'dlf/common/class.tx_dlf_helper.php'
--- dlf/common/class.tx_dlf_helper.php 2012-10-02 07:02:46 +0000
+++ dlf/common/class.tx_dlf_helper.php 2012-10-10 09:08:30 +0000
@@ -1,6 +1,6 @@
1<?php1<?php
2/***************************************************************2/***************************************************************
3* Copyright notice3 * Copyright notice
4*4*
5* (c) 2011 Sebastian Meyer <sebastian.meyer@slub-dresden.de>5* (c) 2011 Sebastian Meyer <sebastian.meyer@slub-dresden.de>
6* All rights reserved6* All rights reserved
@@ -28,13 +28,13 @@
2828
29/**29/**
30 * Helper class 'tx_dlf_helper' for the 'dlf' extension.30 * Helper class 'tx_dlf_helper' for the 'dlf' extension.
31 *31*
32 * @author Sebastian Meyer <sebastian.meyer@slub-dresden.de>32* @author Sebastian Meyer <sebastian.meyer@slub-dresden.de>
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
36 * @access public36* @access public
37 */37*/
38class tx_dlf_helper {38class tx_dlf_helper {
3939
40 /**40 /**
@@ -85,6 +85,32 @@
8585
86 }86 }
8787
88 public static function array_toString($array, $glue = '=', $separator = ', ') {
89
90 if (!is_array($array)) {
91
92 return $array;
93
94 }
95
96 $string = array();
97
98 foreach ($array as $key => $val) {
99
100 if (is_array($val)) {
101
102 $val = implode( ',', $val );
103
104 }
105
106 $string[] = "{$key}{$glue}{$val}";
107
108 }
109
110 return implode($separator, $string);
111
112 }
113
88 /**114 /**
89 * Check if given identifier is a valid identifier of the German National Library115 * Check if given identifier is a valid identifier of the German National Library
90 * @see http://support.d-nb.de/iltis/onlineRoutinen/Pruefziffernberechnung.htm116 * @see http://support.d-nb.de/iltis/onlineRoutinen/Pruefziffernberechnung.htm
@@ -367,6 +393,33 @@
367 }393 }
368394
369 /**395 /**
396 * This gets the registered hook objects for a class.
397 *
398 * @access public
399 *
400 * @param string $class: The name of the class
401 *
402 * @return array Array of hook objects
403 */
404 public static function getHookObjects($class) {
405
406 $hookObjects = array ();
407
408 if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][tx_dlf_helper::$extKey]['hooks'][$class])) {
409
410 foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][tx_dlf_helper::$extKey]['hooks'][$class] as $_classRef) {
411
412 $hookObjects[] = t3lib_div::getUserObj($_classRef);
413
414 }
415
416 }
417
418 return $hookObjects;
419
420 }
421
422 /**
370 * Get the "index_name" for an UID423 * Get the "index_name" for an UID
371 *424 *
372 * @access public425 * @access public
@@ -399,6 +452,7 @@
399452
400 }453 }
401454
455<<<<<<< TREE
402 $where = '';456 $where = '';
403457
404 // Should we check for a specific PID, too?458 // Should we check for a specific PID, too?
@@ -418,6 +472,15 @@
418 '',472 '',
419 '',473 '',
420 '1'474 '1'
475=======
476 $_result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
477 $table.'.index_name AS index_name',
478 $table,
479 $table.'.uid='.$uid.' AND '.$table.'.pid='.$pid.self::whereClause($table),
480 '',
481 '',
482 '1'
483>>>>>>> MERGE-SOURCE
421 );484 );
422485
423 if ($GLOBALS['TYPO3_DB']->sql_num_rows($result) > 0) {486 if ($GLOBALS['TYPO3_DB']->sql_num_rows($result) > 0) {
@@ -598,6 +661,7 @@
598 */661 */
599 public static function getURN($base, $id) {662 public static function getURN($base, $id) {
600663
664<<<<<<< TREE
601 $concordance = array (665 $concordance = array (
602 '0' => 1,666 '0' => 1,
603 '1' => 2,667 '1' => 2,
@@ -637,6 +701,47 @@
637 'z' => 38,701 'z' => 38,
638 '-' => 39,702 '-' => 39,
639 ':' => 17,703 ':' => 17,
704=======
705 $concordance = array(
706 '0' => 1,
707 '1' => 2,
708 '2' => 3,
709 '3' => 4,
710 '4' => 5,
711 '5' => 6,
712 '6' => 7,
713 '7' => 8,
714 '8' => 9,
715 '9' => 41,
716 'a' => 18,
717 'b' => 14,
718 'c' => 19,
719 'd' => 15,
720 'e' => 16,
721 'f' => 21,
722 'g' => 22,
723 'h' => 23,
724 'i' => 24,
725 'j' => 25,
726 'k' => 42,
727 'l' => 26,
728 'm' => 27,
729 'n' => 13,
730 'o' => 28,
731 'p' => 29,
732 'q' => 31,
733 'r' => 12,
734 's' => 32,
735 't' => 33,
736 'u' => 11,
737 'v' => 34,
738 'w' => 35,
739 'x' => 36,
740 'y' => 37,
741 'z' => 38,
742 '-' => 39,
743 ':' => 17,
744>>>>>>> MERGE-SOURCE
640 );745 );
641746
642 $urn = strtolower($base.$id);747 $urn = strtolower($base.$id);
@@ -949,6 +1054,7 @@
949 }1054 }
9501055
951 // Get labels from database.1056 // Get labels from database.
1057<<<<<<< TREE
952 $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(1058 $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
953 '*',1059 '*',
954 $table,1060 $table,
@@ -956,6 +1062,15 @@
956 '',1062 '',
957 '',1063 '',
958 ''1064 ''
1065=======
1066 $_result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
1067 '*',
1068 $table,
1069 'pid='.$pid.$additionalWhere.self::whereClause($table),
1070 '',
1071 '',
1072 ''
1073>>>>>>> MERGE-SOURCE
959 );1074 );
9601075
961 if ($GLOBALS['TYPO3_DB']->sql_num_rows($result) > 0) {1076 if ($GLOBALS['TYPO3_DB']->sql_num_rows($result) > 0) {
@@ -1079,13 +1194,14 @@
1079 *1194 *
1080 * @access protected1195 * @access protected
1081 */1196 */
1082 protected function __construct() {}1197 protected function __construct() {
1198 }
10831199
1084}1200}
10851201
1086/* No xclasses for static classes!1202/* No xclasses for static classes!
1087if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dlf/common/class.tx_dlf_helper.php']) {1203 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dlf/common/class.tx_dlf_helper.php']) {
1088 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dlf/common/class.tx_dlf_helper.php']);1204include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dlf/common/class.tx_dlf_helper.php']);
1089}1205}
1090*/1206*/
10911207
10921208
=== modified file 'dlf/ext_autoload.php'
--- dlf/ext_autoload.php 2012-09-27 11:25:51 +0000
+++ dlf/ext_autoload.php 2012-10-10 09:08:30 +0000
@@ -43,6 +43,7 @@
43 'tx_dlf_modIndexing' => $extensionPath.'modules/indexing/index.php',43 'tx_dlf_modIndexing' => $extensionPath.'modules/indexing/index.php',
44 'tx_dlf_modNewclient' => $extensionPath.'modules/newclient/index.php',44 'tx_dlf_modNewclient' => $extensionPath.'modules/newclient/index.php',
45 'tx_dlf_collection' => $extensionPath.'plugins/collection/class.tx_dlf_collection.php',45 'tx_dlf_collection' => $extensionPath.'plugins/collection/class.tx_dlf_collection.php',
46 'tx_dlf_collection_hook' => $extensionPath.'plugins/collection/class.tx_dlf_collection_hook.php',
46 'tx_dlf_feeds' => $extensionPath.'plugins/feeds/class.tx_dlf_feeds.php',47 'tx_dlf_feeds' => $extensionPath.'plugins/feeds/class.tx_dlf_feeds.php',
47 'tx_dlf_listview' => $extensionPath.'plugins/listview/class.tx_dlf_listview.php',48 'tx_dlf_listview' => $extensionPath.'plugins/listview/class.tx_dlf_listview.php',
48 'tx_dlf_metadata' => $extensionPath.'plugins/metadata/class.tx_dlf_metadata.php',49 'tx_dlf_metadata' => $extensionPath.'plugins/metadata/class.tx_dlf_metadata.php',
4950
=== modified file 'dlf/ext_emconf.php'
=== modified file 'dlf/ext_localconf.php'
--- dlf/ext_localconf.php 2012-09-25 13:28:48 +0000
+++ dlf/ext_localconf.php 2012-10-10 09:08:30 +0000
@@ -65,6 +65,9 @@
6565
66$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/common/class.tx_dlf_document.php']['hookClass'][] = 'EXT:'.$_EXTKEY.'/hooks/class.tx_dlf_hacks.php:tx_dlf_hacks';66$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/common/class.tx_dlf_document.php']['hookClass'][] = 'EXT:'.$_EXTKEY.'/hooks/class.tx_dlf_hacks.php:tx_dlf_hacks';
6767
68// Hook for action menu in list view, to facilitate individual collections.
69$GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$_EXTKEY]['hooks']['tx_dlf_listview'][] = 'EXT:'.$_EXTKEY.'/hooks/class.tx_dlf_collection_hook.php:tx_dlf_collection_hook';
70
68// Register command line scripts.71// Register command line scripts.
69$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['cliKeys'][$_EXTKEY] = array ('EXT:'.$_EXTKEY.'/cli/class.tx_dlf_cli.php', '_CLI_dlf');72$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['cliKeys'][$_EXTKEY] = array ('EXT:'.$_EXTKEY.'/cli/class.tx_dlf_cli.php', '_CLI_dlf');
7073
7174
=== added file 'dlf/hooks/class.tx_dlf_collection_hook.php'
--- dlf/hooks/class.tx_dlf_collection_hook.php 1970-01-01 00:00:00 +0000
+++ dlf/hooks/class.tx_dlf_collection_hook.php 2012-10-10 09:08:30 +0000
@@ -0,0 +1,1229 @@
1<?php
2/***************************************************************
3 * Copyright notice
4*
5* (c) 2012 Henrik Lochmann <dev@mentalmotive.com>, Zeutschel GmbH
6* All rights reserved
7*
8* This script is part of the TYPO3 project. The TYPO3 project is
9* free software; you can redistribute it and/or modify
10* it under the terms of the GNU General Public License as published by
11* the Free Software Foundation; either version 2 of the License, or
12* (at your option) any later version.
13*
14* The GNU General Public License can be found at
15* http://www.gnu.org/copyleft/gpl.html.
16*
17* This script is distributed in the hope that it will be useful,
18* but WITHOUT ANY WARRANTY; without even the implied warranty of
19* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20* GNU General Public License for more details.
21*
22* This copyright notice MUST APPEAR in all copies of the script!
23***************************************************************/
24
25/**
26 * An implementation of various hooks of the 'DLF: List View' plugin
27* to allow front end users the management of individual collections.
28*
29* @author Henrik Lochmann <dev@mentalmotive.com>
30* @copyright Copyright (c) 2012, Henrik Lochmann, Zeutschel GmbH
31* @package TYPO3
32* @subpackage tx_dlf
33* @access public
34*/
35class tx_dlf_collection_hook {
36
37 /**
38 * @var string url parameter name constant for an action (controls on which an action shall be applied)
39 * @see tx_dlf_hook_EntryActions
40 * @see tx_dlf_hook_ListActions
41 */
42 protected static $ENTRY_ACTION = 'action';
43
44 /**
45 * @var string url parameter name constant for an action parameter (controls how is an action applied)
46 */
47 protected static $ENTRY_ACTION_SUBJECT = 'action_subject';
48
49 /**
50 * @var string url parameter name constant for an action site (controls on which target an action applied)
51 */
52 protected static $ENTRY_ACTION_OBJECT = 'action_object';
53
54 protected static $FORM_FIELD_COLLECTION_NAME = 'col_name';
55
56 protected static $FORM_FIELD_COLLECTION_DESCRIPTION = 'col_desc';
57
58 protected static $LANG_PREFIX = 'individual_collections.';
59
60 protected $conf;
61
62 protected $lang;
63
64 protected $editCollectionTemplate;
65
66 protected $plugin;
67
68 /**
69 * Evaluation of 'input'-type values based on 'eval' list
70 *
71 * @param string Value to evaluate
72 * @param array Array of evaluations to traverse.
73 * @param string Is-in string for 'is_in' evaluation
74 * @return array Modified $value in key 'value' or empty array
75 */
76 protected static function checkValue_input_Eval($value, $evalArray, $is_in, $pid = 0) {
77
78 $res = array();
79
80 $newValue = $value;
81
82 $set = TRUE;
83
84 foreach ($evalArray as $func) {
85
86 switch ($func) {
87
88 case 'int':
89 case 'year':
90 case 'time':
91 case 'timesec':
92 $value = intval($value);
93 break;
94
95 case 'date':
96 case 'datetime':
97
98 $value = intval($value);
99
100 if ($value > 0 && !$this->dontProcessTransformations) {
101
102 $value -= date('Z', $value);
103
104 }
105
106 break;
107
108 case 'double2':
109
110 $value = preg_replace('/[^0-9,\.-]/', '', $value);
111
112 $negative = substr($value, 0, 1) == '-';
113
114 $value = strtr($value, array(',' => '.', '-' => ''));
115
116 if (strpos($value, '.') === FALSE) {
117
118 $value .= '.0';
119
120 }
121
122 $valueArray = explode('.', $value);
123
124 $dec = array_pop($valueArray);
125
126 $value = join('', $valueArray) . '.' . $dec;
127
128 if ($negative) {
129
130 $value *= -1;
131
132 }
133
134 $value = number_format($value, 2, '.', '');
135
136 break;
137
138 case 'md5':
139
140 if (strlen($value) != 32) {
141
142 $set = FALSE;
143
144 }
145
146 break;
147
148 case 'trim':
149
150 $value = trim($value);
151
152 break;
153
154 case 'upper':
155
156 $value = $GLOBALS['LANG']->csConvObj->conv_case($GLOBALS['LANG']->charSet, $value, 'toUpper');
157
158 break;
159
160 case 'lower':
161
162 $value = $GLOBALS['LANG']->csConvObj->conv_case($GLOBALS['LANG']->charSet, $value, 'toLower');
163
164 break;
165
166 case 'required':
167
168 if (!isset($value) || $value === '') {
169
170 $set = FALSE;
171
172 }
173
174 break;
175
176 case 'is_in':
177
178 $c = strlen($value);
179
180 if ($c) {
181
182 $newVal = '';
183
184 for ($a = 0; $a < $c; $a++) {
185
186 $char = substr($value, $a, 1);
187
188 if (strpos($is_in, $char) !== FALSE) {
189
190 $newVal .= $char;
191
192 }
193
194 }
195
196 $value = $newVal;
197
198 }
199
200 break;
201
202 case 'nospace':
203
204 $value = str_replace(' ', '', $value);
205
206 break;
207
208 case 'alpha':
209
210 $value = preg_replace('/[^a-zA-Z]/', '', $value);
211
212 break;
213
214 case 'num':
215
216 $value = preg_replace('/[^0-9]/', '', $value);
217
218 break;
219
220 case 'alphanum':
221
222 $value = preg_replace('/[^a-zA-Z0-9]/', '', $value);
223
224 break;
225
226 case 'alphanum_x':
227
228 $value = preg_replace('/[^a-zA-Z0-9_-]/', '', $value);
229
230 break;
231
232 case 'domainname':
233
234 if (!preg_match('/^[a-z0-9\.\-]*$/i', $value)) {
235
236 t3lib_div::requireOnce(PATH_typo3 . 'contrib/idna/idna_convert.class.php');
237
238 $idnaConvert = new idna_convert();
239
240 $idnaConvert->set_parameter('idn_version', '2008');
241
242 $value = $idnaConvert->encode($value);
243
244 unset($idnaConvert);
245
246 }
247
248 break;
249
250 case 'uniqueInPid':
251
252 break;
253
254 default:
255
256 if (t3lib_div::hasValidClassPrefix($func)) {
257
258 $evalObj = t3lib_div::getUserObj($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][$func] . ':&' . $func);
259
260 if (is_object($evalObj) && method_exists($evalObj, 'evaluateFieldValue')) {
261
262 $value = $evalObj->evaluateFieldValue($value, $is_in, $set);
263
264 }
265
266 }
267
268 break;
269 }
270 }
271
272 if ($set) {
273
274 $res['value'] = $value;
275
276 }
277
278 return $res;
279
280 }
281
282 /**
283 * Assigns a DLF document with a DLF collection by updating the corresponding
284 * database table.
285 *
286 * @access protected
287 *
288 * @param integer $documentUid the DLF document's uid
289 * @param integer $collectionUid the DLF collections's uid
290 *
291 * @return void
292 */
293 protected function addDocumentToCollection($documentUid, $collectionUid) {
294
295 // Load TCA to approximate TCE functionality.
296 $GLOBALS['TSFE']->includeTCA();
297
298 t3lib_div::loadTCA('tx_dlf_documents');
299
300 t3lib_div::devLog('[tx_dlf_collection_hook.addDocumentToCollection] tca='.$GLOBALS['TCA']['tx_dlf_documents']['columns']['collections']['config']['MM_match_fields']['ident'], 'dlf', t3lib_div::SYSLOG_SEVERITY_NOTICE);
301
302 // insert relation between document and collection
303 $GLOBALS['TYPO3_DB']->exec_INSERTquery(
304 'tx_dlf_relations',
305 array (
306 'uid_local' => $documentUid,
307 'uid_foreign' => $collectionUid,
308 'ident' => $GLOBALS['TCA']['tx_dlf_documents']['columns']['collections']['config']['MM_match_fields']['ident'],
309 )
310 );
311
312 }
313
314 /**
315 * Applies TCA eval functions to the given collection properties and returns
316 * proper DB table columns for update or insertion in the tx_dlf_collections table.
317 *
318 * @param string $title the desired collection title
319 * @param string $description the desired collection description
320 *
321 * @return array|NULL an associative array with the values label, index_name and oai_name; or NULL if TCA eval constraints were not fulfilled
322 */
323 protected function checkCollectionValues($title, $description) {
324
325 // Load TCA to approximate TCE functionality.
326 $GLOBALS['TSFE']->includeTCA();
327
328 t3lib_div::loadTCA('tx_dlf_collections');
329
330 /* TCEmain->checkValue_input_Eval() should be used here;
331 * until it is available in the frontend, we implement corresponding TCA constraints manually via tx_dlf_helper
332 */
333
334 // title is required
335 if (empty($title)) {
336
337 return NULL;
338
339 }
340
341 // prepare field values
342 $fields = array('label' => $title, 'index_name' => $title, 'oai_name' => $title, 'description' => $description);
343
344 $whereClause = '';
345
346 // apply TCA constraints
347 foreach ($fields as $name => &$value) {
348
349 if (empty($value)) {
350
351 continue;
352
353 }
354
355 $eval_result = tx_dlf_collection_hook::checkValue_input_Eval(
356 $value,
357 $GLOBALS['TCA']['tx_dlf_collections']['columns'][$name]['config']['eval'],
358 $GLOBALS['TCA']['tx_dlf_collections']['columns'][$name]['config']['is_in']);
359
360 if (count($eval_result) == 0) {
361
362 // eval function call failed
363 return NULL;
364
365 }
366
367 $value = $eval_result['value'];
368
369 $whereClause .= ' AND tx_dlf_collections.'.$name.'="'.$value.'"';
370
371 }
372
373 // check uniqueInPid for fields
374 $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
375 'tx_dlf_collections.label AS label,tx_dlf_collections.description AS description,tx_dlf_collections.fe_cruser_id AS fe_cruser_id',
376 'tx_dlf_collections',
377 'tx_dlf_collections.pid='.intval($this->plugin->conf['pages'])
378 .$whereClause
379 .tx_dlf_helper::whereClause('tx_dlf_collections'),
380 '',
381 '',
382 ''
383 );
384
385 // if any of derived fields are already avaiable in DB, check fails: we don't do any
386 // alternative calculation since this method is just a temporary solution for TCE
387 // instantiation in FE, which is to come soon
388 if ($GLOBALS['TYPO3_DB']->sql_num_rows($result) > 0) {
389
390 return NULL;
391
392 }
393
394 return $fields;
395
396 }
397
398 /**
399 * Creates a new DLF collection by updating the corresponding
400 * database table.
401 *
402 * @param string $title the title of the collection to create
403 * @param string $description the description of the collection to create
404 *
405 * @return integer The uid of the last inserted record or -1, if one or more of the passed parameters did not adhere to database column constraints.
406 */
407 protected function createCollection($title, $description) {
408
409 $fields = $this->checkCollectionValues($title, $description);
410
411 if ($fields == NULL) {
412
413 return -1;
414
415 }
416
417 // Insert new collection.
418 $GLOBALS['TYPO3_DB']->exec_INSERTquery(
419 'tx_dlf_collections',
420 array (
421 'pid' => $this->plugin->conf['pages'],
422 'tstamp' => $GLOBALS['EXEC_TIME'],
423 'crdate' => $GLOBALS['EXEC_TIME'],
424 $GLOBALS['TCA']['tx_dlf_collections']['ctrl']['fe_cruser_id'] => $GLOBALS['TSFE']->fe_user->user['uid'],
425 'label' => $fields['label'],
426 'index_name' => $fields['index_name'],
427 'oai_name' => $fields['oai_name'],
428 'description' => $fields['description'],
429 'documents' => 0,
430 'owner' => 0,
431 'status' => 0,
432 )
433 );
434
435 return $GLOBALS['TYPO3_DB']->sql_insert_id();
436
437 }
438
439 /**
440 * Creates a page link URL to the current page, containing special action
441 * parameters that are processed by this hook class.
442 *
443 * @param mixed $action the value that is appended as action parameter in the resulting URL
444 * @param mixed $subject the value that is appended as subject parameter in the resulting URL
445 * @param mixed $object the value that is appended as object parameter in the resulting URL
446 *
447 * @return string The created URL.
448 */
449 protected function createLink($action, $subject, $object = NULL) {
450
451 $params = array (
452 $this->plugin->prefixId => array (
453 self::$ENTRY_ACTION_SUBJECT => (string) $subject,
454 self::$ENTRY_ACTION => (string) $action
455 )
456 );
457
458 if ($object != NULL) {
459
460 $params[$this->plugin->prefixId][self::$ENTRY_ACTION_OBJECT] = (string) $object;
461
462 }
463
464 return $this->plugin->pi_getPageLink($GLOBALS['TSFE']->id, '', $params);
465
466 }
467
468 /**
469 * Deletes a DLF collection by updating the corresponding database table.
470 *
471 * @param integer $collectionUid the DLF collections's uid
472 *
473 * @return void
474 */
475 protected function deleteCollection($collectionUid) {
476
477 // Remove all document relations to collection.
478 $GLOBALS['TYPO3_DB']->exec_DELETEquery('tx_dlf_relations', 'uid_foreign='.$collectionUid);
479
480 // Delete collection: update deleted flag in DB.
481 $GLOBALS['TYPO3_DB']->exec_UPDATEquery(
482 'tx_dlf_collections',
483 'uid='.$collectionUid,
484 array(
485 'deleted' => 1
486 )
487 );
488
489 // Clean list and update header.
490 $list = t3lib_div::makeInstance('tx_dlf_list');
491
492 // check if we come from the collections plugin and remove this passed document, if appropriate
493 if (!empty($list->metadata['options']['source']) && $list->metadata['options']['source'] == 'collection') {
494
495 $colName = $list->metadata['label'];
496
497 $list->reset();
498
499 $list->metadata = array(
500 'label' => $this->getLL(tx_dlf_hook_ListActions::DeleteCollection.'.done'),
501 'description' => sprintf($this->getLL(tx_dlf_hook_ListActions::DeleteCollection.'.done.sub'), $colName),
502 );
503
504 $list->save();
505
506 }
507
508 }
509
510 /**
511 * Fills the markers contained of the edit-collection-template (that
512 * is loaded into the $editCollectionTemplate field) with the passed
513 * values.
514 *
515 * @param mixed $action the action parameter for the ACTION_URL marker
516 * @param mixed $subject the subject parameter for the ACTION_URL marker
517 * @param string $collectionName the content of the COLLECTION_NAME_VALUE marker
518 * @param string $collectionDescription the content of the COLLECTION_DESC_VALUE marker
519 *
520 * @return string The edit collection template with substituted markers.
521 */
522 protected function getEditCollectionTemplate($action, $subject, $collectionName = '', $collectionDescription = '') {
523 // Fill edit collection template.
524 $markerArray = array();
525
526 $markerArray['###ACTION###'] = $action;
527
528 $markerArray['###ACTION_LABEL###'] = $this->getLL($action);
529
530 $markerArray['###SUBMIT_LABEL###'] = $this->getLL($action.'.ok');
531
532 $markerArray['###CANCEL_LABEL###'] = $this->getLL('cancel');
533
534 $markerArray['###ACTION_URL###'] = $this->createLink($action, $subject);
535
536 $markerArray['###COLLECTION_NAME###'] = $this->wrapFormField(self::$FORM_FIELD_COLLECTION_NAME);
537
538 $markerArray['###COLLECTION_NAME_LABEL###'] = $this->getLL('name');
539
540 $markerArray['###COLLECTION_NAME_VALUE###'] = $collectionName;
541
542 $markerArray['###COLLECTION_DESC###'] = $this->wrapFormField(self::$FORM_FIELD_COLLECTION_DESCRIPTION);
543
544 $markerArray['###COLLECTION_DESC_LABEL###'] = $this->getLL('desc');
545
546 $markerArray['###COLLECTION_DESC_VALUE###'] = $collectionDescription;
547
548 return $this->plugin->cObj->substituteMarkerArray($this->editCollectionTemplate, $markerArray);
549
550 }
551
552 /**
553 * Implementation of the 'getEntry_fillEntryActions' hook in the class tx_dlf_listview.
554 * This hook adds user-specific functionionality to edit documents in a FE user collection.
555 * Thus, if no FE user is logged in, NULL is returned.
556 *
557 * @param tx_dlf_plugin $plugin the tx_dlf_listview plugin
558 * @param array $listElement the element shwon in list view, entry actions shall be generated for
559 *
560 * @return NULL|string A rendered menu object with user-specific functionionality to edit documents in a FE user collection or NULL if no FE user is logged in.
561 */
562 public function getEntry_fillEntryActions($plugin, $listElement) {
563
564 $this->init($plugin);
565
566 // We render user-specific entry actions (only when somone is logged-in).
567 $userId = $GLOBALS['TSFE']->fe_user->user['uid'];
568
569 if (empty($userId)) {
570
571 return NULL;
572
573 }
574
575 // We render different entry actions in single collection view than in usual search result views.
576 $list = t3lib_div::makeInstance('tx_dlf_list');
577
578 $collectionUid = NULL;
579
580 if ($list->metadata['options']['source'] === 'collection') {
581
582 $collectionUid = $list->metadata['options']['select'];
583
584 }
585
586 return $this->renderListEntryMenuObject($listElement, $collectionUid);
587
588 }
589
590 /**
591 * Returns the localized string for the given language key.
592 *
593 * @param string $key the language key
594 *
595 * @return string the localized string for the given language key
596 */
597 protected function getLL($key) {
598
599 return $GLOBALS['TSFE']->getLLL(self::$LANG_PREFIX.$key, $this->lang);
600
601 }
602
603 /**
604 * Answers if the requested collection is owned by the passed user.
605 *
606 * @param integer $collectionUid the uid of the requested DLF collection
607 *
608 * @return boolean FALSE, if the requested collection is not owned by the passed user; TRUE otherwise.
609 */
610 protected function isFEUserCollection($collectionUid) {
611
612 if (empty($collectionUid)) {
613
614 return FALSE;
615
616 }
617
618 $properties = $this->getCollectionProperties($collectionUid, $GLOBALS['TSFE']->fe_user->user['uid']);
619
620 if ($properties) {
621
622 return TRUE;
623
624 }
625
626 return FALSE;
627
628 }
629
630 /**
631 * Extracts and returns the properties of a user's collection.
632 *
633 * @param integer $collectionUid the uid of the requested DLF collection
634 * @param integer $userId the uid of the requested DLF collection
635 *
636 * @return boolean,array an associative array with the collection the property keys: label, description, fe_cruser_id or FALSE if the passed collection is not owned by the passed user or does not exist
637 * */
638 protected function getCollectionProperties($collectionUid, $userId) {
639
640 // Get collection properties.
641 $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
642 'tx_dlf_collections.label AS label,tx_dlf_collections.description AS description,tx_dlf_collections.fe_cruser_id AS fe_cruser_id',
643 'tx_dlf_collections',
644 'tx_dlf_collections.pid='.intval($this->plugin->conf['pages'])
645 .' AND tx_dlf_collections.uid='.intval($collectionUid)
646 .' AND tx_dlf_collections.fe_cruser_id='.intval($userId)
647 .tx_dlf_helper::whereClause('tx_dlf_collections'),
648 '',
649 '',
650 ''
651 );
652
653 return $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);
654
655 }
656
657 /**
658 * Initializes this hook class with the passed tx_dlf_plugin instance.
659 *
660 * @param tx_dlf_plugin $plugin the tx_dlf_listview plugin
661 *
662 * @return void
663 */
664 protected function init($plugin) {
665
666 $this->plugin = $plugin;
667
668 // Load collection plugin configuration.
669 $this->conf = $GLOBALS['TSFE']->tmpl->setup['plugin.'][$this->plugin->prefixId.'_collection.'];
670
671 // Load l18n file of collection plugin.
672 $this->lang = $GLOBALS['TSFE']->readLLfile(t3lib_extMgm::extPath($this->plugin->extKey, 'plugins/collection/locallang.xml'));
673
674 // Load the edit collection template.
675 $this->editCollectionTemplate = '';
676
677 if (!empty($this->conf['individualCollections.']['editCollectionTemplate'])) {
678
679 $this->editCollectionTemplate = $this->plugin->cObj->getSubpart($this->plugin->cObj->fileResource($this->conf['individualCollections.']['editCollectionTemplate']), '###TEMPLATE###');
680
681 } else {
682
683 $this->editCollectionTemplate = $this->plugin->cObj->getSubpart($this->plugin->cObj->fileResource('EXT:dlf/plugins/collection/edit_collection.tmpl'), '###TEMPLATE###');
684
685 }
686
687 }
688
689 /**
690 * Implementation of the 'main_fillListActions' hook in the class tx_dlf_listview.
691 * This hook adds user-specific functionionality to edit collections.
692 *
693 * @param tx_dlf_plugin $plugin the tx_dlf_listview plugin
694 *
695 * @return NULL|string NULL if an error occurred or the HTML content that is integrated in the output of the tx_dlf_listview plugin
696 */
697
698 public function main_fillListActions($plugin) {
699
700 t3lib_div::devLog('[tx_dlf_collection_hook.main_fillListActions] ', 'dlf', t3lib_div::SYSLOG_SEVERITY_INFO);
701
702 $this->init($plugin);
703
704 // We render list actions only for logged-in users.
705 $userId = $GLOBALS['TSFE']->fe_user->user['uid'];
706
707 // Checked if a user is logged in.
708 if (empty($userId)) {
709
710 return NULL;
711
712 }
713
714 // Get actual list.
715 $list = t3lib_div::makeInstance('tx_dlf_list');
716
717 // Check if we come from the collections plugin.
718 if (empty($list->metadata['options']['source']) || (!empty($list->metadata['options']['source']) && $list->metadata['options']['source'] != 'collection')) {
719
720 return NULL;
721
722 }
723
724 // Check if the shown collection is owned by the logged in user.
725 $collectionUid = intval($list->metadata['options']['select']);
726
727 t3lib_div::devLog('[tx_dlf_collection_hook.main_fillListActions] colID='.$collectionUid, 'dlf', t3lib_div::SYSLOG_SEVERITY_NOTICE);
728
729 // Get collection properties.
730 $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
731 'tx_dlf_collections.label AS label,tx_dlf_collections.description AS description,tx_dlf_collections.fe_cruser_id AS fe_cruser_id',
732 'tx_dlf_collections',
733 'tx_dlf_collections.pid='.intval($this->plugin->conf['pages'])
734 .' AND tx_dlf_collections.uid='.$collectionUid
735 .' AND tx_dlf_collections.fe_cruser_id='.$userId
736 .tx_dlf_helper::whereClause('tx_dlf_collections'),
737 '',
738 '',
739 ''
740 );
741
742 // If nothing returned, the requested collection is not owned by the logged-in user.
743 if ((!$resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result))) {
744
745 return NULL;
746
747 }
748
749 // Load collection menuConf.
750 $collectionMenuConf = $this->conf['individualCollections.']['collectionMenu.'];
751
752 if (empty($collectionMenuConf)) {
753
754 trigger_error('No collection menu conf found.', E_USER_NOTICE);
755
756 return NULL;
757
758 }
759
760
761 $_TSconfig = array ();
762
763 $_TSconfig['special'] = 'userfunction';
764
765 $_TSconfig['special.']['userFunc'] = 'tx_dlf_collection_hook->makeCollectionListMenu';
766
767 $_TSconfig['special.']['plugin'] = $this->plugin;
768
769 $_TSconfig['special.']['collection'] = $list->metadata['options']['select'];
770
771 $_TSconfig = t3lib_div::array_merge_recursive_overrule($collectionMenuConf, $_TSconfig);
772
773 $content = $this->plugin->cObj->HMENU($_TSconfig);
774
775 // Get collection properties.
776 $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
777 'tx_dlf_collections.label AS label,tx_dlf_collections.description AS description',
778 'tx_dlf_collections',
779 'tx_dlf_collections.pid='.intval($this->plugin->conf['pages'])
780 .' AND tx_dlf_collections.uid='.intval($list->metadata['options']['select'])
781 .tx_dlf_helper::whereClause('tx_dlf_collections'),
782 '',
783 '',
784 ''
785 );
786
787 $actionLabel = '';
788
789 if ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {
790
791 $content .= $this->getEditCollectionTemplate(
792 tx_dlf_hook_ListActions::EditCollection,
793 $list->metadata['options']['select'],
794 $resArray['label'],
795 $resArray['description']);
796
797 } else {
798
799 trigger_error('Given collection id does not exist in database.', E_USER_ERROR);
800
801 }
802
803 return $content;
804
805 }
806
807 /**
808 * Implementation of the 'main_preListRendering' hook in the class tx_dlf_listview.
809 * This hook manages action links produced by this class.
810 *
811 * @param tx_dlf_plugin $plugin the tx_dlf_listview plugin
812 *
813 * @return void
814 */
815 public function main_preListRendering($plugin) {
816
817 $this->init($plugin);
818
819 $action = $this->plugin->piVars[self::$ENTRY_ACTION];
820
821 if (!empty($action)) {
822
823 $subject = $this->plugin->piVars[self::$ENTRY_ACTION_SUBJECT];
824
825 $object = $this->plugin->piVars[self::$ENTRY_ACTION_OBJECT];
826
827 switch ($action) {
828
829 case tx_dlf_hook_EntryActions::AddDocumentToCollection:
830
831 $this->addDocumentToCollection($subject, $object);
832
833 break;
834
835 case tx_dlf_hook_EntryActions::RemoveDocumentFromCollection:
836
837 $this->removeDocumentFromCollection($subject, $object);
838
839 break;
840
841 case tx_dlf_hook_EntryActions::CreateCollection:
842
843 $collectionId = $this->createCollection(
844 $this->plugin->piVars[self::$FORM_FIELD_COLLECTION_NAME],
845 $this->plugin->piVars[self::$FORM_FIELD_COLLECTION_DESCRIPTION]);
846
847 // check if collection creation succeeded.
848 if ($collectionId == -1) {
849
850 return;
851
852 }
853
854 $this->addDocumentToCollection($subject, $collectionId);
855
856 break;
857
858 case tx_dlf_hook_ListActions::EditCollection:
859
860 $this->updateCollection($subject,
861 $this->plugin->piVars[self::$FORM_FIELD_COLLECTION_NAME],
862 $this->plugin->piVars[self::$FORM_FIELD_COLLECTION_DESCRIPTION]);
863
864 break;
865
866 case tx_dlf_hook_ListActions::DeleteCollection:
867
868 $this->deleteCollection($subject);
869
870 break;
871
872 }
873
874 }
875
876 }
877
878 /**
879 * The menuFunc for the HMENU object created and rendered by the implementation
880 * for the getEntry_fillEntryActions hook.
881 *
882 * This function is used when the hooked list view shows a list generated
883 * by the collections plugin.
884 *
885 * @param string $content the content object
886 * @param array $conf the menu configuration
887 *
888 * @return array HMENU array
889 */
890 public function makeCollectionListEntryMenu($content, $conf) {
891
892 // Extract passed and prepare parameters.
893 $this->init($conf['plugin']);
894
895 $action = tx_dlf_hook_EntryActions::RemoveDocumentFromCollection;
896
897 $menuArray[] = array(
898 'title' => $this->getLL($action.'.blank'),
899 '_OVERRIDE_HREF' => $this->createLink($action, $conf['listElement']['uid'], $conf['collectionId'])
900 );
901
902 $menuArray[] = array();
903
904 return $menuArray;
905
906 }
907
908 /**
909 * The menuFunc for the HMENU object created and rendered by the implementation
910 * for the main_fillListActions hook.
911 *
912 * @param string $content the content object
913 * @param array $conf the menu configuration
914 *
915 * @return array HMENU array
916 */
917 public function makeCollectionListMenu($content, $conf) {
918
919 // Extract passed and prepare parameters.
920 $this->init($conf['plugin']);
921
922 $menuArray[] = array(
923 'title' => $this->getLL(tx_dlf_hook_ListActions::EditCollection),
924 '_OVERRIDE_HREF' => '#'.tx_dlf_hook_ListActions::EditCollection
925 );
926
927 $menuArray[] = array(
928 'title' => $this->getLL(tx_dlf_hook_ListActions::DeleteCollection),
929 '_OVERRIDE_HREF' => $this->createLink(tx_dlf_hook_ListActions::DeleteCollection, $conf['collection'])
930 );
931
932 return $menuArray;
933
934 }
935
936 /**
937 * The menuFunc for the HMENU object created and rendered by the implementation
938 * for the getEntry_fillEntryActions hook.
939 *
940 * This function is used when the hooked list view shows a list generated
941 * by the search plugin.
942 *
943 * @param string $content the content object
944 * @param array $conf the menu configuration
945 *
946 * @return array HMENU array
947 */
948 public function makeSearchResultListEntryMenu($content, $conf) {
949
950 // Extract passed and prepare parameters.
951 $this->init($conf['plugin']);
952
953 $listElement = $conf['listElement'];
954
955 $userId = $conf['userId'];
956
957 $menuArray = array();
958
959 // get all user-defined collections (even empty)
960 $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
961 'tx_dlf_collections.uid AS uid,tx_dlf_collections.label AS label',
962 'tx_dlf_collections',
963 'tx_dlf_collections.pid='.intval($this->plugin->conf['pages'])
964 .' AND tx_dlf_collections.fe_cruser_id='.intval($userId)
965 .tx_dlf_helper::whereClause('tx_dlf_collections'),
966 '',
967 '',
968 ''
969 );
970
971 $actionLabel = '';
972
973 while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {
974
975 // is the current entry already in this collection?
976 $isInCollection = $GLOBALS['TYPO3_DB']->sql_num_rows(
977 $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query(
978 'tx_dlf_documents.uid AS doc',
979 'tx_dlf_documents',
980 'tx_dlf_relations',
981 'tx_dlf_collections',
982 ' AND uid_local='.$listElement['uid']
983 .' AND uid_foreign='.$resArray['uid']
984 .tx_dlf_helper::whereClause('tx_dlf_documents').tx_dlf_helper::whereClause('tx_dlf_collections'),
985 '',
986 '',
987 ''
988 )) > 0;
989
990 $action = '';
991
992 if (!$isInCollection) {
993
994 $action = tx_dlf_hook_EntryActions::AddDocumentToCollection;
995
996 } else {
997
998 $action = tx_dlf_hook_EntryActions::RemoveDocumentFromCollection;
999
1000 }
1001
1002 $actionLabel = sprintf($this->getLL($action), $resArray['label']);
1003
1004 $entryArray = array();
1005
1006 $entryArray['title'] = $actionLabel;
1007
1008 $entryArray['ITEM_STATE'] = 'NO';
1009
1010 $entryArray['_OVERRIDE_HREF'] = $this->createLink($action, $listElement['uid'], $resArray['uid']);
1011
1012 $menuArray[] = $entryArray;
1013
1014 }
1015
1016 $menuArray[] = array(
1017 'title' => $this->getLL(tx_dlf_hook_EntryActions::CreateCollection),
1018 '_OVERRIDE_HREF' => '#new_collection',
1019 'newCollection' => true,
1020 );
1021
1022 return $menuArray;
1023
1024 }
1025
1026 /**
1027 * Renders an HMENU with additional FE user functions to edit the passed list
1028 * element coming from the list view plugin.
1029 *
1030 * If the passed collection uid belongs to the logged in user, the menuFunc
1031 * is makeCollectionListEntryMenu; if not, it is makeSearchResultListEntryMenu.
1032 *
1033 * @param array $listElement the element shwon in list view
1034 * @param integer $collection the uid of the DLF collection
1035 *
1036 * @return string|NULL the rendered HMENU object or NULL, if an error occurred
1037 */
1038 protected function renderListEntryMenuObject($listElement, $collection) {
1039
1040 t3lib_div::devLog('[tx_dlf_collection_hook.renderListEntryMenuObject] $collection='.$collection, 'dlf', t3lib_div::SYSLOG_SEVERITY_NOTICE);
1041
1042 // Check for individual collections.
1043 $individualCollections = $this->conf['individualCollections'];
1044
1045 if (empty($individualCollections) || $individualCollections == 0) {
1046
1047 trigger_error('Individual collections disabled, stoping here.', E_USER_NOTICE);
1048
1049 return NULL;
1050
1051 }
1052
1053 // Load entry actions menuConf.
1054 $documentMenuConf = $this->conf['individualCollections.']['documentMenu.'];
1055
1056 if (empty($documentMenuConf)) {
1057
1058 trigger_error('No document menu conf found.', E_USER_NOTICE);
1059
1060 return NULL;
1061
1062 }
1063
1064 $_TSconfig = array ();
1065
1066 $_TSconfig['special'] = 'userfunction';
1067
1068 $collectionProperties = FALSE;
1069
1070 // Individual collections lists got different menus than public collection lists.
1071 if ($this->isFEUserCollection($collection)) {
1072
1073 $_TSconfig['special.']['userFunc'] = 'tx_dlf_collection_hook->makeCollectionListEntryMenu';
1074
1075 $_TSconfig['special.']['collectionId'] = $collection;
1076
1077 } else {
1078
1079 $_TSconfig['special.']['userFunc'] = 'tx_dlf_collection_hook->makeSearchResultListEntryMenu';
1080
1081 }
1082
1083 $_TSconfig['special.']['plugin'] = $this->plugin;
1084
1085 $_TSconfig['special.']['listElement'] = $listElement;
1086
1087 $_TSconfig['special.']['userId'] = $GLOBALS['TSFE']->fe_user->user['uid'];
1088
1089 $_TSconfig = t3lib_div::array_merge_recursive_overrule($documentMenuConf, $_TSconfig);
1090
1091 $content = $this->plugin->cObj->HMENU($_TSconfig);
1092
1093 $content .= $this->getEditCollectionTemplate(tx_dlf_hook_EntryActions::CreateCollection, $listElement['uid']);
1094
1095 return $content;
1096
1097 }
1098
1099 /**
1100 * Removes a DLF document from a DLF collection by updating the corresponding
1101 * database table.
1102 *
1103 * @access protected
1104 *
1105 * @param integer $documentUid the DLF document's uid
1106 * @param integer $collectionUid the DLF collections's uid
1107 *
1108 * @return void
1109 */
1110 protected function removeDocumentFromCollection($documentUid, $collectionUid) {
1111
1112 t3lib_div::devLog('[tx_dlf_collection_hook.removeDocumentFromCollection] $documentUid='.$documentUid.' , $collectionUid='.$collectionUid, 'dlf', t3lib_div::SYSLOG_SEVERITY_NOTICE);
1113
1114 // remove relation between document and collection
1115 $GLOBALS['TYPO3_DB']->exec_DELETEquery('tx_dlf_relations',
1116 'uid_local='.$documentUid.
1117 ' AND uid_foreign='.$collectionUid.
1118 ' AND ident="docs_colls"');
1119
1120 $list = t3lib_div::makeInstance('tx_dlf_list');
1121
1122 // Check if we come from the collections plugin, if the shown collection is of the logged-in user and remove this passed document.
1123 if (!empty($list->metadata['options']['source'])
1124 && ($list->metadata['options']['source'] == 'collection')
1125 && $this->isFEUserCollection($list->metadata['options']['select'])) {
1126
1127 // find document's index and remove it from list
1128 $i = 0;
1129
1130 foreach ($list->elements as $document) {
1131
1132 if ($document['uid'] == $documentUid) {
1133
1134 $list->remove($i);
1135
1136 break;
1137
1138 }
1139
1140 $i++;
1141
1142 }
1143
1144 }
1145
1146 }
1147
1148 /**
1149 * Updates collection properties.
1150 *
1151 * @param integer $collectionUid the DLF collections's uid
1152 * @param string $label the new collection label
1153 * @param string $description the new collection description
1154 *
1155 * @return void
1156 */
1157 protected function updateCollection($collectionUid, $label, $description) {
1158
1159 $fields = $this->checkCollectionValues($label, $description);
1160
1161 if ($fields == NULL) {
1162
1163 return -1;
1164
1165 }
1166
1167 // Update database.
1168 $GLOBALS['TYPO3_DB']->exec_UPDATEquery(
1169 'tx_dlf_collections',
1170 'uid='.$collectionUid,
1171 $fields
1172 );
1173
1174 // Update list.
1175 $list = t3lib_div::makeInstance('tx_dlf_list');
1176
1177 // check if we come from the collections plugin and remove this passed document, if appropriate
1178 if (!empty($list->metadata['options']['source']) && $list->metadata['options']['source'] == 'collection') {
1179
1180 $_metadata = $list->metadata;
1181
1182 $_metadata['label'] = $fields['label'];;
1183
1184 $_metadata['description'] = $fields['description'];
1185
1186 $list->metadata = $_metadata;
1187
1188 }
1189
1190 }
1191
1192 /**
1193 * Wraps a form field as plugin field.
1194 *
1195 * @param string $fieldName
1196 *
1197 * @return string the wrapped field name
1198 */
1199 protected function wrapFormField($fieldName) {
1200
1201 return $this->plugin->prefixId.'['.$fieldName.']';
1202
1203 }
1204
1205}
1206
1207class tx_dlf_hook_EntryActions {
1208
1209 const AddDocumentToCollection = 'add';
1210
1211 const CreateCollection = 'new_collection';
1212
1213 const RemoveDocumentFromCollection = 'remove';
1214
1215}
1216
1217class tx_dlf_hook_ListActions {
1218
1219 const EditCollection = 'edit_collection';
1220
1221 const DeleteCollection = 'delete_collection';
1222
1223}
1224
1225if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dlf/plugins/collection/class.tx_dlf_collection_hook.php']) {
1226 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dlf/plugins/collection/class.tx_dlf_collection_hook.php']);
1227}
1228
1229?>
0\ No newline at end of file1230\ No newline at end of file
11231
=== modified file 'dlf/lib/ISO-639/iso-639-1.xml'
--- dlf/lib/ISO-639/iso-639-1.xml 2012-08-07 14:39:23 +0000
+++ dlf/lib/ISO-639/iso-639-1.xml 2012-10-10 09:08:30 +0000
@@ -1,3 +1,4 @@
1<<<<<<< TREE
1<?xml version="1.0" encoding="UTF-8"?>2<?xml version="1.0" encoding="UTF-8"?>
2<T3locallang>3<T3locallang>
3 <meta type="array">4 <meta type="array">
@@ -293,4 +294,301 @@
293 <label index="zu">Zulu</label>294 <label index="zu">Zulu</label>
294 </languageKey>295 </languageKey>
295 </data>296 </data>
297=======
298<?xml version="1.0" encoding="UTF-8"?>
299<T3locallang>
300 <meta type="array">
301 <type>module</type>
302 <description>Language labels for ISO 639-1 codes</description>
303 </meta>
304 <data type="array">
305 <languageKey index="default" type="array">
306 <label index="aa">Afar</label>
307 <label index="ab">Abkhazian</label>
308 <label index="af">Afrikaans</label>
309 <label index="am">Amharic</label>
310 <label index="ar">Arabic</label>
311 <label index="as">Assamese</label>
312 <label index="ay">Aymara</label>
313 <label index="az">Azerbaijani</label>
314 <label index="ba">Bashkir</label>
315 <label index="be">Byelorussian</label>
316 <label index="bg">Bulgarian</label>
317 <label index="bh">Bihari</label>
318 <label index="bi">Bislama</label>
319 <label index="bn">Bengali</label>
320 <label index="bo">Tibetan</label>
321 <label index="br">Breton</label>
322 <label index="ca">Catalan</label>
323 <label index="co">Corsican</label>
324 <label index="cs">Czech</label>
325 <label index="cy">Welsh</label>
326 <label index="da">Danish</label>
327 <label index="de">German</label>
328 <label index="dz">Dzongkha</label>
329 <label index="el">Greek</label>
330 <label index="en">English</label>
331 <label index="eo">Esperanto</label>
332 <label index="es">Spanish</label>
333 <label index="et">Estonian</label>
334 <label index="eu">Basque</label>
335 <label index="fa">Persian</label>
336 <label index="fi">Finnish</label>
337 <label index="fj">Fijian</label>
338 <label index="fo">Faroese</label>
339 <label index="fr">French</label>
340 <label index="fy">Frisian</label>
341 <label index="ga">Irish</label>
342 <label index="gd">Scottish Gaelic</label>
343 <label index="gl">Galician</label>
344 <label index="gn">Guarani</label>
345 <label index="gu">Gujarati</label>
346 <label index="ha">Hausa</label>
347 <label index="he">Hebrew</label>
348 <label index="hi">Hindi</label>
349 <label index="hr">Croatian</label>
350 <label index="hu">Hungarian</label>
351 <label index="hy">Armenian</label>
352 <label index="ia">Interlingua</label>
353 <label index="id">Indonesian</label>
354 <label index="ie">Interlingue, Occidental</label>
355 <label index="ik">Inupiak</label>
356 <label index="is">Icelandic</label>
357 <label index="it">Italian</label>
358 <label index="iu">Inuktitut</label>
359 <label index="iw">Hebrew</label>
360 <label index="ja">Japanese</label>
361 <label index="ji">Yiddish</label>
362 <label index="jv">Javanese</label>
363 <label index="jw">Javanese</label>
364 <label index="ka">Georgian</label>
365 <label index="kk">Kazakh</label>
366 <label index="kl">Kalaallisut, Greenlandic</label>
367 <label index="km">Khmer</label>
368 <label index="kn">Kannada</label>
369 <label index="ko">Korean</label>
370 <label index="ks">Kashmiri</label>
371 <label index="ku">Kurdish</label>
372 <label index="ky">Kirghiz, Kyrgyz</label>
373 <label index="la">Latin</label>
374 <label index="ln">Lingala</label>
375 <label index="lo">Lao</label>
376 <label index="lt">Lithuanian</label>
377 <label index="lv">Latvian</label>
378 <label index="mg">Malagasy</label>
379 <label index="mi">Maori</label>
380 <label index="mk">Macedonian</label>
381 <label index="ml">Malayalam</label>
382 <label index="mn">Mongolian</label>
383 <label index="mo">Moldavian</label>
384 <label index="mr">Marathi</label>
385 <label index="ms">Malay</label>
386 <label index="mt">Maltese</label>
387 <label index="my">Burmese</label>
388 <label index="na">Nauru</label>
389 <label index="ne">Nepali</label>
390 <label index="nl">Dutch</label>
391 <label index="no">Norwegian</label>
392 <label index="oc">Occitan</label>
393 <label index="om">Oromo</label>
394 <label index="or">Oriya</label>
395 <label index="pa">Panjabi</label>
396 <label index="pl">Polish</label>
397 <label index="ps">Pushto</label>
398 <label index="pt">Portuguese</label>
399 <label index="qu">Quechua</label>
400 <label index="rm">Romansh</label>
401 <label index="rn">Rundi</label>
402 <label index="ro">Romanian</label>
403 <label index="ru">Russian</label>
404 <label index="rw">Kinyarwanda</label>
405 <label index="sa">Sanskrit</label>
406 <label index="sd">Sindhi</label>
407 <label index="sg">Sango</label>
408 <label index="sh">Serbo-Croatian</label>
409 <label index="si">Sinhalese</label>
410 <label index="sk">Slovak</label>
411 <label index="sl">Slovenian</label>
412 <label index="sm">Samoan</label>
413 <label index="sn">Shona</label>
414 <label index="so">Somali</label>
415 <label index="sq">Albanian</label>
416 <label index="sr">Serbian</label>
417 <label index="ss">Swati</label>
418 <label index="st">Southern Sotho</label>
419 <label index="su">Sundanese</label>
420 <label index="sv">Swedish</label>
421 <label index="sw">Swahili</label>
422 <label index="ta">Tamil</label>
423 <label index="te">Telugu</label>
424 <label index="tg">Tajik</label>
425 <label index="th">Thai</label>
426 <label index="ti">Tigrinya</label>
427 <label index="tk">Turkmen</label>
428 <label index="tl">Tagalog</label>
429 <label index="tn">Tswana</label>
430 <label index="to">Tonga</label>
431 <label index="tr">Turkish</label>
432 <label index="ts">Tsonga</label>
433 <label index="tt">Tatar</label>
434 <label index="tw">Twi</label>
435 <label index="ug">Uighur</label>
436 <label index="uk">Ukrainian</label>
437 <label index="ur">Urdu</label>
438 <label index="uz">Uzbek</label>
439 <label index="vi">Vietnamese</label>
440 <label index="vo">Volapük</label>
441 <label index="wo">Wolof</label>
442 <label index="xh">Xhosa</label>
443 <label index="yi">Yiddish</label>
444 <label index="yo">Yoruba</label>
445 <label index="za">Zhuang</label>
446 <label index="zh">Chinese</label>
447 <label index="zu">Zulu</label>
448 </languageKey>
449 <languageKey index="de" type="array">
450 <label index="aa">Afar</label>
451 <label index="ab">Abchasisch</label>
452 <label index="af">Afrikaans</label>
453 <label index="am">Amharisch</label>
454 <label index="ar">Arabisch</label>
455 <label index="as">Assamesisch</label>
456 <label index="ay">Aymara</label>
457 <label index="az">Aserbaidschanisch</label>
458 <label index="ba">Baschkirisch</label>
459 <label index="be">Belorussisch</label>
460 <label index="bg">Bulgarisch</label>
461 <label index="bh">Biharisch</label>
462 <label index="bi">Bislamisch</label>
463 <label index="bn">Bengalisch</label>
464 <label index="bo">Tibetanisch</label>
465 <label index="br">Bretonisch</label>
466 <label index="ca">Katalanisch</label>
467 <label index="co">Korsisch</label>
468 <label index="cs">Tschechisch</label>
469 <label index="cy">Walisisch</label>
470 <label index="da">Dänisch</label>
471 <label index="de">Deutsch</label>
472 <label index="dz">Dzongkha, Bhutani</label>
473 <label index="el">Griechisch</label>
474 <label index="en">Englisch</label>
475 <label index="eo">Esperanto</label>
476 <label index="es">Spanisch</label>
477 <label index="et">Estnisch</label>
478 <label index="eu">Baskisch</label>
479 <label index="fa">Persisch</label>
480 <label index="fi">Finnisch</label>
481 <label index="fj">Fiji</label>
482 <label index="fo">Färöisch</label>
483 <label index="fr">Französisch</label>
484 <label index="fy">Friesisch</label>
485 <label index="ga">Irisch</label>
486 <label index="gd">Schottisches Gälisch</label>
487 <label index="gl">Galizisch</label>
488 <label index="gn">Guarani</label>
489 <label index="gu">Gujaratisch</label>
490 <label index="ha">Haussa</label>
491 <label index="he">Hebräisch</label>
492 <label index="hi">Hindi</label>
493 <label index="hr">Kroatisch</label>
494 <label index="hu">Ungarisch</label>
495 <label index="hy">Armenisch</label>
496 <label index="ia">Interlingua</label>
497 <label index="id">Indonesisch</label>
498 <label index="ie">Interlingue</label>
499 <label index="ik">Inupiak</label>
500 <label index="is">Isländisch</label>
501 <label index="it">Italienisch</label>
502 <label index="iu">Inuktitut (Eskimo)</label>
503 <label index="iw">Hebräisch</label>
504 <label index="ja">Japanisch</label>
505 <label index="ji">Jiddish</label>
506 <label index="jv">Javanisch</label>
507 <label index="ka">Georgisch</label>
508 <label index="kk">Kasachisch</label>
509 <label index="kl">Kalaallisut (Grönländisch)</label>
510 <label index="km">Kambodschanisch</label>
511 <label index="kn">Kannada</label>
512 <label index="ko">Koreanisch</label>
513 <label index="ks">Kaschmirisch</label>
514 <label index="ku">Kurdisch</label>
515 <label index="ky">Kirgisisch</label>
516 <label index="la">Lateinisch</label>
517 <label index="ln">Lingala</label>
518 <label index="lo">Laotisch</label>
519 <label index="lt">Litauisch</label>
520 <label index="lv">Lettisch</label>
521 <label index="mg">Malagasisch</label>
522 <label index="mi">Maorisch</label>
523 <label index="mk">Mazedonisch</label>
524 <label index="ml">Malajalam</label>
525 <label index="mn">Mongolisch</label>
526 <label index="mo">Moldavisch</label>
527 <label index="mr">Marathi</label>
528 <label index="ms">Malaysisch</label>
529 <label index="mt">Maltesisch</label>
530 <label index="my">Burmesisch</label>
531 <label index="na">Nauruisch</label>
532 <label index="ne">Nepalesisch</label>
533 <label index="nl">Holländisch</label>
534 <label index="no">Norwegisch</label>
535 <label index="oc">Okzitanisch</label>
536 <label index="om">Oromo</label>
537 <label index="or">Oriya</label>
538 <label index="pa">Pundjabisch</label>
539 <label index="pl">Polnisch</label>
540 <label index="ps">Paschtu</label>
541 <label index="pt">Portugiesisch</label>
542 <label index="qu">Quechua</label>
543 <label index="rm">Rätoromanisch</label>
544 <label index="rn">Kirundisch</label>
545 <label index="ro">Rumänisch</label>
546 <label index="ru">Russisch</label>
547 <label index="rw">Kijarwanda</label>
548 <label index="sa">Sanskrit</label>
549 <label index="sd">Zinti</label>
550 <label index="sg">Sango</label>
551 <label index="sh">Serbokroatisch</label>
552 <label index="si">Singhalesisch</label>
553 <label index="sk">Slowakisch</label>
554 <label index="sl">Slowenisch</label>
555 <label index="sm">Samoanisch</label>
556 <label index="sn">Schonisch</label>
557 <label index="so">Somalisch</label>
558 <label index="sq">Albanisch</label>
559 <label index="sr">Serbisch</label>
560 <label index="ss">Swasiländisch</label>
561 <label index="st">Sesothisch</label>
562 <label index="su">Sudanesisch</label>
563 <label index="sv">Schwedisch</label>
564 <label index="sw">Suaheli</label>
565 <label index="ta">Tamilisch</label>
566 <label index="te">Tegulu</label>
567 <label index="tg">Tadschikisch</label>
568 <label index="th">Thai</label>
569 <label index="ti">Tigrinja</label>
570 <label index="tk">Turkmenisch</label>
571 <label index="tl">Tagalog</label>
572 <label index="tn">Sezuan</label>
573 <label index="to">Tongaisch</label>
574 <label index="tr">Türkisch</label>
575 <label index="ts">Tsongaisch</label>
576 <label index="tt">Tatarisch</label>
577 <label index="tw">Twi</label>
578 <label index="ug">Uigur</label>
579 <label index="uk">Ukrainisch</label>
580 <label index="ur">Urdu</label>
581 <label index="uz">Usbekisch</label>
582 <label index="vi">Vietnamesisch</label>
583 <label index="vo">Volapük</label>
584 <label index="wo">Wolof</label>
585 <label index="xh">Xhosa</label>
586 <label index="yi">Jiddish</label>
587 <label index="yo">Joruba</label>
588 <label index="za">Zhuang</label>
589 <label index="zh">Chinesisch</label>
590 <label index="zu">Zulu</label>
591 </languageKey>
592 </data>
593>>>>>>> MERGE-SOURCE
296</T3locallang>594</T3locallang>
297\ No newline at end of file595\ No newline at end of file
298596
=== modified file 'dlf/lib/ISO-639/iso-639-2b.xml'
--- dlf/lib/ISO-639/iso-639-2b.xml 2012-08-07 14:39:23 +0000
+++ dlf/lib/ISO-639/iso-639-2b.xml 2012-10-10 09:08:30 +0000
@@ -1,3 +1,4 @@
1<<<<<<< TREE
1<?xml version="1.0" encoding="UTF-8"?>2<?xml version="1.0" encoding="UTF-8"?>
2<T3locallang>3<T3locallang>
3 <meta type="array">4 <meta type="array">
@@ -981,4 +982,989 @@
981 <label index="zza">Zazaki</label>982 <label index="zza">Zazaki</label>
982 </languageKey>983 </languageKey>
983 </data>984 </data>
985=======
986<?xml version="1.0" encoding="UTF-8"?>
987<T3locallang>
988 <meta type="array">
989 <type>module</type>
990 <description>Language labels for ISO 639-2/B codes</description>
991 </meta>
992 <data type="array">
993 <languageKey index="default" type="array">
994 <label index="aar">Afar</label>
995 <label index="abk">Abkhazian</label>
996 <label index="ace">Achinese</label>
997 <label index="ach">Acoli</label>
998 <label index="ada">Adangme</label>
999 <label index="ady">Adyghe, Adygei</label>
1000 <label index="afa">Afro-Asiatic languages</label>
1001 <label index="afh">Afrihili</label>
1002 <label index="afr">Afrikaans</label>
1003 <label index="ain">Ainu</label>
1004 <label index="aka">Akan</label>
1005 <label index="akk">Akkadian</label>
1006 <label index="alb">Albanian</label>
1007 <label index="ale">Aleut</label>
1008 <label index="alg">Algonquian languages</label>
1009 <label index="alt">Southern Altai</label>
1010 <label index="amh">Amharic</label>
1011 <label index="ang">Old English (ca.450-1100)</label>
1012 <label index="anp">Angika</label>
1013 <label index="apa">Apache languages</label>
1014 <label index="ara">Arabic</label>
1015 <label index="arc">Official/Imperial Aramaic (700-300 BCE)</label>
1016 <label index="arg">Aragonese</label>
1017 <label index="arm">Armenian</label>
1018 <label index="arn">Mapudungun, Mapuche</label>
1019 <label index="arp">Arapaho</label>
1020 <label index="art">Artificial languages</label>
1021 <label index="arw">Arawak</label>
1022 <label index="asm">Assamese</label>
1023 <label index="ast">Asturian, Bable, Leonese, Asturleonese</label>
1024 <label index="ath">Athapascan languages</label>
1025 <label index="aus">Australian languages</label>
1026 <label index="ava">Avaric</label>
1027 <label index="ave">Avestan</label>
1028 <label index="awa">Awadhi</label>
1029 <label index="aym">Aymara</label>
1030 <label index="aze">Azerbaijani</label>
1031 <label index="bad">Banda languages</label>
1032 <label index="bai">Bamileke languages</label>
1033 <label index="bak">Bashkir</label>
1034 <label index="bal">Baluchi</label>
1035 <label index="bam">Bambara</label>
1036 <label index="ban">Balinese</label>
1037 <label index="baq">Basque</label>
1038 <label index="bas">Basa</label>
1039 <label index="bat">Baltic languages</label>
1040 <label index="bej">Beja, Bedawiyet</label>
1041 <label index="bel">Byelorussian</label>
1042 <label index="bem">Bemba</label>
1043 <label index="ben">Bengali</label>
1044 <label index="ber">Berber languages</label>
1045 <label index="bho">Bhojpuri</label>
1046 <label index="bih">Bihari languages</label>
1047 <label index="bik">Bikol</label>
1048 <label index="bin">Bini, Edo</label>
1049 <label index="bis">Bislama</label>
1050 <label index="bla">Siksika</label>
1051 <label index="bnt">Bantu</label>
1052 <label index="bos">Bosnian</label>
1053 <label index="bra">Braj</label>
1054 <label index="bre">Breton</label>
1055 <label index="btk">Batak languages</label>
1056 <label index="bua">Buriat</label>
1057 <label index="bug">Buginese</label>
1058 <label index="bul">Bulgarian</label>
1059 <label index="bur">Burmese</label>
1060 <label index="byn">Blin, Bilin</label>
1061 <label index="cad">Caddo</label>
1062 <label index="cai">Central American Indian languages</label>
1063 <label index="car">Galibi Carib</label>
1064 <label index="cat">Catalan, Valencian</label>
1065 <label index="cau">Caucasian languages</label>
1066 <label index="ceb">Cebuano</label>
1067 <label index="cel">Celtic languages</label>
1068 <label index="cha">Chamorro</label>
1069 <label index="chb">Chibcha</label>
1070 <label index="che">Chechen</label>
1071 <label index="chg">Chagatai</label>
1072 <label index="chi">Chinese</label>
1073 <label index="chk">Chuukese</label>
1074 <label index="chm">Mari</label>
1075 <label index="chn">Chinook jargon</label>
1076 <label index="cho">Choctaw</label>
1077 <label index="chp">Chipewyan, Dene Suline</label>
1078 <label index="chr">Cherokee</label>
1079 <label index="chu">Church Slavic, Old Bulgarian</label>
1080 <label index="chv">Chuvash</label>
1081 <label index="chy">Cheyenne</label>
1082 <label index="cmc">Chamic languages</label>
1083 <label index="cop">Coptic</label>
1084 <label index="cor">Cornish</label>
1085 <label index="cos">Corsican</label>
1086 <label index="cpe">English-based Creoles and pidgins</label>
1087 <label index="cpf">French-based Creoles and pidgins</label>
1088 <label index="cpp">Portuguese-based Creoles and pidgins</label>
1089 <label index="cre">Cree</label>
1090 <label index="crh">Crimean Tatar, Crimean Turkish</label>
1091 <label index="crp">Creoles and pidgins</label>
1092 <label index="csb">Kashubian</label>
1093 <label index="cus">Cushitic languages</label>
1094 <label index="cze">Czech</label>
1095 <label index="dak">Dakota</label>
1096 <label index="dan">Danish</label>
1097 <label index="dar">Dargwa</label>
1098 <label index="day">Land Dayak languages</label>
1099 <label index="del">Delaware</label>
1100 <label index="den">Slave (Athapascan)</label>
1101 <label index="dgr">Dogrib</label>
1102 <label index="din">Dinka</label>
1103 <label index="div">Divehi, Dhivehi, Maldivian</label>
1104 <label index="doi">Dogri</label>
1105 <label index="dra">Dravidian languages</label>
1106 <label index="dsb">Lower Sorbian</label>
1107 <label index="dua">Duala</label>
1108 <label index="dum">Middle Dutch (ca.1050-1350)</label>
1109 <label index="dut">Dutch</label>
1110 <label index="dyu">Dyula</label>
1111 <label index="dzo">Dzongkha</label>
1112 <label index="efi">Efik</label>
1113 <label index="egy">Ancient Egyptian</label>
1114 <label index="eka">Ekajuk</label>
1115 <label index="elx">Elamite</label>
1116 <label index="eng">English</label>
1117 <label index="enm">Middle English (1100-1500)</label>
1118 <label index="epo">Esperanto</label>
1119 <label index="est">Estonian</label>
1120 <label index="ewe">Ewe</label>
1121 <label index="ewo">Ewondo</label>
1122 <label index="fan">Fang</label>
1123 <label index="fao">Faroese</label>
1124 <label index="fat">Fanti</label>
1125 <label index="fij">Fijian</label>
1126 <label index="fil">Filipino, Pilipino</label>
1127 <label index="fin">Finnish</label>
1128 <label index="fiu">Finno-Ugrian languages</label>
1129 <label index="fon">Fon</label>
1130 <label index="fre">French</label>
1131 <label index="frm">Middle French (ca.1400-1600)</label>
1132 <label index="fro">Old French (842-ca.1400)</label>
1133 <label index="frr">Northern Frisian</label>
1134 <label index="frs">Eastern Frisian</label>
1135 <label index="fry">Western Frisian</label>
1136 <label index="ful">Fulah</label>
1137 <label index="fur">Friulian</label>
1138 <label index="gaa">Ga</label>
1139 <label index="gay">Gayo</label>
1140 <label index="gba">Gbaya</label>
1141 <label index="gem">Germanic languages</label>
1142 <label index="geo">Georgian</label>
1143 <label index="ger">German</label>
1144 <label index="gez">Geez</label>
1145 <label index="gil">Gilbertese</label>
1146 <label index="gla">Gaelic, Scottish Gaelic</label>
1147 <label index="gle">Irish</label>
1148 <label index="glg">Galician</label>
1149 <label index="glv">Manx</label>
1150 <label index="gmh">Middle High German (ca.1050-1500)</label>
1151 <label index="goh">Old High German (ca.750-1050)</label>
1152 <label index="gon">Gondi</label>
1153 <label index="gor">Gorontalo</label>
1154 <label index="got">Gothic</label>
1155 <label index="grb">Grebo</label>
1156 <label index="grc">Ancient Greek (to 1453)</label>
1157 <label index="gre">Modern Greek (1453-)</label>
1158 <label index="grn">Guarani</label>
1159 <label index="gsw">Swiss German, Alemannic, Alsatian</label>
1160 <label index="guj">Gujarati</label>
1161 <label index="gwi">Gwich'in</label>
1162 <label index="hai">Haida</label>
1163 <label index="hat">Haitian, Haitian Creole</label>
1164 <label index="hau">Hausa</label>
1165 <label index="haw">Hawaiian</label>
1166 <label index="heb">Hebrew</label>
1167 <label index="her">Herero</label>
1168 <label index="hil">Hiligaynon</label>
1169 <label index="him">Himachali languages, Western Pahari languages</label>
1170 <label index="hin">Hindi</label>
1171 <label index="hit">Hittite</label>
1172 <label index="hmn">Hmong, Mong</label>
1173 <label index="hmo">Hiri Motu</label>
1174 <label index="hrv">Croatian</label>
1175 <label index="hsb">Upper Sorbian</label>
1176 <label index="hun">Hungarian</label>
1177 <label index="hup">Hupa</label>
1178 <label index="iba">Iban</label>
1179 <label index="ibo">Igbo</label>
1180 <label index="ice">Icelandic</label>
1181 <label index="ido">Ido</label>
1182 <label index="iii">Sichuan Yi, Nuosu</label>
1183 <label index="ijo">Ijo languages</label>
1184 <label index="iku">Inuktitut</label>
1185 <label index="ile">Interlingue, Occidental</label>
1186 <label index="ilo">Iloko</label>
1187 <label index="ina">Interlingua</label>
1188 <label index="inc">Indic languages</label>
1189 <label index="ind">Indonesian</label>
1190 <label index="ine">Indo-European languages</label>
1191 <label index="inh">Ingush</label>
1192 <label index="ipk">Inupiak</label>
1193 <label index="ira">Iranian languages</label>
1194 <label index="iro">Iroquoian languages</label>
1195 <label index="ita">Italian</label>
1196 <label index="jav">Javanese</label>
1197 <label index="jaw">Javanese</label>
1198 <label index="jbo">Lojban</label>
1199 <label index="jpn">Japanese</label>
1200 <label index="jpr">Judeo-Persian</label>
1201 <label index="jrb">Judeo-Arabic</label>
1202 <label index="kaa">Kara-Kalpak</label>
1203 <label index="kab">Kabyle</label>
1204 <label index="kac">Kachin, Jingpho</label>
1205 <label index="kal">Kalaallisut, Greenlandic</label>
1206 <label index="kam">Kamba</label>
1207 <label index="kan">Kannada</label>
1208 <label index="kar">Karen languages</label>
1209 <label index="kas">Kashmiri</label>
1210 <label index="kau">Kanuri</label>
1211 <label index="kaw">Kawi</label>
1212 <label index="kaz">Kazakh</label>
1213 <label index="kbd">Kabardian</label>
1214 <label index="kha">Khasi</label>
1215 <label index="khi">Khoisan languages</label>
1216 <label index="khm">Khmer</label>
1217 <label index="kho">Khotanese, Sakan</label>
1218 <label index="kik">Kikuyu, Gikuyu</label>
1219 <label index="kin">Kinyarwanda</label>
1220 <label index="kir">Kirghiz, Kyrgyz</label>
1221 <label index="kmb">Kimbundu</label>
1222 <label index="kok">Konkani</label>
1223 <label index="kom">Komi</label>
1224 <label index="kon">Kongo</label>
1225 <label index="kor">Korean</label>
1226 <label index="kos">Kosraean</label>
1227 <label index="kpe">Kpelle</label>
1228 <label index="krc">Karachay-Balkar</label>
1229 <label index="krl">Karelian</label>
1230 <label index="kro">Kru languages</label>
1231 <label index="kru">Kurukh</label>
1232 <label index="kua">Kuanyama, Kwanyama</label>
1233 <label index="kum">Kumyk</label>
1234 <label index="kur">Kurdish</label>
1235 <label index="kut">Kutenai</label>
1236 <label index="lad">Ladino</label>
1237 <label index="lah">Lahnda</label>
1238 <label index="lam">Lamba</label>
1239 <label index="lao">Lao</label>
1240 <label index="lat">Latin</label>
1241 <label index="lav">Latvian</label>
1242 <label index="lez">Lezghian</label>
1243 <label index="lim">Limburgan, Limburgish</label>
1244 <label index="lin">Lingala</label>
1245 <label index="lit">Lithuanian</label>
1246 <label index="lol">Mongo</label>
1247 <label index="loz">Lozi</label>
1248 <label index="ltz">Luxembourgish, Letzeburgesch</label>
1249 <label index="lua">Luba-Lulua</label>
1250 <label index="lub">Luba-Katanga</label>
1251 <label index="lug">Ganda</label>
1252 <label index="lui">Luiseno</label>
1253 <label index="lun">Lunda</label>
1254 <label index="luo">Luo (Kenya and Tanzania)</label>
1255 <label index="lus">Lushai</label>
1256 <label index="mac">Macedonian</label>
1257 <label index="mad">Madurese</label>
1258 <label index="mag">Magahi</label>
1259 <label index="mah">Marshallese</label>
1260 <label index="mai">Maithili</label>
1261 <label index="mak">Makasar</label>
1262 <label index="mal">Malayalam</label>
1263 <label index="man">Mandingo</label>
1264 <label index="mao">Maori</label>
1265 <label index="map">Austronesian languages</label>
1266 <label index="mar">Marathi</label>
1267 <label index="mas">Masai</label>
1268 <label index="may">Malay</label>
1269 <label index="mdf">Moksha</label>
1270 <label index="mdr">Mandar</label>
1271 <label index="men">Mende</label>
1272 <label index="mga">Middle Irish (900-1200)</label>
1273 <label index="mic">Mi'kmaq, Micmac</label>
1274 <label index="min">Minangkabau</label>
1275 <label index="mis">Uncoded languages</label>
1276 <label index="mkh">Mon-Khmer languages</label>
1277 <label index="mlg">Malagasy</label>
1278 <label index="mlt">Maltese</label>
1279 <label index="mnc">Manchu</label>
1280 <label index="mni">Manipuri</label>
1281 <label index="mno">Manobo languages</label>
1282 <label index="moh">Mohawk</label>
1283 <label index="mol">Moldavian</label>
1284 <label index="mon">Mongolian</label>
1285 <label index="mos">Mossi</label>
1286 <label index="mul">Multiple languages</label>
1287 <label index="mun">Munda languages</label>
1288 <label index="mus">Creek</label>
1289 <label index="mwl">Mirandese</label>
1290 <label index="mwr">Marwari</label>
1291 <label index="myn">Mayan languages</label>
1292 <label index="myv">Erzya</label>
1293 <label index="nah">Nahuatl languages</label>
1294 <label index="nai">North American Indian languages</label>
1295 <label index="nap">Neapolitan</label>
1296 <label index="nau">Nauru</label>
1297 <label index="nav">Navajo, Navaho</label>
1298 <label index="nbl">South Ndebele</label>
1299 <label index="nde">North Ndebele</label>
1300 <label index="ndo">Ndonga</label>
1301 <label index="nds">Low German, Low Saxon</label>
1302 <label index="nep">Nepali</label>
1303 <label index="new">Newari, Nepal Bhasa</label>
1304 <label index="nia">Nias</label>
1305 <label index="nic">Niger-Kordofanian languages</label>
1306 <label index="niu">Niuean</label>
1307 <label index="nno">Norwegian Nynorsk</label>
1308 <label index="nob">Norwegian Bokmål</label>
1309 <label index="nog">Nogai</label>
1310 <label index="non">Old Norse</label>
1311 <label index="nor">Norwegian</label>
1312 <label index="nqo">N'Ko</label>
1313 <label index="nso">Pedi, Sepedi, Northern Sotho</label>
1314 <label index="nub">Nubian languages</label>
1315 <label index="nwc">Classical Newari, Classical Nepal Bhasa</label>
1316 <label index="nya">Chichewa, Chewa, Nyanja</label>
1317 <label index="nym">Nyamwezi</label>
1318 <label index="nyn">Nyankole</label>
1319 <label index="nyo">Nyoro</label>
1320 <label index="nzi">Nzima</label>
1321 <label index="oci">Occitan (post 1500), Provençal</label>
1322 <label index="oji">Ojibwa</label>
1323 <label index="ori">Oriya</label>
1324 <label index="orm">Oromo</label>
1325 <label index="osa">Osage</label>
1326 <label index="oss">Ossetian, Ossetic</label>
1327 <label index="ota">Ottoman Turkish (1500-1928)</label>
1328 <label index="oto">Otomian languages</label>
1329 <label index="paa">Papuan languages</label>
1330 <label index="pag">Pangasinan</label>
1331 <label index="pal">Pahlavi</label>
1332 <label index="pam">Pampanga, Kapampangan</label>
1333 <label index="pan">Panjabi, Punjabi</label>
1334 <label index="pap">Papiamento</label>
1335 <label index="pau">Palauan</label>
1336 <label index="peo">Old Persian (ca.600-400 BCE)</label>
1337 <label index="per">Persian</label>
1338 <label index="phi">Philippine languages</label>
1339 <label index="phn">Phoenician</label>
1340 <label index="pli">Pali</label>
1341 <label index="pol">Polish</label>
1342 <label index="pon">Pohnpeian</label>
1343 <label index="por">Portuguese</label>
1344 <label index="pra">Prakrit languages</label>
1345 <label index="pro">Old Provençal (to 1500)</label>
1346 <label index="pus">Pushto</label>
1347 <label index="que">Quechua</label>
1348 <label index="raj">Rajasthani</label>
1349 <label index="rap">Rapanui</label>
1350 <label index="rar">Rarotongan, Cook Islands Maori</label>
1351 <label index="roa">Romance languages</label>
1352 <label index="roh">Romansh</label>
1353 <label index="rom">Romany</label>
1354 <label index="rum">Romanian, Moldavian</label>
1355 <label index="run">Rundi</label>
1356 <label index="rup">Aromanian, Arumanian, Macedo-Romanian</label>
1357 <label index="rus">Russian</label>
1358 <label index="sad">Sandawe</label>
1359 <label index="sag">Sango</label>
1360 <label index="sah">Yakut</label>
1361 <label index="sai">South American Indian</label>
1362 <label index="sal">Salishan languages</label>
1363 <label index="sam">Samaritan Aramaic</label>
1364 <label index="san">Sanskrit</label>
1365 <label index="sas">Sasak</label>
1366 <label index="sat">Santali</label>
1367 <label index="scn">Sicilian</label>
1368 <label index="sco">Scots</label>
1369 <label index="sel">Selkup</label>
1370 <label index="sem">Semitic languages</label>
1371 <label index="sga">Old Irish (to 900)</label>
1372 <label index="sgn">Sign Languages</label>
1373 <label index="shn">Shan</label>
1374 <label index="sid">Sidamo</label>
1375 <label index="sin">Sinhalese</label>
1376 <label index="sio">Siouan languages</label>
1377 <label index="sit">Sino-Tibetan languages</label>
1378 <label index="sla">Slavic languages</label>
1379 <label index="slo">Slovak</label>
1380 <label index="slv">Slovenian</label>
1381 <label index="sma">Southern Sami</label>
1382 <label index="sme">Northern Sami</label>
1383 <label index="smi">Sami languages</label>
1384 <label index="smj">Lule Sami</label>
1385 <label index="smn">Inari Sami</label>
1386 <label index="smo">Samoan</label>
1387 <label index="sms">Skolt Sami</label>
1388 <label index="sna">Shona</label>
1389 <label index="snd">Sindhi</label>
1390 <label index="snk">Soninke</label>
1391 <label index="sog">Sogdian</label>
1392 <label index="som">Somali</label>
1393 <label index="son">Songhai languages</label>
1394 <label index="sot">Southern Sotho</label>
1395 <label index="spa">Spanish, Castilian</label>
1396 <label index="srd">Sardinian</label>
1397 <label index="srn">Sranan Tongo</label>
1398 <label index="srp">Serbian</label>
1399 <label index="srr">Serer</label>
1400 <label index="ssa">Nilo-Saharan languages</label>
1401 <label index="ssw">Swati</label>
1402 <label index="suk">Sukuma</label>
1403 <label index="sun">Sundanese</label>
1404 <label index="sus">Susu</label>
1405 <label index="sux">Sumerian</label>
1406 <label index="swa">Swahili</label>
1407 <label index="swe">Swedish</label>
1408 <label index="syc">Classical Syriac</label>
1409 <label index="syr">Syriac</label>
1410 <label index="tah">Tahitian</label>
1411 <label index="tai">Tai languages</label>
1412 <label index="tam">Tamil</label>
1413 <label index="tat">Tatar</label>
1414 <label index="tel">Telugu</label>
1415 <label index="tem">Timne</label>
1416 <label index="ter">Tereno</label>
1417 <label index="tet">Tetum</label>
1418 <label index="tgk">Tajik</label>
1419 <label index="tgl">Tagalog</label>
1420 <label index="tha">Thai</label>
1421 <label index="tib">Tibetan</label>
1422 <label index="tig">Tigre</label>
1423 <label index="tir">Tigrinya</label>
1424 <label index="tiv">Tiv</label>
1425 <label index="tkl">Tokelau</label>
1426 <label index="tlh">Klingon</label>
1427 <label index="tli">Tlingit</label>
1428 <label index="tmh">Tamashek</label>
1429 <label index="tog">Tonga (Nyasa)</label>
1430 <label index="ton">Tonga (Tonga Islands)</label>
1431 <label index="tpi">Tok Pisin</label>
1432 <label index="tsi">Tsimshian</label>
1433 <label index="tsn">Tswana</label>
1434 <label index="tso">Tsonga</label>
1435 <label index="tuk">Turkmen</label>
1436 <label index="tum">Tumbuka</label>
1437 <label index="tup">Tupi languages</label>
1438 <label index="tur">Turkish</label>
1439 <label index="tut">Altaic languages</label>
1440 <label index="tvl">Tuvalu</label>
1441 <label index="twi">Twi</label>
1442 <label index="tyv">Tuvinian</label>
1443 <label index="udm">Udmurt</label>
1444 <label index="uga">Ugaritic</label>
1445 <label index="uig">Uighur</label>
1446 <label index="ukr">Ukrainian</label>
1447 <label index="umb">Umbundu</label>
1448 <label index="und">Undetermined</label>
1449 <label index="urd">Urdu</label>
1450 <label index="uzb">Uzbek</label>
1451 <label index="vai">Vai</label>
1452 <label index="ven">Venda</label>
1453 <label index="vie">Vietnamese</label>
1454 <label index="vol">Volapük</label>
1455 <label index="vot">Votic</label>
1456 <label index="wak">Wakashan languages</label>
1457 <label index="wal">Walamo</label>
1458 <label index="war">Waray</label>
1459 <label index="was">Washo</label>
1460 <label index="wel">Welsh</label>
1461 <label index="wen">Sorbian languages</label>
1462 <label index="wln">Walloon</label>
1463 <label index="wol">Wolof</label>
1464 <label index="xal">Kalmyk, Oirat</label>
1465 <label index="xho">Xhosa</label>
1466 <label index="yao">Yao</label>
1467 <label index="yap">Yapese</label>
1468 <label index="yid">Yiddish</label>
1469 <label index="yor">Yoruba</label>
1470 <label index="ypk">Yupik languages</label>
1471 <label index="zap">Zapotec</label>
1472 <label index="zbl">Blissymbolics</label>
1473 <label index="zen">Zenaga</label>
1474 <label index="zha">Zhuang</label>
1475 <label index="znd">Zande languages</label>
1476 <label index="zul">Zulu</label>
1477 <label index="zun">Zuni</label>
1478 <label index="zxx">No linguistic content</label>
1479 <label index="zza">Zazaki</label>
1480 </languageKey>
1481 <languageKey index="de" type="array">
1482 <label index="aar">Danakil-Sprache</label>
1483 <label index="abk">Abchasisch</label>
1484 <label index="ace">Aceh-Sprache</label>
1485 <label index="ach">Acholi-Sprache</label>
1486 <label index="ada">Adangme-Sprache</label>
1487 <label index="ady">Adygisch</label>
1488 <label index="afa">Hamitosemitische Sprachen</label>
1489 <label index="afh">Afrihili</label>
1490 <label index="afr">Afrikaans</label>
1491 <label index="ain">Ainu-Sprache</label>
1492 <label index="aka">Akan-Sprache</label>
1493 <label index="akk">Akkadisch</label>
1494 <label index="alb">Albanisch</label>
1495 <label index="ale">Aleutisch</label>
1496 <label index="alg">Algonkin-Sprachen</label>
1497 <label index="alt">Altaisch</label>
1498 <label index="amh">Amharisch</label>
1499 <label index="ang">Altenglisch (ca.450-1100)</label>
1500 <label index="anp">Anga-Sprache</label>
1501 <label index="apa">Apachen-Sprachen</label>
1502 <label index="ara">Arabisch</label>
1503 <label index="arc">Aramäisch (700-300 v.Chr.)</label>
1504 <label index="arg">Aragonesisch</label>
1505 <label index="arm">Armenisch</label>
1506 <label index="arn">Arauka-Sprachen</label>
1507 <label index="arp">Arapaho-Sprache</label>
1508 <label index="art">Kunstsprachen</label>
1509 <label index="arw">Arawak-Sprachen</label>
1510 <label index="asm">Assamesisch</label>
1511 <label index="ast">Asturisch</label>
1512 <label index="ath">Athapaskische Sprachen</label>
1513 <label index="aus">Australische Sprachen</label>
1514 <label index="ava">Awarisch</label>
1515 <label index="ave">Avestisch</label>
1516 <label index="awa">Awadhī</label>
1517 <label index="aym">Aymará-Sprache</label>
1518 <label index="aze">Aserbeidschanisch</label>
1519 <label index="bad">Banda-Sprachen (Ubangi-Sprachen)</label>
1520 <label index="bai">Bamileke-Sprachen</label>
1521 <label index="bak">Baschkirisch</label>
1522 <label index="bal">Belutschisch</label>
1523 <label index="bam">Bambara-Sprache</label>
1524 <label index="ban">Balinesisch</label>
1525 <label index="baq">Baskisch</label>
1526 <label index="bas">Basaa-Sprache</label>
1527 <label index="bat">Baltische Sprachen</label>
1528 <label index="bej">Bedauye</label>
1529 <label index="bel">Weißrussisch</label>
1530 <label index="bem">Bemba-Sprache</label>
1531 <label index="ben">Bengali</label>
1532 <label index="ber">Berbersprachen</label>
1533 <label index="bho">Bhojpurī</label>
1534 <label index="bih">Bihari</label>
1535 <label index="bik">Bikol-Sprache</label>
1536 <label index="bin">Edo-Sprache</label>
1537 <label index="bis">Beach-la-mar</label>
1538 <label index="bla">Blackfoot-Sprache</label>
1539 <label index="bnt">Bantusprachen</label>
1540 <label index="bos">Bosnisch</label>
1541 <label index="bra">Braj-Bhakha</label>
1542 <label index="bre">Bretonisch</label>
1543 <label index="btk">Batak-Sprache</label>
1544 <label index="bua">Burjatisch</label>
1545 <label index="bug">Bugi-Sprache</label>
1546 <label index="bul">Bulgarisch</label>
1547 <label index="bur">Birmanisch</label>
1548 <label index="byn">Bilin-Sprache</label>
1549 <label index="cad">Caddo-Sprachen</label>
1550 <label index="cai">Zentralamerikanische Indianersprachen</label>
1551 <label index="car">Karibische Sprachen</label>
1552 <label index="cat">Katalanisch</label>
1553 <label index="cau">Kaukasische Sprachen</label>
1554 <label index="ceb">Cebuano</label>
1555 <label index="cel">Keltische Sprachen</label>
1556 <label index="cha">Chamorro-Sprache</label>
1557 <label index="chb">Chibcha-Sprachen</label>
1558 <label index="che">Tschetschenisch</label>
1559 <label index="chg">Tschagataisch</label>
1560 <label index="chi">Chinesisch</label>
1561 <label index="chk">Trukesisch</label>
1562 <label index="chm">Tscheremissisch</label>
1563 <label index="chn">Chinook-Jargon</label>
1564 <label index="cho">Choctaw-Sprache</label>
1565 <label index="chp">Chipewyan-Sprache</label>
1566 <label index="chr">Cherokee-Sprache</label>
1567 <label index="chu">Kirchenslawisch</label>
1568 <label index="chv">Tschuwaschisch</label>
1569 <label index="chy">Cheyenne-Sprache</label>
1570 <label index="cmc">Cham-Sprachen</label>
1571 <label index="cop">Koptisch</label>
1572 <label index="cor">Kornisch</label>
1573 <label index="cos">Korsisch</label>
1574 <label index="cpe">Kreolisch-Englisch</label>
1575 <label index="cpf">Kreolisch-Französisch</label>
1576 <label index="cpp">Kreolisch-Portugiesisch</label>
1577 <label index="cre">Cree-Sprache</label>
1578 <label index="crh">Krimtatarisch</label>
1579 <label index="crp">Kreolische Sprachen, Pidginsprachen</label>
1580 <label index="csb">Kaschubisch</label>
1581 <label index="cus">Kuschitische Sprachen</label>
1582 <label index="cze">Tschechisch</label>
1583 <label index="dak">Dakota-Sprache</label>
1584 <label index="dan">Dänisch</label>
1585 <label index="dar">Darginisch</label>
1586 <label index="day">Dajakisch</label>
1587 <label index="del">Delaware-Sprache</label>
1588 <label index="den">Slave-Sprache</label>
1589 <label index="dgr">Dogrib-Sprache</label>
1590 <label index="din">Dinka-Sprache</label>
1591 <label index="div">Maledivisch</label>
1592 <label index="doi">Dogrī</label>
1593 <label index="dra">Drawidische Sprachen</label>
1594 <label index="dsb">Niedersorbisch</label>
1595 <label index="dua">Duala-Sprachen</label>
1596 <label index="dum">Mittelniederländisch (ca.1050-1350)</label>
1597 <label index="dut">Niederländisch</label>
1598 <label index="dyu">Dyula-Sprache</label>
1599 <label index="dzo">Dzongkha</label>
1600 <label index="efi">Efik</label>
1601 <label index="egy">Ägyptisch</label>
1602 <label index="eka">Ekajuk</label>
1603 <label index="elx">Elamisch</label>
1604 <label index="eng">Englisch</label>
1605 <label index="enm">Mittelenglisch (1100-1500)</label>
1606 <label index="epo">Esperanto</label>
1607 <label index="est">Estnisch</label>
1608 <label index="ewe">Ewe-Sprache</label>
1609 <label index="ewo">Ewondo</label>
1610 <label index="fan">Pangwe-Sprache</label>
1611 <label index="fao">Färöisch</label>
1612 <label index="fat">Fante-Sprache</label>
1613 <label index="fij">Fidschi-Sprache</label>
1614 <label index="fil">Pilipino</label>
1615 <label index="fin">Finnisch</label>
1616 <label index="fiu">Finnougrische Sprachen</label>
1617 <label index="fon">Fon-Sprache</label>
1618 <label index="fre">Französisch</label>
1619 <label index="frm">Mittelfranzösisch (ca.1400-1600)</label>
1620 <label index="fro">Altfranzösisch (842-ca.1400)</label>
1621 <label index="frr">Nordfriesisch</label>
1622 <label index="frs">Ostfriesisch</label>
1623 <label index="fry">Friesisch</label>
1624 <label index="ful">Ful</label>
1625 <label index="fur">Friulisch</label>
1626 <label index="gaa">Ga-Sprache</label>
1627 <label index="gay">Gayo-Sprache</label>
1628 <label index="gba">Gbaya-Sprache</label>
1629 <label index="gem">Germanische Sprachen</label>
1630 <label index="geo">Georgisch</label>
1631 <label index="ger">Deutsch</label>
1632 <label index="gez">Altäthiopisch</label>
1633 <label index="gil">Gilbertesisch</label>
1634 <label index="gla">Gälisch-Schottisch</label>
1635 <label index="gle">Irisch</label>
1636 <label index="glg">Galicisch</label>
1637 <label index="glv">Manx</label>
1638 <label index="gmh">Mittelhochdeutsch (ca.1050-1500)</label>
1639 <label index="goh">Althochdeutsch (ca.750-1050)</label>
1640 <label index="gon">Gondi-Sprache</label>
1641 <label index="gor">Gorontalesisch</label>
1642 <label index="got">Gotisch</label>
1643 <label index="grb">Grebo-Sprache</label>
1644 <label index="grc">Griechisch (bis 1453)</label>
1645 <label index="gre">Neugriechisch (ab 1453)</label>
1646 <label index="grn">Guaraní-Sprache</label>
1647 <label index="gsw">Schweizerdeutsch</label>
1648 <label index="guj">Gujarātī-Sprache</label>
1649 <label index="gwi">Kutchin-Sprache</label>
1650 <label index="hai">Haida-Sprache</label>
1651 <label index="hat">Haïtien (Haiti-Kreolisch)</label>
1652 <label index="hau">Haussa-Sprache</label>
1653 <label index="haw">Hawaiisch</label>
1654 <label index="heb">Hebräisch</label>
1655 <label index="her">Herero-Sprache</label>
1656 <label index="hil">Hiligaynon-Sprache</label>
1657 <label index="him">Himachali</label>
1658 <label index="hin">Hindi</label>
1659 <label index="hit">Hethitisch</label>
1660 <label index="hmn">Miao-Sprachen</label>
1661 <label index="hmo">Hiri-Motu</label>
1662 <label index="hrv">Kroatisch</label>
1663 <label index="hsb">Obersorbisch</label>
1664 <label index="hun">Ungarisch</label>
1665 <label index="hup">Hupa-Sprache</label>
1666 <label index="iba">Iban-Sprache</label>
1667 <label index="ibo">Ibo-Sprache</label>
1668 <label index="ice">Isländisch</label>
1669 <label index="ido">Ido</label>
1670 <label index="iii">Lalo-Sprache</label>
1671 <label index="ijo">Ijo-Sprache</label>
1672 <label index="iku">Inuktitut</label>
1673 <label index="ile">Interlingue</label>
1674 <label index="ilo">Ilokano-Sprache</label>
1675 <label index="ina">Interlingua</label>
1676 <label index="inc">Indoarische Sprachen</label>
1677 <label index="ind">Bahasa Indonesia</label>
1678 <label index="ine">Indogermanische Sprachen</label>
1679 <label index="inh">Inguschisch</label>
1680 <label index="ipk">Inupik</label>
1681 <label index="ira">Iranische Sprachen</label>
1682 <label index="iro">Irokesische Sprachen</label>
1683 <label index="ita">Italienisch</label>
1684 <label index="jav">Javanisch</label>
1685 <label index="jbo">Lojban</label>
1686 <label index="jpn">Japanisch</label>
1687 <label index="jpr">Jüdisch-Persisch</label>
1688 <label index="jrb">Jüdisch-Arabisch</label>
1689 <label index="kaa">Karakalpakisch</label>
1690 <label index="kab">Kabylisch</label>
1691 <label index="kac">Kachin-Sprache</label>
1692 <label index="kal">Grönländisch</label>
1693 <label index="kam">Kamba-Sprache</label>
1694 <label index="kan">Kannada</label>
1695 <label index="kar">Karenisch</label>
1696 <label index="kas">Kaschmiri</label>
1697 <label index="kau">Kanuri-Sprache</label>
1698 <label index="kaw">Kawi</label>
1699 <label index="kaz">Kasachisch</label>
1700 <label index="kbd">Kabardinisch</label>
1701 <label index="kha">Khasi-Sprache</label>
1702 <label index="khi">Khoisan-Sprachen</label>
1703 <label index="khm">Kambodschanisch</label>
1704 <label index="kho">Sakisch</label>
1705 <label index="kik">Kikuyu-Sprache</label>
1706 <label index="kin">Rwanda-Sprache</label>
1707 <label index="kir">Kirgisisch</label>
1708 <label index="kmb">Kimbundu-Sprache</label>
1709 <label index="kok">Konkani</label>
1710 <label index="kom">Komi-Sprache</label>
1711 <label index="kon">Kongo-Sprache</label>
1712 <label index="kor">Koreanisch</label>
1713 <label index="kos">Kosraeanisch</label>
1714 <label index="kpe">Kpelle-Sprache</label>
1715 <label index="krc">Karatschaiisch-Balkarisch</label>
1716 <label index="krl">Karelisch</label>
1717 <label index="kro">Kru-Sprachen</label>
1718 <label index="kru">Oraon-Sprache</label>
1719 <label index="kua">Kwanyama-Sprache</label>
1720 <label index="kum">Kumükisch</label>
1721 <label index="kur">Kurdisch</label>
1722 <label index="kut">Kutenai-Sprache</label>
1723 <label index="lad">Judenspanisch</label>
1724 <label index="lah">Lahndā</label>
1725 <label index="lam">Lamba-Sprache (Bantusprache)</label>
1726 <label index="lao">Laotisch</label>
1727 <label index="lat">Latein</label>
1728 <label index="lav">Lettisch</label>
1729 <label index="lez">Lesgisch</label>
1730 <label index="lim">Limburgisch</label>
1731 <label index="lin">Lingala</label>
1732 <label index="lit">Litauisch</label>
1733 <label index="lol">Mongo-Sprache</label>
1734 <label index="loz">Rotse-Sprache</label>
1735 <label index="ltz">Luxemburgisch</label>
1736 <label index="lua">Lulua-Sprache</label>
1737 <label index="lub">Luba-Katanga-Sprache</label>
1738 <label index="lug">Ganda-Sprache</label>
1739 <label index="lui">Luiseño-Sprache</label>
1740 <label index="lun">Lunda-Sprache</label>
1741 <label index="luo">Luo-Sprache</label>
1742 <label index="lus">Lushai-Sprache</label>
1743 <label index="mac">Makedonisch</label>
1744 <label index="mad">Maduresisch</label>
1745 <label index="mag">Khotta</label>
1746 <label index="mah">Marschallesisch</label>
1747 <label index="mai">Maithili</label>
1748 <label index="mak">Makassarisch</label>
1749 <label index="mal">Malayalam</label>
1750 <label index="man">Malinke-Sprache</label>
1751 <label index="mao">Maori-Sprache</label>
1752 <label index="map">Austronesische Sprachen</label>
1753 <label index="mar">Marathi</label>
1754 <label index="mas">Massai-Sprache</label>
1755 <label index="may">Malaiisch</label>
1756 <label index="mdf">Mokscha-Sprache</label>
1757 <label index="mdr">Mandaresisch</label>
1758 <label index="men">Mende-Sprache</label>
1759 <label index="mga">Mittelirisch (900-1200)</label>
1760 <label index="mic">Micmac-Sprache</label>
1761 <label index="min">Minangkabau-Sprache</label>
1762 <label index="mis">Einzelne andere Sprachen</label>
1763 <label index="mkh">Mon-Khmer-Sprachen</label>
1764 <label index="mlg">Malagassi-Sprache</label>
1765 <label index="mlt">Maltesisch</label>
1766 <label index="mnc">Mandschurisch</label>
1767 <label index="mni">Meithei-Sprache</label>
1768 <label index="mno">Manobo-Sprachen</label>
1769 <label index="moh">Mohawk-Sprache</label>
1770 <label index="mol">Moldavisch</label>
1771 <label index="mon">Mongolisch</label>
1772 <label index="mos">Mossi-Sprache</label>
1773 <label index="mul">Mehrere Sprachen</label>
1774 <label index="mun">Mundasprachen</label>
1775 <label index="mus">Muskogisch</label>
1776 <label index="mwl">Mirandesisch</label>
1777 <label index="mwr">Mārwārī</label>
1778 <label index="myn">Maya-Sprachen</label>
1779 <label index="myv">Erza-Mordwinisch</label>
1780 <label index="nah">Nahuatl</label>
1781 <label index="nai">Nordamerikanische Indianersprachen</label>
1782 <label index="nap">Neapel (Mundart)</label>
1783 <label index="nau">Nauruanisch</label>
1784 <label index="nav">Navajo-Sprache</label>
1785 <label index="nbl">Ndebele-Sprache (Transvaal)</label>
1786 <label index="nde">Ndebele-Sprache (Simbabwe)</label>
1787 <label index="ndo">Ndonga</label>
1788 <label index="nds">Niederdeutsch</label>
1789 <label index="nep">Nepali</label>
1790 <label index="new">Newārī</label>
1791 <label index="nia">Nias-Sprache</label>
1792 <label index="nic">Nigerkordofanische Sprachen</label>
1793 <label index="niu">Niue-Sprache</label>
1794 <label index="nno">Nynorsk</label>
1795 <label index="nob">Bokmål</label>
1796 <label index="nog">Nogaisch</label>
1797 <label index="non">Altnorwegisch</label>
1798 <label index="nor">Norwegisch</label>
1799 <label index="nqo">N'Ko</label>
1800 <label index="nso">Pedi-Sprache</label>
1801 <label index="nub">Nubische Sprachen</label>
1802 <label index="nwc">Alt-Newārī</label>
1803 <label index="nya">Nyanja-Sprache</label>
1804 <label index="nym">Nyamwezi-Sprache</label>
1805 <label index="nyn">Nkole-Sprache</label>
1806 <label index="nyo">Nyoro-Sprache</label>
1807 <label index="nzi">Nzima-Sprache</label>
1808 <label index="oci">Okzitanisch (ab 1500)</label>
1809 <label index="oji">Ojibwa-Sprache</label>
1810 <label index="ori">Oriya-Sprache</label>
1811 <label index="orm">Galla-Sprache</label>
1812 <label index="osa">Osage-Sprache</label>
1813 <label index="oss">Ossetisch</label>
1814 <label index="ota">Osmanisch (1500-1928)</label>
1815 <label index="oto">Otomangue-Sprachen</label>
1816 <label index="paa">Papuasprachen</label>
1817 <label index="pag">Pangasinan-Sprache</label>
1818 <label index="pal">Mittelpersisch</label>
1819 <label index="pam">Pampanggan-Sprache</label>
1820 <label index="pan">Pandschabi-Sprache</label>
1821 <label index="pap">Papiamento</label>
1822 <label index="pau">Palau-Sprache</label>
1823 <label index="peo">Altpersisch (ca.600-400 v.Chr.)</label>
1824 <label index="per">Persisch</label>
1825 <label index="phi">Philippinisch-Austronesisch</label>
1826 <label index="phn">Phönikisch</label>
1827 <label index="pli">Pāli</label>
1828 <label index="pol">Polnisch</label>
1829 <label index="pon">Ponapeanisch</label>
1830 <label index="por">Portugiesisch</label>
1831 <label index="pra">Prākrit</label>
1832 <label index="pro">Altokzitanisch (bis 1500)</label>
1833 <label index="pus">Paschtu</label>
1834 <label index="que">Quechua-Sprache</label>
1835 <label index="raj">Rājasthānī</label>
1836 <label index="rap">Osterinsel-Sprache</label>
1837 <label index="rar">Rarotonganisch</label>
1838 <label index="roa">Romanische Sprachen</label>
1839 <label index="roh">Rätoromanisch</label>
1840 <label index="rom">Romani (Sprache)</label>
1841 <label index="rum">Rumänisch</label>
1842 <label index="run">Rundi-Sprache</label>
1843 <label index="rup">Aromunisch</label>
1844 <label index="rus">Russisch</label>
1845 <label index="sad">Sandawe-Sprache</label>
1846 <label index="sag">Sango-Sprache</label>
1847 <label index="sah">Jakutisch</label>
1848 <label index="sai">Südamerikanische Indianersprachen</label>
1849 <label index="sal">Salish-Sprache</label>
1850 <label index="sam">Samaritanisch</label>
1851 <label index="san">Sanskrit</label>
1852 <label index="sas">Sasak</label>
1853 <label index="sat">Santālī</label>
1854 <label index="scn">Sizilianisch</label>
1855 <label index="sco">Schottisch</label>
1856 <label index="sel">Selkupisch</label>
1857 <label index="sem">Semitische Sprachen</label>
1858 <label index="sga">Altirisch (bis 900)</label>
1859 <label index="sgn">Zeichensprachen</label>
1860 <label index="shn">Schan-Sprache</label>
1861 <label index="sid">Sidamo-Sprache</label>
1862 <label index="sin">Singhalesisch</label>
1863 <label index="sio">Sioux-Sprachen</label>
1864 <label index="sit">Sinotibetische Sprachen</label>
1865 <label index="sla">Slawische Sprachen</label>
1866 <label index="slo">Slowakisch</label>
1867 <label index="slv">Slowenisch</label>
1868 <label index="sma">Südsaamisch</label>
1869 <label index="sme">Nordsaamisch</label>
1870 <label index="smi">Saamisch</label>
1871 <label index="smj">Lulesaamisch</label>
1872 <label index="smn">Inarisaamisch</label>
1873 <label index="smo">Samoanisch</label>
1874 <label index="sms">Skoltsaamisch</label>
1875 <label index="sna">Schona-Sprache</label>
1876 <label index="snd">Sindhi-Sprache</label>
1877 <label index="snk">Soninke-Sprache</label>
1878 <label index="sog">Sogdisch</label>
1879 <label index="som">Somali</label>
1880 <label index="son">Songhai-Sprache</label>
1881 <label index="sot">Süd-Sotho-Sprache</label>
1882 <label index="spa">Spanisch</label>
1883 <label index="srd">Sardisch</label>
1884 <label index="srn">Sranantongo</label>
1885 <label index="srp">Serbisch</label>
1886 <label index="srr">Serer-Sprache</label>
1887 <label index="ssa">Nilosaharanische Sprachen</label>
1888 <label index="ssw">Swasi-Sprache</label>
1889 <label index="suk">Sukuma-Sprache</label>
1890 <label index="sun">Sundanesisch</label>
1891 <label index="sus">Susu</label>
1892 <label index="sux">Sumerisch</label>
1893 <label index="swa">Swahili</label>
1894 <label index="swe">Schwedisch</label>
1895 <label index="syc">Syrisch</label>
1896 <label index="syr">Neuostaramäisch</label>
1897 <label index="tah">Tahitisch</label>
1898 <label index="tai">Thaisprachen</label>
1899 <label index="tam">Tamil</label>
1900 <label index="tat">Tatarisch</label>
1901 <label index="tel">Telugu-Sprache</label>
1902 <label index="tem">Temne-Sprache</label>
1903 <label index="ter">Tereno-Sprache</label>
1904 <label index="tet">Tetum-Sprache</label>
1905 <label index="tgk">Tadschikisch</label>
1906 <label index="tgl">Tagalog</label>
1907 <label index="tha">Thailändisch</label>
1908 <label index="tib">Tibetisch</label>
1909 <label index="tig">Tigre-Sprache</label>
1910 <label index="tir">Tigrinja-Sprache</label>
1911 <label index="tiv">Tiv-Sprache</label>
1912 <label index="tkl">Tokelauanisch</label>
1913 <label index="tlh">Klingonisch</label>
1914 <label index="tli">Tlingit-Sprache</label>
1915 <label index="tmh">Tamašeq</label>
1916 <label index="tog">Tonga (Bantusprache, Sambia)</label>
1917 <label index="ton">Tongaisch</label>
1918 <label index="tpi">Neumelanesisch</label>
1919 <label index="tsi">Tsimshian-Sprache</label>
1920 <label index="tsn">Tswana-Sprache</label>
1921 <label index="tso">Tsonga-Sprache</label>
1922 <label index="tuk">Turkmenisch</label>
1923 <label index="tum">Tumbuka-Sprache</label>
1924 <label index="tup">Tupi-Sprache</label>
1925 <label index="tur">Türkisch</label>
1926 <label index="tut">Altaische Sprachen</label>
1927 <label index="tvl">Elliceanisch</label>
1928 <label index="twi">Twi-Sprache</label>
1929 <label index="tyv">Tuwinisch</label>
1930 <label index="udm">Udmurtisch</label>
1931 <label index="uga">Ugaritisch</label>
1932 <label index="uig">Uigurisch</label>
1933 <label index="ukr">Ukrainisch</label>
1934 <label index="umb">Mbundu-Sprache</label>
1935 <label index="und">Nicht zu entscheiden</label>
1936 <label index="urd">Urdu</label>
1937 <label index="uzb">Usbekisch</label>
1938 <label index="vai">Vai-Sprache</label>
1939 <label index="ven">Venda-Sprache</label>
1940 <label index="vie">Vietnamesisch</label>
1941 <label index="vol">Volapük</label>
1942 <label index="vot">Wotisch</label>
1943 <label index="wak">Wakash-Sprachen</label>
1944 <label index="wal">Walamo-Sprache</label>
1945 <label index="war">Waray</label>
1946 <label index="was">Washo-Sprache</label>
1947 <label index="wel">Kymrisch</label>
1948 <label index="wen">Sorbisch</label>
1949 <label index="wln">Wallonisch</label>
1950 <label index="wol">Wolof-Sprache</label>
1951 <label index="xal">Kalmückisch</label>
1952 <label index="xho">Xhosa-Sprache</label>
1953 <label index="yao">Yao-Sprache (Bantusprache)</label>
1954 <label index="yap">Yapesisch</label>
1955 <label index="yid">Jiddisch</label>
1956 <label index="yor">Yoruba-Sprache</label>
1957 <label index="ypk">Ypik-Sprachen</label>
1958 <label index="zap">Zapotekisch</label>
1959 <label index="zbl">Bliss-Symbol</label>
1960 <label index="zen">Zenaga</label>
1961 <label index="zha">Zhuang</label>
1962 <label index="znd">Zande-Sprachen</label>
1963 <label index="zul">Zulu-Sprache</label>
1964 <label index="zun">Zuñi-Sprache</label>
1965 <label index="zxx">Kein linguistischer Inhalt</label>
1966 <label index="zza">Zazaki</label>
1967 </languageKey>
1968 </data>
1969>>>>>>> MERGE-SOURCE
984</T3locallang>1970</T3locallang>
985\ No newline at end of file1971\ No newline at end of file
9861972
=== modified file 'dlf/modules/indexing/index.php'
=== modified file 'dlf/modules/newclient/locallang.xml'
=== modified file 'dlf/modules/newclient/metadata.inc.php'
--- dlf/modules/newclient/metadata.inc.php 2012-09-27 14:45:04 +0000
+++ dlf/modules/newclient/metadata.inc.php 2012-10-10 09:08:30 +0000
@@ -347,8 +347,208 @@
347 'is_sortable' => 0,347 'is_sortable' => 0,
348 'is_facet' => 0,348 'is_facet' => 0,
349 'is_listed' => 0,349 'is_listed' => 0,
350<<<<<<< TREE
350 'autocomplete' => 0,351 'autocomplete' => 0,
351 )352 )
353=======
354 ),
355 'record_id' => array (
356 'encoded' => 1,
357 'xpath' => './mods:recordInfo/mods:recordIdentifier',
358 'xpath_sorting' => '',
359 'default_value' => '',
360 'wrap' => '',
361 'tokenized' => 0,
362 'stored' => 0,
363 'indexed' => 1,
364 'boost' => 1.00,
365 'is_sortable' => 0,
366 'is_facet' => 0,
367 'is_listed' => 0,
368 ),
369 'union_id' => array (
370 'encoded' => 1,
371 'xpath' => './mods:identifier[@type="ppn"]',
372 'xpath_sorting' => '',
373 'default_value' => '',
374 'wrap' => '',
375 'tokenized' => 0,
376 'stored' => 0,
377 'indexed' => 1,
378 'boost' => 1.00,
379 'is_sortable' => 0,
380 'is_facet' => 0,
381 'is_listed' => 0,
382 ),
383 'opac_id' => array (
384 'encoded' => 1,
385 'xpath' => './mods:identifier[@type="opac"]',
386 'xpath_sorting' => '',
387 'default_value' => '',
388 'wrap' => '',
389 'tokenized' => 0,
390 'stored' => 0,
391 'indexed' => 1,
392 'boost' => 1.00,
393 'is_sortable' => 0,
394 'is_facet' => 0,
395 'is_listed' => 0,
396 ),
397 'urn' => array (
398 'encoded' => 1,
399 'xpath' => './mods:identifier[@type="urn"]',
400 'xpath_sorting' => '',
401 'default_value' => '',
402 'wrap' => "key.wrap = <dt>|</dt>\nvalue.setContentToCurrent = 1\nvalue.typolink.parameter.current = 1\nvalue.typolink.parameter.prepend = TEXT\nvalue.typolink.parameter.prepend.value = http://nbn-resolving.de/\nvalue.wrap = <dd>|</dd>",
403 'tokenized' => 0,
404 'stored' => 0,
405 'indexed' => 1,
406 'boost' => 1.00,
407 'is_sortable' => 0,
408 'is_facet' => 0,
409 'is_listed' => 0,
410 ),
411 'purl' => array (
412 'encoded' => 1,
413 'xpath' => './mods:identifier[@type="purl"]',
414 'xpath_sorting' => '',
415 'default_value' => '',
416 'wrap' => "key.wrap = <dt>|</dt>\nvalue.setContentToCurrent = 1\nvalue.typolink.parameter.current = 1\nvalue.wrap = <dd>|</dd>",
417 'tokenized' => 0,
418 'stored' => 0,
419 'indexed' => 0,
420 'boost' => 1.00,
421 'is_sortable' => 0,
422 'is_facet' => 0,
423 'is_listed' => 0,
424 ),
425 'owner' => array (
426 'encoded' => 1,
427 'xpath' => './mods:name[./mods:role/mods:roleTerm="own"]/mods:displayForm',
428 'xpath_sorting' => '',
429 'default_value' => '',
430 'wrap' => '',
431 'tokenized' => 0,
432 'stored' => 0,
433 'indexed' => 1,
434 'boost' => 1.00,
435 'is_sortable' => 0,
436 'is_facet' => 1,
437 'is_listed' => 0,
438 ),
439 'collection' => array (
440 'encoded' => 1,
441 'xpath' => './mods:relatedItem[@type="series"]/mods:titleInfo/mods:title',
442 'xpath_sorting' => '',
443 'default_value' => '',
444 'wrap' => '',
445 'tokenized' => 1,
446 'stored' => 0,
447 'indexed' => 1,
448 'boost' => 1.00,
449 'is_sortable' => 0,
450 'is_facet' => 1,
451 'is_listed' => 0,
452 ),
453 'language' => array (
454 'encoded' => 1,
455 'xpath' => './mods:language/mods:languageTerm',
456 'xpath_sorting' => '',
457 'default_value' => '',
458 'wrap' => '',
459 'tokenized' => 0,
460 'stored' => 0,
461 'indexed' => 1,
462 'boost' => 1.00,
463 'is_sortable' => 0,
464 'is_facet' => 1,
465 'is_listed' => 0,
466 ),
467 'year' => array (
468 'encoded' => 1,
469 'xpath' => '',
470 'xpath_sorting' => '',
471 'default_value' => '',
472 'wrap' => '',
473 'tokenized' => 0,
474 'stored' => 1,
475 'indexed' => 1,
476 'boost' => 1.00,
477 'is_sortable' => 1,
478 'is_facet' => 1,
479 'is_listed' => 1,
480 ),
481 'place' => array (
482 'encoded' => 1,
483 'xpath' => '',
484 'xpath_sorting' => '',
485 'default_value' => '',
486 'wrap' => '',
487 'tokenized' => 1,
488 'stored' => 1,
489 'indexed' => 1,
490 'boost' => 1.00,
491 'is_sortable' => 1,
492 'is_facet' => 1,
493 'is_listed' => 1,
494 ),
495 'author' => array (
496 'encoded' => 1,
497 'xpath' => '',
498 'xpath_sorting' => '',
499 'default_value' => '',
500 'wrap' => '',
501 'tokenized' => 1,
502 'stored' => 1,
503 'indexed' => 1,
504 'boost' => 2.00,
505 'is_sortable' => 1,
506 'is_facet' => 1,
507 'is_listed' => 1,
508 ),
509 'volume' => array (
510 'encoded' => 1,
511 'xpath' => './mods:part/mods:detail/mods:number',
512 'xpath_sorting' => './mods:part[@type="host"]/@order',
513 'default_value' => '',
514 'wrap' => '',
515 'tokenized' => 0,
516 'stored' => 1,
517 'indexed' => 0,
518 'boost' => 1.00,
519 'is_sortable' => 1,
520 'is_facet' => 0,
521 'is_listed' => 1,
522 ),
523 'title' => array (
524 'encoded' => 1,
525 'xpath' => 'concat(./mods:titleInfo/mods:nonSort," ",./mods:titleInfo/mods:title)',
526 'xpath_sorting' => './mods:titleInfo/mods:title',
527 'default_value' => '',
528 'wrap' => "key.wrap = <dt class=\"tx-dlf-metadata-title\">|</dt>\nvalue.wrap = <dd class=\"tx-dlf-metadata-title\">|</dd>",
529 'tokenized' => 1,
530 'stored' => 1,
531 'indexed' => 1,
532 'boost' => 2.00,
533 'is_sortable' => 1,
534 'is_facet' => 0,
535 'is_listed' => 1,
536 ),
537 'type' => array (
538 'encoded' => 0,
539 'xpath' => '',
540 'xpath_sorting' => '',
541 'default_value' => '',
542 'wrap' => "key.wrap = <dt class=\"tx-dlf-metadata-type\">|</dt>\nvalue.wrap = <dd class=\"tx-dlf-metadata-type\">|</dd>",
543 'tokenized' => 0,
544 'stored' => 1,
545 'indexed' => 0,
546 'boost' => 1.00,
547 'is_sortable' => 1,
548 'is_facet' => 1,
549 'is_listed' => 1,
550 )
551>>>>>>> MERGE-SOURCE
352);552);
353553
354?>554?>
355\ No newline at end of file555\ No newline at end of file
356556
=== modified file 'dlf/plugins/collection/class.tx_dlf_collection.php'
--- dlf/plugins/collection/class.tx_dlf_collection.php 2012-10-02 07:02:46 +0000
+++ dlf/plugins/collection/class.tx_dlf_collection.php 2012-10-10 09:08:30 +0000
@@ -1,6 +1,6 @@
1<?php1<?php
2/***************************************************************2/***************************************************************
3* Copyright notice3 * Copyright notice
4*4*
5* (c) 2011 Sebastian Meyer <sebastian.meyer@slub-dresden.de>5* (c) 2011 Sebastian Meyer <sebastian.meyer@slub-dresden.de>
6* All rights reserved6* All rights reserved
@@ -28,13 +28,13 @@
2828
29/**29/**
30 * Plugin 'DLF: Collection' for the 'dlf' extension.30 * Plugin 'DLF: Collection' for the 'dlf' extension.
31 *31*
32 * @author Sebastian Meyer <sebastian.meyer@slub-dresden.de>32* @author Sebastian Meyer <sebastian.meyer@slub-dresden.de>
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
36 * @access public36* @access public
37 */37*/
38class tx_dlf_collection extends tx_dlf_plugin {38class tx_dlf_collection extends tx_dlf_plugin {
3939
40 public $scriptRelPath = 'plugins/collection/class.tx_dlf_collection.php';40 public $scriptRelPath = 'plugins/collection/class.tx_dlf_collection.php';
@@ -53,9 +53,15 @@
5353
54 $this->init($conf);54 $this->init($conf);
5555
56<<<<<<< TREE
56 // Turn cache on.57 // Turn cache on.
57 $this->setCache(TRUE);58 $this->setCache(TRUE);
5859
60=======
61 // Disable caching for this plugin.
62 $this->setCache(FALSE);
63
64>>>>>>> MERGE-SOURCE
59 // Quit without doing anything if required configuration variables are not set.65 // Quit without doing anything if required configuration variables are not set.
60 if (empty($this->conf['pages'])) {66 if (empty($this->conf['pages'])) {
6167
@@ -122,10 +128,20 @@
122128
123 }129 }
124130
125 // Should user-defined collections be shown, too?131 // Should user-defined or indexed collections be shown?
126 if ($this->conf['show_userdefined']) {132 if ($this->conf['show_userdefined']) {
127133
128 $additionalWhere .= ' AND NOT tx_dlf_collections.fe_cruser_id=0';134 $userId = $GLOBALS['TSFE']->fe_user->user['uid'];
135
136 if ($userId) {
137
138 $additionalWhere .= ' AND tx_dlf_collections.fe_cruser_id='.intval($userId);
139
140 } else {
141
142 $additionalWhere .= ' AND tx_dlf_collections.fe_cruser_id!=0';
143
144 }
129145
130 } else {146 } else {
131147
@@ -135,14 +151,15 @@
135151
136 // Get collections.152 // Get collections.
137 $result = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query(153 $result = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query(
138 'tx_dlf_collections.uid AS uid,tx_dlf_collections.label AS label,tx_dlf_collections.description AS description,COUNT(tx_dlf_documents.uid) AS titles',154 'tx_dlf_collections.uid AS uid,tx_dlf_collections.label AS label,tx_dlf_collections.description AS description,COUNT(tx_dlf_documents.uid) AS titles',
139 'tx_dlf_documents',155 'tx_dlf_documents',
140 'tx_dlf_relations',156 'tx_dlf_relations',
141 'tx_dlf_collections',157 'tx_dlf_collections',
142 'AND tx_dlf_collections.pid='.intval($this->conf['pages']).' AND tx_dlf_documents.partof=0'.$additionalWhere.tx_dlf_helper::whereClause('tx_dlf_documents').tx_dlf_helper::whereClause('tx_dlf_collections'),158 'AND tx_dlf_collections.pid='.intval($this->conf['pages']).' AND tx_dlf_documents.partof=0'
143 'tx_dlf_collections.uid',159 .$additionalWhere.tx_dlf_helper::whereClause('tx_dlf_documents').tx_dlf_helper::whereClause('tx_dlf_collections'),
144 $orderBy,160 'tx_dlf_collections.uid',
145 ''161 $orderBy,
162 ''
146 );163 );
147164
148 $count = $GLOBALS['TYPO3_DB']->sql_num_rows($result);165 $count = $GLOBALS['TYPO3_DB']->sql_num_rows($result);
@@ -159,14 +176,14 @@
159176
160 // Get number of volumes per collection.177 // Get number of volumes per collection.
161 $resultVolumes = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query(178 $resultVolumes = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query(
162 'tx_dlf_collections.uid AS uid,COUNT(tx_dlf_documents.uid) AS volumes',179 'tx_dlf_collections.uid AS uid,COUNT(tx_dlf_documents.uid) AS volumes',
163 'tx_dlf_documents',180 'tx_dlf_documents',
164 'tx_dlf_relations',181 'tx_dlf_relations',
165 'tx_dlf_collections',182 'tx_dlf_collections',
166 'AND tx_dlf_collections.pid='.intval($this->conf['pages']).' AND NOT tx_dlf_documents.uid IN (SELECT DISTINCT tx_dlf_documents.partof FROM tx_dlf_documents WHERE NOT tx_dlf_documents.partof=0'.tx_dlf_helper::whereClause('tx_dlf_documents').')'.$additionalWhere.tx_dlf_helper::whereClause('tx_dlf_documents').tx_dlf_helper::whereClause('tx_dlf_collections'),183 'AND tx_dlf_collections.pid='.intval($this->conf['pages']).' AND NOT tx_dlf_documents.uid IN (SELECT DISTINCT tx_dlf_documents.partof FROM tx_dlf_documents WHERE NOT tx_dlf_documents.partof=0'.tx_dlf_helper::whereClause('tx_dlf_documents').')'.$additionalWhere.tx_dlf_helper::whereClause('tx_dlf_documents').tx_dlf_helper::whereClause('tx_dlf_collections'),
167 'tx_dlf_collections.uid',184 'tx_dlf_collections.uid',
168 '',185 '',
169 ''186 ''
170 );187 );
171188
172 $volumes = array ();189 $volumes = array ();
@@ -261,6 +278,7 @@
261278
262 // Get all documents in collection.279 // Get all documents in collection.
263 $result = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query(280 $result = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query(
281<<<<<<< TREE
264 'tx_dlf_collections.index_name AS index_name,tx_dlf_collections.label AS collLabel,tx_dlf_collections.description AS collDesc,tx_dlf_documents.uid AS uid,tx_dlf_documents.thumbnail AS thumbnail,tx_dlf_documents.metadata AS metadata,tx_dlf_documents.metadata_sorting AS metadata_sorting,tx_dlf_documents.volume_sorting AS volume_sorting,tx_dlf_documents.partof AS partof',282 'tx_dlf_collections.index_name AS index_name,tx_dlf_collections.label AS collLabel,tx_dlf_collections.description AS collDesc,tx_dlf_documents.uid AS uid,tx_dlf_documents.thumbnail AS thumbnail,tx_dlf_documents.metadata AS metadata,tx_dlf_documents.metadata_sorting AS metadata_sorting,tx_dlf_documents.volume_sorting AS volume_sorting,tx_dlf_documents.partof AS partof',
265 'tx_dlf_documents',283 'tx_dlf_documents',
266 'tx_dlf_relations',284 'tx_dlf_relations',
@@ -269,6 +287,16 @@
269 '',287 '',
270 'tx_dlf_documents.title_sorting ASC',288 'tx_dlf_documents.title_sorting ASC',
271 ''289 ''
290=======
291 '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',
292 'tx_dlf_documents',
293 'tx_dlf_relations',
294 'tx_dlf_collections',
295 'AND tx_dlf_collections.uid='.intval($id).' AND tx_dlf_collections.pid='.intval($this->conf['pages']).tx_dlf_helper::whereClause('tx_dlf_documents').tx_dlf_helper::whereClause('tx_dlf_collections'),
296 '',
297 'tx_dlf_documents.title_sorting ASC',
298 ''
299>>>>>>> MERGE-SOURCE
272 );300 );
273301
274 $toplevel = array ();302 $toplevel = array ();
@@ -280,6 +308,7 @@
280308
281 if (empty($listMetadata)) {309 if (empty($listMetadata)) {
282310
311<<<<<<< TREE
283 $listMetadata = array (312 $listMetadata = array (
284 'label' => htmlspecialchars($resArray['collLabel']),313 'label' => htmlspecialchars($resArray['collLabel']),
285 'description' => $this->pi_RTEcssText($resArray['collDesc']),314 'description' => $this->pi_RTEcssText($resArray['collDesc']),
@@ -290,6 +319,16 @@
290 'order' => 'title',319 'order' => 'title',
291 'order.asc' => TRUE320 'order.asc' => TRUE
292 )321 )
322=======
323 $_metadata = array (
324 'label' => htmlspecialchars($resArray['collLabel']),
325 'description' => $this->pi_RTEcssText($resArray['collDesc']),
326 'options' => array (
327 'source' => 'collection',
328 'select' => $id,
329 'order' => 'title'
330 )
331>>>>>>> MERGE-SOURCE
293 );332 );
294333
295 }334 }
@@ -348,22 +387,45 @@
348 if ($resArray['partof'] == 0) {387 if ($resArray['partof'] == 0) {
349388
350 $toplevel[$resArray['uid']] = array (389 $toplevel[$resArray['uid']] = array (
390<<<<<<< TREE
351 'uid' => $resArray['uid'],391 'uid' => $resArray['uid'],
352 'page' => 1,392 'page' => 1,
353 'thumbnail' => $resArray['thumbnail'],393 'thumbnail' => $resArray['thumbnail'],
354 'metadata' => $metadata,394 'metadata' => $metadata,
355 'sorting' => $sorting,395 'sorting' => $sorting,
356 'subparts' => array ()396 'subparts' => array ()
397=======
398 'uid' => $resArray['uid'],
399 'page' => 1,
400 'title' => array ($resArray['title']),
401 'volume' => array ($resArray['volume']),
402 'author' => array ($resArray['author']),
403 'year' => array ($resArray['year']),
404 'place' => array ($resArray['place']),
405 'type' => array (tx_dlf_helper::getIndexName($resArray['type'], 'tx_dlf_structures', $this->conf['pages'])),
406 'subparts' => array ()
407>>>>>>> MERGE-SOURCE
357 );408 );
358409
359 } else {410 } else {
360411
361 $subparts[$resArray['partof']][$resArray['volume_sorting']] = array (412 $subparts[$resArray['partof']][$resArray['volume_sorting']] = array (
413<<<<<<< TREE
362 'uid' => $resArray['uid'],414 'uid' => $resArray['uid'],
363 'page' => 1,415 'page' => 1,
364 'thumbnail' => $resArray['thumbnail'],416 'thumbnail' => $resArray['thumbnail'],
365 'metadata' => $metadata,417 'metadata' => $metadata,
366 'sorting' => $sorting418 'sorting' => $sorting
419=======
420 'uid' => $resArray['uid'],
421 'page' => 1,
422 'title' => array ($resArray['title']),
423 'volume' => array ($resArray['volume']),
424 'author' => array ($resArray['author']),
425 'year' => array ($resArray['year']),
426 'place' => array ($resArray['place']),
427 'type' => array (tx_dlf_helper::getIndexName($resArray['type'], 'tx_dlf_structures', $this->conf['pages']))
428>>>>>>> MERGE-SOURCE
367 );429 );
368430
369 }431 }
370432
=== added file 'dlf/plugins/collection/edit_collection.tmpl'
--- dlf/plugins/collection/edit_collection.tmpl 1970-01-01 00:00:00 +0000
+++ dlf/plugins/collection/edit_collection.tmpl 2012-10-10 09:08:30 +0000
@@ -0,0 +1,32 @@
1<!-- ###TEMPLATE### -->
2<div class="modal fade" id="###ACTION###">
3 <div class="modal-header">
4 <a class="close" data-dismiss="modal">×</a>
5 <h3>###ACTION_LABEL###</h3>
6 </div>
7 <div class="modal-body">
8 <form class="form-horizontal" action="###ACTION_URL###" method="post">
9 <fieldset>
10 <div class="control-group">
11 <label class="control-label" for="###COLLECTION_NAME###">>###COLLECTION_NAME_LABEL###</label>
12 <div class="controls">
13 <input type="text" class="input-xlarge" id="###COLLECTION_NAME###"
14 name="###COLLECTION_NAME###" value="###COLLECTION_NAME_VALUE###">
15 </div>
16 </div>
17 <div class="control-group">
18 <label class="control-label" for="###COLLECTION_DESC###">>###COLLECTION_DESC_LABEL###</label>
19 <div class="controls">
20 <textarea class="input-xlarge" id="###COLLECTION_DESC###"
21 name="###COLLECTION_DESC###" rows="5">###COLLECTION_DESC_VALUE###</textarea>
22 </div>
23 </div>
24 <div class="form-actions">
25 <button type="submit" class="btn btn-primary">###SUBMIT_LABEL###</button>
26 <button class="btn">###CANCEL_LABEL###</button>
27 </div>
28 </fieldset>
29 </form>
30 </div>
31</div>
32<!-- ###TEMPLATE### -->
0\ No newline at end of file33\ No newline at end of file
134
=== modified file 'dlf/plugins/collection/locallang.xml'
--- dlf/plugins/collection/locallang.xml 2011-08-27 16:52:55 +0000
+++ dlf/plugins/collection/locallang.xml 2012-10-10 09:08:30 +0000
@@ -18,6 +18,19 @@
18 <label index="volumes"> volumes</label>18 <label index="volumes"> volumes</label>
19 <label index="feedAlt">RSS feed</label>19 <label index="feedAlt">RSS feed</label>
20 <label index="feedTitle">Subscribe to the RSS feed of this collection!</label>20 <label index="feedTitle">Subscribe to the RSS feed of this collection!</label>
21 <label index="individual_collections.new_collection">Create new collection</label>
22 <label index="individual_collections.new_collection.ok">Create collection</label>
23 <label index="individual_collections.edit_collection">Edit collection</label>
24 <label index="individual_collections.edit_collection.ok">Save changes</label>
25 <label index="individual_collections.delete_collection">Delete collection</label>
26 <label index="individual_collections.delete_collection.done">Collection removed</label>
27 <label index="individual_collections.delete_collection.done.sub">The collection "%s" has been deleted.</label>
28 <label index="individual_collections.cancel">Cancel</label>
29 <label index="individual_collections.add">Add to "%s"</label>
30 <label index="individual_collections.remove">Remove from "%s"</label>
31 <label index="individual_collections.remove.blank">Remove from this collection</label>
32 <label index="individual_collections.name">Name</label>
33 <label index="individual_collections.desc">Description</label>
21 </languageKey>34 </languageKey>
22 <languageKey index="de" type="array">35 <languageKey index="de" type="array">
23 <label index="tt_content.pi_flexform.sheet_general">Einstellungen</label>36 <label index="tt_content.pi_flexform.sheet_general">Einstellungen</label>
@@ -32,6 +45,19 @@
32 <label index="volumes"> Bände</label>45 <label index="volumes"> Bände</label>
33 <label index="feedAlt">RSS-Feed</label>46 <label index="feedAlt">RSS-Feed</label>
34 <label index="feedTitle">Abonnieren Sie den RSS-Feed dieser Kollektion!</label>47 <label index="feedTitle">Abonnieren Sie den RSS-Feed dieser Kollektion!</label>
48 <label index="individual_collections.new_collection">Neue Sammlung erstellen</label>
49 <label index="individual_collections.new_collection.ok">Neue Sammlung erstellen</label>
50 <label index="individual_collections.edit_collection">Sammlung bearbeiten</label>
51 <label index="individual_collections.edit_collection.ok">Änderungen speichern</label>
52 <label index="individual_collections.delete_collection">Sammlung entfernen</label>
53 <label index="individual_collections.delete_collection.done">Sammlung enfernt</label>
54 <label index="individual_collections.delete_collection.done.sub">Die Sammlung "%s" wurde gelöscht.</label>
55 <label index="individual_collections.cancel">Abbrechen</label>
56 <label index="individual_collections.add">Zu "%s" hinzufügen</label>
57 <label index="individual_collections.remove">Aus "%s" entfernen</label>
58 <label index="individual_collections.remove.blank">Aus dieser Sammlung entfernen</label>
59 <label index="individual_collections.name">Name</label>
60 <label index="individual_collections.desc">Beschreibung</label>
35 </languageKey>61 </languageKey>
36 </data>62 </data>
37</T3locallang>63</T3locallang>
38\ No newline at end of file64\ No newline at end of file
3965
=== modified file 'dlf/plugins/listview/class.tx_dlf_listview.php'
--- dlf/plugins/listview/class.tx_dlf_listview.php 2012-10-02 07:02:46 +0000
+++ dlf/plugins/listview/class.tx_dlf_listview.php 2012-10-10 09:08:30 +0000
@@ -1,6 +1,6 @@
1<?php1<?php
2/***************************************************************2/***************************************************************
3* Copyright notice3 * Copyright notice
4*4*
5* (c) 2011 Sebastian Meyer <sebastian.meyer@slub-dresden.de>5* (c) 2011 Sebastian Meyer <sebastian.meyer@slub-dresden.de>
6* All rights reserved6* All rights reserved
@@ -28,6 +28,7 @@
2828
29/**29/**
30 * Plugin 'DLF: List View' for the 'dlf' extension.30 * Plugin 'DLF: List View' for the 'dlf' extension.
31<<<<<<< TREE
31 *32 *
32 * @author Sebastian Meyer <sebastian.meyer@slub-dresden.de>, Henrik Lochmann <dev@mentalmotive.com>33 * @author Sebastian Meyer <sebastian.meyer@slub-dresden.de>, Henrik Lochmann <dev@mentalmotive.com>
33 * @copyright Copyright (c) 2011, Sebastian Meyer, SLUB Dresden34 * @copyright Copyright (c) 2011, Sebastian Meyer, SLUB Dresden
@@ -35,6 +36,15 @@
35 * @subpackage tx_dlf36 * @subpackage tx_dlf
36 * @access public37 * @access public
37 */38 */
39=======
40*
41* @author Sebastian Meyer <sebastian.meyer@slub-dresden.de>
42* @copyright Copyright (c) 2011, Sebastian Meyer, SLUB Dresden
43* @package TYPO3
44* @subpackage tx_dlf
45* @access public
46*/
47>>>>>>> MERGE-SOURCE
38class tx_dlf_listview extends tx_dlf_plugin {48class tx_dlf_listview extends tx_dlf_plugin {
3949
40 public $scriptRelPath = 'plugins/listview/class.tx_dlf_listview.php';50 public $scriptRelPath = 'plugins/listview/class.tx_dlf_listview.php';
@@ -158,10 +168,34 @@
158168
159 $markerArray['###METADATA###'] = '';169 $markerArray['###METADATA###'] = '';
160170
171<<<<<<< TREE
161 $markerArray['###THUMBNAIL###'] = '';172 $markerArray['###THUMBNAIL###'] = '';
162173
174=======
175 // Process entry action hooks.
176 $hookObjects = tx_dlf_helper::getHookObjects(get_called_class());
177
178 foreach($hookObjects as $hookObj) {
179
180 if (method_exists($hookObj, 'getEntry_fillEntryActions')) {
181
182 $markerArray['###ENTRY_ACTIONS###'] = $hookObj->getEntry_fillEntryActions($this, $this->list->elements[$number]);
183
184 }
185
186 }
187
188 // Ensure marker is processed.
189 if ($markerArray['###ENTRY_ACTIONS###'] == NULL) {
190
191 $markerArray['###ENTRY_ACTIONS###'] = '';
192
193 }
194
195>>>>>>> MERGE-SOURCE
163 $subpart = '';196 $subpart = '';
164197
198<<<<<<< TREE
165 $imgAlt = '';199 $imgAlt = '';
166200
167 $metadata = $this->list->elements[$number]['metadata'];201 $metadata = $this->list->elements[$number]['metadata'];
@@ -235,6 +269,75 @@
235 $field .= $parsedValue;269 $field .= $parsedValue;
236270
237 $markerArray['###METADATA###'] .= $this->cObj->stdWrap($field, $fieldwrap['all.']);271 $markerArray['###METADATA###'] .= $this->cObj->stdWrap($field, $fieldwrap['all.']);
272=======
273 foreach ($this->metadata as $_index_name => $_wrap) {
274
275 $hasValue = FALSE;
276
277 if (is_array($this->list->elements[$number][$_index_name]) && !empty($this->labels[$_index_name])) {
278
279 $fieldwrap = $this->parseTS($_wrap);
280
281 $field = $this->cObj->stdWrap(htmlspecialchars($this->labels[$_index_name]), $fieldwrap['key.']);
282
283 foreach ($this->list->elements[$number][$_index_name] as $_value) {
284
285 // Link title to pageview.
286 if ($_index_name == 'title') {
287
288 // Get title of parent document if needed.
289 if (empty($_value) && $this->conf['getTitle']) {
290
291 $_value = '['.tx_dlf_document::getTitle($this->list->elements[$number]['uid'], TRUE).']';
292
293 }
294
295 // Set fake title if still not present.
296 if (empty($_value)) {
297
298 $_value = $this->pi_getLL('noTitle');
299
300 }
301
302 $_value = $this->pi_linkTP(htmlspecialchars($_value), array ($this->prefixId => array ('id' => $this->list->elements[$number]['uid'], 'page' => $this->list->elements[$number]['page'], 'pointer' => $this->piVars['pointer'])), TRUE, $this->conf['targetPid']);
303
304 // Translate name of holding library.
305 } elseif ($_index_name == 'owner' && !empty($_value)) {
306
307 $_value = htmlspecialchars(tx_dlf_helper::translate($_value, 'tx_dlf_libraries', $this->conf['pages']));
308
309 // Translate document type.
310 } elseif ($_index_name == 'type' && !empty($_value)) {
311
312 $_value = $this->pi_getLL($_value, tx_dlf_helper::translate($_value, 'tx_dlf_structures', $this->conf['pages']), FALSE);
313
314 // Translate ISO 639 language code.
315 } elseif ($_index_name == 'language' && !empty($_value)) {
316
317 $_value = htmlspecialchars(tx_dlf_helper::getLanguageName($_value));
318
319 } elseif (!empty($_value)) {
320
321 $_value = htmlspecialchars($_value);
322
323 }
324
325 if (!empty($_value)) {
326
327 $field .= $this->cObj->stdWrap($_value, $fieldwrap['value.']);
328
329 $hasValue = TRUE;
330
331 }
332
333 }
334
335 if ($hasValue) {
336
337 $markerArray['###METADATA###'] .= $this->cObj->stdWrap($field, $fieldwrap['all.']);
338
339 }
340>>>>>>> MERGE-SOURCE
238341
239 }342 }
240343
@@ -348,6 +451,7 @@
348451
349 $markerArray['###SUBMETADATA###'] = '';452 $markerArray['###SUBMETADATA###'] = '';
350453
454<<<<<<< TREE
351 $markerArray['###SUBTHUMBNAIL###'] = '';455 $markerArray['###SUBTHUMBNAIL###'] = '';
352456
353 $imgAlt = '';457 $imgAlt = '';
@@ -421,6 +525,75 @@
421 $field .= $parsedValue;525 $field .= $parsedValue;
422526
423 $markerArray['###SUBMETADATA###'] .= $this->cObj->stdWrap($field, $fieldwrap['all.']);527 $markerArray['###SUBMETADATA###'] .= $this->cObj->stdWrap($field, $fieldwrap['all.']);
528=======
529 foreach ($this->metadata as $_index_name => $_wrap) {
530
531 $hasValue = FALSE;
532
533 if (is_array($subpart[$_index_name]) && !empty($this->labels[$_index_name])) {
534
535 $fieldwrap = $this->parseTS($_wrap);
536
537 $field = $this->cObj->stdWrap(htmlspecialchars($this->labels[$_index_name]), $fieldwrap['key.']);
538
539 foreach ($subpart[$_index_name] as $_value) {
540
541 // Link title to pageview.
542 if ($_index_name == 'title') {
543
544 // Get title of parent document if needed.
545 if (empty($_value) && $this->conf['getTitle']) {
546
547 $_value = '['.tx_dlf_document::getTitle($subpart['uid'], TRUE).']';
548
549 }
550
551 // Set fake title if still not present.
552 if (empty($_value)) {
553
554 $_value = $this->pi_getLL('noTitle');
555
556 }
557
558 $_value = $this->pi_linkTP(htmlspecialchars($_value), array ($this->prefixId => array ('id' => $subpart['uid'], 'page' => $subpart['page'], 'pointer' => $this->piVars['pointer'])), TRUE, $this->conf['targetPid']);
559
560 // Translate name of holding library.
561 } elseif ($_index_name == 'owner' && !empty($_value)) {
562
563 $_value = htmlspecialchars(tx_dlf_helper::translate($_value, 'tx_dlf_libraries', $this->conf['pages']));
564
565 // Translate document type.
566 } elseif ($_index_name == 'type' && !empty($_value)) {
567
568 $_value = $this->pi_getLL($_value, tx_dlf_helper::translate($_value, 'tx_dlf_structures', $this->conf['pages']), FALSE);
569
570 // Translate ISO 639 language code.
571 } elseif ($_index_name == 'language' && !empty($_value)) {
572
573 $_value = htmlspecialchars(tx_dlf_helper::getLanguageName($_value));
574
575 } elseif (!empty($_value)) {
576
577 $_value = htmlspecialchars($_value);
578
579 }
580
581 if (!empty($_value)) {
582
583 $field .= $this->cObj->stdWrap($_value, $fieldwrap['value.']);
584
585 $hasValue = TRUE;
586
587 }
588
589 }
590
591 if ($hasValue) {
592
593 $markerArray['###SUBMETADATA###'] .= $this->cObj->stdWrap($field, $fieldwrap['all.']);
594
595 }
596>>>>>>> MERGE-SOURCE
424597
425 }598 }
426599
@@ -450,6 +623,7 @@
450 */623 */
451 protected function loadConfig() {624 protected function loadConfig() {
452625
626<<<<<<< TREE
453 $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(627 $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
454 'tx_dlf_metadata.index_name AS index_name,tx_dlf_metadata.wrap AS wrap,tx_dlf_metadata.is_listed AS is_listed,tx_dlf_metadata.is_sortable AS is_sortable',628 'tx_dlf_metadata.index_name AS index_name,tx_dlf_metadata.wrap AS wrap,tx_dlf_metadata.is_listed AS is_listed,tx_dlf_metadata.is_sortable AS is_sortable',
455 'tx_dlf_metadata',629 'tx_dlf_metadata',
@@ -457,6 +631,23 @@
457 '',631 '',
458 'tx_dlf_metadata.sorting ASC',632 'tx_dlf_metadata.sorting ASC',
459 ''633 ''
634=======
635 $this->labels = array (
636 'title' => $this->pi_getLL('title', tx_dlf_helper::translate('title', 'tx_dlf_metadata', $this->conf['pages']), TRUE),
637 'author' => $this->pi_getLL('author', tx_dlf_helper::translate('author', 'tx_dlf_metadata', $this->conf['pages']), TRUE),
638 'year' => $this->pi_getLL('year', tx_dlf_helper::translate('year', 'tx_dlf_metadata', $this->conf['pages']), TRUE),
639 'place' => $this->pi_getLL('place', tx_dlf_helper::translate('place', 'tx_dlf_metadata', $this->conf['pages']), TRUE),
640 'type' => $this->pi_getLL('type', tx_dlf_helper::translate('type', 'tx_dlf_metadata', $this->conf['pages']), TRUE)
641 );
642
643 $_result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
644 'tx_dlf_metadata.index_name AS index_name,tx_dlf_metadata.wrap AS wrap',
645 'tx_dlf_metadata',
646 'tx_dlf_metadata.pid='.intval($this->conf['pages']).tx_dlf_helper::whereClause('tx_dlf_metadata'),
647 '',
648 'tx_dlf_metadata.sorting ASC',
649 ''
650>>>>>>> MERGE-SOURCE
460 );651 );
461652
462 while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {653 while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {
@@ -497,6 +688,19 @@
497 // Don't cache the output.688 // Don't cache the output.
498 $this->setCache(FALSE);689 $this->setCache(FALSE);
499690
691 // Process pre rendering hooks.
692 $hookObjects = tx_dlf_helper::getHookObjects(get_called_class());
693
694 foreach($hookObjects as $hookObj) {
695
696 if (method_exists($hookObj, 'main_preListRendering')) {
697
698 $hookObj->main_preListRendering($this);
699
700 }
701
702 }
703
500 // Load the list.704 // Load the list.
501 $this->list = t3lib_div::makeInstance('tx_dlf_list');705 $this->list = t3lib_div::makeInstance('tx_dlf_list');
502706
@@ -581,6 +785,26 @@
581785
582 }786 }
583787
788 // Process list action hooks.
789 $hookObjects = tx_dlf_helper::getHookObjects(get_called_class());
790
791 foreach($hookObjects as $hookObj) {
792
793 if (method_exists($hookObj, 'main_fillListActions')) {
794
795 $markerArray['###LIST_ACTIONS###'] = $hookObj->main_fillListActions($this);
796
797 }
798
799 }
800
801 // Ensure marker is processed.
802 if ($markerArray['###LIST_ACTIONS###'] == NULL) {
803
804 $markerArray['###LIST_ACTIONS###'] = '';
805
806 }
807
584 $markerArray['###PAGEBROWSER###'] = $this->getPageBrowser();808 $markerArray['###PAGEBROWSER###'] = $this->getPageBrowser();
585809
586 $markerArray['###SORTING###'] = $this->getSortingForm();810 $markerArray['###SORTING###'] = $this->getSortingForm();
587811
=== modified file 'dlf/plugins/listview/template.tmpl'
--- dlf/plugins/listview/template.tmpl 2012-09-13 17:53:13 +0000
+++ dlf/plugins/listview/template.tmpl 2012-10-10 09:08:30 +0000
@@ -4,6 +4,7 @@
4<p class="tx-dlf-listview-counts">###COUNT###</p>4<p class="tx-dlf-listview-counts">###COUNT###</p>
5###SORTING###5###SORTING###
6<p class="tx-dlf-listview-pagebrowser">###PAGEBROWSER###</p>6<p class="tx-dlf-listview-pagebrowser">###PAGEBROWSER###</p>
7###LIST_ACTIONS###
7<ol class="tx-dlf-listview-list">8<ol class="tx-dlf-listview-list">
8 <!-- ###ENTRY### -->9 <!-- ###ENTRY### -->
9 <li value="###NUMBER###">10 <li value="###NUMBER###">
@@ -23,6 +24,7 @@
23 <!-- ###SUBENTRY### -->24 <!-- ###SUBENTRY### -->
24 </ol>25 </ol>
25 <!-- ###SUBTEMPLATE### -->26 <!-- ###SUBTEMPLATE### -->
27 ###ENTRY_ACTIONS###
26 </li>28 </li>
27 <!-- ###ENTRY### -->29 <!-- ###ENTRY### -->
28</ol>30</ol>
2931
=== modified file 'dlf/plugins/search/class.tx_dlf_search.php'
--- dlf/plugins/search/class.tx_dlf_search.php 2012-10-02 07:02:46 +0000
+++ dlf/plugins/search/class.tx_dlf_search.php 2012-10-10 09:08:30 +0000
@@ -418,6 +418,7 @@
418418
419 }419 }
420420
421<<<<<<< TREE
421 // Set last query if applicable.422 // Set last query if applicable.
422 $lastQuery = '';423 $lastQuery = '';
423424
@@ -435,17 +436,34 @@
435 'forceAbsoluteUrl' => 1436 'forceAbsoluteUrl' => 1
436 );437 );
437438
439=======
440 // Set last query if applicable.
441 $lastQuery = '';
442
443 $_list = t3lib_div::makeInstance('tx_dlf_list');
444
445 if (!empty($_list->metadata['options']['source']) && $_list->metadata['options']['source'] == 'search') {
446
447 $lastQuery = $_list->metadata['options']['select'];
448
449 }
450
451>>>>>>> MERGE-SOURCE
438 // Fill markers.452 // Fill markers.
439 $markerArray = array (453 $markerArray = array (
440 '###ACTION_URL###' => $this->cObj->typoLink_URL($linkConf),454 '###ACTION_URL###' => $this->cObj->typoLink_URL($linkConf),
441 '###LABEL_QUERY###' => $this->pi_getLL('label.query'),455 '###LABEL_QUERY###' => $this->pi_getLL('label.query'),
442 '###LABEL_SUBMIT###' => $this->pi_getLL('label.submit'),456 '###LABEL_SUBMIT###' => $this->pi_getLL('label.submit'),
443 '###FIELD_QUERY###' => $this->prefixId.'[query]',457 '###FIELD_QUERY###' => $this->prefixId.'[query]',
458<<<<<<< TREE
444 '###QUERY###' => htmlspecialchars($lastQuery),459 '###QUERY###' => htmlspecialchars($lastQuery),
445 '###FIELD_DOC###' => $this->addCurrentDocument(),460 '###FIELD_DOC###' => $this->addCurrentDocument(),
446 '###FIELD_COLL###' => $this->addCurrentCollection(),461 '###FIELD_COLL###' => $this->addCurrentCollection(),
447 '###ADDITIONAL_INPUTS###' => $this->addEncryptedCoreName(),462 '###ADDITIONAL_INPUTS###' => $this->addEncryptedCoreName(),
448 '###FACETS_MENU###' => $this->addFacetsMenu()463 '###FACETS_MENU###' => $this->addFacetsMenu()
464=======
465 '###QUERY###' => htmlspecialchars($lastQuery),
466>>>>>>> MERGE-SOURCE
449 );467 );
450468
451 // Get additional fields for extended search.469 // Get additional fields for extended search.
@@ -560,12 +578,30 @@
560 $solr->params = $params;578 $solr->params = $params;
561579
562 // Perform search.580 // Perform search.
581<<<<<<< TREE
563 $results = $solr->search($query);582 $results = $solr->search($query);
564583
565 $results->metadata = array (584 $results->metadata = array (
566 'label' => $label,585 'label' => $label,
567 'description' => '<p class="tx-dlf-search-numHits">'.htmlspecialchars(sprintf($this->pi_getLL('hits', ''), $solr->numberOfHits, $results->count)).'</p>',586 'description' => '<p class="tx-dlf-search-numHits">'.htmlspecialchars(sprintf($this->pi_getLL('hits', ''), $solr->numberOfHits, $results->count)).'</p>',
568 'options' => $results->metadata['options']587 'options' => $results->metadata['options']
588=======
589 $query = $solr->search($this->piVars['query'], 0, $this->conf['limit'], array ());
590
591 $numHits = count($query->response->docs);
592
593 $_list = array ();
594
595 // Set metadata for search.
596 $_metadata = array (
597 'label' => htmlspecialchars(sprintf($this->pi_getLL('searchfor', ''), $this->piVars['query'])),
598 'description' => '<p class="tx-dlf-search-numHits">'.htmlspecialchars(sprintf($this->pi_getLL('hits', ''), $numHits)).'</p>',
599 'options' => array (
600 'source' => 'search',
601 'select' => $this->piVars['query'],
602 'order' => 'relevance'
603 )
604>>>>>>> MERGE-SOURCE
569 );605 );
570606
571 $results->save();607 $results->save();

Subscribers

People subscribed via source and target branches