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
1=== modified file 'dlf/cli/class.tx_dlf_cli.php'
2=== modified file 'dlf/common/class.tx_dlf_document.php'
3--- dlf/common/class.tx_dlf_document.php 2012-10-02 12:30:10 +0000
4+++ dlf/common/class.tx_dlf_document.php 2012-10-10 09:08:30 +0000
5@@ -746,6 +746,7 @@
6 while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {
7
8 // Set metadata field's value(s).
9+<<<<<<< TREE
10 if ($resArray['format'] > 0 && !empty($resArray['xpath']) && ($values = $domXPath->evaluate($resArray['xpath'], $domNode))) {
11
12 if ($values instanceof DOMNodeList && $values->length > 0) {
13@@ -755,13 +756,31 @@
14 foreach ($values as $value) {
15
16 $metadata[$resArray['index_name']][] = trim((string) $value->nodeValue);
17+=======
18+ if ($resArray['xpath'] && ($_values = $_domXPath->evaluate($resArray['xpath'], $_domNode))) {
19+
20+ if ($_values instanceof DOMNodeList && $_values->length > 0) {
21+
22+ $_metadata[$resArray['index_name']] = array ();
23+
24+ foreach ($_values as $_value) {
25+
26+ $_metadata[$resArray['index_name']][] = trim((string) $_value->nodeValue);
27+>>>>>>> MERGE-SOURCE
28
29 }
30
31+<<<<<<< TREE
32 } elseif (!($values instanceof DOMNodeList)) {
33
34 $metadata[$resArray['index_name']] = array (trim((string) $values));
35
36+=======
37+ } elseif (!($_values instanceof DOMNodeList)) {
38+
39+ $_metadata[$resArray['index_name']] = array (trim((string) $_values));
40+
41+>>>>>>> MERGE-SOURCE
42 }
43
44 }
45@@ -774,6 +793,7 @@
46 }
47
48 // Set sorting value if applicable.
49+<<<<<<< TREE
50 if (!empty($metadata[$resArray['index_name']]) && $resArray['is_sortable']) {
51
52 if ($resArray['format'] > 0 && !empty($resArray['xpath_sorting']) && ($values = $domXPath->evaluate($resArray['xpath_sorting'], $domNode))) {
53@@ -795,6 +815,29 @@
54 $metadata[$resArray['index_name'].'_sorting'][0] = $metadata[$resArray['index_name']][0];
55
56 }
57+=======
58+ if (!empty($_metadata[$resArray['index_name']]) && $resArray['is_sortable']) {
59+
60+ if ($resArray['xpath_sorting'] && ($_values = $_domXPath->evaluate($resArray['xpath_sorting'], $_domNode))) {
61+
62+ if ($_values instanceof DOMNodeList && $_values->length > 0) {
63+
64+ $_metadata[$resArray['index_name'].'_sorting'][0] = trim((string) $_values->item(0)->nodeValue);
65+
66+ } elseif (!($_values instanceof DOMNodeList)) {
67+
68+ $_metadata[$resArray['index_name'].'_sorting'][0] = trim((string) $_values);
69+
70+ }
71+
72+ }
73+
74+ if (empty($_metadata[$resArray['index_name'].'_sorting'][0])) {
75+
76+ $_metadata[$resArray['index_name'].'_sorting'][0] = $_metadata[$resArray['index_name']][0];
77+
78+ }
79+>>>>>>> MERGE-SOURCE
80
81 }
82
83
84=== modified file 'dlf/common/class.tx_dlf_helper.php'
85--- dlf/common/class.tx_dlf_helper.php 2012-10-02 07:02:46 +0000
86+++ dlf/common/class.tx_dlf_helper.php 2012-10-10 09:08:30 +0000
87@@ -1,6 +1,6 @@
88 <?php
89 /***************************************************************
90-* Copyright notice
91+ * Copyright notice
92 *
93 * (c) 2011 Sebastian Meyer <sebastian.meyer@slub-dresden.de>
94 * All rights reserved
95@@ -28,13 +28,13 @@
96
97 /**
98 * Helper class 'tx_dlf_helper' for the 'dlf' extension.
99- *
100- * @author Sebastian Meyer <sebastian.meyer@slub-dresden.de>
101- * @copyright Copyright (c) 2011, Sebastian Meyer, SLUB Dresden
102- * @package TYPO3
103- * @subpackage tx_dlf
104- * @access public
105- */
106+*
107+* @author Sebastian Meyer <sebastian.meyer@slub-dresden.de>
108+* @copyright Copyright (c) 2011, Sebastian Meyer, SLUB Dresden
109+* @package TYPO3
110+* @subpackage tx_dlf
111+* @access public
112+*/
113 class tx_dlf_helper {
114
115 /**
116@@ -85,6 +85,32 @@
117
118 }
119
120+ public static function array_toString($array, $glue = '=', $separator = ', ') {
121+
122+ if (!is_array($array)) {
123+
124+ return $array;
125+
126+ }
127+
128+ $string = array();
129+
130+ foreach ($array as $key => $val) {
131+
132+ if (is_array($val)) {
133+
134+ $val = implode( ',', $val );
135+
136+ }
137+
138+ $string[] = "{$key}{$glue}{$val}";
139+
140+ }
141+
142+ return implode($separator, $string);
143+
144+ }
145+
146 /**
147 * Check if given identifier is a valid identifier of the German National Library
148 * @see http://support.d-nb.de/iltis/onlineRoutinen/Pruefziffernberechnung.htm
149@@ -367,6 +393,33 @@
150 }
151
152 /**
153+ * This gets the registered hook objects for a class.
154+ *
155+ * @access public
156+ *
157+ * @param string $class: The name of the class
158+ *
159+ * @return array Array of hook objects
160+ */
161+ public static function getHookObjects($class) {
162+
163+ $hookObjects = array ();
164+
165+ if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][tx_dlf_helper::$extKey]['hooks'][$class])) {
166+
167+ foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][tx_dlf_helper::$extKey]['hooks'][$class] as $_classRef) {
168+
169+ $hookObjects[] = t3lib_div::getUserObj($_classRef);
170+
171+ }
172+
173+ }
174+
175+ return $hookObjects;
176+
177+ }
178+
179+ /**
180 * Get the "index_name" for an UID
181 *
182 * @access public
183@@ -399,6 +452,7 @@
184
185 }
186
187+<<<<<<< TREE
188 $where = '';
189
190 // Should we check for a specific PID, too?
191@@ -418,6 +472,15 @@
192 '',
193 '',
194 '1'
195+=======
196+ $_result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
197+ $table.'.index_name AS index_name',
198+ $table,
199+ $table.'.uid='.$uid.' AND '.$table.'.pid='.$pid.self::whereClause($table),
200+ '',
201+ '',
202+ '1'
203+>>>>>>> MERGE-SOURCE
204 );
205
206 if ($GLOBALS['TYPO3_DB']->sql_num_rows($result) > 0) {
207@@ -598,6 +661,7 @@
208 */
209 public static function getURN($base, $id) {
210
211+<<<<<<< TREE
212 $concordance = array (
213 '0' => 1,
214 '1' => 2,
215@@ -637,6 +701,47 @@
216 'z' => 38,
217 '-' => 39,
218 ':' => 17,
219+=======
220+ $concordance = array(
221+ '0' => 1,
222+ '1' => 2,
223+ '2' => 3,
224+ '3' => 4,
225+ '4' => 5,
226+ '5' => 6,
227+ '6' => 7,
228+ '7' => 8,
229+ '8' => 9,
230+ '9' => 41,
231+ 'a' => 18,
232+ 'b' => 14,
233+ 'c' => 19,
234+ 'd' => 15,
235+ 'e' => 16,
236+ 'f' => 21,
237+ 'g' => 22,
238+ 'h' => 23,
239+ 'i' => 24,
240+ 'j' => 25,
241+ 'k' => 42,
242+ 'l' => 26,
243+ 'm' => 27,
244+ 'n' => 13,
245+ 'o' => 28,
246+ 'p' => 29,
247+ 'q' => 31,
248+ 'r' => 12,
249+ 's' => 32,
250+ 't' => 33,
251+ 'u' => 11,
252+ 'v' => 34,
253+ 'w' => 35,
254+ 'x' => 36,
255+ 'y' => 37,
256+ 'z' => 38,
257+ '-' => 39,
258+ ':' => 17,
259+>>>>>>> MERGE-SOURCE
260 );
261
262 $urn = strtolower($base.$id);
263@@ -949,6 +1054,7 @@
264 }
265
266 // Get labels from database.
267+<<<<<<< TREE
268 $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
269 '*',
270 $table,
271@@ -956,6 +1062,15 @@
272 '',
273 '',
274 ''
275+=======
276+ $_result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
277+ '*',
278+ $table,
279+ 'pid='.$pid.$additionalWhere.self::whereClause($table),
280+ '',
281+ '',
282+ ''
283+>>>>>>> MERGE-SOURCE
284 );
285
286 if ($GLOBALS['TYPO3_DB']->sql_num_rows($result) > 0) {
287@@ -1079,13 +1194,14 @@
288 *
289 * @access protected
290 */
291- protected function __construct() {}
292+ protected function __construct() {
293+ }
294
295 }
296
297 /* No xclasses for static classes!
298-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dlf/common/class.tx_dlf_helper.php']) {
299- include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dlf/common/class.tx_dlf_helper.php']);
300+ if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dlf/common/class.tx_dlf_helper.php']) {
301+include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dlf/common/class.tx_dlf_helper.php']);
302 }
303 */
304
305
306=== modified file 'dlf/ext_autoload.php'
307--- dlf/ext_autoload.php 2012-09-27 11:25:51 +0000
308+++ dlf/ext_autoload.php 2012-10-10 09:08:30 +0000
309@@ -43,6 +43,7 @@
310 'tx_dlf_modIndexing' => $extensionPath.'modules/indexing/index.php',
311 'tx_dlf_modNewclient' => $extensionPath.'modules/newclient/index.php',
312 'tx_dlf_collection' => $extensionPath.'plugins/collection/class.tx_dlf_collection.php',
313+ 'tx_dlf_collection_hook' => $extensionPath.'plugins/collection/class.tx_dlf_collection_hook.php',
314 'tx_dlf_feeds' => $extensionPath.'plugins/feeds/class.tx_dlf_feeds.php',
315 'tx_dlf_listview' => $extensionPath.'plugins/listview/class.tx_dlf_listview.php',
316 'tx_dlf_metadata' => $extensionPath.'plugins/metadata/class.tx_dlf_metadata.php',
317
318=== modified file 'dlf/ext_emconf.php'
319=== modified file 'dlf/ext_localconf.php'
320--- dlf/ext_localconf.php 2012-09-25 13:28:48 +0000
321+++ dlf/ext_localconf.php 2012-10-10 09:08:30 +0000
322@@ -65,6 +65,9 @@
323
324 $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';
325
326+// Hook for action menu in list view, to facilitate individual collections.
327+$GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$_EXTKEY]['hooks']['tx_dlf_listview'][] = 'EXT:'.$_EXTKEY.'/hooks/class.tx_dlf_collection_hook.php:tx_dlf_collection_hook';
328+
329 // Register command line scripts.
330 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['cliKeys'][$_EXTKEY] = array ('EXT:'.$_EXTKEY.'/cli/class.tx_dlf_cli.php', '_CLI_dlf');
331
332
333=== added file 'dlf/hooks/class.tx_dlf_collection_hook.php'
334--- dlf/hooks/class.tx_dlf_collection_hook.php 1970-01-01 00:00:00 +0000
335+++ dlf/hooks/class.tx_dlf_collection_hook.php 2012-10-10 09:08:30 +0000
336@@ -0,0 +1,1229 @@
337+<?php
338+/***************************************************************
339+ * Copyright notice
340+*
341+* (c) 2012 Henrik Lochmann <dev@mentalmotive.com>, Zeutschel GmbH
342+* All rights reserved
343+*
344+* This script is part of the TYPO3 project. The TYPO3 project is
345+* free software; you can redistribute it and/or modify
346+* it under the terms of the GNU General Public License as published by
347+* the Free Software Foundation; either version 2 of the License, or
348+* (at your option) any later version.
349+*
350+* The GNU General Public License can be found at
351+* http://www.gnu.org/copyleft/gpl.html.
352+*
353+* This script is distributed in the hope that it will be useful,
354+* but WITHOUT ANY WARRANTY; without even the implied warranty of
355+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
356+* GNU General Public License for more details.
357+*
358+* This copyright notice MUST APPEAR in all copies of the script!
359+***************************************************************/
360+
361+/**
362+ * An implementation of various hooks of the 'DLF: List View' plugin
363+* to allow front end users the management of individual collections.
364+*
365+* @author Henrik Lochmann <dev@mentalmotive.com>
366+* @copyright Copyright (c) 2012, Henrik Lochmann, Zeutschel GmbH
367+* @package TYPO3
368+* @subpackage tx_dlf
369+* @access public
370+*/
371+class tx_dlf_collection_hook {
372+
373+ /**
374+ * @var string url parameter name constant for an action (controls on which an action shall be applied)
375+ * @see tx_dlf_hook_EntryActions
376+ * @see tx_dlf_hook_ListActions
377+ */
378+ protected static $ENTRY_ACTION = 'action';
379+
380+ /**
381+ * @var string url parameter name constant for an action parameter (controls how is an action applied)
382+ */
383+ protected static $ENTRY_ACTION_SUBJECT = 'action_subject';
384+
385+ /**
386+ * @var string url parameter name constant for an action site (controls on which target an action applied)
387+ */
388+ protected static $ENTRY_ACTION_OBJECT = 'action_object';
389+
390+ protected static $FORM_FIELD_COLLECTION_NAME = 'col_name';
391+
392+ protected static $FORM_FIELD_COLLECTION_DESCRIPTION = 'col_desc';
393+
394+ protected static $LANG_PREFIX = 'individual_collections.';
395+
396+ protected $conf;
397+
398+ protected $lang;
399+
400+ protected $editCollectionTemplate;
401+
402+ protected $plugin;
403+
404+ /**
405+ * Evaluation of 'input'-type values based on 'eval' list
406+ *
407+ * @param string Value to evaluate
408+ * @param array Array of evaluations to traverse.
409+ * @param string Is-in string for 'is_in' evaluation
410+ * @return array Modified $value in key 'value' or empty array
411+ */
412+ protected static function checkValue_input_Eval($value, $evalArray, $is_in, $pid = 0) {
413+
414+ $res = array();
415+
416+ $newValue = $value;
417+
418+ $set = TRUE;
419+
420+ foreach ($evalArray as $func) {
421+
422+ switch ($func) {
423+
424+ case 'int':
425+ case 'year':
426+ case 'time':
427+ case 'timesec':
428+ $value = intval($value);
429+ break;
430+
431+ case 'date':
432+ case 'datetime':
433+
434+ $value = intval($value);
435+
436+ if ($value > 0 && !$this->dontProcessTransformations) {
437+
438+ $value -= date('Z', $value);
439+
440+ }
441+
442+ break;
443+
444+ case 'double2':
445+
446+ $value = preg_replace('/[^0-9,\.-]/', '', $value);
447+
448+ $negative = substr($value, 0, 1) == '-';
449+
450+ $value = strtr($value, array(',' => '.', '-' => ''));
451+
452+ if (strpos($value, '.') === FALSE) {
453+
454+ $value .= '.0';
455+
456+ }
457+
458+ $valueArray = explode('.', $value);
459+
460+ $dec = array_pop($valueArray);
461+
462+ $value = join('', $valueArray) . '.' . $dec;
463+
464+ if ($negative) {
465+
466+ $value *= -1;
467+
468+ }
469+
470+ $value = number_format($value, 2, '.', '');
471+
472+ break;
473+
474+ case 'md5':
475+
476+ if (strlen($value) != 32) {
477+
478+ $set = FALSE;
479+
480+ }
481+
482+ break;
483+
484+ case 'trim':
485+
486+ $value = trim($value);
487+
488+ break;
489+
490+ case 'upper':
491+
492+ $value = $GLOBALS['LANG']->csConvObj->conv_case($GLOBALS['LANG']->charSet, $value, 'toUpper');
493+
494+ break;
495+
496+ case 'lower':
497+
498+ $value = $GLOBALS['LANG']->csConvObj->conv_case($GLOBALS['LANG']->charSet, $value, 'toLower');
499+
500+ break;
501+
502+ case 'required':
503+
504+ if (!isset($value) || $value === '') {
505+
506+ $set = FALSE;
507+
508+ }
509+
510+ break;
511+
512+ case 'is_in':
513+
514+ $c = strlen($value);
515+
516+ if ($c) {
517+
518+ $newVal = '';
519+
520+ for ($a = 0; $a < $c; $a++) {
521+
522+ $char = substr($value, $a, 1);
523+
524+ if (strpos($is_in, $char) !== FALSE) {
525+
526+ $newVal .= $char;
527+
528+ }
529+
530+ }
531+
532+ $value = $newVal;
533+
534+ }
535+
536+ break;
537+
538+ case 'nospace':
539+
540+ $value = str_replace(' ', '', $value);
541+
542+ break;
543+
544+ case 'alpha':
545+
546+ $value = preg_replace('/[^a-zA-Z]/', '', $value);
547+
548+ break;
549+
550+ case 'num':
551+
552+ $value = preg_replace('/[^0-9]/', '', $value);
553+
554+ break;
555+
556+ case 'alphanum':
557+
558+ $value = preg_replace('/[^a-zA-Z0-9]/', '', $value);
559+
560+ break;
561+
562+ case 'alphanum_x':
563+
564+ $value = preg_replace('/[^a-zA-Z0-9_-]/', '', $value);
565+
566+ break;
567+
568+ case 'domainname':
569+
570+ if (!preg_match('/^[a-z0-9\.\-]*$/i', $value)) {
571+
572+ t3lib_div::requireOnce(PATH_typo3 . 'contrib/idna/idna_convert.class.php');
573+
574+ $idnaConvert = new idna_convert();
575+
576+ $idnaConvert->set_parameter('idn_version', '2008');
577+
578+ $value = $idnaConvert->encode($value);
579+
580+ unset($idnaConvert);
581+
582+ }
583+
584+ break;
585+
586+ case 'uniqueInPid':
587+
588+ break;
589+
590+ default:
591+
592+ if (t3lib_div::hasValidClassPrefix($func)) {
593+
594+ $evalObj = t3lib_div::getUserObj($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][$func] . ':&' . $func);
595+
596+ if (is_object($evalObj) && method_exists($evalObj, 'evaluateFieldValue')) {
597+
598+ $value = $evalObj->evaluateFieldValue($value, $is_in, $set);
599+
600+ }
601+
602+ }
603+
604+ break;
605+ }
606+ }
607+
608+ if ($set) {
609+
610+ $res['value'] = $value;
611+
612+ }
613+
614+ return $res;
615+
616+ }
617+
618+ /**
619+ * Assigns a DLF document with a DLF collection by updating the corresponding
620+ * database table.
621+ *
622+ * @access protected
623+ *
624+ * @param integer $documentUid the DLF document's uid
625+ * @param integer $collectionUid the DLF collections's uid
626+ *
627+ * @return void
628+ */
629+ protected function addDocumentToCollection($documentUid, $collectionUid) {
630+
631+ // Load TCA to approximate TCE functionality.
632+ $GLOBALS['TSFE']->includeTCA();
633+
634+ t3lib_div::loadTCA('tx_dlf_documents');
635+
636+ 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);
637+
638+ // insert relation between document and collection
639+ $GLOBALS['TYPO3_DB']->exec_INSERTquery(
640+ 'tx_dlf_relations',
641+ array (
642+ 'uid_local' => $documentUid,
643+ 'uid_foreign' => $collectionUid,
644+ 'ident' => $GLOBALS['TCA']['tx_dlf_documents']['columns']['collections']['config']['MM_match_fields']['ident'],
645+ )
646+ );
647+
648+ }
649+
650+ /**
651+ * Applies TCA eval functions to the given collection properties and returns
652+ * proper DB table columns for update or insertion in the tx_dlf_collections table.
653+ *
654+ * @param string $title the desired collection title
655+ * @param string $description the desired collection description
656+ *
657+ * @return array|NULL an associative array with the values label, index_name and oai_name; or NULL if TCA eval constraints were not fulfilled
658+ */
659+ protected function checkCollectionValues($title, $description) {
660+
661+ // Load TCA to approximate TCE functionality.
662+ $GLOBALS['TSFE']->includeTCA();
663+
664+ t3lib_div::loadTCA('tx_dlf_collections');
665+
666+ /* TCEmain->checkValue_input_Eval() should be used here;
667+ * until it is available in the frontend, we implement corresponding TCA constraints manually via tx_dlf_helper
668+ */
669+
670+ // title is required
671+ if (empty($title)) {
672+
673+ return NULL;
674+
675+ }
676+
677+ // prepare field values
678+ $fields = array('label' => $title, 'index_name' => $title, 'oai_name' => $title, 'description' => $description);
679+
680+ $whereClause = '';
681+
682+ // apply TCA constraints
683+ foreach ($fields as $name => &$value) {
684+
685+ if (empty($value)) {
686+
687+ continue;
688+
689+ }
690+
691+ $eval_result = tx_dlf_collection_hook::checkValue_input_Eval(
692+ $value,
693+ $GLOBALS['TCA']['tx_dlf_collections']['columns'][$name]['config']['eval'],
694+ $GLOBALS['TCA']['tx_dlf_collections']['columns'][$name]['config']['is_in']);
695+
696+ if (count($eval_result) == 0) {
697+
698+ // eval function call failed
699+ return NULL;
700+
701+ }
702+
703+ $value = $eval_result['value'];
704+
705+ $whereClause .= ' AND tx_dlf_collections.'.$name.'="'.$value.'"';
706+
707+ }
708+
709+ // check uniqueInPid for fields
710+ $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
711+ 'tx_dlf_collections.label AS label,tx_dlf_collections.description AS description,tx_dlf_collections.fe_cruser_id AS fe_cruser_id',
712+ 'tx_dlf_collections',
713+ 'tx_dlf_collections.pid='.intval($this->plugin->conf['pages'])
714+ .$whereClause
715+ .tx_dlf_helper::whereClause('tx_dlf_collections'),
716+ '',
717+ '',
718+ ''
719+ );
720+
721+ // if any of derived fields are already avaiable in DB, check fails: we don't do any
722+ // alternative calculation since this method is just a temporary solution for TCE
723+ // instantiation in FE, which is to come soon
724+ if ($GLOBALS['TYPO3_DB']->sql_num_rows($result) > 0) {
725+
726+ return NULL;
727+
728+ }
729+
730+ return $fields;
731+
732+ }
733+
734+ /**
735+ * Creates a new DLF collection by updating the corresponding
736+ * database table.
737+ *
738+ * @param string $title the title of the collection to create
739+ * @param string $description the description of the collection to create
740+ *
741+ * @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.
742+ */
743+ protected function createCollection($title, $description) {
744+
745+ $fields = $this->checkCollectionValues($title, $description);
746+
747+ if ($fields == NULL) {
748+
749+ return -1;
750+
751+ }
752+
753+ // Insert new collection.
754+ $GLOBALS['TYPO3_DB']->exec_INSERTquery(
755+ 'tx_dlf_collections',
756+ array (
757+ 'pid' => $this->plugin->conf['pages'],
758+ 'tstamp' => $GLOBALS['EXEC_TIME'],
759+ 'crdate' => $GLOBALS['EXEC_TIME'],
760+ $GLOBALS['TCA']['tx_dlf_collections']['ctrl']['fe_cruser_id'] => $GLOBALS['TSFE']->fe_user->user['uid'],
761+ 'label' => $fields['label'],
762+ 'index_name' => $fields['index_name'],
763+ 'oai_name' => $fields['oai_name'],
764+ 'description' => $fields['description'],
765+ 'documents' => 0,
766+ 'owner' => 0,
767+ 'status' => 0,
768+ )
769+ );
770+
771+ return $GLOBALS['TYPO3_DB']->sql_insert_id();
772+
773+ }
774+
775+ /**
776+ * Creates a page link URL to the current page, containing special action
777+ * parameters that are processed by this hook class.
778+ *
779+ * @param mixed $action the value that is appended as action parameter in the resulting URL
780+ * @param mixed $subject the value that is appended as subject parameter in the resulting URL
781+ * @param mixed $object the value that is appended as object parameter in the resulting URL
782+ *
783+ * @return string The created URL.
784+ */
785+ protected function createLink($action, $subject, $object = NULL) {
786+
787+ $params = array (
788+ $this->plugin->prefixId => array (
789+ self::$ENTRY_ACTION_SUBJECT => (string) $subject,
790+ self::$ENTRY_ACTION => (string) $action
791+ )
792+ );
793+
794+ if ($object != NULL) {
795+
796+ $params[$this->plugin->prefixId][self::$ENTRY_ACTION_OBJECT] = (string) $object;
797+
798+ }
799+
800+ return $this->plugin->pi_getPageLink($GLOBALS['TSFE']->id, '', $params);
801+
802+ }
803+
804+ /**
805+ * Deletes a DLF collection by updating the corresponding database table.
806+ *
807+ * @param integer $collectionUid the DLF collections's uid
808+ *
809+ * @return void
810+ */
811+ protected function deleteCollection($collectionUid) {
812+
813+ // Remove all document relations to collection.
814+ $GLOBALS['TYPO3_DB']->exec_DELETEquery('tx_dlf_relations', 'uid_foreign='.$collectionUid);
815+
816+ // Delete collection: update deleted flag in DB.
817+ $GLOBALS['TYPO3_DB']->exec_UPDATEquery(
818+ 'tx_dlf_collections',
819+ 'uid='.$collectionUid,
820+ array(
821+ 'deleted' => 1
822+ )
823+ );
824+
825+ // Clean list and update header.
826+ $list = t3lib_div::makeInstance('tx_dlf_list');
827+
828+ // check if we come from the collections plugin and remove this passed document, if appropriate
829+ if (!empty($list->metadata['options']['source']) && $list->metadata['options']['source'] == 'collection') {
830+
831+ $colName = $list->metadata['label'];
832+
833+ $list->reset();
834+
835+ $list->metadata = array(
836+ 'label' => $this->getLL(tx_dlf_hook_ListActions::DeleteCollection.'.done'),
837+ 'description' => sprintf($this->getLL(tx_dlf_hook_ListActions::DeleteCollection.'.done.sub'), $colName),
838+ );
839+
840+ $list->save();
841+
842+ }
843+
844+ }
845+
846+ /**
847+ * Fills the markers contained of the edit-collection-template (that
848+ * is loaded into the $editCollectionTemplate field) with the passed
849+ * values.
850+ *
851+ * @param mixed $action the action parameter for the ACTION_URL marker
852+ * @param mixed $subject the subject parameter for the ACTION_URL marker
853+ * @param string $collectionName the content of the COLLECTION_NAME_VALUE marker
854+ * @param string $collectionDescription the content of the COLLECTION_DESC_VALUE marker
855+ *
856+ * @return string The edit collection template with substituted markers.
857+ */
858+ protected function getEditCollectionTemplate($action, $subject, $collectionName = '', $collectionDescription = '') {
859+ // Fill edit collection template.
860+ $markerArray = array();
861+
862+ $markerArray['###ACTION###'] = $action;
863+
864+ $markerArray['###ACTION_LABEL###'] = $this->getLL($action);
865+
866+ $markerArray['###SUBMIT_LABEL###'] = $this->getLL($action.'.ok');
867+
868+ $markerArray['###CANCEL_LABEL###'] = $this->getLL('cancel');
869+
870+ $markerArray['###ACTION_URL###'] = $this->createLink($action, $subject);
871+
872+ $markerArray['###COLLECTION_NAME###'] = $this->wrapFormField(self::$FORM_FIELD_COLLECTION_NAME);
873+
874+ $markerArray['###COLLECTION_NAME_LABEL###'] = $this->getLL('name');
875+
876+ $markerArray['###COLLECTION_NAME_VALUE###'] = $collectionName;
877+
878+ $markerArray['###COLLECTION_DESC###'] = $this->wrapFormField(self::$FORM_FIELD_COLLECTION_DESCRIPTION);
879+
880+ $markerArray['###COLLECTION_DESC_LABEL###'] = $this->getLL('desc');
881+
882+ $markerArray['###COLLECTION_DESC_VALUE###'] = $collectionDescription;
883+
884+ return $this->plugin->cObj->substituteMarkerArray($this->editCollectionTemplate, $markerArray);
885+
886+ }
887+
888+ /**
889+ * Implementation of the 'getEntry_fillEntryActions' hook in the class tx_dlf_listview.
890+ * This hook adds user-specific functionionality to edit documents in a FE user collection.
891+ * Thus, if no FE user is logged in, NULL is returned.
892+ *
893+ * @param tx_dlf_plugin $plugin the tx_dlf_listview plugin
894+ * @param array $listElement the element shwon in list view, entry actions shall be generated for
895+ *
896+ * @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.
897+ */
898+ public function getEntry_fillEntryActions($plugin, $listElement) {
899+
900+ $this->init($plugin);
901+
902+ // We render user-specific entry actions (only when somone is logged-in).
903+ $userId = $GLOBALS['TSFE']->fe_user->user['uid'];
904+
905+ if (empty($userId)) {
906+
907+ return NULL;
908+
909+ }
910+
911+ // We render different entry actions in single collection view than in usual search result views.
912+ $list = t3lib_div::makeInstance('tx_dlf_list');
913+
914+ $collectionUid = NULL;
915+
916+ if ($list->metadata['options']['source'] === 'collection') {
917+
918+ $collectionUid = $list->metadata['options']['select'];
919+
920+ }
921+
922+ return $this->renderListEntryMenuObject($listElement, $collectionUid);
923+
924+ }
925+
926+ /**
927+ * Returns the localized string for the given language key.
928+ *
929+ * @param string $key the language key
930+ *
931+ * @return string the localized string for the given language key
932+ */
933+ protected function getLL($key) {
934+
935+ return $GLOBALS['TSFE']->getLLL(self::$LANG_PREFIX.$key, $this->lang);
936+
937+ }
938+
939+ /**
940+ * Answers if the requested collection is owned by the passed user.
941+ *
942+ * @param integer $collectionUid the uid of the requested DLF collection
943+ *
944+ * @return boolean FALSE, if the requested collection is not owned by the passed user; TRUE otherwise.
945+ */
946+ protected function isFEUserCollection($collectionUid) {
947+
948+ if (empty($collectionUid)) {
949+
950+ return FALSE;
951+
952+ }
953+
954+ $properties = $this->getCollectionProperties($collectionUid, $GLOBALS['TSFE']->fe_user->user['uid']);
955+
956+ if ($properties) {
957+
958+ return TRUE;
959+
960+ }
961+
962+ return FALSE;
963+
964+ }
965+
966+ /**
967+ * Extracts and returns the properties of a user's collection.
968+ *
969+ * @param integer $collectionUid the uid of the requested DLF collection
970+ * @param integer $userId the uid of the requested DLF collection
971+ *
972+ * @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
973+ * */
974+ protected function getCollectionProperties($collectionUid, $userId) {
975+
976+ // Get collection properties.
977+ $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
978+ 'tx_dlf_collections.label AS label,tx_dlf_collections.description AS description,tx_dlf_collections.fe_cruser_id AS fe_cruser_id',
979+ 'tx_dlf_collections',
980+ 'tx_dlf_collections.pid='.intval($this->plugin->conf['pages'])
981+ .' AND tx_dlf_collections.uid='.intval($collectionUid)
982+ .' AND tx_dlf_collections.fe_cruser_id='.intval($userId)
983+ .tx_dlf_helper::whereClause('tx_dlf_collections'),
984+ '',
985+ '',
986+ ''
987+ );
988+
989+ return $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);
990+
991+ }
992+
993+ /**
994+ * Initializes this hook class with the passed tx_dlf_plugin instance.
995+ *
996+ * @param tx_dlf_plugin $plugin the tx_dlf_listview plugin
997+ *
998+ * @return void
999+ */
1000+ protected function init($plugin) {
1001+
1002+ $this->plugin = $plugin;
1003+
1004+ // Load collection plugin configuration.
1005+ $this->conf = $GLOBALS['TSFE']->tmpl->setup['plugin.'][$this->plugin->prefixId.'_collection.'];
1006+
1007+ // Load l18n file of collection plugin.
1008+ $this->lang = $GLOBALS['TSFE']->readLLfile(t3lib_extMgm::extPath($this->plugin->extKey, 'plugins/collection/locallang.xml'));
1009+
1010+ // Load the edit collection template.
1011+ $this->editCollectionTemplate = '';
1012+
1013+ if (!empty($this->conf['individualCollections.']['editCollectionTemplate'])) {
1014+
1015+ $this->editCollectionTemplate = $this->plugin->cObj->getSubpart($this->plugin->cObj->fileResource($this->conf['individualCollections.']['editCollectionTemplate']), '###TEMPLATE###');
1016+
1017+ } else {
1018+
1019+ $this->editCollectionTemplate = $this->plugin->cObj->getSubpart($this->plugin->cObj->fileResource('EXT:dlf/plugins/collection/edit_collection.tmpl'), '###TEMPLATE###');
1020+
1021+ }
1022+
1023+ }
1024+
1025+ /**
1026+ * Implementation of the 'main_fillListActions' hook in the class tx_dlf_listview.
1027+ * This hook adds user-specific functionionality to edit collections.
1028+ *
1029+ * @param tx_dlf_plugin $plugin the tx_dlf_listview plugin
1030+ *
1031+ * @return NULL|string NULL if an error occurred or the HTML content that is integrated in the output of the tx_dlf_listview plugin
1032+ */
1033+
1034+ public function main_fillListActions($plugin) {
1035+
1036+ t3lib_div::devLog('[tx_dlf_collection_hook.main_fillListActions] ', 'dlf', t3lib_div::SYSLOG_SEVERITY_INFO);
1037+
1038+ $this->init($plugin);
1039+
1040+ // We render list actions only for logged-in users.
1041+ $userId = $GLOBALS['TSFE']->fe_user->user['uid'];
1042+
1043+ // Checked if a user is logged in.
1044+ if (empty($userId)) {
1045+
1046+ return NULL;
1047+
1048+ }
1049+
1050+ // Get actual list.
1051+ $list = t3lib_div::makeInstance('tx_dlf_list');
1052+
1053+ // Check if we come from the collections plugin.
1054+ if (empty($list->metadata['options']['source']) || (!empty($list->metadata['options']['source']) && $list->metadata['options']['source'] != 'collection')) {
1055+
1056+ return NULL;
1057+
1058+ }
1059+
1060+ // Check if the shown collection is owned by the logged in user.
1061+ $collectionUid = intval($list->metadata['options']['select']);
1062+
1063+ t3lib_div::devLog('[tx_dlf_collection_hook.main_fillListActions] colID='.$collectionUid, 'dlf', t3lib_div::SYSLOG_SEVERITY_NOTICE);
1064+
1065+ // Get collection properties.
1066+ $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
1067+ 'tx_dlf_collections.label AS label,tx_dlf_collections.description AS description,tx_dlf_collections.fe_cruser_id AS fe_cruser_id',
1068+ 'tx_dlf_collections',
1069+ 'tx_dlf_collections.pid='.intval($this->plugin->conf['pages'])
1070+ .' AND tx_dlf_collections.uid='.$collectionUid
1071+ .' AND tx_dlf_collections.fe_cruser_id='.$userId
1072+ .tx_dlf_helper::whereClause('tx_dlf_collections'),
1073+ '',
1074+ '',
1075+ ''
1076+ );
1077+
1078+ // If nothing returned, the requested collection is not owned by the logged-in user.
1079+ if ((!$resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result))) {
1080+
1081+ return NULL;
1082+
1083+ }
1084+
1085+ // Load collection menuConf.
1086+ $collectionMenuConf = $this->conf['individualCollections.']['collectionMenu.'];
1087+
1088+ if (empty($collectionMenuConf)) {
1089+
1090+ trigger_error('No collection menu conf found.', E_USER_NOTICE);
1091+
1092+ return NULL;
1093+
1094+ }
1095+
1096+
1097+ $_TSconfig = array ();
1098+
1099+ $_TSconfig['special'] = 'userfunction';
1100+
1101+ $_TSconfig['special.']['userFunc'] = 'tx_dlf_collection_hook->makeCollectionListMenu';
1102+
1103+ $_TSconfig['special.']['plugin'] = $this->plugin;
1104+
1105+ $_TSconfig['special.']['collection'] = $list->metadata['options']['select'];
1106+
1107+ $_TSconfig = t3lib_div::array_merge_recursive_overrule($collectionMenuConf, $_TSconfig);
1108+
1109+ $content = $this->plugin->cObj->HMENU($_TSconfig);
1110+
1111+ // Get collection properties.
1112+ $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
1113+ 'tx_dlf_collections.label AS label,tx_dlf_collections.description AS description',
1114+ 'tx_dlf_collections',
1115+ 'tx_dlf_collections.pid='.intval($this->plugin->conf['pages'])
1116+ .' AND tx_dlf_collections.uid='.intval($list->metadata['options']['select'])
1117+ .tx_dlf_helper::whereClause('tx_dlf_collections'),
1118+ '',
1119+ '',
1120+ ''
1121+ );
1122+
1123+ $actionLabel = '';
1124+
1125+ if ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {
1126+
1127+ $content .= $this->getEditCollectionTemplate(
1128+ tx_dlf_hook_ListActions::EditCollection,
1129+ $list->metadata['options']['select'],
1130+ $resArray['label'],
1131+ $resArray['description']);
1132+
1133+ } else {
1134+
1135+ trigger_error('Given collection id does not exist in database.', E_USER_ERROR);
1136+
1137+ }
1138+
1139+ return $content;
1140+
1141+ }
1142+
1143+ /**
1144+ * Implementation of the 'main_preListRendering' hook in the class tx_dlf_listview.
1145+ * This hook manages action links produced by this class.
1146+ *
1147+ * @param tx_dlf_plugin $plugin the tx_dlf_listview plugin
1148+ *
1149+ * @return void
1150+ */
1151+ public function main_preListRendering($plugin) {
1152+
1153+ $this->init($plugin);
1154+
1155+ $action = $this->plugin->piVars[self::$ENTRY_ACTION];
1156+
1157+ if (!empty($action)) {
1158+
1159+ $subject = $this->plugin->piVars[self::$ENTRY_ACTION_SUBJECT];
1160+
1161+ $object = $this->plugin->piVars[self::$ENTRY_ACTION_OBJECT];
1162+
1163+ switch ($action) {
1164+
1165+ case tx_dlf_hook_EntryActions::AddDocumentToCollection:
1166+
1167+ $this->addDocumentToCollection($subject, $object);
1168+
1169+ break;
1170+
1171+ case tx_dlf_hook_EntryActions::RemoveDocumentFromCollection:
1172+
1173+ $this->removeDocumentFromCollection($subject, $object);
1174+
1175+ break;
1176+
1177+ case tx_dlf_hook_EntryActions::CreateCollection:
1178+
1179+ $collectionId = $this->createCollection(
1180+ $this->plugin->piVars[self::$FORM_FIELD_COLLECTION_NAME],
1181+ $this->plugin->piVars[self::$FORM_FIELD_COLLECTION_DESCRIPTION]);
1182+
1183+ // check if collection creation succeeded.
1184+ if ($collectionId == -1) {
1185+
1186+ return;
1187+
1188+ }
1189+
1190+ $this->addDocumentToCollection($subject, $collectionId);
1191+
1192+ break;
1193+
1194+ case tx_dlf_hook_ListActions::EditCollection:
1195+
1196+ $this->updateCollection($subject,
1197+ $this->plugin->piVars[self::$FORM_FIELD_COLLECTION_NAME],
1198+ $this->plugin->piVars[self::$FORM_FIELD_COLLECTION_DESCRIPTION]);
1199+
1200+ break;
1201+
1202+ case tx_dlf_hook_ListActions::DeleteCollection:
1203+
1204+ $this->deleteCollection($subject);
1205+
1206+ break;
1207+
1208+ }
1209+
1210+ }
1211+
1212+ }
1213+
1214+ /**
1215+ * The menuFunc for the HMENU object created and rendered by the implementation
1216+ * for the getEntry_fillEntryActions hook.
1217+ *
1218+ * This function is used when the hooked list view shows a list generated
1219+ * by the collections plugin.
1220+ *
1221+ * @param string $content the content object
1222+ * @param array $conf the menu configuration
1223+ *
1224+ * @return array HMENU array
1225+ */
1226+ public function makeCollectionListEntryMenu($content, $conf) {
1227+
1228+ // Extract passed and prepare parameters.
1229+ $this->init($conf['plugin']);
1230+
1231+ $action = tx_dlf_hook_EntryActions::RemoveDocumentFromCollection;
1232+
1233+ $menuArray[] = array(
1234+ 'title' => $this->getLL($action.'.blank'),
1235+ '_OVERRIDE_HREF' => $this->createLink($action, $conf['listElement']['uid'], $conf['collectionId'])
1236+ );
1237+
1238+ $menuArray[] = array();
1239+
1240+ return $menuArray;
1241+
1242+ }
1243+
1244+ /**
1245+ * The menuFunc for the HMENU object created and rendered by the implementation
1246+ * for the main_fillListActions hook.
1247+ *
1248+ * @param string $content the content object
1249+ * @param array $conf the menu configuration
1250+ *
1251+ * @return array HMENU array
1252+ */
1253+ public function makeCollectionListMenu($content, $conf) {
1254+
1255+ // Extract passed and prepare parameters.
1256+ $this->init($conf['plugin']);
1257+
1258+ $menuArray[] = array(
1259+ 'title' => $this->getLL(tx_dlf_hook_ListActions::EditCollection),
1260+ '_OVERRIDE_HREF' => '#'.tx_dlf_hook_ListActions::EditCollection
1261+ );
1262+
1263+ $menuArray[] = array(
1264+ 'title' => $this->getLL(tx_dlf_hook_ListActions::DeleteCollection),
1265+ '_OVERRIDE_HREF' => $this->createLink(tx_dlf_hook_ListActions::DeleteCollection, $conf['collection'])
1266+ );
1267+
1268+ return $menuArray;
1269+
1270+ }
1271+
1272+ /**
1273+ * The menuFunc for the HMENU object created and rendered by the implementation
1274+ * for the getEntry_fillEntryActions hook.
1275+ *
1276+ * This function is used when the hooked list view shows a list generated
1277+ * by the search plugin.
1278+ *
1279+ * @param string $content the content object
1280+ * @param array $conf the menu configuration
1281+ *
1282+ * @return array HMENU array
1283+ */
1284+ public function makeSearchResultListEntryMenu($content, $conf) {
1285+
1286+ // Extract passed and prepare parameters.
1287+ $this->init($conf['plugin']);
1288+
1289+ $listElement = $conf['listElement'];
1290+
1291+ $userId = $conf['userId'];
1292+
1293+ $menuArray = array();
1294+
1295+ // get all user-defined collections (even empty)
1296+ $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
1297+ 'tx_dlf_collections.uid AS uid,tx_dlf_collections.label AS label',
1298+ 'tx_dlf_collections',
1299+ 'tx_dlf_collections.pid='.intval($this->plugin->conf['pages'])
1300+ .' AND tx_dlf_collections.fe_cruser_id='.intval($userId)
1301+ .tx_dlf_helper::whereClause('tx_dlf_collections'),
1302+ '',
1303+ '',
1304+ ''
1305+ );
1306+
1307+ $actionLabel = '';
1308+
1309+ while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {
1310+
1311+ // is the current entry already in this collection?
1312+ $isInCollection = $GLOBALS['TYPO3_DB']->sql_num_rows(
1313+ $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query(
1314+ 'tx_dlf_documents.uid AS doc',
1315+ 'tx_dlf_documents',
1316+ 'tx_dlf_relations',
1317+ 'tx_dlf_collections',
1318+ ' AND uid_local='.$listElement['uid']
1319+ .' AND uid_foreign='.$resArray['uid']
1320+ .tx_dlf_helper::whereClause('tx_dlf_documents').tx_dlf_helper::whereClause('tx_dlf_collections'),
1321+ '',
1322+ '',
1323+ ''
1324+ )) > 0;
1325+
1326+ $action = '';
1327+
1328+ if (!$isInCollection) {
1329+
1330+ $action = tx_dlf_hook_EntryActions::AddDocumentToCollection;
1331+
1332+ } else {
1333+
1334+ $action = tx_dlf_hook_EntryActions::RemoveDocumentFromCollection;
1335+
1336+ }
1337+
1338+ $actionLabel = sprintf($this->getLL($action), $resArray['label']);
1339+
1340+ $entryArray = array();
1341+
1342+ $entryArray['title'] = $actionLabel;
1343+
1344+ $entryArray['ITEM_STATE'] = 'NO';
1345+
1346+ $entryArray['_OVERRIDE_HREF'] = $this->createLink($action, $listElement['uid'], $resArray['uid']);
1347+
1348+ $menuArray[] = $entryArray;
1349+
1350+ }
1351+
1352+ $menuArray[] = array(
1353+ 'title' => $this->getLL(tx_dlf_hook_EntryActions::CreateCollection),
1354+ '_OVERRIDE_HREF' => '#new_collection',
1355+ 'newCollection' => true,
1356+ );
1357+
1358+ return $menuArray;
1359+
1360+ }
1361+
1362+ /**
1363+ * Renders an HMENU with additional FE user functions to edit the passed list
1364+ * element coming from the list view plugin.
1365+ *
1366+ * If the passed collection uid belongs to the logged in user, the menuFunc
1367+ * is makeCollectionListEntryMenu; if not, it is makeSearchResultListEntryMenu.
1368+ *
1369+ * @param array $listElement the element shwon in list view
1370+ * @param integer $collection the uid of the DLF collection
1371+ *
1372+ * @return string|NULL the rendered HMENU object or NULL, if an error occurred
1373+ */
1374+ protected function renderListEntryMenuObject($listElement, $collection) {
1375+
1376+ t3lib_div::devLog('[tx_dlf_collection_hook.renderListEntryMenuObject] $collection='.$collection, 'dlf', t3lib_div::SYSLOG_SEVERITY_NOTICE);
1377+
1378+ // Check for individual collections.
1379+ $individualCollections = $this->conf['individualCollections'];
1380+
1381+ if (empty($individualCollections) || $individualCollections == 0) {
1382+
1383+ trigger_error('Individual collections disabled, stoping here.', E_USER_NOTICE);
1384+
1385+ return NULL;
1386+
1387+ }
1388+
1389+ // Load entry actions menuConf.
1390+ $documentMenuConf = $this->conf['individualCollections.']['documentMenu.'];
1391+
1392+ if (empty($documentMenuConf)) {
1393+
1394+ trigger_error('No document menu conf found.', E_USER_NOTICE);
1395+
1396+ return NULL;
1397+
1398+ }
1399+
1400+ $_TSconfig = array ();
1401+
1402+ $_TSconfig['special'] = 'userfunction';
1403+
1404+ $collectionProperties = FALSE;
1405+
1406+ // Individual collections lists got different menus than public collection lists.
1407+ if ($this->isFEUserCollection($collection)) {
1408+
1409+ $_TSconfig['special.']['userFunc'] = 'tx_dlf_collection_hook->makeCollectionListEntryMenu';
1410+
1411+ $_TSconfig['special.']['collectionId'] = $collection;
1412+
1413+ } else {
1414+
1415+ $_TSconfig['special.']['userFunc'] = 'tx_dlf_collection_hook->makeSearchResultListEntryMenu';
1416+
1417+ }
1418+
1419+ $_TSconfig['special.']['plugin'] = $this->plugin;
1420+
1421+ $_TSconfig['special.']['listElement'] = $listElement;
1422+
1423+ $_TSconfig['special.']['userId'] = $GLOBALS['TSFE']->fe_user->user['uid'];
1424+
1425+ $_TSconfig = t3lib_div::array_merge_recursive_overrule($documentMenuConf, $_TSconfig);
1426+
1427+ $content = $this->plugin->cObj->HMENU($_TSconfig);
1428+
1429+ $content .= $this->getEditCollectionTemplate(tx_dlf_hook_EntryActions::CreateCollection, $listElement['uid']);
1430+
1431+ return $content;
1432+
1433+ }
1434+
1435+ /**
1436+ * Removes a DLF document from a DLF collection by updating the corresponding
1437+ * database table.
1438+ *
1439+ * @access protected
1440+ *
1441+ * @param integer $documentUid the DLF document's uid
1442+ * @param integer $collectionUid the DLF collections's uid
1443+ *
1444+ * @return void
1445+ */
1446+ protected function removeDocumentFromCollection($documentUid, $collectionUid) {
1447+
1448+ t3lib_div::devLog('[tx_dlf_collection_hook.removeDocumentFromCollection] $documentUid='.$documentUid.' , $collectionUid='.$collectionUid, 'dlf', t3lib_div::SYSLOG_SEVERITY_NOTICE);
1449+
1450+ // remove relation between document and collection
1451+ $GLOBALS['TYPO3_DB']->exec_DELETEquery('tx_dlf_relations',
1452+ 'uid_local='.$documentUid.
1453+ ' AND uid_foreign='.$collectionUid.
1454+ ' AND ident="docs_colls"');
1455+
1456+ $list = t3lib_div::makeInstance('tx_dlf_list');
1457+
1458+ // Check if we come from the collections plugin, if the shown collection is of the logged-in user and remove this passed document.
1459+ if (!empty($list->metadata['options']['source'])
1460+ && ($list->metadata['options']['source'] == 'collection')
1461+ && $this->isFEUserCollection($list->metadata['options']['select'])) {
1462+
1463+ // find document's index and remove it from list
1464+ $i = 0;
1465+
1466+ foreach ($list->elements as $document) {
1467+
1468+ if ($document['uid'] == $documentUid) {
1469+
1470+ $list->remove($i);
1471+
1472+ break;
1473+
1474+ }
1475+
1476+ $i++;
1477+
1478+ }
1479+
1480+ }
1481+
1482+ }
1483+
1484+ /**
1485+ * Updates collection properties.
1486+ *
1487+ * @param integer $collectionUid the DLF collections's uid
1488+ * @param string $label the new collection label
1489+ * @param string $description the new collection description
1490+ *
1491+ * @return void
1492+ */
1493+ protected function updateCollection($collectionUid, $label, $description) {
1494+
1495+ $fields = $this->checkCollectionValues($label, $description);
1496+
1497+ if ($fields == NULL) {
1498+
1499+ return -1;
1500+
1501+ }
1502+
1503+ // Update database.
1504+ $GLOBALS['TYPO3_DB']->exec_UPDATEquery(
1505+ 'tx_dlf_collections',
1506+ 'uid='.$collectionUid,
1507+ $fields
1508+ );
1509+
1510+ // Update list.
1511+ $list = t3lib_div::makeInstance('tx_dlf_list');
1512+
1513+ // check if we come from the collections plugin and remove this passed document, if appropriate
1514+ if (!empty($list->metadata['options']['source']) && $list->metadata['options']['source'] == 'collection') {
1515+
1516+ $_metadata = $list->metadata;
1517+
1518+ $_metadata['label'] = $fields['label'];;
1519+
1520+ $_metadata['description'] = $fields['description'];
1521+
1522+ $list->metadata = $_metadata;
1523+
1524+ }
1525+
1526+ }
1527+
1528+ /**
1529+ * Wraps a form field as plugin field.
1530+ *
1531+ * @param string $fieldName
1532+ *
1533+ * @return string the wrapped field name
1534+ */
1535+ protected function wrapFormField($fieldName) {
1536+
1537+ return $this->plugin->prefixId.'['.$fieldName.']';
1538+
1539+ }
1540+
1541+}
1542+
1543+class tx_dlf_hook_EntryActions {
1544+
1545+ const AddDocumentToCollection = 'add';
1546+
1547+ const CreateCollection = 'new_collection';
1548+
1549+ const RemoveDocumentFromCollection = 'remove';
1550+
1551+}
1552+
1553+class tx_dlf_hook_ListActions {
1554+
1555+ const EditCollection = 'edit_collection';
1556+
1557+ const DeleteCollection = 'delete_collection';
1558+
1559+}
1560+
1561+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dlf/plugins/collection/class.tx_dlf_collection_hook.php']) {
1562+ include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dlf/plugins/collection/class.tx_dlf_collection_hook.php']);
1563+}
1564+
1565+?>
1566\ No newline at end of file
1567
1568=== modified file 'dlf/lib/ISO-639/iso-639-1.xml'
1569--- dlf/lib/ISO-639/iso-639-1.xml 2012-08-07 14:39:23 +0000
1570+++ dlf/lib/ISO-639/iso-639-1.xml 2012-10-10 09:08:30 +0000
1571@@ -1,3 +1,4 @@
1572+<<<<<<< TREE
1573 <?xml version="1.0" encoding="UTF-8"?>
1574 <T3locallang>
1575 <meta type="array">
1576@@ -293,4 +294,301 @@
1577 <label index="zu">Zulu</label>
1578 </languageKey>
1579 </data>
1580+=======
1581+<?xml version="1.0" encoding="UTF-8"?>
1582+<T3locallang>
1583+ <meta type="array">
1584+ <type>module</type>
1585+ <description>Language labels for ISO 639-1 codes</description>
1586+ </meta>
1587+ <data type="array">
1588+ <languageKey index="default" type="array">
1589+ <label index="aa">Afar</label>
1590+ <label index="ab">Abkhazian</label>
1591+ <label index="af">Afrikaans</label>
1592+ <label index="am">Amharic</label>
1593+ <label index="ar">Arabic</label>
1594+ <label index="as">Assamese</label>
1595+ <label index="ay">Aymara</label>
1596+ <label index="az">Azerbaijani</label>
1597+ <label index="ba">Bashkir</label>
1598+ <label index="be">Byelorussian</label>
1599+ <label index="bg">Bulgarian</label>
1600+ <label index="bh">Bihari</label>
1601+ <label index="bi">Bislama</label>
1602+ <label index="bn">Bengali</label>
1603+ <label index="bo">Tibetan</label>
1604+ <label index="br">Breton</label>
1605+ <label index="ca">Catalan</label>
1606+ <label index="co">Corsican</label>
1607+ <label index="cs">Czech</label>
1608+ <label index="cy">Welsh</label>
1609+ <label index="da">Danish</label>
1610+ <label index="de">German</label>
1611+ <label index="dz">Dzongkha</label>
1612+ <label index="el">Greek</label>
1613+ <label index="en">English</label>
1614+ <label index="eo">Esperanto</label>
1615+ <label index="es">Spanish</label>
1616+ <label index="et">Estonian</label>
1617+ <label index="eu">Basque</label>
1618+ <label index="fa">Persian</label>
1619+ <label index="fi">Finnish</label>
1620+ <label index="fj">Fijian</label>
1621+ <label index="fo">Faroese</label>
1622+ <label index="fr">French</label>
1623+ <label index="fy">Frisian</label>
1624+ <label index="ga">Irish</label>
1625+ <label index="gd">Scottish Gaelic</label>
1626+ <label index="gl">Galician</label>
1627+ <label index="gn">Guarani</label>
1628+ <label index="gu">Gujarati</label>
1629+ <label index="ha">Hausa</label>
1630+ <label index="he">Hebrew</label>
1631+ <label index="hi">Hindi</label>
1632+ <label index="hr">Croatian</label>
1633+ <label index="hu">Hungarian</label>
1634+ <label index="hy">Armenian</label>
1635+ <label index="ia">Interlingua</label>
1636+ <label index="id">Indonesian</label>
1637+ <label index="ie">Interlingue, Occidental</label>
1638+ <label index="ik">Inupiak</label>
1639+ <label index="is">Icelandic</label>
1640+ <label index="it">Italian</label>
1641+ <label index="iu">Inuktitut</label>
1642+ <label index="iw">Hebrew</label>
1643+ <label index="ja">Japanese</label>
1644+ <label index="ji">Yiddish</label>
1645+ <label index="jv">Javanese</label>
1646+ <label index="jw">Javanese</label>
1647+ <label index="ka">Georgian</label>
1648+ <label index="kk">Kazakh</label>
1649+ <label index="kl">Kalaallisut, Greenlandic</label>
1650+ <label index="km">Khmer</label>
1651+ <label index="kn">Kannada</label>
1652+ <label index="ko">Korean</label>
1653+ <label index="ks">Kashmiri</label>
1654+ <label index="ku">Kurdish</label>
1655+ <label index="ky">Kirghiz, Kyrgyz</label>
1656+ <label index="la">Latin</label>
1657+ <label index="ln">Lingala</label>
1658+ <label index="lo">Lao</label>
1659+ <label index="lt">Lithuanian</label>
1660+ <label index="lv">Latvian</label>
1661+ <label index="mg">Malagasy</label>
1662+ <label index="mi">Maori</label>
1663+ <label index="mk">Macedonian</label>
1664+ <label index="ml">Malayalam</label>
1665+ <label index="mn">Mongolian</label>
1666+ <label index="mo">Moldavian</label>
1667+ <label index="mr">Marathi</label>
1668+ <label index="ms">Malay</label>
1669+ <label index="mt">Maltese</label>
1670+ <label index="my">Burmese</label>
1671+ <label index="na">Nauru</label>
1672+ <label index="ne">Nepali</label>
1673+ <label index="nl">Dutch</label>
1674+ <label index="no">Norwegian</label>
1675+ <label index="oc">Occitan</label>
1676+ <label index="om">Oromo</label>
1677+ <label index="or">Oriya</label>
1678+ <label index="pa">Panjabi</label>
1679+ <label index="pl">Polish</label>
1680+ <label index="ps">Pushto</label>
1681+ <label index="pt">Portuguese</label>
1682+ <label index="qu">Quechua</label>
1683+ <label index="rm">Romansh</label>
1684+ <label index="rn">Rundi</label>
1685+ <label index="ro">Romanian</label>
1686+ <label index="ru">Russian</label>
1687+ <label index="rw">Kinyarwanda</label>
1688+ <label index="sa">Sanskrit</label>
1689+ <label index="sd">Sindhi</label>
1690+ <label index="sg">Sango</label>
1691+ <label index="sh">Serbo-Croatian</label>
1692+ <label index="si">Sinhalese</label>
1693+ <label index="sk">Slovak</label>
1694+ <label index="sl">Slovenian</label>
1695+ <label index="sm">Samoan</label>
1696+ <label index="sn">Shona</label>
1697+ <label index="so">Somali</label>
1698+ <label index="sq">Albanian</label>
1699+ <label index="sr">Serbian</label>
1700+ <label index="ss">Swati</label>
1701+ <label index="st">Southern Sotho</label>
1702+ <label index="su">Sundanese</label>
1703+ <label index="sv">Swedish</label>
1704+ <label index="sw">Swahili</label>
1705+ <label index="ta">Tamil</label>
1706+ <label index="te">Telugu</label>
1707+ <label index="tg">Tajik</label>
1708+ <label index="th">Thai</label>
1709+ <label index="ti">Tigrinya</label>
1710+ <label index="tk">Turkmen</label>
1711+ <label index="tl">Tagalog</label>
1712+ <label index="tn">Tswana</label>
1713+ <label index="to">Tonga</label>
1714+ <label index="tr">Turkish</label>
1715+ <label index="ts">Tsonga</label>
1716+ <label index="tt">Tatar</label>
1717+ <label index="tw">Twi</label>
1718+ <label index="ug">Uighur</label>
1719+ <label index="uk">Ukrainian</label>
1720+ <label index="ur">Urdu</label>
1721+ <label index="uz">Uzbek</label>
1722+ <label index="vi">Vietnamese</label>
1723+ <label index="vo">Volapük</label>
1724+ <label index="wo">Wolof</label>
1725+ <label index="xh">Xhosa</label>
1726+ <label index="yi">Yiddish</label>
1727+ <label index="yo">Yoruba</label>
1728+ <label index="za">Zhuang</label>
1729+ <label index="zh">Chinese</label>
1730+ <label index="zu">Zulu</label>
1731+ </languageKey>
1732+ <languageKey index="de" type="array">
1733+ <label index="aa">Afar</label>
1734+ <label index="ab">Abchasisch</label>
1735+ <label index="af">Afrikaans</label>
1736+ <label index="am">Amharisch</label>
1737+ <label index="ar">Arabisch</label>
1738+ <label index="as">Assamesisch</label>
1739+ <label index="ay">Aymara</label>
1740+ <label index="az">Aserbaidschanisch</label>
1741+ <label index="ba">Baschkirisch</label>
1742+ <label index="be">Belorussisch</label>
1743+ <label index="bg">Bulgarisch</label>
1744+ <label index="bh">Biharisch</label>
1745+ <label index="bi">Bislamisch</label>
1746+ <label index="bn">Bengalisch</label>
1747+ <label index="bo">Tibetanisch</label>
1748+ <label index="br">Bretonisch</label>
1749+ <label index="ca">Katalanisch</label>
1750+ <label index="co">Korsisch</label>
1751+ <label index="cs">Tschechisch</label>
1752+ <label index="cy">Walisisch</label>
1753+ <label index="da">Dänisch</label>
1754+ <label index="de">Deutsch</label>
1755+ <label index="dz">Dzongkha, Bhutani</label>
1756+ <label index="el">Griechisch</label>
1757+ <label index="en">Englisch</label>
1758+ <label index="eo">Esperanto</label>
1759+ <label index="es">Spanisch</label>
1760+ <label index="et">Estnisch</label>
1761+ <label index="eu">Baskisch</label>
1762+ <label index="fa">Persisch</label>
1763+ <label index="fi">Finnisch</label>
1764+ <label index="fj">Fiji</label>
1765+ <label index="fo">Färöisch</label>
1766+ <label index="fr">Französisch</label>
1767+ <label index="fy">Friesisch</label>
1768+ <label index="ga">Irisch</label>
1769+ <label index="gd">Schottisches Gälisch</label>
1770+ <label index="gl">Galizisch</label>
1771+ <label index="gn">Guarani</label>
1772+ <label index="gu">Gujaratisch</label>
1773+ <label index="ha">Haussa</label>
1774+ <label index="he">Hebräisch</label>
1775+ <label index="hi">Hindi</label>
1776+ <label index="hr">Kroatisch</label>
1777+ <label index="hu">Ungarisch</label>
1778+ <label index="hy">Armenisch</label>
1779+ <label index="ia">Interlingua</label>
1780+ <label index="id">Indonesisch</label>
1781+ <label index="ie">Interlingue</label>
1782+ <label index="ik">Inupiak</label>
1783+ <label index="is">Isländisch</label>
1784+ <label index="it">Italienisch</label>
1785+ <label index="iu">Inuktitut (Eskimo)</label>
1786+ <label index="iw">Hebräisch</label>
1787+ <label index="ja">Japanisch</label>
1788+ <label index="ji">Jiddish</label>
1789+ <label index="jv">Javanisch</label>
1790+ <label index="ka">Georgisch</label>
1791+ <label index="kk">Kasachisch</label>
1792+ <label index="kl">Kalaallisut (Grönländisch)</label>
1793+ <label index="km">Kambodschanisch</label>
1794+ <label index="kn">Kannada</label>
1795+ <label index="ko">Koreanisch</label>
1796+ <label index="ks">Kaschmirisch</label>
1797+ <label index="ku">Kurdisch</label>
1798+ <label index="ky">Kirgisisch</label>
1799+ <label index="la">Lateinisch</label>
1800+ <label index="ln">Lingala</label>
1801+ <label index="lo">Laotisch</label>
1802+ <label index="lt">Litauisch</label>
1803+ <label index="lv">Lettisch</label>
1804+ <label index="mg">Malagasisch</label>
1805+ <label index="mi">Maorisch</label>
1806+ <label index="mk">Mazedonisch</label>
1807+ <label index="ml">Malajalam</label>
1808+ <label index="mn">Mongolisch</label>
1809+ <label index="mo">Moldavisch</label>
1810+ <label index="mr">Marathi</label>
1811+ <label index="ms">Malaysisch</label>
1812+ <label index="mt">Maltesisch</label>
1813+ <label index="my">Burmesisch</label>
1814+ <label index="na">Nauruisch</label>
1815+ <label index="ne">Nepalesisch</label>
1816+ <label index="nl">Holländisch</label>
1817+ <label index="no">Norwegisch</label>
1818+ <label index="oc">Okzitanisch</label>
1819+ <label index="om">Oromo</label>
1820+ <label index="or">Oriya</label>
1821+ <label index="pa">Pundjabisch</label>
1822+ <label index="pl">Polnisch</label>
1823+ <label index="ps">Paschtu</label>
1824+ <label index="pt">Portugiesisch</label>
1825+ <label index="qu">Quechua</label>
1826+ <label index="rm">Rätoromanisch</label>
1827+ <label index="rn">Kirundisch</label>
1828+ <label index="ro">Rumänisch</label>
1829+ <label index="ru">Russisch</label>
1830+ <label index="rw">Kijarwanda</label>
1831+ <label index="sa">Sanskrit</label>
1832+ <label index="sd">Zinti</label>
1833+ <label index="sg">Sango</label>
1834+ <label index="sh">Serbokroatisch</label>
1835+ <label index="si">Singhalesisch</label>
1836+ <label index="sk">Slowakisch</label>
1837+ <label index="sl">Slowenisch</label>
1838+ <label index="sm">Samoanisch</label>
1839+ <label index="sn">Schonisch</label>
1840+ <label index="so">Somalisch</label>
1841+ <label index="sq">Albanisch</label>
1842+ <label index="sr">Serbisch</label>
1843+ <label index="ss">Swasiländisch</label>
1844+ <label index="st">Sesothisch</label>
1845+ <label index="su">Sudanesisch</label>
1846+ <label index="sv">Schwedisch</label>
1847+ <label index="sw">Suaheli</label>
1848+ <label index="ta">Tamilisch</label>
1849+ <label index="te">Tegulu</label>
1850+ <label index="tg">Tadschikisch</label>
1851+ <label index="th">Thai</label>
1852+ <label index="ti">Tigrinja</label>
1853+ <label index="tk">Turkmenisch</label>
1854+ <label index="tl">Tagalog</label>
1855+ <label index="tn">Sezuan</label>
1856+ <label index="to">Tongaisch</label>
1857+ <label index="tr">Türkisch</label>
1858+ <label index="ts">Tsongaisch</label>
1859+ <label index="tt">Tatarisch</label>
1860+ <label index="tw">Twi</label>
1861+ <label index="ug">Uigur</label>
1862+ <label index="uk">Ukrainisch</label>
1863+ <label index="ur">Urdu</label>
1864+ <label index="uz">Usbekisch</label>
1865+ <label index="vi">Vietnamesisch</label>
1866+ <label index="vo">Volapük</label>
1867+ <label index="wo">Wolof</label>
1868+ <label index="xh">Xhosa</label>
1869+ <label index="yi">Jiddish</label>
1870+ <label index="yo">Joruba</label>
1871+ <label index="za">Zhuang</label>
1872+ <label index="zh">Chinesisch</label>
1873+ <label index="zu">Zulu</label>
1874+ </languageKey>
1875+ </data>
1876+>>>>>>> MERGE-SOURCE
1877 </T3locallang>
1878\ No newline at end of file
1879
1880=== modified file 'dlf/lib/ISO-639/iso-639-2b.xml'
1881--- dlf/lib/ISO-639/iso-639-2b.xml 2012-08-07 14:39:23 +0000
1882+++ dlf/lib/ISO-639/iso-639-2b.xml 2012-10-10 09:08:30 +0000
1883@@ -1,3 +1,4 @@
1884+<<<<<<< TREE
1885 <?xml version="1.0" encoding="UTF-8"?>
1886 <T3locallang>
1887 <meta type="array">
1888@@ -981,4 +982,989 @@
1889 <label index="zza">Zazaki</label>
1890 </languageKey>
1891 </data>
1892+=======
1893+<?xml version="1.0" encoding="UTF-8"?>
1894+<T3locallang>
1895+ <meta type="array">
1896+ <type>module</type>
1897+ <description>Language labels for ISO 639-2/B codes</description>
1898+ </meta>
1899+ <data type="array">
1900+ <languageKey index="default" type="array">
1901+ <label index="aar">Afar</label>
1902+ <label index="abk">Abkhazian</label>
1903+ <label index="ace">Achinese</label>
1904+ <label index="ach">Acoli</label>
1905+ <label index="ada">Adangme</label>
1906+ <label index="ady">Adyghe, Adygei</label>
1907+ <label index="afa">Afro-Asiatic languages</label>
1908+ <label index="afh">Afrihili</label>
1909+ <label index="afr">Afrikaans</label>
1910+ <label index="ain">Ainu</label>
1911+ <label index="aka">Akan</label>
1912+ <label index="akk">Akkadian</label>
1913+ <label index="alb">Albanian</label>
1914+ <label index="ale">Aleut</label>
1915+ <label index="alg">Algonquian languages</label>
1916+ <label index="alt">Southern Altai</label>
1917+ <label index="amh">Amharic</label>
1918+ <label index="ang">Old English (ca.450-1100)</label>
1919+ <label index="anp">Angika</label>
1920+ <label index="apa">Apache languages</label>
1921+ <label index="ara">Arabic</label>
1922+ <label index="arc">Official/Imperial Aramaic (700-300 BCE)</label>
1923+ <label index="arg">Aragonese</label>
1924+ <label index="arm">Armenian</label>
1925+ <label index="arn">Mapudungun, Mapuche</label>
1926+ <label index="arp">Arapaho</label>
1927+ <label index="art">Artificial languages</label>
1928+ <label index="arw">Arawak</label>
1929+ <label index="asm">Assamese</label>
1930+ <label index="ast">Asturian, Bable, Leonese, Asturleonese</label>
1931+ <label index="ath">Athapascan languages</label>
1932+ <label index="aus">Australian languages</label>
1933+ <label index="ava">Avaric</label>
1934+ <label index="ave">Avestan</label>
1935+ <label index="awa">Awadhi</label>
1936+ <label index="aym">Aymara</label>
1937+ <label index="aze">Azerbaijani</label>
1938+ <label index="bad">Banda languages</label>
1939+ <label index="bai">Bamileke languages</label>
1940+ <label index="bak">Bashkir</label>
1941+ <label index="bal">Baluchi</label>
1942+ <label index="bam">Bambara</label>
1943+ <label index="ban">Balinese</label>
1944+ <label index="baq">Basque</label>
1945+ <label index="bas">Basa</label>
1946+ <label index="bat">Baltic languages</label>
1947+ <label index="bej">Beja, Bedawiyet</label>
1948+ <label index="bel">Byelorussian</label>
1949+ <label index="bem">Bemba</label>
1950+ <label index="ben">Bengali</label>
1951+ <label index="ber">Berber languages</label>
1952+ <label index="bho">Bhojpuri</label>
1953+ <label index="bih">Bihari languages</label>
1954+ <label index="bik">Bikol</label>
1955+ <label index="bin">Bini, Edo</label>
1956+ <label index="bis">Bislama</label>
1957+ <label index="bla">Siksika</label>
1958+ <label index="bnt">Bantu</label>
1959+ <label index="bos">Bosnian</label>
1960+ <label index="bra">Braj</label>
1961+ <label index="bre">Breton</label>
1962+ <label index="btk">Batak languages</label>
1963+ <label index="bua">Buriat</label>
1964+ <label index="bug">Buginese</label>
1965+ <label index="bul">Bulgarian</label>
1966+ <label index="bur">Burmese</label>
1967+ <label index="byn">Blin, Bilin</label>
1968+ <label index="cad">Caddo</label>
1969+ <label index="cai">Central American Indian languages</label>
1970+ <label index="car">Galibi Carib</label>
1971+ <label index="cat">Catalan, Valencian</label>
1972+ <label index="cau">Caucasian languages</label>
1973+ <label index="ceb">Cebuano</label>
1974+ <label index="cel">Celtic languages</label>
1975+ <label index="cha">Chamorro</label>
1976+ <label index="chb">Chibcha</label>
1977+ <label index="che">Chechen</label>
1978+ <label index="chg">Chagatai</label>
1979+ <label index="chi">Chinese</label>
1980+ <label index="chk">Chuukese</label>
1981+ <label index="chm">Mari</label>
1982+ <label index="chn">Chinook jargon</label>
1983+ <label index="cho">Choctaw</label>
1984+ <label index="chp">Chipewyan, Dene Suline</label>
1985+ <label index="chr">Cherokee</label>
1986+ <label index="chu">Church Slavic, Old Bulgarian</label>
1987+ <label index="chv">Chuvash</label>
1988+ <label index="chy">Cheyenne</label>
1989+ <label index="cmc">Chamic languages</label>
1990+ <label index="cop">Coptic</label>
1991+ <label index="cor">Cornish</label>
1992+ <label index="cos">Corsican</label>
1993+ <label index="cpe">English-based Creoles and pidgins</label>
1994+ <label index="cpf">French-based Creoles and pidgins</label>
1995+ <label index="cpp">Portuguese-based Creoles and pidgins</label>
1996+ <label index="cre">Cree</label>
1997+ <label index="crh">Crimean Tatar, Crimean Turkish</label>
1998+ <label index="crp">Creoles and pidgins</label>
1999+ <label index="csb">Kashubian</label>
2000+ <label index="cus">Cushitic languages</label>
2001+ <label index="cze">Czech</label>
2002+ <label index="dak">Dakota</label>
2003+ <label index="dan">Danish</label>
2004+ <label index="dar">Dargwa</label>
2005+ <label index="day">Land Dayak languages</label>
2006+ <label index="del">Delaware</label>
2007+ <label index="den">Slave (Athapascan)</label>
2008+ <label index="dgr">Dogrib</label>
2009+ <label index="din">Dinka</label>
2010+ <label index="div">Divehi, Dhivehi, Maldivian</label>
2011+ <label index="doi">Dogri</label>
2012+ <label index="dra">Dravidian languages</label>
2013+ <label index="dsb">Lower Sorbian</label>
2014+ <label index="dua">Duala</label>
2015+ <label index="dum">Middle Dutch (ca.1050-1350)</label>
2016+ <label index="dut">Dutch</label>
2017+ <label index="dyu">Dyula</label>
2018+ <label index="dzo">Dzongkha</label>
2019+ <label index="efi">Efik</label>
2020+ <label index="egy">Ancient Egyptian</label>
2021+ <label index="eka">Ekajuk</label>
2022+ <label index="elx">Elamite</label>
2023+ <label index="eng">English</label>
2024+ <label index="enm">Middle English (1100-1500)</label>
2025+ <label index="epo">Esperanto</label>
2026+ <label index="est">Estonian</label>
2027+ <label index="ewe">Ewe</label>
2028+ <label index="ewo">Ewondo</label>
2029+ <label index="fan">Fang</label>
2030+ <label index="fao">Faroese</label>
2031+ <label index="fat">Fanti</label>
2032+ <label index="fij">Fijian</label>
2033+ <label index="fil">Filipino, Pilipino</label>
2034+ <label index="fin">Finnish</label>
2035+ <label index="fiu">Finno-Ugrian languages</label>
2036+ <label index="fon">Fon</label>
2037+ <label index="fre">French</label>
2038+ <label index="frm">Middle French (ca.1400-1600)</label>
2039+ <label index="fro">Old French (842-ca.1400)</label>
2040+ <label index="frr">Northern Frisian</label>
2041+ <label index="frs">Eastern Frisian</label>
2042+ <label index="fry">Western Frisian</label>
2043+ <label index="ful">Fulah</label>
2044+ <label index="fur">Friulian</label>
2045+ <label index="gaa">Ga</label>
2046+ <label index="gay">Gayo</label>
2047+ <label index="gba">Gbaya</label>
2048+ <label index="gem">Germanic languages</label>
2049+ <label index="geo">Georgian</label>
2050+ <label index="ger">German</label>
2051+ <label index="gez">Geez</label>
2052+ <label index="gil">Gilbertese</label>
2053+ <label index="gla">Gaelic, Scottish Gaelic</label>
2054+ <label index="gle">Irish</label>
2055+ <label index="glg">Galician</label>
2056+ <label index="glv">Manx</label>
2057+ <label index="gmh">Middle High German (ca.1050-1500)</label>
2058+ <label index="goh">Old High German (ca.750-1050)</label>
2059+ <label index="gon">Gondi</label>
2060+ <label index="gor">Gorontalo</label>
2061+ <label index="got">Gothic</label>
2062+ <label index="grb">Grebo</label>
2063+ <label index="grc">Ancient Greek (to 1453)</label>
2064+ <label index="gre">Modern Greek (1453-)</label>
2065+ <label index="grn">Guarani</label>
2066+ <label index="gsw">Swiss German, Alemannic, Alsatian</label>
2067+ <label index="guj">Gujarati</label>
2068+ <label index="gwi">Gwich'in</label>
2069+ <label index="hai">Haida</label>
2070+ <label index="hat">Haitian, Haitian Creole</label>
2071+ <label index="hau">Hausa</label>
2072+ <label index="haw">Hawaiian</label>
2073+ <label index="heb">Hebrew</label>
2074+ <label index="her">Herero</label>
2075+ <label index="hil">Hiligaynon</label>
2076+ <label index="him">Himachali languages, Western Pahari languages</label>
2077+ <label index="hin">Hindi</label>
2078+ <label index="hit">Hittite</label>
2079+ <label index="hmn">Hmong, Mong</label>
2080+ <label index="hmo">Hiri Motu</label>
2081+ <label index="hrv">Croatian</label>
2082+ <label index="hsb">Upper Sorbian</label>
2083+ <label index="hun">Hungarian</label>
2084+ <label index="hup">Hupa</label>
2085+ <label index="iba">Iban</label>
2086+ <label index="ibo">Igbo</label>
2087+ <label index="ice">Icelandic</label>
2088+ <label index="ido">Ido</label>
2089+ <label index="iii">Sichuan Yi, Nuosu</label>
2090+ <label index="ijo">Ijo languages</label>
2091+ <label index="iku">Inuktitut</label>
2092+ <label index="ile">Interlingue, Occidental</label>
2093+ <label index="ilo">Iloko</label>
2094+ <label index="ina">Interlingua</label>
2095+ <label index="inc">Indic languages</label>
2096+ <label index="ind">Indonesian</label>
2097+ <label index="ine">Indo-European languages</label>
2098+ <label index="inh">Ingush</label>
2099+ <label index="ipk">Inupiak</label>
2100+ <label index="ira">Iranian languages</label>
2101+ <label index="iro">Iroquoian languages</label>
2102+ <label index="ita">Italian</label>
2103+ <label index="jav">Javanese</label>
2104+ <label index="jaw">Javanese</label>
2105+ <label index="jbo">Lojban</label>
2106+ <label index="jpn">Japanese</label>
2107+ <label index="jpr">Judeo-Persian</label>
2108+ <label index="jrb">Judeo-Arabic</label>
2109+ <label index="kaa">Kara-Kalpak</label>
2110+ <label index="kab">Kabyle</label>
2111+ <label index="kac">Kachin, Jingpho</label>
2112+ <label index="kal">Kalaallisut, Greenlandic</label>
2113+ <label index="kam">Kamba</label>
2114+ <label index="kan">Kannada</label>
2115+ <label index="kar">Karen languages</label>
2116+ <label index="kas">Kashmiri</label>
2117+ <label index="kau">Kanuri</label>
2118+ <label index="kaw">Kawi</label>
2119+ <label index="kaz">Kazakh</label>
2120+ <label index="kbd">Kabardian</label>
2121+ <label index="kha">Khasi</label>
2122+ <label index="khi">Khoisan languages</label>
2123+ <label index="khm">Khmer</label>
2124+ <label index="kho">Khotanese, Sakan</label>
2125+ <label index="kik">Kikuyu, Gikuyu</label>
2126+ <label index="kin">Kinyarwanda</label>
2127+ <label index="kir">Kirghiz, Kyrgyz</label>
2128+ <label index="kmb">Kimbundu</label>
2129+ <label index="kok">Konkani</label>
2130+ <label index="kom">Komi</label>
2131+ <label index="kon">Kongo</label>
2132+ <label index="kor">Korean</label>
2133+ <label index="kos">Kosraean</label>
2134+ <label index="kpe">Kpelle</label>
2135+ <label index="krc">Karachay-Balkar</label>
2136+ <label index="krl">Karelian</label>
2137+ <label index="kro">Kru languages</label>
2138+ <label index="kru">Kurukh</label>
2139+ <label index="kua">Kuanyama, Kwanyama</label>
2140+ <label index="kum">Kumyk</label>
2141+ <label index="kur">Kurdish</label>
2142+ <label index="kut">Kutenai</label>
2143+ <label index="lad">Ladino</label>
2144+ <label index="lah">Lahnda</label>
2145+ <label index="lam">Lamba</label>
2146+ <label index="lao">Lao</label>
2147+ <label index="lat">Latin</label>
2148+ <label index="lav">Latvian</label>
2149+ <label index="lez">Lezghian</label>
2150+ <label index="lim">Limburgan, Limburgish</label>
2151+ <label index="lin">Lingala</label>
2152+ <label index="lit">Lithuanian</label>
2153+ <label index="lol">Mongo</label>
2154+ <label index="loz">Lozi</label>
2155+ <label index="ltz">Luxembourgish, Letzeburgesch</label>
2156+ <label index="lua">Luba-Lulua</label>
2157+ <label index="lub">Luba-Katanga</label>
2158+ <label index="lug">Ganda</label>
2159+ <label index="lui">Luiseno</label>
2160+ <label index="lun">Lunda</label>
2161+ <label index="luo">Luo (Kenya and Tanzania)</label>
2162+ <label index="lus">Lushai</label>
2163+ <label index="mac">Macedonian</label>
2164+ <label index="mad">Madurese</label>
2165+ <label index="mag">Magahi</label>
2166+ <label index="mah">Marshallese</label>
2167+ <label index="mai">Maithili</label>
2168+ <label index="mak">Makasar</label>
2169+ <label index="mal">Malayalam</label>
2170+ <label index="man">Mandingo</label>
2171+ <label index="mao">Maori</label>
2172+ <label index="map">Austronesian languages</label>
2173+ <label index="mar">Marathi</label>
2174+ <label index="mas">Masai</label>
2175+ <label index="may">Malay</label>
2176+ <label index="mdf">Moksha</label>
2177+ <label index="mdr">Mandar</label>
2178+ <label index="men">Mende</label>
2179+ <label index="mga">Middle Irish (900-1200)</label>
2180+ <label index="mic">Mi'kmaq, Micmac</label>
2181+ <label index="min">Minangkabau</label>
2182+ <label index="mis">Uncoded languages</label>
2183+ <label index="mkh">Mon-Khmer languages</label>
2184+ <label index="mlg">Malagasy</label>
2185+ <label index="mlt">Maltese</label>
2186+ <label index="mnc">Manchu</label>
2187+ <label index="mni">Manipuri</label>
2188+ <label index="mno">Manobo languages</label>
2189+ <label index="moh">Mohawk</label>
2190+ <label index="mol">Moldavian</label>
2191+ <label index="mon">Mongolian</label>
2192+ <label index="mos">Mossi</label>
2193+ <label index="mul">Multiple languages</label>
2194+ <label index="mun">Munda languages</label>
2195+ <label index="mus">Creek</label>
2196+ <label index="mwl">Mirandese</label>
2197+ <label index="mwr">Marwari</label>
2198+ <label index="myn">Mayan languages</label>
2199+ <label index="myv">Erzya</label>
2200+ <label index="nah">Nahuatl languages</label>
2201+ <label index="nai">North American Indian languages</label>
2202+ <label index="nap">Neapolitan</label>
2203+ <label index="nau">Nauru</label>
2204+ <label index="nav">Navajo, Navaho</label>
2205+ <label index="nbl">South Ndebele</label>
2206+ <label index="nde">North Ndebele</label>
2207+ <label index="ndo">Ndonga</label>
2208+ <label index="nds">Low German, Low Saxon</label>
2209+ <label index="nep">Nepali</label>
2210+ <label index="new">Newari, Nepal Bhasa</label>
2211+ <label index="nia">Nias</label>
2212+ <label index="nic">Niger-Kordofanian languages</label>
2213+ <label index="niu">Niuean</label>
2214+ <label index="nno">Norwegian Nynorsk</label>
2215+ <label index="nob">Norwegian Bokmål</label>
2216+ <label index="nog">Nogai</label>
2217+ <label index="non">Old Norse</label>
2218+ <label index="nor">Norwegian</label>
2219+ <label index="nqo">N'Ko</label>
2220+ <label index="nso">Pedi, Sepedi, Northern Sotho</label>
2221+ <label index="nub">Nubian languages</label>
2222+ <label index="nwc">Classical Newari, Classical Nepal Bhasa</label>
2223+ <label index="nya">Chichewa, Chewa, Nyanja</label>
2224+ <label index="nym">Nyamwezi</label>
2225+ <label index="nyn">Nyankole</label>
2226+ <label index="nyo">Nyoro</label>
2227+ <label index="nzi">Nzima</label>
2228+ <label index="oci">Occitan (post 1500), Provençal</label>
2229+ <label index="oji">Ojibwa</label>
2230+ <label index="ori">Oriya</label>
2231+ <label index="orm">Oromo</label>
2232+ <label index="osa">Osage</label>
2233+ <label index="oss">Ossetian, Ossetic</label>
2234+ <label index="ota">Ottoman Turkish (1500-1928)</label>
2235+ <label index="oto">Otomian languages</label>
2236+ <label index="paa">Papuan languages</label>
2237+ <label index="pag">Pangasinan</label>
2238+ <label index="pal">Pahlavi</label>
2239+ <label index="pam">Pampanga, Kapampangan</label>
2240+ <label index="pan">Panjabi, Punjabi</label>
2241+ <label index="pap">Papiamento</label>
2242+ <label index="pau">Palauan</label>
2243+ <label index="peo">Old Persian (ca.600-400 BCE)</label>
2244+ <label index="per">Persian</label>
2245+ <label index="phi">Philippine languages</label>
2246+ <label index="phn">Phoenician</label>
2247+ <label index="pli">Pali</label>
2248+ <label index="pol">Polish</label>
2249+ <label index="pon">Pohnpeian</label>
2250+ <label index="por">Portuguese</label>
2251+ <label index="pra">Prakrit languages</label>
2252+ <label index="pro">Old Provençal (to 1500)</label>
2253+ <label index="pus">Pushto</label>
2254+ <label index="que">Quechua</label>
2255+ <label index="raj">Rajasthani</label>
2256+ <label index="rap">Rapanui</label>
2257+ <label index="rar">Rarotongan, Cook Islands Maori</label>
2258+ <label index="roa">Romance languages</label>
2259+ <label index="roh">Romansh</label>
2260+ <label index="rom">Romany</label>
2261+ <label index="rum">Romanian, Moldavian</label>
2262+ <label index="run">Rundi</label>
2263+ <label index="rup">Aromanian, Arumanian, Macedo-Romanian</label>
2264+ <label index="rus">Russian</label>
2265+ <label index="sad">Sandawe</label>
2266+ <label index="sag">Sango</label>
2267+ <label index="sah">Yakut</label>
2268+ <label index="sai">South American Indian</label>
2269+ <label index="sal">Salishan languages</label>
2270+ <label index="sam">Samaritan Aramaic</label>
2271+ <label index="san">Sanskrit</label>
2272+ <label index="sas">Sasak</label>
2273+ <label index="sat">Santali</label>
2274+ <label index="scn">Sicilian</label>
2275+ <label index="sco">Scots</label>
2276+ <label index="sel">Selkup</label>
2277+ <label index="sem">Semitic languages</label>
2278+ <label index="sga">Old Irish (to 900)</label>
2279+ <label index="sgn">Sign Languages</label>
2280+ <label index="shn">Shan</label>
2281+ <label index="sid">Sidamo</label>
2282+ <label index="sin">Sinhalese</label>
2283+ <label index="sio">Siouan languages</label>
2284+ <label index="sit">Sino-Tibetan languages</label>
2285+ <label index="sla">Slavic languages</label>
2286+ <label index="slo">Slovak</label>
2287+ <label index="slv">Slovenian</label>
2288+ <label index="sma">Southern Sami</label>
2289+ <label index="sme">Northern Sami</label>
2290+ <label index="smi">Sami languages</label>
2291+ <label index="smj">Lule Sami</label>
2292+ <label index="smn">Inari Sami</label>
2293+ <label index="smo">Samoan</label>
2294+ <label index="sms">Skolt Sami</label>
2295+ <label index="sna">Shona</label>
2296+ <label index="snd">Sindhi</label>
2297+ <label index="snk">Soninke</label>
2298+ <label index="sog">Sogdian</label>
2299+ <label index="som">Somali</label>
2300+ <label index="son">Songhai languages</label>
2301+ <label index="sot">Southern Sotho</label>
2302+ <label index="spa">Spanish, Castilian</label>
2303+ <label index="srd">Sardinian</label>
2304+ <label index="srn">Sranan Tongo</label>
2305+ <label index="srp">Serbian</label>
2306+ <label index="srr">Serer</label>
2307+ <label index="ssa">Nilo-Saharan languages</label>
2308+ <label index="ssw">Swati</label>
2309+ <label index="suk">Sukuma</label>
2310+ <label index="sun">Sundanese</label>
2311+ <label index="sus">Susu</label>
2312+ <label index="sux">Sumerian</label>
2313+ <label index="swa">Swahili</label>
2314+ <label index="swe">Swedish</label>
2315+ <label index="syc">Classical Syriac</label>
2316+ <label index="syr">Syriac</label>
2317+ <label index="tah">Tahitian</label>
2318+ <label index="tai">Tai languages</label>
2319+ <label index="tam">Tamil</label>
2320+ <label index="tat">Tatar</label>
2321+ <label index="tel">Telugu</label>
2322+ <label index="tem">Timne</label>
2323+ <label index="ter">Tereno</label>
2324+ <label index="tet">Tetum</label>
2325+ <label index="tgk">Tajik</label>
2326+ <label index="tgl">Tagalog</label>
2327+ <label index="tha">Thai</label>
2328+ <label index="tib">Tibetan</label>
2329+ <label index="tig">Tigre</label>
2330+ <label index="tir">Tigrinya</label>
2331+ <label index="tiv">Tiv</label>
2332+ <label index="tkl">Tokelau</label>
2333+ <label index="tlh">Klingon</label>
2334+ <label index="tli">Tlingit</label>
2335+ <label index="tmh">Tamashek</label>
2336+ <label index="tog">Tonga (Nyasa)</label>
2337+ <label index="ton">Tonga (Tonga Islands)</label>
2338+ <label index="tpi">Tok Pisin</label>
2339+ <label index="tsi">Tsimshian</label>
2340+ <label index="tsn">Tswana</label>
2341+ <label index="tso">Tsonga</label>
2342+ <label index="tuk">Turkmen</label>
2343+ <label index="tum">Tumbuka</label>
2344+ <label index="tup">Tupi languages</label>
2345+ <label index="tur">Turkish</label>
2346+ <label index="tut">Altaic languages</label>
2347+ <label index="tvl">Tuvalu</label>
2348+ <label index="twi">Twi</label>
2349+ <label index="tyv">Tuvinian</label>
2350+ <label index="udm">Udmurt</label>
2351+ <label index="uga">Ugaritic</label>
2352+ <label index="uig">Uighur</label>
2353+ <label index="ukr">Ukrainian</label>
2354+ <label index="umb">Umbundu</label>
2355+ <label index="und">Undetermined</label>
2356+ <label index="urd">Urdu</label>
2357+ <label index="uzb">Uzbek</label>
2358+ <label index="vai">Vai</label>
2359+ <label index="ven">Venda</label>
2360+ <label index="vie">Vietnamese</label>
2361+ <label index="vol">Volapük</label>
2362+ <label index="vot">Votic</label>
2363+ <label index="wak">Wakashan languages</label>
2364+ <label index="wal">Walamo</label>
2365+ <label index="war">Waray</label>
2366+ <label index="was">Washo</label>
2367+ <label index="wel">Welsh</label>
2368+ <label index="wen">Sorbian languages</label>
2369+ <label index="wln">Walloon</label>
2370+ <label index="wol">Wolof</label>
2371+ <label index="xal">Kalmyk, Oirat</label>
2372+ <label index="xho">Xhosa</label>
2373+ <label index="yao">Yao</label>
2374+ <label index="yap">Yapese</label>
2375+ <label index="yid">Yiddish</label>
2376+ <label index="yor">Yoruba</label>
2377+ <label index="ypk">Yupik languages</label>
2378+ <label index="zap">Zapotec</label>
2379+ <label index="zbl">Blissymbolics</label>
2380+ <label index="zen">Zenaga</label>
2381+ <label index="zha">Zhuang</label>
2382+ <label index="znd">Zande languages</label>
2383+ <label index="zul">Zulu</label>
2384+ <label index="zun">Zuni</label>
2385+ <label index="zxx">No linguistic content</label>
2386+ <label index="zza">Zazaki</label>
2387+ </languageKey>
2388+ <languageKey index="de" type="array">
2389+ <label index="aar">Danakil-Sprache</label>
2390+ <label index="abk">Abchasisch</label>
2391+ <label index="ace">Aceh-Sprache</label>
2392+ <label index="ach">Acholi-Sprache</label>
2393+ <label index="ada">Adangme-Sprache</label>
2394+ <label index="ady">Adygisch</label>
2395+ <label index="afa">Hamitosemitische Sprachen</label>
2396+ <label index="afh">Afrihili</label>
2397+ <label index="afr">Afrikaans</label>
2398+ <label index="ain">Ainu-Sprache</label>
2399+ <label index="aka">Akan-Sprache</label>
2400+ <label index="akk">Akkadisch</label>
2401+ <label index="alb">Albanisch</label>
2402+ <label index="ale">Aleutisch</label>
2403+ <label index="alg">Algonkin-Sprachen</label>
2404+ <label index="alt">Altaisch</label>
2405+ <label index="amh">Amharisch</label>
2406+ <label index="ang">Altenglisch (ca.450-1100)</label>
2407+ <label index="anp">Anga-Sprache</label>
2408+ <label index="apa">Apachen-Sprachen</label>
2409+ <label index="ara">Arabisch</label>
2410+ <label index="arc">Aramäisch (700-300 v.Chr.)</label>
2411+ <label index="arg">Aragonesisch</label>
2412+ <label index="arm">Armenisch</label>
2413+ <label index="arn">Arauka-Sprachen</label>
2414+ <label index="arp">Arapaho-Sprache</label>
2415+ <label index="art">Kunstsprachen</label>
2416+ <label index="arw">Arawak-Sprachen</label>
2417+ <label index="asm">Assamesisch</label>
2418+ <label index="ast">Asturisch</label>
2419+ <label index="ath">Athapaskische Sprachen</label>
2420+ <label index="aus">Australische Sprachen</label>
2421+ <label index="ava">Awarisch</label>
2422+ <label index="ave">Avestisch</label>
2423+ <label index="awa">Awadhī</label>
2424+ <label index="aym">Aymará-Sprache</label>
2425+ <label index="aze">Aserbeidschanisch</label>
2426+ <label index="bad">Banda-Sprachen (Ubangi-Sprachen)</label>
2427+ <label index="bai">Bamileke-Sprachen</label>
2428+ <label index="bak">Baschkirisch</label>
2429+ <label index="bal">Belutschisch</label>
2430+ <label index="bam">Bambara-Sprache</label>
2431+ <label index="ban">Balinesisch</label>
2432+ <label index="baq">Baskisch</label>
2433+ <label index="bas">Basaa-Sprache</label>
2434+ <label index="bat">Baltische Sprachen</label>
2435+ <label index="bej">Bedauye</label>
2436+ <label index="bel">Weißrussisch</label>
2437+ <label index="bem">Bemba-Sprache</label>
2438+ <label index="ben">Bengali</label>
2439+ <label index="ber">Berbersprachen</label>
2440+ <label index="bho">Bhojpurī</label>
2441+ <label index="bih">Bihari</label>
2442+ <label index="bik">Bikol-Sprache</label>
2443+ <label index="bin">Edo-Sprache</label>
2444+ <label index="bis">Beach-la-mar</label>
2445+ <label index="bla">Blackfoot-Sprache</label>
2446+ <label index="bnt">Bantusprachen</label>
2447+ <label index="bos">Bosnisch</label>
2448+ <label index="bra">Braj-Bhakha</label>
2449+ <label index="bre">Bretonisch</label>
2450+ <label index="btk">Batak-Sprache</label>
2451+ <label index="bua">Burjatisch</label>
2452+ <label index="bug">Bugi-Sprache</label>
2453+ <label index="bul">Bulgarisch</label>
2454+ <label index="bur">Birmanisch</label>
2455+ <label index="byn">Bilin-Sprache</label>
2456+ <label index="cad">Caddo-Sprachen</label>
2457+ <label index="cai">Zentralamerikanische Indianersprachen</label>
2458+ <label index="car">Karibische Sprachen</label>
2459+ <label index="cat">Katalanisch</label>
2460+ <label index="cau">Kaukasische Sprachen</label>
2461+ <label index="ceb">Cebuano</label>
2462+ <label index="cel">Keltische Sprachen</label>
2463+ <label index="cha">Chamorro-Sprache</label>
2464+ <label index="chb">Chibcha-Sprachen</label>
2465+ <label index="che">Tschetschenisch</label>
2466+ <label index="chg">Tschagataisch</label>
2467+ <label index="chi">Chinesisch</label>
2468+ <label index="chk">Trukesisch</label>
2469+ <label index="chm">Tscheremissisch</label>
2470+ <label index="chn">Chinook-Jargon</label>
2471+ <label index="cho">Choctaw-Sprache</label>
2472+ <label index="chp">Chipewyan-Sprache</label>
2473+ <label index="chr">Cherokee-Sprache</label>
2474+ <label index="chu">Kirchenslawisch</label>
2475+ <label index="chv">Tschuwaschisch</label>
2476+ <label index="chy">Cheyenne-Sprache</label>
2477+ <label index="cmc">Cham-Sprachen</label>
2478+ <label index="cop">Koptisch</label>
2479+ <label index="cor">Kornisch</label>
2480+ <label index="cos">Korsisch</label>
2481+ <label index="cpe">Kreolisch-Englisch</label>
2482+ <label index="cpf">Kreolisch-Französisch</label>
2483+ <label index="cpp">Kreolisch-Portugiesisch</label>
2484+ <label index="cre">Cree-Sprache</label>
2485+ <label index="crh">Krimtatarisch</label>
2486+ <label index="crp">Kreolische Sprachen, Pidginsprachen</label>
2487+ <label index="csb">Kaschubisch</label>
2488+ <label index="cus">Kuschitische Sprachen</label>
2489+ <label index="cze">Tschechisch</label>
2490+ <label index="dak">Dakota-Sprache</label>
2491+ <label index="dan">Dänisch</label>
2492+ <label index="dar">Darginisch</label>
2493+ <label index="day">Dajakisch</label>
2494+ <label index="del">Delaware-Sprache</label>
2495+ <label index="den">Slave-Sprache</label>
2496+ <label index="dgr">Dogrib-Sprache</label>
2497+ <label index="din">Dinka-Sprache</label>
2498+ <label index="div">Maledivisch</label>
2499+ <label index="doi">Dogrī</label>
2500+ <label index="dra">Drawidische Sprachen</label>
2501+ <label index="dsb">Niedersorbisch</label>
2502+ <label index="dua">Duala-Sprachen</label>
2503+ <label index="dum">Mittelniederländisch (ca.1050-1350)</label>
2504+ <label index="dut">Niederländisch</label>
2505+ <label index="dyu">Dyula-Sprache</label>
2506+ <label index="dzo">Dzongkha</label>
2507+ <label index="efi">Efik</label>
2508+ <label index="egy">Ägyptisch</label>
2509+ <label index="eka">Ekajuk</label>
2510+ <label index="elx">Elamisch</label>
2511+ <label index="eng">Englisch</label>
2512+ <label index="enm">Mittelenglisch (1100-1500)</label>
2513+ <label index="epo">Esperanto</label>
2514+ <label index="est">Estnisch</label>
2515+ <label index="ewe">Ewe-Sprache</label>
2516+ <label index="ewo">Ewondo</label>
2517+ <label index="fan">Pangwe-Sprache</label>
2518+ <label index="fao">Färöisch</label>
2519+ <label index="fat">Fante-Sprache</label>
2520+ <label index="fij">Fidschi-Sprache</label>
2521+ <label index="fil">Pilipino</label>
2522+ <label index="fin">Finnisch</label>
2523+ <label index="fiu">Finnougrische Sprachen</label>
2524+ <label index="fon">Fon-Sprache</label>
2525+ <label index="fre">Französisch</label>
2526+ <label index="frm">Mittelfranzösisch (ca.1400-1600)</label>
2527+ <label index="fro">Altfranzösisch (842-ca.1400)</label>
2528+ <label index="frr">Nordfriesisch</label>
2529+ <label index="frs">Ostfriesisch</label>
2530+ <label index="fry">Friesisch</label>
2531+ <label index="ful">Ful</label>
2532+ <label index="fur">Friulisch</label>
2533+ <label index="gaa">Ga-Sprache</label>
2534+ <label index="gay">Gayo-Sprache</label>
2535+ <label index="gba">Gbaya-Sprache</label>
2536+ <label index="gem">Germanische Sprachen</label>
2537+ <label index="geo">Georgisch</label>
2538+ <label index="ger">Deutsch</label>
2539+ <label index="gez">Altäthiopisch</label>
2540+ <label index="gil">Gilbertesisch</label>
2541+ <label index="gla">Gälisch-Schottisch</label>
2542+ <label index="gle">Irisch</label>
2543+ <label index="glg">Galicisch</label>
2544+ <label index="glv">Manx</label>
2545+ <label index="gmh">Mittelhochdeutsch (ca.1050-1500)</label>
2546+ <label index="goh">Althochdeutsch (ca.750-1050)</label>
2547+ <label index="gon">Gondi-Sprache</label>
2548+ <label index="gor">Gorontalesisch</label>
2549+ <label index="got">Gotisch</label>
2550+ <label index="grb">Grebo-Sprache</label>
2551+ <label index="grc">Griechisch (bis 1453)</label>
2552+ <label index="gre">Neugriechisch (ab 1453)</label>
2553+ <label index="grn">Guaraní-Sprache</label>
2554+ <label index="gsw">Schweizerdeutsch</label>
2555+ <label index="guj">Gujarātī-Sprache</label>
2556+ <label index="gwi">Kutchin-Sprache</label>
2557+ <label index="hai">Haida-Sprache</label>
2558+ <label index="hat">Haïtien (Haiti-Kreolisch)</label>
2559+ <label index="hau">Haussa-Sprache</label>
2560+ <label index="haw">Hawaiisch</label>
2561+ <label index="heb">Hebräisch</label>
2562+ <label index="her">Herero-Sprache</label>
2563+ <label index="hil">Hiligaynon-Sprache</label>
2564+ <label index="him">Himachali</label>
2565+ <label index="hin">Hindi</label>
2566+ <label index="hit">Hethitisch</label>
2567+ <label index="hmn">Miao-Sprachen</label>
2568+ <label index="hmo">Hiri-Motu</label>
2569+ <label index="hrv">Kroatisch</label>
2570+ <label index="hsb">Obersorbisch</label>
2571+ <label index="hun">Ungarisch</label>
2572+ <label index="hup">Hupa-Sprache</label>
2573+ <label index="iba">Iban-Sprache</label>
2574+ <label index="ibo">Ibo-Sprache</label>
2575+ <label index="ice">Isländisch</label>
2576+ <label index="ido">Ido</label>
2577+ <label index="iii">Lalo-Sprache</label>
2578+ <label index="ijo">Ijo-Sprache</label>
2579+ <label index="iku">Inuktitut</label>
2580+ <label index="ile">Interlingue</label>
2581+ <label index="ilo">Ilokano-Sprache</label>
2582+ <label index="ina">Interlingua</label>
2583+ <label index="inc">Indoarische Sprachen</label>
2584+ <label index="ind">Bahasa Indonesia</label>
2585+ <label index="ine">Indogermanische Sprachen</label>
2586+ <label index="inh">Inguschisch</label>
2587+ <label index="ipk">Inupik</label>
2588+ <label index="ira">Iranische Sprachen</label>
2589+ <label index="iro">Irokesische Sprachen</label>
2590+ <label index="ita">Italienisch</label>
2591+ <label index="jav">Javanisch</label>
2592+ <label index="jbo">Lojban</label>
2593+ <label index="jpn">Japanisch</label>
2594+ <label index="jpr">Jüdisch-Persisch</label>
2595+ <label index="jrb">Jüdisch-Arabisch</label>
2596+ <label index="kaa">Karakalpakisch</label>
2597+ <label index="kab">Kabylisch</label>
2598+ <label index="kac">Kachin-Sprache</label>
2599+ <label index="kal">Grönländisch</label>
2600+ <label index="kam">Kamba-Sprache</label>
2601+ <label index="kan">Kannada</label>
2602+ <label index="kar">Karenisch</label>
2603+ <label index="kas">Kaschmiri</label>
2604+ <label index="kau">Kanuri-Sprache</label>
2605+ <label index="kaw">Kawi</label>
2606+ <label index="kaz">Kasachisch</label>
2607+ <label index="kbd">Kabardinisch</label>
2608+ <label index="kha">Khasi-Sprache</label>
2609+ <label index="khi">Khoisan-Sprachen</label>
2610+ <label index="khm">Kambodschanisch</label>
2611+ <label index="kho">Sakisch</label>
2612+ <label index="kik">Kikuyu-Sprache</label>
2613+ <label index="kin">Rwanda-Sprache</label>
2614+ <label index="kir">Kirgisisch</label>
2615+ <label index="kmb">Kimbundu-Sprache</label>
2616+ <label index="kok">Konkani</label>
2617+ <label index="kom">Komi-Sprache</label>
2618+ <label index="kon">Kongo-Sprache</label>
2619+ <label index="kor">Koreanisch</label>
2620+ <label index="kos">Kosraeanisch</label>
2621+ <label index="kpe">Kpelle-Sprache</label>
2622+ <label index="krc">Karatschaiisch-Balkarisch</label>
2623+ <label index="krl">Karelisch</label>
2624+ <label index="kro">Kru-Sprachen</label>
2625+ <label index="kru">Oraon-Sprache</label>
2626+ <label index="kua">Kwanyama-Sprache</label>
2627+ <label index="kum">Kumükisch</label>
2628+ <label index="kur">Kurdisch</label>
2629+ <label index="kut">Kutenai-Sprache</label>
2630+ <label index="lad">Judenspanisch</label>
2631+ <label index="lah">Lahndā</label>
2632+ <label index="lam">Lamba-Sprache (Bantusprache)</label>
2633+ <label index="lao">Laotisch</label>
2634+ <label index="lat">Latein</label>
2635+ <label index="lav">Lettisch</label>
2636+ <label index="lez">Lesgisch</label>
2637+ <label index="lim">Limburgisch</label>
2638+ <label index="lin">Lingala</label>
2639+ <label index="lit">Litauisch</label>
2640+ <label index="lol">Mongo-Sprache</label>
2641+ <label index="loz">Rotse-Sprache</label>
2642+ <label index="ltz">Luxemburgisch</label>
2643+ <label index="lua">Lulua-Sprache</label>
2644+ <label index="lub">Luba-Katanga-Sprache</label>
2645+ <label index="lug">Ganda-Sprache</label>
2646+ <label index="lui">Luiseño-Sprache</label>
2647+ <label index="lun">Lunda-Sprache</label>
2648+ <label index="luo">Luo-Sprache</label>
2649+ <label index="lus">Lushai-Sprache</label>
2650+ <label index="mac">Makedonisch</label>
2651+ <label index="mad">Maduresisch</label>
2652+ <label index="mag">Khotta</label>
2653+ <label index="mah">Marschallesisch</label>
2654+ <label index="mai">Maithili</label>
2655+ <label index="mak">Makassarisch</label>
2656+ <label index="mal">Malayalam</label>
2657+ <label index="man">Malinke-Sprache</label>
2658+ <label index="mao">Maori-Sprache</label>
2659+ <label index="map">Austronesische Sprachen</label>
2660+ <label index="mar">Marathi</label>
2661+ <label index="mas">Massai-Sprache</label>
2662+ <label index="may">Malaiisch</label>
2663+ <label index="mdf">Mokscha-Sprache</label>
2664+ <label index="mdr">Mandaresisch</label>
2665+ <label index="men">Mende-Sprache</label>
2666+ <label index="mga">Mittelirisch (900-1200)</label>
2667+ <label index="mic">Micmac-Sprache</label>
2668+ <label index="min">Minangkabau-Sprache</label>
2669+ <label index="mis">Einzelne andere Sprachen</label>
2670+ <label index="mkh">Mon-Khmer-Sprachen</label>
2671+ <label index="mlg">Malagassi-Sprache</label>
2672+ <label index="mlt">Maltesisch</label>
2673+ <label index="mnc">Mandschurisch</label>
2674+ <label index="mni">Meithei-Sprache</label>
2675+ <label index="mno">Manobo-Sprachen</label>
2676+ <label index="moh">Mohawk-Sprache</label>
2677+ <label index="mol">Moldavisch</label>
2678+ <label index="mon">Mongolisch</label>
2679+ <label index="mos">Mossi-Sprache</label>
2680+ <label index="mul">Mehrere Sprachen</label>
2681+ <label index="mun">Mundasprachen</label>
2682+ <label index="mus">Muskogisch</label>
2683+ <label index="mwl">Mirandesisch</label>
2684+ <label index="mwr">Mārwārī</label>
2685+ <label index="myn">Maya-Sprachen</label>
2686+ <label index="myv">Erza-Mordwinisch</label>
2687+ <label index="nah">Nahuatl</label>
2688+ <label index="nai">Nordamerikanische Indianersprachen</label>
2689+ <label index="nap">Neapel (Mundart)</label>
2690+ <label index="nau">Nauruanisch</label>
2691+ <label index="nav">Navajo-Sprache</label>
2692+ <label index="nbl">Ndebele-Sprache (Transvaal)</label>
2693+ <label index="nde">Ndebele-Sprache (Simbabwe)</label>
2694+ <label index="ndo">Ndonga</label>
2695+ <label index="nds">Niederdeutsch</label>
2696+ <label index="nep">Nepali</label>
2697+ <label index="new">Newārī</label>
2698+ <label index="nia">Nias-Sprache</label>
2699+ <label index="nic">Nigerkordofanische Sprachen</label>
2700+ <label index="niu">Niue-Sprache</label>
2701+ <label index="nno">Nynorsk</label>
2702+ <label index="nob">Bokmål</label>
2703+ <label index="nog">Nogaisch</label>
2704+ <label index="non">Altnorwegisch</label>
2705+ <label index="nor">Norwegisch</label>
2706+ <label index="nqo">N'Ko</label>
2707+ <label index="nso">Pedi-Sprache</label>
2708+ <label index="nub">Nubische Sprachen</label>
2709+ <label index="nwc">Alt-Newārī</label>
2710+ <label index="nya">Nyanja-Sprache</label>
2711+ <label index="nym">Nyamwezi-Sprache</label>
2712+ <label index="nyn">Nkole-Sprache</label>
2713+ <label index="nyo">Nyoro-Sprache</label>
2714+ <label index="nzi">Nzima-Sprache</label>
2715+ <label index="oci">Okzitanisch (ab 1500)</label>
2716+ <label index="oji">Ojibwa-Sprache</label>
2717+ <label index="ori">Oriya-Sprache</label>
2718+ <label index="orm">Galla-Sprache</label>
2719+ <label index="osa">Osage-Sprache</label>
2720+ <label index="oss">Ossetisch</label>
2721+ <label index="ota">Osmanisch (1500-1928)</label>
2722+ <label index="oto">Otomangue-Sprachen</label>
2723+ <label index="paa">Papuasprachen</label>
2724+ <label index="pag">Pangasinan-Sprache</label>
2725+ <label index="pal">Mittelpersisch</label>
2726+ <label index="pam">Pampanggan-Sprache</label>
2727+ <label index="pan">Pandschabi-Sprache</label>
2728+ <label index="pap">Papiamento</label>
2729+ <label index="pau">Palau-Sprache</label>
2730+ <label index="peo">Altpersisch (ca.600-400 v.Chr.)</label>
2731+ <label index="per">Persisch</label>
2732+ <label index="phi">Philippinisch-Austronesisch</label>
2733+ <label index="phn">Phönikisch</label>
2734+ <label index="pli">Pāli</label>
2735+ <label index="pol">Polnisch</label>
2736+ <label index="pon">Ponapeanisch</label>
2737+ <label index="por">Portugiesisch</label>
2738+ <label index="pra">Prākrit</label>
2739+ <label index="pro">Altokzitanisch (bis 1500)</label>
2740+ <label index="pus">Paschtu</label>
2741+ <label index="que">Quechua-Sprache</label>
2742+ <label index="raj">Rājasthānī</label>
2743+ <label index="rap">Osterinsel-Sprache</label>
2744+ <label index="rar">Rarotonganisch</label>
2745+ <label index="roa">Romanische Sprachen</label>
2746+ <label index="roh">Rätoromanisch</label>
2747+ <label index="rom">Romani (Sprache)</label>
2748+ <label index="rum">Rumänisch</label>
2749+ <label index="run">Rundi-Sprache</label>
2750+ <label index="rup">Aromunisch</label>
2751+ <label index="rus">Russisch</label>
2752+ <label index="sad">Sandawe-Sprache</label>
2753+ <label index="sag">Sango-Sprache</label>
2754+ <label index="sah">Jakutisch</label>
2755+ <label index="sai">Südamerikanische Indianersprachen</label>
2756+ <label index="sal">Salish-Sprache</label>
2757+ <label index="sam">Samaritanisch</label>
2758+ <label index="san">Sanskrit</label>
2759+ <label index="sas">Sasak</label>
2760+ <label index="sat">Santālī</label>
2761+ <label index="scn">Sizilianisch</label>
2762+ <label index="sco">Schottisch</label>
2763+ <label index="sel">Selkupisch</label>
2764+ <label index="sem">Semitische Sprachen</label>
2765+ <label index="sga">Altirisch (bis 900)</label>
2766+ <label index="sgn">Zeichensprachen</label>
2767+ <label index="shn">Schan-Sprache</label>
2768+ <label index="sid">Sidamo-Sprache</label>
2769+ <label index="sin">Singhalesisch</label>
2770+ <label index="sio">Sioux-Sprachen</label>
2771+ <label index="sit">Sinotibetische Sprachen</label>
2772+ <label index="sla">Slawische Sprachen</label>
2773+ <label index="slo">Slowakisch</label>
2774+ <label index="slv">Slowenisch</label>
2775+ <label index="sma">Südsaamisch</label>
2776+ <label index="sme">Nordsaamisch</label>
2777+ <label index="smi">Saamisch</label>
2778+ <label index="smj">Lulesaamisch</label>
2779+ <label index="smn">Inarisaamisch</label>
2780+ <label index="smo">Samoanisch</label>
2781+ <label index="sms">Skoltsaamisch</label>
2782+ <label index="sna">Schona-Sprache</label>
2783+ <label index="snd">Sindhi-Sprache</label>
2784+ <label index="snk">Soninke-Sprache</label>
2785+ <label index="sog">Sogdisch</label>
2786+ <label index="som">Somali</label>
2787+ <label index="son">Songhai-Sprache</label>
2788+ <label index="sot">Süd-Sotho-Sprache</label>
2789+ <label index="spa">Spanisch</label>
2790+ <label index="srd">Sardisch</label>
2791+ <label index="srn">Sranantongo</label>
2792+ <label index="srp">Serbisch</label>
2793+ <label index="srr">Serer-Sprache</label>
2794+ <label index="ssa">Nilosaharanische Sprachen</label>
2795+ <label index="ssw">Swasi-Sprache</label>
2796+ <label index="suk">Sukuma-Sprache</label>
2797+ <label index="sun">Sundanesisch</label>
2798+ <label index="sus">Susu</label>
2799+ <label index="sux">Sumerisch</label>
2800+ <label index="swa">Swahili</label>
2801+ <label index="swe">Schwedisch</label>
2802+ <label index="syc">Syrisch</label>
2803+ <label index="syr">Neuostaramäisch</label>
2804+ <label index="tah">Tahitisch</label>
2805+ <label index="tai">Thaisprachen</label>
2806+ <label index="tam">Tamil</label>
2807+ <label index="tat">Tatarisch</label>
2808+ <label index="tel">Telugu-Sprache</label>
2809+ <label index="tem">Temne-Sprache</label>
2810+ <label index="ter">Tereno-Sprache</label>
2811+ <label index="tet">Tetum-Sprache</label>
2812+ <label index="tgk">Tadschikisch</label>
2813+ <label index="tgl">Tagalog</label>
2814+ <label index="tha">Thailändisch</label>
2815+ <label index="tib">Tibetisch</label>
2816+ <label index="tig">Tigre-Sprache</label>
2817+ <label index="tir">Tigrinja-Sprache</label>
2818+ <label index="tiv">Tiv-Sprache</label>
2819+ <label index="tkl">Tokelauanisch</label>
2820+ <label index="tlh">Klingonisch</label>
2821+ <label index="tli">Tlingit-Sprache</label>
2822+ <label index="tmh">Tamašeq</label>
2823+ <label index="tog">Tonga (Bantusprache, Sambia)</label>
2824+ <label index="ton">Tongaisch</label>
2825+ <label index="tpi">Neumelanesisch</label>
2826+ <label index="tsi">Tsimshian-Sprache</label>
2827+ <label index="tsn">Tswana-Sprache</label>
2828+ <label index="tso">Tsonga-Sprache</label>
2829+ <label index="tuk">Turkmenisch</label>
2830+ <label index="tum">Tumbuka-Sprache</label>
2831+ <label index="tup">Tupi-Sprache</label>
2832+ <label index="tur">Türkisch</label>
2833+ <label index="tut">Altaische Sprachen</label>
2834+ <label index="tvl">Elliceanisch</label>
2835+ <label index="twi">Twi-Sprache</label>
2836+ <label index="tyv">Tuwinisch</label>
2837+ <label index="udm">Udmurtisch</label>
2838+ <label index="uga">Ugaritisch</label>
2839+ <label index="uig">Uigurisch</label>
2840+ <label index="ukr">Ukrainisch</label>
2841+ <label index="umb">Mbundu-Sprache</label>
2842+ <label index="und">Nicht zu entscheiden</label>
2843+ <label index="urd">Urdu</label>
2844+ <label index="uzb">Usbekisch</label>
2845+ <label index="vai">Vai-Sprache</label>
2846+ <label index="ven">Venda-Sprache</label>
2847+ <label index="vie">Vietnamesisch</label>
2848+ <label index="vol">Volapük</label>
2849+ <label index="vot">Wotisch</label>
2850+ <label index="wak">Wakash-Sprachen</label>
2851+ <label index="wal">Walamo-Sprache</label>
2852+ <label index="war">Waray</label>
2853+ <label index="was">Washo-Sprache</label>
2854+ <label index="wel">Kymrisch</label>
2855+ <label index="wen">Sorbisch</label>
2856+ <label index="wln">Wallonisch</label>
2857+ <label index="wol">Wolof-Sprache</label>
2858+ <label index="xal">Kalmückisch</label>
2859+ <label index="xho">Xhosa-Sprache</label>
2860+ <label index="yao">Yao-Sprache (Bantusprache)</label>
2861+ <label index="yap">Yapesisch</label>
2862+ <label index="yid">Jiddisch</label>
2863+ <label index="yor">Yoruba-Sprache</label>
2864+ <label index="ypk">Ypik-Sprachen</label>
2865+ <label index="zap">Zapotekisch</label>
2866+ <label index="zbl">Bliss-Symbol</label>
2867+ <label index="zen">Zenaga</label>
2868+ <label index="zha">Zhuang</label>
2869+ <label index="znd">Zande-Sprachen</label>
2870+ <label index="zul">Zulu-Sprache</label>
2871+ <label index="zun">Zuñi-Sprache</label>
2872+ <label index="zxx">Kein linguistischer Inhalt</label>
2873+ <label index="zza">Zazaki</label>
2874+ </languageKey>
2875+ </data>
2876+>>>>>>> MERGE-SOURCE
2877 </T3locallang>
2878\ No newline at end of file
2879
2880=== modified file 'dlf/modules/indexing/index.php'
2881=== modified file 'dlf/modules/newclient/locallang.xml'
2882=== modified file 'dlf/modules/newclient/metadata.inc.php'
2883--- dlf/modules/newclient/metadata.inc.php 2012-09-27 14:45:04 +0000
2884+++ dlf/modules/newclient/metadata.inc.php 2012-10-10 09:08:30 +0000
2885@@ -347,8 +347,208 @@
2886 'is_sortable' => 0,
2887 'is_facet' => 0,
2888 'is_listed' => 0,
2889+<<<<<<< TREE
2890 'autocomplete' => 0,
2891 )
2892+=======
2893+ ),
2894+ 'record_id' => array (
2895+ 'encoded' => 1,
2896+ 'xpath' => './mods:recordInfo/mods:recordIdentifier',
2897+ 'xpath_sorting' => '',
2898+ 'default_value' => '',
2899+ 'wrap' => '',
2900+ 'tokenized' => 0,
2901+ 'stored' => 0,
2902+ 'indexed' => 1,
2903+ 'boost' => 1.00,
2904+ 'is_sortable' => 0,
2905+ 'is_facet' => 0,
2906+ 'is_listed' => 0,
2907+ ),
2908+ 'union_id' => array (
2909+ 'encoded' => 1,
2910+ 'xpath' => './mods:identifier[@type="ppn"]',
2911+ 'xpath_sorting' => '',
2912+ 'default_value' => '',
2913+ 'wrap' => '',
2914+ 'tokenized' => 0,
2915+ 'stored' => 0,
2916+ 'indexed' => 1,
2917+ 'boost' => 1.00,
2918+ 'is_sortable' => 0,
2919+ 'is_facet' => 0,
2920+ 'is_listed' => 0,
2921+ ),
2922+ 'opac_id' => array (
2923+ 'encoded' => 1,
2924+ 'xpath' => './mods:identifier[@type="opac"]',
2925+ 'xpath_sorting' => '',
2926+ 'default_value' => '',
2927+ 'wrap' => '',
2928+ 'tokenized' => 0,
2929+ 'stored' => 0,
2930+ 'indexed' => 1,
2931+ 'boost' => 1.00,
2932+ 'is_sortable' => 0,
2933+ 'is_facet' => 0,
2934+ 'is_listed' => 0,
2935+ ),
2936+ 'urn' => array (
2937+ 'encoded' => 1,
2938+ 'xpath' => './mods:identifier[@type="urn"]',
2939+ 'xpath_sorting' => '',
2940+ 'default_value' => '',
2941+ '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>",
2942+ 'tokenized' => 0,
2943+ 'stored' => 0,
2944+ 'indexed' => 1,
2945+ 'boost' => 1.00,
2946+ 'is_sortable' => 0,
2947+ 'is_facet' => 0,
2948+ 'is_listed' => 0,
2949+ ),
2950+ 'purl' => array (
2951+ 'encoded' => 1,
2952+ 'xpath' => './mods:identifier[@type="purl"]',
2953+ 'xpath_sorting' => '',
2954+ 'default_value' => '',
2955+ 'wrap' => "key.wrap = <dt>|</dt>\nvalue.setContentToCurrent = 1\nvalue.typolink.parameter.current = 1\nvalue.wrap = <dd>|</dd>",
2956+ 'tokenized' => 0,
2957+ 'stored' => 0,
2958+ 'indexed' => 0,
2959+ 'boost' => 1.00,
2960+ 'is_sortable' => 0,
2961+ 'is_facet' => 0,
2962+ 'is_listed' => 0,
2963+ ),
2964+ 'owner' => array (
2965+ 'encoded' => 1,
2966+ 'xpath' => './mods:name[./mods:role/mods:roleTerm="own"]/mods:displayForm',
2967+ 'xpath_sorting' => '',
2968+ 'default_value' => '',
2969+ 'wrap' => '',
2970+ 'tokenized' => 0,
2971+ 'stored' => 0,
2972+ 'indexed' => 1,
2973+ 'boost' => 1.00,
2974+ 'is_sortable' => 0,
2975+ 'is_facet' => 1,
2976+ 'is_listed' => 0,
2977+ ),
2978+ 'collection' => array (
2979+ 'encoded' => 1,
2980+ 'xpath' => './mods:relatedItem[@type="series"]/mods:titleInfo/mods:title',
2981+ 'xpath_sorting' => '',
2982+ 'default_value' => '',
2983+ 'wrap' => '',
2984+ 'tokenized' => 1,
2985+ 'stored' => 0,
2986+ 'indexed' => 1,
2987+ 'boost' => 1.00,
2988+ 'is_sortable' => 0,
2989+ 'is_facet' => 1,
2990+ 'is_listed' => 0,
2991+ ),
2992+ 'language' => array (
2993+ 'encoded' => 1,
2994+ 'xpath' => './mods:language/mods:languageTerm',
2995+ 'xpath_sorting' => '',
2996+ 'default_value' => '',
2997+ 'wrap' => '',
2998+ 'tokenized' => 0,
2999+ 'stored' => 0,
3000+ 'indexed' => 1,
3001+ 'boost' => 1.00,
3002+ 'is_sortable' => 0,
3003+ 'is_facet' => 1,
3004+ 'is_listed' => 0,
3005+ ),
3006+ 'year' => array (
3007+ 'encoded' => 1,
3008+ 'xpath' => '',
3009+ 'xpath_sorting' => '',
3010+ 'default_value' => '',
3011+ 'wrap' => '',
3012+ 'tokenized' => 0,
3013+ 'stored' => 1,
3014+ 'indexed' => 1,
3015+ 'boost' => 1.00,
3016+ 'is_sortable' => 1,
3017+ 'is_facet' => 1,
3018+ 'is_listed' => 1,
3019+ ),
3020+ 'place' => array (
3021+ 'encoded' => 1,
3022+ 'xpath' => '',
3023+ 'xpath_sorting' => '',
3024+ 'default_value' => '',
3025+ 'wrap' => '',
3026+ 'tokenized' => 1,
3027+ 'stored' => 1,
3028+ 'indexed' => 1,
3029+ 'boost' => 1.00,
3030+ 'is_sortable' => 1,
3031+ 'is_facet' => 1,
3032+ 'is_listed' => 1,
3033+ ),
3034+ 'author' => array (
3035+ 'encoded' => 1,
3036+ 'xpath' => '',
3037+ 'xpath_sorting' => '',
3038+ 'default_value' => '',
3039+ 'wrap' => '',
3040+ 'tokenized' => 1,
3041+ 'stored' => 1,
3042+ 'indexed' => 1,
3043+ 'boost' => 2.00,
3044+ 'is_sortable' => 1,
3045+ 'is_facet' => 1,
3046+ 'is_listed' => 1,
3047+ ),
3048+ 'volume' => array (
3049+ 'encoded' => 1,
3050+ 'xpath' => './mods:part/mods:detail/mods:number',
3051+ 'xpath_sorting' => './mods:part[@type="host"]/@order',
3052+ 'default_value' => '',
3053+ 'wrap' => '',
3054+ 'tokenized' => 0,
3055+ 'stored' => 1,
3056+ 'indexed' => 0,
3057+ 'boost' => 1.00,
3058+ 'is_sortable' => 1,
3059+ 'is_facet' => 0,
3060+ 'is_listed' => 1,
3061+ ),
3062+ 'title' => array (
3063+ 'encoded' => 1,
3064+ 'xpath' => 'concat(./mods:titleInfo/mods:nonSort," ",./mods:titleInfo/mods:title)',
3065+ 'xpath_sorting' => './mods:titleInfo/mods:title',
3066+ 'default_value' => '',
3067+ 'wrap' => "key.wrap = <dt class=\"tx-dlf-metadata-title\">|</dt>\nvalue.wrap = <dd class=\"tx-dlf-metadata-title\">|</dd>",
3068+ 'tokenized' => 1,
3069+ 'stored' => 1,
3070+ 'indexed' => 1,
3071+ 'boost' => 2.00,
3072+ 'is_sortable' => 1,
3073+ 'is_facet' => 0,
3074+ 'is_listed' => 1,
3075+ ),
3076+ 'type' => array (
3077+ 'encoded' => 0,
3078+ 'xpath' => '',
3079+ 'xpath_sorting' => '',
3080+ 'default_value' => '',
3081+ 'wrap' => "key.wrap = <dt class=\"tx-dlf-metadata-type\">|</dt>\nvalue.wrap = <dd class=\"tx-dlf-metadata-type\">|</dd>",
3082+ 'tokenized' => 0,
3083+ 'stored' => 1,
3084+ 'indexed' => 0,
3085+ 'boost' => 1.00,
3086+ 'is_sortable' => 1,
3087+ 'is_facet' => 1,
3088+ 'is_listed' => 1,
3089+ )
3090+>>>>>>> MERGE-SOURCE
3091 );
3092
3093 ?>
3094\ No newline at end of file
3095
3096=== modified file 'dlf/plugins/collection/class.tx_dlf_collection.php'
3097--- dlf/plugins/collection/class.tx_dlf_collection.php 2012-10-02 07:02:46 +0000
3098+++ dlf/plugins/collection/class.tx_dlf_collection.php 2012-10-10 09:08:30 +0000
3099@@ -1,6 +1,6 @@
3100 <?php
3101 /***************************************************************
3102-* Copyright notice
3103+ * Copyright notice
3104 *
3105 * (c) 2011 Sebastian Meyer <sebastian.meyer@slub-dresden.de>
3106 * All rights reserved
3107@@ -28,13 +28,13 @@
3108
3109 /**
3110 * Plugin 'DLF: Collection' for the 'dlf' extension.
3111- *
3112- * @author Sebastian Meyer <sebastian.meyer@slub-dresden.de>
3113- * @copyright Copyright (c) 2011, Sebastian Meyer, SLUB Dresden
3114- * @package TYPO3
3115- * @subpackage tx_dlf
3116- * @access public
3117- */
3118+*
3119+* @author Sebastian Meyer <sebastian.meyer@slub-dresden.de>
3120+* @copyright Copyright (c) 2011, Sebastian Meyer, SLUB Dresden
3121+* @package TYPO3
3122+* @subpackage tx_dlf
3123+* @access public
3124+*/
3125 class tx_dlf_collection extends tx_dlf_plugin {
3126
3127 public $scriptRelPath = 'plugins/collection/class.tx_dlf_collection.php';
3128@@ -53,9 +53,15 @@
3129
3130 $this->init($conf);
3131
3132+<<<<<<< TREE
3133 // Turn cache on.
3134 $this->setCache(TRUE);
3135
3136+=======
3137+ // Disable caching for this plugin.
3138+ $this->setCache(FALSE);
3139+
3140+>>>>>>> MERGE-SOURCE
3141 // Quit without doing anything if required configuration variables are not set.
3142 if (empty($this->conf['pages'])) {
3143
3144@@ -122,10 +128,20 @@
3145
3146 }
3147
3148- // Should user-defined collections be shown, too?
3149+ // Should user-defined or indexed collections be shown?
3150 if ($this->conf['show_userdefined']) {
3151
3152- $additionalWhere .= ' AND NOT tx_dlf_collections.fe_cruser_id=0';
3153+ $userId = $GLOBALS['TSFE']->fe_user->user['uid'];
3154+
3155+ if ($userId) {
3156+
3157+ $additionalWhere .= ' AND tx_dlf_collections.fe_cruser_id='.intval($userId);
3158+
3159+ } else {
3160+
3161+ $additionalWhere .= ' AND tx_dlf_collections.fe_cruser_id!=0';
3162+
3163+ }
3164
3165 } else {
3166
3167@@ -135,14 +151,15 @@
3168
3169 // Get collections.
3170 $result = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query(
3171- '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',
3172- 'tx_dlf_documents',
3173- 'tx_dlf_relations',
3174- 'tx_dlf_collections',
3175- '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'),
3176- 'tx_dlf_collections.uid',
3177- $orderBy,
3178- ''
3179+ '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',
3180+ 'tx_dlf_documents',
3181+ 'tx_dlf_relations',
3182+ 'tx_dlf_collections',
3183+ 'AND tx_dlf_collections.pid='.intval($this->conf['pages']).' AND tx_dlf_documents.partof=0'
3184+ .$additionalWhere.tx_dlf_helper::whereClause('tx_dlf_documents').tx_dlf_helper::whereClause('tx_dlf_collections'),
3185+ 'tx_dlf_collections.uid',
3186+ $orderBy,
3187+ ''
3188 );
3189
3190 $count = $GLOBALS['TYPO3_DB']->sql_num_rows($result);
3191@@ -159,14 +176,14 @@
3192
3193 // Get number of volumes per collection.
3194 $resultVolumes = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query(
3195- 'tx_dlf_collections.uid AS uid,COUNT(tx_dlf_documents.uid) AS volumes',
3196- 'tx_dlf_documents',
3197- 'tx_dlf_relations',
3198- 'tx_dlf_collections',
3199- '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'),
3200- 'tx_dlf_collections.uid',
3201- '',
3202- ''
3203+ 'tx_dlf_collections.uid AS uid,COUNT(tx_dlf_documents.uid) AS volumes',
3204+ 'tx_dlf_documents',
3205+ 'tx_dlf_relations',
3206+ 'tx_dlf_collections',
3207+ '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'),
3208+ 'tx_dlf_collections.uid',
3209+ '',
3210+ ''
3211 );
3212
3213 $volumes = array ();
3214@@ -261,6 +278,7 @@
3215
3216 // Get all documents in collection.
3217 $result = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query(
3218+<<<<<<< TREE
3219 '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',
3220 'tx_dlf_documents',
3221 'tx_dlf_relations',
3222@@ -269,6 +287,16 @@
3223 '',
3224 'tx_dlf_documents.title_sorting ASC',
3225 ''
3226+=======
3227+ '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',
3228+ 'tx_dlf_documents',
3229+ 'tx_dlf_relations',
3230+ 'tx_dlf_collections',
3231+ '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'),
3232+ '',
3233+ 'tx_dlf_documents.title_sorting ASC',
3234+ ''
3235+>>>>>>> MERGE-SOURCE
3236 );
3237
3238 $toplevel = array ();
3239@@ -280,6 +308,7 @@
3240
3241 if (empty($listMetadata)) {
3242
3243+<<<<<<< TREE
3244 $listMetadata = array (
3245 'label' => htmlspecialchars($resArray['collLabel']),
3246 'description' => $this->pi_RTEcssText($resArray['collDesc']),
3247@@ -290,6 +319,16 @@
3248 'order' => 'title',
3249 'order.asc' => TRUE
3250 )
3251+=======
3252+ $_metadata = array (
3253+ 'label' => htmlspecialchars($resArray['collLabel']),
3254+ 'description' => $this->pi_RTEcssText($resArray['collDesc']),
3255+ 'options' => array (
3256+ 'source' => 'collection',
3257+ 'select' => $id,
3258+ 'order' => 'title'
3259+ )
3260+>>>>>>> MERGE-SOURCE
3261 );
3262
3263 }
3264@@ -348,22 +387,45 @@
3265 if ($resArray['partof'] == 0) {
3266
3267 $toplevel[$resArray['uid']] = array (
3268+<<<<<<< TREE
3269 'uid' => $resArray['uid'],
3270 'page' => 1,
3271 'thumbnail' => $resArray['thumbnail'],
3272 'metadata' => $metadata,
3273 'sorting' => $sorting,
3274 'subparts' => array ()
3275+=======
3276+ 'uid' => $resArray['uid'],
3277+ 'page' => 1,
3278+ 'title' => array ($resArray['title']),
3279+ 'volume' => array ($resArray['volume']),
3280+ 'author' => array ($resArray['author']),
3281+ 'year' => array ($resArray['year']),
3282+ 'place' => array ($resArray['place']),
3283+ 'type' => array (tx_dlf_helper::getIndexName($resArray['type'], 'tx_dlf_structures', $this->conf['pages'])),
3284+ 'subparts' => array ()
3285+>>>>>>> MERGE-SOURCE
3286 );
3287
3288 } else {
3289
3290 $subparts[$resArray['partof']][$resArray['volume_sorting']] = array (
3291+<<<<<<< TREE
3292 'uid' => $resArray['uid'],
3293 'page' => 1,
3294 'thumbnail' => $resArray['thumbnail'],
3295 'metadata' => $metadata,
3296 'sorting' => $sorting
3297+=======
3298+ 'uid' => $resArray['uid'],
3299+ 'page' => 1,
3300+ 'title' => array ($resArray['title']),
3301+ 'volume' => array ($resArray['volume']),
3302+ 'author' => array ($resArray['author']),
3303+ 'year' => array ($resArray['year']),
3304+ 'place' => array ($resArray['place']),
3305+ 'type' => array (tx_dlf_helper::getIndexName($resArray['type'], 'tx_dlf_structures', $this->conf['pages']))
3306+>>>>>>> MERGE-SOURCE
3307 );
3308
3309 }
3310
3311=== added file 'dlf/plugins/collection/edit_collection.tmpl'
3312--- dlf/plugins/collection/edit_collection.tmpl 1970-01-01 00:00:00 +0000
3313+++ dlf/plugins/collection/edit_collection.tmpl 2012-10-10 09:08:30 +0000
3314@@ -0,0 +1,32 @@
3315+<!-- ###TEMPLATE### -->
3316+<div class="modal fade" id="###ACTION###">
3317+ <div class="modal-header">
3318+ <a class="close" data-dismiss="modal">×</a>
3319+ <h3>###ACTION_LABEL###</h3>
3320+ </div>
3321+ <div class="modal-body">
3322+ <form class="form-horizontal" action="###ACTION_URL###" method="post">
3323+ <fieldset>
3324+ <div class="control-group">
3325+ <label class="control-label" for="###COLLECTION_NAME###">>###COLLECTION_NAME_LABEL###</label>
3326+ <div class="controls">
3327+ <input type="text" class="input-xlarge" id="###COLLECTION_NAME###"
3328+ name="###COLLECTION_NAME###" value="###COLLECTION_NAME_VALUE###">
3329+ </div>
3330+ </div>
3331+ <div class="control-group">
3332+ <label class="control-label" for="###COLLECTION_DESC###">>###COLLECTION_DESC_LABEL###</label>
3333+ <div class="controls">
3334+ <textarea class="input-xlarge" id="###COLLECTION_DESC###"
3335+ name="###COLLECTION_DESC###" rows="5">###COLLECTION_DESC_VALUE###</textarea>
3336+ </div>
3337+ </div>
3338+ <div class="form-actions">
3339+ <button type="submit" class="btn btn-primary">###SUBMIT_LABEL###</button>
3340+ <button class="btn">###CANCEL_LABEL###</button>
3341+ </div>
3342+ </fieldset>
3343+ </form>
3344+ </div>
3345+</div>
3346+<!-- ###TEMPLATE### -->
3347\ No newline at end of file
3348
3349=== modified file 'dlf/plugins/collection/locallang.xml'
3350--- dlf/plugins/collection/locallang.xml 2011-08-27 16:52:55 +0000
3351+++ dlf/plugins/collection/locallang.xml 2012-10-10 09:08:30 +0000
3352@@ -18,6 +18,19 @@
3353 <label index="volumes"> volumes</label>
3354 <label index="feedAlt">RSS feed</label>
3355 <label index="feedTitle">Subscribe to the RSS feed of this collection!</label>
3356+ <label index="individual_collections.new_collection">Create new collection</label>
3357+ <label index="individual_collections.new_collection.ok">Create collection</label>
3358+ <label index="individual_collections.edit_collection">Edit collection</label>
3359+ <label index="individual_collections.edit_collection.ok">Save changes</label>
3360+ <label index="individual_collections.delete_collection">Delete collection</label>
3361+ <label index="individual_collections.delete_collection.done">Collection removed</label>
3362+ <label index="individual_collections.delete_collection.done.sub">The collection "%s" has been deleted.</label>
3363+ <label index="individual_collections.cancel">Cancel</label>
3364+ <label index="individual_collections.add">Add to "%s"</label>
3365+ <label index="individual_collections.remove">Remove from "%s"</label>
3366+ <label index="individual_collections.remove.blank">Remove from this collection</label>
3367+ <label index="individual_collections.name">Name</label>
3368+ <label index="individual_collections.desc">Description</label>
3369 </languageKey>
3370 <languageKey index="de" type="array">
3371 <label index="tt_content.pi_flexform.sheet_general">Einstellungen</label>
3372@@ -32,6 +45,19 @@
3373 <label index="volumes"> Bände</label>
3374 <label index="feedAlt">RSS-Feed</label>
3375 <label index="feedTitle">Abonnieren Sie den RSS-Feed dieser Kollektion!</label>
3376+ <label index="individual_collections.new_collection">Neue Sammlung erstellen</label>
3377+ <label index="individual_collections.new_collection.ok">Neue Sammlung erstellen</label>
3378+ <label index="individual_collections.edit_collection">Sammlung bearbeiten</label>
3379+ <label index="individual_collections.edit_collection.ok">Änderungen speichern</label>
3380+ <label index="individual_collections.delete_collection">Sammlung entfernen</label>
3381+ <label index="individual_collections.delete_collection.done">Sammlung enfernt</label>
3382+ <label index="individual_collections.delete_collection.done.sub">Die Sammlung "%s" wurde gelöscht.</label>
3383+ <label index="individual_collections.cancel">Abbrechen</label>
3384+ <label index="individual_collections.add">Zu "%s" hinzufügen</label>
3385+ <label index="individual_collections.remove">Aus "%s" entfernen</label>
3386+ <label index="individual_collections.remove.blank">Aus dieser Sammlung entfernen</label>
3387+ <label index="individual_collections.name">Name</label>
3388+ <label index="individual_collections.desc">Beschreibung</label>
3389 </languageKey>
3390 </data>
3391 </T3locallang>
3392\ No newline at end of file
3393
3394=== modified file 'dlf/plugins/listview/class.tx_dlf_listview.php'
3395--- dlf/plugins/listview/class.tx_dlf_listview.php 2012-10-02 07:02:46 +0000
3396+++ dlf/plugins/listview/class.tx_dlf_listview.php 2012-10-10 09:08:30 +0000
3397@@ -1,6 +1,6 @@
3398 <?php
3399 /***************************************************************
3400-* Copyright notice
3401+ * Copyright notice
3402 *
3403 * (c) 2011 Sebastian Meyer <sebastian.meyer@slub-dresden.de>
3404 * All rights reserved
3405@@ -28,6 +28,7 @@
3406
3407 /**
3408 * Plugin 'DLF: List View' for the 'dlf' extension.
3409+<<<<<<< TREE
3410 *
3411 * @author Sebastian Meyer <sebastian.meyer@slub-dresden.de>, Henrik Lochmann <dev@mentalmotive.com>
3412 * @copyright Copyright (c) 2011, Sebastian Meyer, SLUB Dresden
3413@@ -35,6 +36,15 @@
3414 * @subpackage tx_dlf
3415 * @access public
3416 */
3417+=======
3418+*
3419+* @author Sebastian Meyer <sebastian.meyer@slub-dresden.de>
3420+* @copyright Copyright (c) 2011, Sebastian Meyer, SLUB Dresden
3421+* @package TYPO3
3422+* @subpackage tx_dlf
3423+* @access public
3424+*/
3425+>>>>>>> MERGE-SOURCE
3426 class tx_dlf_listview extends tx_dlf_plugin {
3427
3428 public $scriptRelPath = 'plugins/listview/class.tx_dlf_listview.php';
3429@@ -158,10 +168,34 @@
3430
3431 $markerArray['###METADATA###'] = '';
3432
3433+<<<<<<< TREE
3434 $markerArray['###THUMBNAIL###'] = '';
3435
3436+=======
3437+ // Process entry action hooks.
3438+ $hookObjects = tx_dlf_helper::getHookObjects(get_called_class());
3439+
3440+ foreach($hookObjects as $hookObj) {
3441+
3442+ if (method_exists($hookObj, 'getEntry_fillEntryActions')) {
3443+
3444+ $markerArray['###ENTRY_ACTIONS###'] = $hookObj->getEntry_fillEntryActions($this, $this->list->elements[$number]);
3445+
3446+ }
3447+
3448+ }
3449+
3450+ // Ensure marker is processed.
3451+ if ($markerArray['###ENTRY_ACTIONS###'] == NULL) {
3452+
3453+ $markerArray['###ENTRY_ACTIONS###'] = '';
3454+
3455+ }
3456+
3457+>>>>>>> MERGE-SOURCE
3458 $subpart = '';
3459
3460+<<<<<<< TREE
3461 $imgAlt = '';
3462
3463 $metadata = $this->list->elements[$number]['metadata'];
3464@@ -235,6 +269,75 @@
3465 $field .= $parsedValue;
3466
3467 $markerArray['###METADATA###'] .= $this->cObj->stdWrap($field, $fieldwrap['all.']);
3468+=======
3469+ foreach ($this->metadata as $_index_name => $_wrap) {
3470+
3471+ $hasValue = FALSE;
3472+
3473+ if (is_array($this->list->elements[$number][$_index_name]) && !empty($this->labels[$_index_name])) {
3474+
3475+ $fieldwrap = $this->parseTS($_wrap);
3476+
3477+ $field = $this->cObj->stdWrap(htmlspecialchars($this->labels[$_index_name]), $fieldwrap['key.']);
3478+
3479+ foreach ($this->list->elements[$number][$_index_name] as $_value) {
3480+
3481+ // Link title to pageview.
3482+ if ($_index_name == 'title') {
3483+
3484+ // Get title of parent document if needed.
3485+ if (empty($_value) && $this->conf['getTitle']) {
3486+
3487+ $_value = '['.tx_dlf_document::getTitle($this->list->elements[$number]['uid'], TRUE).']';
3488+
3489+ }
3490+
3491+ // Set fake title if still not present.
3492+ if (empty($_value)) {
3493+
3494+ $_value = $this->pi_getLL('noTitle');
3495+
3496+ }
3497+
3498+ $_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']);
3499+
3500+ // Translate name of holding library.
3501+ } elseif ($_index_name == 'owner' && !empty($_value)) {
3502+
3503+ $_value = htmlspecialchars(tx_dlf_helper::translate($_value, 'tx_dlf_libraries', $this->conf['pages']));
3504+
3505+ // Translate document type.
3506+ } elseif ($_index_name == 'type' && !empty($_value)) {
3507+
3508+ $_value = $this->pi_getLL($_value, tx_dlf_helper::translate($_value, 'tx_dlf_structures', $this->conf['pages']), FALSE);
3509+
3510+ // Translate ISO 639 language code.
3511+ } elseif ($_index_name == 'language' && !empty($_value)) {
3512+
3513+ $_value = htmlspecialchars(tx_dlf_helper::getLanguageName($_value));
3514+
3515+ } elseif (!empty($_value)) {
3516+
3517+ $_value = htmlspecialchars($_value);
3518+
3519+ }
3520+
3521+ if (!empty($_value)) {
3522+
3523+ $field .= $this->cObj->stdWrap($_value, $fieldwrap['value.']);
3524+
3525+ $hasValue = TRUE;
3526+
3527+ }
3528+
3529+ }
3530+
3531+ if ($hasValue) {
3532+
3533+ $markerArray['###METADATA###'] .= $this->cObj->stdWrap($field, $fieldwrap['all.']);
3534+
3535+ }
3536+>>>>>>> MERGE-SOURCE
3537
3538 }
3539
3540@@ -348,6 +451,7 @@
3541
3542 $markerArray['###SUBMETADATA###'] = '';
3543
3544+<<<<<<< TREE
3545 $markerArray['###SUBTHUMBNAIL###'] = '';
3546
3547 $imgAlt = '';
3548@@ -421,6 +525,75 @@
3549 $field .= $parsedValue;
3550
3551 $markerArray['###SUBMETADATA###'] .= $this->cObj->stdWrap($field, $fieldwrap['all.']);
3552+=======
3553+ foreach ($this->metadata as $_index_name => $_wrap) {
3554+
3555+ $hasValue = FALSE;
3556+
3557+ if (is_array($subpart[$_index_name]) && !empty($this->labels[$_index_name])) {
3558+
3559+ $fieldwrap = $this->parseTS($_wrap);
3560+
3561+ $field = $this->cObj->stdWrap(htmlspecialchars($this->labels[$_index_name]), $fieldwrap['key.']);
3562+
3563+ foreach ($subpart[$_index_name] as $_value) {
3564+
3565+ // Link title to pageview.
3566+ if ($_index_name == 'title') {
3567+
3568+ // Get title of parent document if needed.
3569+ if (empty($_value) && $this->conf['getTitle']) {
3570+
3571+ $_value = '['.tx_dlf_document::getTitle($subpart['uid'], TRUE).']';
3572+
3573+ }
3574+
3575+ // Set fake title if still not present.
3576+ if (empty($_value)) {
3577+
3578+ $_value = $this->pi_getLL('noTitle');
3579+
3580+ }
3581+
3582+ $_value = $this->pi_linkTP(htmlspecialchars($_value), array ($this->prefixId => array ('id' => $subpart['uid'], 'page' => $subpart['page'], 'pointer' => $this->piVars['pointer'])), TRUE, $this->conf['targetPid']);
3583+
3584+ // Translate name of holding library.
3585+ } elseif ($_index_name == 'owner' && !empty($_value)) {
3586+
3587+ $_value = htmlspecialchars(tx_dlf_helper::translate($_value, 'tx_dlf_libraries', $this->conf['pages']));
3588+
3589+ // Translate document type.
3590+ } elseif ($_index_name == 'type' && !empty($_value)) {
3591+
3592+ $_value = $this->pi_getLL($_value, tx_dlf_helper::translate($_value, 'tx_dlf_structures', $this->conf['pages']), FALSE);
3593+
3594+ // Translate ISO 639 language code.
3595+ } elseif ($_index_name == 'language' && !empty($_value)) {
3596+
3597+ $_value = htmlspecialchars(tx_dlf_helper::getLanguageName($_value));
3598+
3599+ } elseif (!empty($_value)) {
3600+
3601+ $_value = htmlspecialchars($_value);
3602+
3603+ }
3604+
3605+ if (!empty($_value)) {
3606+
3607+ $field .= $this->cObj->stdWrap($_value, $fieldwrap['value.']);
3608+
3609+ $hasValue = TRUE;
3610+
3611+ }
3612+
3613+ }
3614+
3615+ if ($hasValue) {
3616+
3617+ $markerArray['###SUBMETADATA###'] .= $this->cObj->stdWrap($field, $fieldwrap['all.']);
3618+
3619+ }
3620+>>>>>>> MERGE-SOURCE
3621
3622 }
3623
3624@@ -450,6 +623,7 @@
3625 */
3626 protected function loadConfig() {
3627
3628+<<<<<<< TREE
3629 $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
3630 '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',
3631 'tx_dlf_metadata',
3632@@ -457,6 +631,23 @@
3633 '',
3634 'tx_dlf_metadata.sorting ASC',
3635 ''
3636+=======
3637+ $this->labels = array (
3638+ 'title' => $this->pi_getLL('title', tx_dlf_helper::translate('title', 'tx_dlf_metadata', $this->conf['pages']), TRUE),
3639+ 'author' => $this->pi_getLL('author', tx_dlf_helper::translate('author', 'tx_dlf_metadata', $this->conf['pages']), TRUE),
3640+ 'year' => $this->pi_getLL('year', tx_dlf_helper::translate('year', 'tx_dlf_metadata', $this->conf['pages']), TRUE),
3641+ 'place' => $this->pi_getLL('place', tx_dlf_helper::translate('place', 'tx_dlf_metadata', $this->conf['pages']), TRUE),
3642+ 'type' => $this->pi_getLL('type', tx_dlf_helper::translate('type', 'tx_dlf_metadata', $this->conf['pages']), TRUE)
3643+ );
3644+
3645+ $_result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
3646+ 'tx_dlf_metadata.index_name AS index_name,tx_dlf_metadata.wrap AS wrap',
3647+ 'tx_dlf_metadata',
3648+ 'tx_dlf_metadata.pid='.intval($this->conf['pages']).tx_dlf_helper::whereClause('tx_dlf_metadata'),
3649+ '',
3650+ 'tx_dlf_metadata.sorting ASC',
3651+ ''
3652+>>>>>>> MERGE-SOURCE
3653 );
3654
3655 while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {
3656@@ -497,6 +688,19 @@
3657 // Don't cache the output.
3658 $this->setCache(FALSE);
3659
3660+ // Process pre rendering hooks.
3661+ $hookObjects = tx_dlf_helper::getHookObjects(get_called_class());
3662+
3663+ foreach($hookObjects as $hookObj) {
3664+
3665+ if (method_exists($hookObj, 'main_preListRendering')) {
3666+
3667+ $hookObj->main_preListRendering($this);
3668+
3669+ }
3670+
3671+ }
3672+
3673 // Load the list.
3674 $this->list = t3lib_div::makeInstance('tx_dlf_list');
3675
3676@@ -581,6 +785,26 @@
3677
3678 }
3679
3680+ // Process list action hooks.
3681+ $hookObjects = tx_dlf_helper::getHookObjects(get_called_class());
3682+
3683+ foreach($hookObjects as $hookObj) {
3684+
3685+ if (method_exists($hookObj, 'main_fillListActions')) {
3686+
3687+ $markerArray['###LIST_ACTIONS###'] = $hookObj->main_fillListActions($this);
3688+
3689+ }
3690+
3691+ }
3692+
3693+ // Ensure marker is processed.
3694+ if ($markerArray['###LIST_ACTIONS###'] == NULL) {
3695+
3696+ $markerArray['###LIST_ACTIONS###'] = '';
3697+
3698+ }
3699+
3700 $markerArray['###PAGEBROWSER###'] = $this->getPageBrowser();
3701
3702 $markerArray['###SORTING###'] = $this->getSortingForm();
3703
3704=== modified file 'dlf/plugins/listview/template.tmpl'
3705--- dlf/plugins/listview/template.tmpl 2012-09-13 17:53:13 +0000
3706+++ dlf/plugins/listview/template.tmpl 2012-10-10 09:08:30 +0000
3707@@ -4,6 +4,7 @@
3708 <p class="tx-dlf-listview-counts">###COUNT###</p>
3709 ###SORTING###
3710 <p class="tx-dlf-listview-pagebrowser">###PAGEBROWSER###</p>
3711+###LIST_ACTIONS###
3712 <ol class="tx-dlf-listview-list">
3713 <!-- ###ENTRY### -->
3714 <li value="###NUMBER###">
3715@@ -23,6 +24,7 @@
3716 <!-- ###SUBENTRY### -->
3717 </ol>
3718 <!-- ###SUBTEMPLATE### -->
3719+ ###ENTRY_ACTIONS###
3720 </li>
3721 <!-- ###ENTRY### -->
3722 </ol>
3723
3724=== modified file 'dlf/plugins/search/class.tx_dlf_search.php'
3725--- dlf/plugins/search/class.tx_dlf_search.php 2012-10-02 07:02:46 +0000
3726+++ dlf/plugins/search/class.tx_dlf_search.php 2012-10-10 09:08:30 +0000
3727@@ -418,6 +418,7 @@
3728
3729 }
3730
3731+<<<<<<< TREE
3732 // Set last query if applicable.
3733 $lastQuery = '';
3734
3735@@ -435,17 +436,34 @@
3736 'forceAbsoluteUrl' => 1
3737 );
3738
3739+=======
3740+ // Set last query if applicable.
3741+ $lastQuery = '';
3742+
3743+ $_list = t3lib_div::makeInstance('tx_dlf_list');
3744+
3745+ if (!empty($_list->metadata['options']['source']) && $_list->metadata['options']['source'] == 'search') {
3746+
3747+ $lastQuery = $_list->metadata['options']['select'];
3748+
3749+ }
3750+
3751+>>>>>>> MERGE-SOURCE
3752 // Fill markers.
3753 $markerArray = array (
3754 '###ACTION_URL###' => $this->cObj->typoLink_URL($linkConf),
3755 '###LABEL_QUERY###' => $this->pi_getLL('label.query'),
3756 '###LABEL_SUBMIT###' => $this->pi_getLL('label.submit'),
3757 '###FIELD_QUERY###' => $this->prefixId.'[query]',
3758+<<<<<<< TREE
3759 '###QUERY###' => htmlspecialchars($lastQuery),
3760 '###FIELD_DOC###' => $this->addCurrentDocument(),
3761 '###FIELD_COLL###' => $this->addCurrentCollection(),
3762 '###ADDITIONAL_INPUTS###' => $this->addEncryptedCoreName(),
3763 '###FACETS_MENU###' => $this->addFacetsMenu()
3764+=======
3765+ '###QUERY###' => htmlspecialchars($lastQuery),
3766+>>>>>>> MERGE-SOURCE
3767 );
3768
3769 // Get additional fields for extended search.
3770@@ -560,12 +578,30 @@
3771 $solr->params = $params;
3772
3773 // Perform search.
3774+<<<<<<< TREE
3775 $results = $solr->search($query);
3776
3777 $results->metadata = array (
3778 'label' => $label,
3779 'description' => '<p class="tx-dlf-search-numHits">'.htmlspecialchars(sprintf($this->pi_getLL('hits', ''), $solr->numberOfHits, $results->count)).'</p>',
3780 'options' => $results->metadata['options']
3781+=======
3782+ $query = $solr->search($this->piVars['query'], 0, $this->conf['limit'], array ());
3783+
3784+ $numHits = count($query->response->docs);
3785+
3786+ $_list = array ();
3787+
3788+ // Set metadata for search.
3789+ $_metadata = array (
3790+ 'label' => htmlspecialchars(sprintf($this->pi_getLL('searchfor', ''), $this->piVars['query'])),
3791+ 'description' => '<p class="tx-dlf-search-numHits">'.htmlspecialchars(sprintf($this->pi_getLL('hits', ''), $numHits)).'</p>',
3792+ 'options' => array (
3793+ 'source' => 'search',
3794+ 'select' => $this->piVars['query'],
3795+ 'order' => 'relevance'
3796+ )
3797+>>>>>>> MERGE-SOURCE
3798 );
3799
3800 $results->save();

Subscribers

People subscribed via source and target branches