Commit Graph

520 Commits

Author SHA1 Message Date
Alexander Bigga d986aa09e7 Remove not used method indexer::delete().
This method is not used since switching to solarium. It's not compatible
with TYPO3 9.5 and should be removed therefore.
2020-02-17 17:21:47 +01:00
Alexander Bigga 615cc20cb6 Change target navigation of calendar plugin.
The calendar plugin knows the targetPid setting as almost all plugins.
Up to know there is only one targetPid so the pageview has to be on the
same uid as the calendar plugin.

With this patch, the targetPid is only used to address the pageview of
an issue. To link between anchor and year (calendar), the current uid is
used.
2020-02-17 17:18:55 +01:00
Alexander Bigga e736738ae7 The year files are not sorted as volume_sorting is empty. 2020-02-12 09:34:52 +01:00
Sebastian Meyer f9b98e3d4f
Merge pull request #476 from albig/feature-calendar-plugin
Enhance the calendar plugin.
2020-02-11 11:35:12 +01:00
Alexander Bigga 096ff58670 Simplify getting the document type 2020-02-11 09:54:10 +01:00
Alexander Bigga 1ee18ce765 fix line indent 2020-02-11 09:44:19 +01:00
Sebastian Meyer 889b8e510e
Merge pull request #470 from albig/96-pr8
Some more SQL queries converted to doctrine QueryBuilder.
2020-02-10 17:37:23 +01:00
Alexander Bigga 17e0131dbe Enhance the calendar plugin.
The calendar plugin is not usable without a TypoScrip condition or a
condition inside Fluid. The main() method is without any function so
far.

This patch adds the possibility to place the plugin on a separate page
like the pageview plugin.

The main method now does the type-check. Additionally it is possible to
configure an initial document. E.g. the anchor file of a newspaper. So
you may do a page with a calendar of a special newspaper or a single
year.
2020-02-10 17:13:53 +01:00
Alexander Bigga f67bbdbf37
Apply suggestions from code review
Co-Authored-By: Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
2020-02-10 16:56:27 +01:00
Sebastian Meyer 086e8afb16
Merge pull request #475 from albig/fix-474
Fix language overlay for list and single collection view.
2020-02-10 16:53:03 +01:00
Sebastian Meyer 03fab66163
Merge pull request #473 from albig/fix-469
Fix SQL query in search plugin for facetCollections.
2020-02-10 16:37:28 +01:00
Sebastian Meyer 197ee7f0fd
Merge pull request #468 from albig/95-pr7
Bootstrap on accessing the extension configuration in TYPO3 9.
2020-02-10 16:35:51 +01:00
Sebastian Meyer 75a0e1f912
Change some comments to be more consistent. 2020-02-10 16:16:52 +01:00
Alexander Bigga fbe21d5ce1 Fix language overlay for list and single collection view.
There were several bugs which disabled the language overlay:

* Using getRecordOverlay(), the given record array needs to keep
  'uid', 'pid' and 'sys_language_uid'.
* It is not allowed to rename fields in this record.
* There is no overlay ov tx_dlf_documents. This was useless.
* Values of sys_language_contentOL may be boolean but also
  'hideNonTranslated' --> if condition didn't work.
2020-02-10 10:59:25 +01:00
Alexander Bigga 21f62e9ffd Fix SQL query in search plugin for facetCollections.
The SQL query breaks if the array $facetCollections is empty.

Using the QueryBuilder createNamedParameter() fixes the query itself.
But the whole query is not necessary, if no collection is selected.
That's why the patch add's a if(!empty()) statement around.
2020-02-07 15:45:53 +01:00
Alexander Bigga 593bfa2cff fix scrutinizer hint 2020-02-07 14:43:39 +01:00
Alexander Bigga e565695e4f fix codacy hint 2020-02-07 14:41:19 +01:00
Alexander Bigga 93f98d1fb1 Fix count of volume count 2020-02-07 14:15:28 +01:00
Alexander Bigga fd5f89f81b Convert SQL query to QueryBuilder (statistics) 2020-02-07 14:15:28 +01:00
Alexander Bigga f0d0491537 Convert SQL query to QueryBuilder 2020-02-07 14:15:28 +01:00
Alexander Bigga aac393ca9e Convert SQL query to QueryBuilder (statistics) 2020-02-07 14:15:28 +01:00
Alexander Bigga 8e5acaa8c5 Convert SQL query to QueryBuilder 2020-02-07 14:15:28 +01:00
Alexander Bigga f0a4499b8b Bootstrap on accessing the extension configuration in TYPO3 9.
In TYPO3 9 the following arrays are not filled on access of
checkMetadataFormats():

* $GLOBALS['TCA']
* $GLOBALS['BE_USER']
* all devlog constants defined in ext_localconf.php

We need to do some bootstrapping manually here.
2020-02-06 16:13:22 +01:00
Sebastian Meyer 1d69309cab
Fix Codacy issues 2020-02-06 15:48:46 +01:00
Sebastian Meyer 24c31d330c
Remove blank line 2020-02-06 15:42:30 +01:00
Alexander Bigga 29cc3d0b37 fix ident 2020-02-06 12:16:39 +01:00
Alexander Bigga 5e0f132671 Make the newTenant module work with TYPO3 8.7 + 9.5. 2020-02-06 11:31:23 +01:00
Alexander Bigga 81a53cb7ef move newTenantModule back to the tools module 2020-02-06 11:02:00 +01:00
Alexander Bigga d3ae8f1830 Migration newTenant module to TYPO3 9
* main() gets only one parameter, but two are required --> remove unused
  (?) response
* The pagetree is not shown anymore in section 'tools' --> move to 'web'
* Do not reuse $queryBuilder objects! The results are wrong.
2020-02-06 10:17:57 +01:00
Sebastian Meyer 64877fff27
Merge pull request #466 from albig/95-pr5
Show flashmessages on updating kitodo records in the backend.
2020-02-06 09:43:14 +01:00
Sebastian Meyer 43fe447a52
Consistently write "FlashMessage" in CamelCase 2020-02-06 09:35:17 +01:00
Sebastian Meyer 598c02dc9c
Consistently write "FlashMessage" in CamelCase 2020-02-06 09:33:16 +01:00
Alexander Bigga d39435e634 fix scrutinizer hint 2020-02-05 19:57:12 +01:00
Alexander Bigga 9810c2a78b Show flash messages in indexer using the default queue.
Currently, no feedback is shown on updating records in the TYPO3 list
module. This is due to a the flash message rendering in the backend
module. This use the fluid FlashMessagesViewHelper() which get's passed
the default queuei ('core.template.flashMessages').

I didn't find a way to overwrite this queue. In case of Indexer::add(),
this patch adds the default queue. Messages are shown. But with the
default Bootstrap render including the htmlspecialchars() handling.
2020-02-05 17:52:32 +01:00
Sebastian Meyer 98ea294531
Merge pull request #465 from albig/95-pr4
Three SQL-queries migrated to QueryBuilder.
2020-02-05 16:58:24 +01:00
Sebastian Meyer 3b4fde1ba3
Merge pull request #464 from albig/95-pr3
Convert eID-scripts to support PSR-7.
2020-02-05 16:54:45 +01:00
Alexander Bigga aedf54e570 Move comment to KitodoFlashmessageRenderer 2020-02-05 16:38:06 +01:00
Alexander Bigga 34041e9884 Fork the BootstrapRenderer and use it to render flash messages 2020-02-05 16:25:33 +01:00
Sebastian Meyer 71ffa78ab8
Merge pull request #463 from albig/95-pr2
Small config changes for TYPO3 9.5 and 8.7.
2020-02-05 15:48:34 +01:00
Alexander Bigga f896eb717e fix scrutinizer hint 2020-02-05 15:41:52 +01:00
Alexander Bigga 59f3daa439 Fix some scrutinizer hints 2020-02-05 15:32:05 +01:00
Alexander Bigga f026fdd8bd Convert SQL query to QueryBuilder 2020-02-05 15:19:42 +01:00
Alexander Bigga 5d3f2165af Convert two SQL queries to QueryBuilder 2020-02-05 15:19:12 +01:00
Alexander Bigga 1c58c714c3 whereExpression is not necessary with QueryBuilder
QueryBuilder respects hidden and or delete fields of TCA by its own.

The removed code breaks TYPO3 9.5
2020-02-05 15:17:08 +01:00
Alexander Bigga f2b733e5e7 Add scrutinizer ignore-deprecate - we know this! 2020-02-05 15:13:41 +01:00
Alexander Bigga 69fa811461 Convert eID-scripts to support PSR-7.
With TYPO3 7.4 "Feature: #68186 - PSR-7 support for eID" was added. With
TYPO3 8.7 the simple old style scripts did still work. As of TYPO 9.5
these scripts fail due to missing response object.

This patch converts the eID-scripts to make it work with TYPO3 8.7 and
9.5.
2020-02-05 15:04:47 +01:00
Alexander Bigga 61bb8767c8 Replace constant TYPO3_DLOG.
TYPO3_DLOG is not defined anymore as of TYPO3 9.0. i

See https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/9.0/Breaking-82162-GlobalErrorConstantsRemoved.html

The recommended check is out of the typo3db_legacy extension:

216989225a
2020-02-05 14:47:10 +01:00
Sebastian Meyer 281c3c81c2
Merge pull request #462 from albig/95-pr1
Register Plugins without addPItoST43().
2020-02-05 14:44:14 +01:00
Alexander Bigga bddf25a3b8 Remove own addPItoST43() function as it is not compatible anymore. 2020-02-05 14:32:34 +01:00
Frank Ulrich Weber cdccb0247e Replace nonexistent Method countRow() by rowCount() within basket plugin 2020-01-29 17:18:39 +01:00
Sebastian Meyer 7763267a18
Merge pull request #459 from albig/fix-indexing-authors-with-valueURI-2
Fix indexing METS files with linked URIs.
2020-01-22 17:16:06 +01:00
Alexander Bigga cb50a8cc5e Fix indexing METS files with linked URIs.
Introduced with #401 it is possible for author metadata fields to link
to the given valueURI attribute.

Unfortunately this feature is not complete in case you are using the
author field for facets. The Solr query breaks due to the not allowed
character 31. We have to split the string in Indexer::processPhysical()
as well.

We should fix this issue in 2.x, too.
2020-01-22 17:06:34 +01:00
Alexander Bigga 8aaff82428 Fix arguments on calling addMessage().
If Solr errors occure on saving tx_dlf_documents the backend dies with
the following error:

Argument 1 passed to TYPO3\CMS\Core\Messaging\AbstractMessage::setSeverity() must be of the type integer, string given, called in /app/vendor/typo3/cms/typo3/sysext/core/Classes/Messaging/FlashMessage.php on line 68
2020-01-22 15:56:39 +01:00
Sebastian Meyer 85cc9d4659
Merge pull request #451 from albig/fix-metsdocument-query
Fix #450: Show all MODS metadata
2019-12-17 15:56:22 +01:00
Sebastian Meyer 935e5966d0
Fix code style 2019-12-17 15:25:25 +01:00
Sebastian Meyer 2a09428aa1
Remove unnecessary andX() clause 2019-12-17 14:43:58 +01:00
Sebastian Meyer dd776f8738
Add missing WHERE clauses 2019-12-17 14:38:34 +01:00
Scrutinizer Auto-Fixer 82c13a4dfd Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2019-12-15 20:33:21 +00:00
Alexander Bigga f8b8d28c13 fix codacy hints 2019-12-15 21:00:40 +01:00
Alexander Bigga fcdc9942c1 Show MODS metadata records without own xpath. 2019-12-15 20:33:58 +01:00
Alexander Bigga 7b39b4acf2 Migrate old DB-query to QueryBuilder. 2019-12-15 14:18:12 +01:00
Sebastian Meyer ded3e7bf5f
Move call to addPlayerJS 2019-12-10 13:28:54 +01:00
Christopher 3c9a68cab4
AudioPlayer fix: Load method addPlayerJS in main 2019-12-10 13:15:53 +01:00
Sebastian Meyer 219d9d6252
Merge pull request #444 from BFallert/feature/add_title_to_navicon
add title with translation to 8 navigation icons
2019-11-15 16:53:41 +01:00
Sebastian Meyer 3f593e50a7
Add whitespace between attributes 2019-11-15 16:44:47 +01:00
Bernd Fallert 94933ece35 add title with translation to 8 navigation icons
only if they not active (=>span)
###FIRST###
###BACK###
###PREVIOUS###

###NEXT###
###FORWARD###
###LAST###

if they active (=>a) or not active (=>span)
###DOUBLEPAGE###
###DOUBLEPAGE+1###
2019-11-15 16:26:53 +01:00
Sebastian Meyer 63dac17d88 Sort collection's entries by title initially 2019-11-15 16:00:11 +01:00
Sebastian Meyer 28c81c2323
Merge pull request #441 from BFallert/feature/pageview_add_titel_to_addInteraction
add title with translation to 3 pageview interaction icons
2019-11-15 13:14:32 +01:00
Sebastian Meyer cf12bfe84d
Fix code style 2019-11-15 12:56:44 +01:00
Bernd Fallert a2e82056ac add title with translation to 3 pageview interaction icons
###EDITBUTTON###
###EDITREMOVE###
###MAGNIFIER###
2019-11-15 12:07:23 +01:00
Sebastian Meyer a209ccb3e0
Merge pull request #439 from kitodo/fix-doctypecheck
Fix docTypeCheck for non-indexed documents
2019-11-15 12:06:18 +01:00
Alexander Bigga 60f4f7fd4d Use doc->cPid here. This is set on non-indexed documents, too. 2019-11-15 11:18:50 +01:00
Scrutinizer Auto-Fixer 85debd81af Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2019-11-15 06:54:25 +00:00
Sebastian Meyer c734f43e31 Use internal proxy for fulltext only if configured 2019-11-15 07:50:51 +01:00
Sebastian Meyer 82ea6e7033 We need the PID to get the metadata 2019-11-14 18:35:59 +01:00
Sebastian Meyer 9386dd2a82 Remove unused parameters
Fixes codacy issues
2019-11-14 16:12:31 +01:00
Sebastian Meyer 8b7867f60f Simplify metadata settings 2019-11-14 14:08:21 +01:00
Sebastian Meyer c03abaf43b Replace FormEngine with UserFunc and ItemsProcFunc 2019-11-14 14:08:01 +01:00
Sebastian Meyer a196b60f3d Use lower case CSS classes for backwards compatibility 2019-11-14 11:26:23 +01:00
Alexander Bigga c9ba698718 use always MarkerBasedTemplateService (scrutinizer hint) 2019-11-14 10:59:06 +01:00
Alexander Bigga 642f561eb0 Doctrine does not support multiple orderBy; ASC is default order 2019-11-14 10:17:58 +01:00
Alexander Bigga ecd5ecfab1 array must be initialized 2019-11-14 10:17:18 +01:00
Sebastian Meyer c643210c86
Fix scrutinizer issue 2019-11-14 09:53:08 +01:00
Sebastian Meyer 226ab2ff8f
Merge branch 'master' into fix-calendar 2019-11-14 09:46:44 +01:00
Sebastian Meyer 494a5b618a
Don't escape whitespace in search queries 2019-11-13 21:36:16 +01:00
Sebastian Meyer 3a442a5985 Apply fixes from 2.x to master 2019-11-13 16:55:30 +01:00
Sebastian Meyer 18228403dd
Merge branch 'master' into fix-150 2019-11-13 15:57:11 +01:00
Sebastian Meyer 8cdadbb688
Merge branch 'master' into fix-419 2019-11-13 15:43:57 +01:00
Sebastian Meyer a22e69bdc8 Fix search truncation with '*' and '?' 2019-11-13 14:28:21 +01:00
Sebastian Meyer 3faee53dde Add use declaration for Connection 2019-11-13 14:09:46 +01:00
Sebastian Meyer 97acf54345 Remove obsolete use declarations 2019-11-13 14:09:35 +01:00
Sebastian Meyer 57c40cc7da Fix scrutinizer issue 2019-11-13 14:05:21 +01:00
Sebastian Meyer dc31f96bb4 Turn empty search query into '*' 2019-11-13 14:00:11 +01:00
Sebastian Meyer 51740d7f25 Place condition on new line 2019-11-13 13:51:28 +01:00
Sebastian Meyer 57ecf61ae9 Move namespace declaration behind file-level docs 2019-11-13 13:41:26 +01:00
Sebastian Meyer e832d94e20 Use lower case for all reserved types and keywords 2019-11-13 13:09:00 +01:00
Sebastian Meyer 5e4ad588a2 Use short form of type keywords 2019-11-13 12:51:19 +01:00
Alexander Bigga 98cd03c819 fix trailing whitespaces 2019-11-12 20:58:47 +01:00
Sebastian Meyer 2961ea50a5
Merge branch 'master' into fix-issues 2019-11-12 17:16:04 +01:00
Sebastian Meyer 0066c1d8a9
Fix setting of $sorting for volumes without toplevel 2019-11-12 16:45:36 +01:00
Sebastian Meyer d95af02eee Add magic method __isset() 2019-11-12 16:34:27 +01:00
Alexander Bigga 5a9be24fda Always show volumes of a collection.
In case volumes and parents have different collections assigned it may
happen that these volumes are not shown at all.

E.g.
Parent: "Collection-1"
Volume (child): "Collection-2"

The collection plugin is configured to show only "Collection-2". The
current code cannot find the parent as it does not belogn to "Collection
2". As result, the volume is not shown.

The proposed solution handles the found volume as "toplevel" list entry.
The parent is still not shown.
2019-11-12 15:37:41 +01:00
Sebastian Meyer cf70dc7d9e check if array exists to avoid PHP warning
Co-Authored-By: Alexander Bigga <alexander.bigga@slub-dresden.de>
2019-11-12 11:38:01 +01:00
Sebastian Meyer 432badfe58 Add prefix to localization labels to prevent duplicates 2019-11-11 18:36:25 +01:00
Sebastian Meyer 73fa2513ca Use variable instead of boolean value 2019-11-11 18:26:45 +01:00
Sebastian Meyer c99f292f70 Fix xpath return values 2019-11-08 19:23:54 +01:00
Alexander Bigga e2c476391e fix usage of renamed cache key 2019-11-08 13:29:31 +01:00
Sebastian Meyer e4f9c3636c Fix file loading 2019-11-06 16:01:18 +01:00
Sebastian Meyer 169253f2be Check for errors when loading files 2019-11-06 15:49:34 +01:00
Sebastian Meyer a7b49d50d8 Check for boolean return value 2019-11-06 15:44:31 +01:00
Sebastian Meyer 690dc936c3 Remove type-hinting comment 2019-11-06 15:40:43 +01:00
Sebastian Meyer 5499852a40 Declare variables 2019-11-06 15:37:24 +01:00
Sebastian Meyer df22fbc419 Replace deprecated function fileResource() 2019-11-06 15:06:23 +01:00
Sebastian Meyer 4960aa8b25 Update AbstractModule.php 2019-11-06 15:01:24 +01:00
Sebastian Meyer bc4ce62622 Update Document.php 2019-11-06 14:56:28 +01:00
Sebastian Meyer f6821b836a
Merge pull request #420 from kitodo/fix-scrutinizer-issues
Fix scrutinizer issues
2019-11-06 14:30:35 +01:00
Sebastian Meyer 7b55437d42 Check for empty arrays 2019-11-05 16:53:54 +01:00
Sebastian Meyer 37b6b706fa Fix bugs 2019-11-05 16:50:19 +01:00
Sebastian Meyer c4bf2c03c1 Handle boolean return value 2019-11-05 16:43:59 +01:00
Sebastian Meyer abbc60143f Don't compute size on each iteration 2019-11-05 16:31:35 +01:00
Sebastian Meyer a16761f5a5 Initialize variable before use 2019-11-05 16:29:52 +01:00
Sebastian Meyer 697a1b2f0a Fix phpDoc 2019-11-05 16:12:19 +01:00
Sebastian Meyer 605787e0d7 Check for boolean return values as well 2019-11-05 15:51:16 +01:00
Sebastian Meyer 6da7218b86 Handle boolean return values 2019-11-05 15:09:40 +01:00
Sebastian Meyer ef172e7fef Fix phpDoc 2019-11-05 15:04:47 +01:00
Sebastian Meyer 7d0dd68d35 Fix bug 2019-11-05 15:02:16 +01:00
Sebastian Meyer ea4e14ff78 Use TYPO3 constants in global namespace 2019-11-05 15:00:23 +01:00
Sebastian Meyer 1665d1e8ee Check for variable type before invoking methods 2019-11-05 14:56:17 +01:00
Sebastian Meyer 9167d0bc7b Fix CLI commands for array inputs 2019-11-05 14:48:14 +01:00
Sebastian Meyer 40ba1aedbd Fix code styling 2019-11-05 14:21:40 +01:00
Sebastian Meyer bba4786ec8 Remove dead variable 2019-11-04 16:59:05 +01:00
Sebastian Meyer f840fd5332 Use constants in global namespace 2019-11-04 16:53:38 +01:00
Sebastian Meyer 19cba2ad8b Move property to parent class 2019-11-04 16:37:47 +01:00
Sebastian Meyer 00430d1f15 Handle error while loading file 2019-11-04 16:31:22 +01:00
Sebastian Meyer b10ff7e5ae Add @property documentation 2019-11-04 16:14:18 +01:00
Sebastian Meyer 005f6c34ab Support multiple DMDID 2019-11-04 13:40:04 +01:00
Scrutinizer Auto-Fixer 0eef70d080 Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2019-10-30 17:51:09 +00:00
Sebastian Meyer 6bc0ce7b8e
Merge branch 'master' into code-style 2019-10-30 16:53:01 +01:00
Sebastian Meyer 36a430bf5e Use short array notation 2019-10-30 15:56:33 +01:00
Sebastian Meyer f1e488278f Capitalize TRUE, FALSE, NULL 2019-10-30 15:56:21 +01:00
Sebastian Meyer 6f48dcb9a5 Use PSR-12 code styling 2019-10-30 15:37:44 +01:00
Sebastian Meyer 64c81c7768
Merge pull request #414 from kitodo/fix-calendar-in-master
Extract @LABEL and @ORDERLABEL from METS
2019-10-30 15:05:57 +01:00
Sebastian Meyer 6ff2716d14 Extract @ORDER and @ORDERLABEL from METS 2019-10-30 14:57:59 +01:00
Sebastian Meyer 0f1195f5ea
Merge pull request #404 from kitodo/fix-402
Handle HTML entities in fulltext properly
2019-10-30 14:41:59 +01:00
Alexander Bigga 2159e25b91 Check for type of instance to avoid loading unnecessary JavaScript. 2019-10-22 13:10:43 +02:00
Sebastian Meyer 363302eec3
Merge pull request #408 from kitodo/fix-406
Fix handling of tools' templates
2019-10-21 15:04:22 +02:00
Sebastian Meyer 906c571423
Merge pull request #401 from kitodo/add-gnd-support
Add support for linking URIs
2019-10-21 14:14:18 +02:00
Sebastian Meyer 9a98cab212 Remove special handling of tool templates 2019-10-21 13:55:10 +02:00
Sebastian Meyer a26f31c578 Handle HTML entities in fulltext properly 2019-10-15 14:33:07 +02:00
Sebastian Meyer 77b9d7a313 Add support for linking URIs 2019-10-14 14:58:57 +02:00
Sebastian Meyer 2315586bf2
Merge pull request #392 from effective-webwork/toolbox_custom_template_workaround
Workaround for toolbox plugin bug (if using custom template)
Fixes #363
2019-10-08 14:47:25 +02:00
Sebastian Meyer 42b6ff0c1e
Remove empty line 2019-10-08 14:42:01 +02:00
Christopher Timm 4a0a5bd824 revert removing pi_wrapInBaseClass from tool plugins 2019-10-08 14:08:34 +02:00
Alexander Bigga c987aac6bf
Merge pull request #397 from albig/add-solr-caching
Add caching of raw solr queries
2019-10-07 13:54:19 +02:00
Alexander Bigga fb6970254c fix codacy issue 2019-10-04 15:53:58 +02:00
Alexander Bigga 9dabd7fdde enhance code readability 2019-10-04 15:26:07 +02:00
Alexander Bigga fa7319bb15 add caching of solr queries esp. of collection plugin 2019-10-04 14:17:50 +02:00
Sebastian Meyer cbcd4a1428
Merge pull request #394 from kitodo/add-rights-information-to-oai
License and Rights Information
2019-10-04 14:11:54 +02:00
Sebastian Meyer da0ae9c2a6 Add rights fields to index 2019-10-04 14:06:28 +02:00
Sebastian Meyer eda8e7cbdb
Merge pull request #393 from albig/add-search-in-document
Add a new tool "search in document".
2019-10-02 22:38:45 +02:00
Sebastian Meyer f1f78f9ca5 Add rights information fields 2019-10-02 12:24:20 +02:00
Alexander Bigga dc5050f210
Update Classes/Plugin/Tools/SearchInDocumentTool.php
Co-Authored-By: Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
2019-10-01 21:05:49 +02:00
Sebastian Meyer e450b54210
Fix Code Style 2019-10-01 11:10:52 +02:00
Sebastian Meyer 68e33d3906
Fix Code Style 2019-10-01 11:10:28 +02:00
Sebastian Meyer 82514b2e9a
Fix Code Style 2019-10-01 11:10:12 +02:00
Sebastian Meyer 98cf67a3f5
Fix Code Style 2019-10-01 11:09:48 +02:00
Sebastian Meyer a969ba293c
Fix Code Style 2019-10-01 11:09:29 +02:00
Sebastian Meyer 808da3194c
Fix code style 2019-10-01 11:07:08 +02:00
Alexander Bigga 347301aef5 fix formating 2019-09-30 21:45:51 +02:00
Alexander Bigga 319a051310 do not show the input field if no fulltext is available for the given page 2019-09-30 21:38:28 +02:00
Alexander Bigga dd26e1acd4 Add a new tool "search in document".
This adds a input field to the toolbox in case a fulltext file is
present. The search is executed only in this document. 20 results are
listed and you may page through all results in pages with 20 items.

The search is inspired by the SRU search in DFG-Viewer.

Please note: there is no design provided for this feature (as usual in
Kitodo.Presentation).
2019-09-30 21:01:28 +02:00
Alexander Bigga 58bc7a52af do not double escape phrases as this disables phrase search 2019-09-30 20:52:00 +02:00
Christopher Timm dcb454d9d5 remove comments 2019-09-27 21:11:17 +02:00
Christopher Timm 2307fe94cc add $tool (boolean) parameter for getTemplate in abstractPlugin class to recognize every tool plugin.
If a tool plugin is given getTemplate returns the tool template instead of the toolbox template from "this->conf".
2019-09-27 15:22:39 +02:00
Alexander Bigga 7d1ebb9165 add lost audioplayer configuration 2019-09-24 14:17:08 +02:00
Alexander Bigga 7da3a0b4b7 Use PageRenderer to add JavaScript and CSS file to page header/footer 2019-09-24 13:51:52 +02:00
Alexander Bigga 2a09e92095 do not re-use QueryBuilder for different queries 2019-09-24 12:17:28 +02:00
Alexander Bigga 3a04248120 Fix subpart rendering (title has to set for linking subpart) 2019-09-22 14:27:24 +02:00
Alexander Bigga 486672b0d4 fix another queryBuilder related bug 2019-09-20 23:45:29 +02:00
Alexander Bigga 6881b40398 only instantiate solr once and trim the user query input 2019-09-20 20:42:12 +02:00
Alexander Bigga f64d799783 fix query of metadata in solr class 2019-09-20 20:41:09 +02:00
Alexander Bigga bdbd1c436d fix query of metadata in document listing 2019-09-20 20:40:30 +02:00
Alexander Bigga 2318e50a0f
Fix error in DataHandler.php 2019-09-19 19:41:36 +02:00
Alexander Bigga 0f59b79ed6
Merge pull request #386 from albig/index-geofield
Enable indexing of geospatial information in GeoJSON format.
2019-09-17 14:10:59 +02:00
Alexander Bigga 0fde68cc00 Enable indexing of geospatial information in GeoJSON format. 2019-09-16 13:33:18 +02:00
Alexander Bigga b46cf7bafe Fix class name on new format records.
The default formats are created automatically in tx_dlf_formats on
opening the extension configuration. In this case the class field is set
with double backslashes which is wrong.

The update-script is not affected. The four (!) backslashes updates an
existing old class name correctly.
2019-09-16 10:03:48 +02:00
Alexander Bigga f0c828a1fc only get toplevel documents from solr 2019-09-13 16:25:54 +02:00
Alexander Bigga 0715d2d1e2 fix two mistakes from last patch 2019-09-13 12:11:55 +02:00
Alexander Bigga a47e7beb40 Log error if collection uid is not found and exit. 2019-09-12 15:29:47 +02:00
Alexander Bigga 34d361d543 We need to save all metadata to db - not only the first one! 2019-09-12 15:24:32 +02:00
Alexander Bigga 71c86b9aeb Replace list() construct with new queryBuilder
The list() function works only reliable with numerical arrays. The
result of the queryBuilder queries are assoziative arrays. Additionally
the order of list() has changed in PHP 7. And the order may change in
the future again.

Best is to avoid list() at all [1].

With PHP 7.2 the current solution doesn't work. The list components are
all NULL.

[1] https://www.php.net/manual/en/function.list.php
2019-09-12 13:41:18 +02:00
Sebastian Meyer d10ada4156
Fix Codacy issues 2019-09-11 12:50:00 +02:00
Alexander Bigga a565e6cd11 replase MySQL FIELD() by sorting the resulting array 2019-09-11 12:22:12 +02:00
Alexander Bigga 1447efc5d4 use fetch() to get single record from db results 2019-09-09 10:40:34 +02:00
Alexander Bigga fed9a0f3be Use proper COUNT statement in SQL
The current solution in master does not work because the MYSQL $result
is empty after fetchAll(). You cannot execute a loop with
$result->fetch() afterwards.

The PDOStatement::rowCount() would fix this issue at least for MySQL and
MariaDB but the documentation warns to use it for SELECT queries.

The suggested solution is to make a proper COUNT statement. See the
following issue and patch as example:

https://forge.typo3.org/issues/78129
2019-09-06 12:22:12 +02:00
Alexander Bigga ae58070234 fix SQL syntax error
The equal sign is not part of the field name. The current code creates a
SQL query like
  WHERE (`tx_dlf_solrcores`.`uid=` = 1)
which is obviously wrong.
2019-09-06 11:13:46 +02:00
Sebastian Meyer d0e528543c
Merge pull request #366 from albig/cli-new
Replace old CLI by Symfony Command Controller
2019-09-03 16:08:30 +02:00
Sebastian Meyer 6f26a99b45
$result is not countable, but $allResults should be 2019-09-03 15:40:39 +02:00
Sebastian Meyer b259e01b75
Import namespaces below license 2019-09-03 15:15:52 +02:00
Beatrycze Volk f993f5a3d1 Add queryBuilder variable information and replace fullQuoteStr method call with literal 2019-08-28 11:08:56 +02:00
Beatrycze Volk 652dbbc0f0 Replace deprecated calls to $GLOBALS['TYPO3'] select 2019-08-27 14:23:04 +02:00
Alexander Bigga 488a917195 remove check for old cliDispatcher 2019-08-22 13:42:16 +02:00
Sebastian Meyer 3433582b0e
Merge pull request #370 from albig/fix-369
Fix 369: output stream of search suggestions via output variable
2019-08-21 18:31:36 +02:00
Sebastian Meyer 139cd5ecdf
Fix namespace declaration 2019-08-21 18:24:02 +02:00
Sebastian Meyer 371853aa62
Merge pull request #374 from Beacze/replace-deprecated
Replace deprecated marker related methods and make getTemplate more generic
2019-08-21 18:22:47 +02:00
Sebastian Meyer 729ba261a1
Add namespace to variable declaration 2019-08-21 17:45:05 +02:00
Beatrycze Volk cd9bd7935b Replace deprecated marker related methods and make getTemplate more generic 2019-08-21 17:06:09 +02:00
Sebastian Meyer 0c8bc27df5
Merge pull request #373 from Beacze/initialize-issues-array
Initialize empty issues array in Calendar
2019-08-21 13:07:51 +02:00
Beatrycze Volk 59fd2d867c Initialize empty issues array in Calendar 2019-08-21 12:51:18 +02:00
Sebastian Meyer 93ac39c744
Merge pull request #371 from Beacze/fix-tableofcontents
3.x - Display month and day for table of content
2019-08-20 09:15:46 +02:00
Beatrycze Volk 9b2db31f11 3.x - Display month and day for table of content 2019-08-19 12:58:57 +02:00
Alexander Bigga e5cb1ed541 use GeneralUtility::getUrl like in other eID-Script 2019-08-18 19:46:38 +02:00
Alexander Bigga 76752b2a7c fix #369: output stream of search suggestions via output-variable 2019-08-18 17:54:31 +02:00
Beatrycze Volk 4495168590 Check if metadata value is empty before it is put in html tags 2019-08-16 10:02:50 +02:00
Alexander Bigga 2338600d99 Add droped feature clearRegistry() again. 2019-08-12 15:36:13 +02:00
Alexander Bigga 0c7c9b91ce fix output messages of reindex CLI job 2019-08-12 13:52:47 +02:00
Alexander Bigga d88a7c0118 fix line indents 2019-08-02 15:01:49 +02:00
Alexander Bigga 1c7a625abb enhance verbose output of reindex cli job 2019-08-02 14:19:12 +02:00
Alexander Bigga 4f3b9825ad add documentation of the (new) CLI jobs 2019-08-02 14:09:36 +02:00
Alexander Bigga c7bfa75f49 add new command line indexer 2019-08-01 14:53:31 +02:00
Alexander Bigga 5f8fa3f4b6 remove old cli 2019-08-01 14:52:54 +02:00
Sebastian Meyer 8e102a712d
Check for specific array key 2019-07-30 10:33:14 +02:00
Sebastian Meyer e9de8d6bfc
Check for specific array key 2019-07-30 10:32:55 +02:00
Sebastian Meyer 5d6708bd35
Check for specific array key 2019-07-30 10:32:35 +02:00
Sebastian Meyer 6cab219b36
Check for specific array key 2019-07-30 10:32:10 +02:00
Sebastian Meyer 358fade275
Check for specific array key 2019-07-30 10:31:44 +02:00
Alexander Bigga 9464b3907e Check for empty toolbox configuration.
This patch makes it possible to use a single tool without the toolbox
e.g. in Fluid templates. Using the single tool in this way, the
$this->cobj->data array is NULL. This array is set usually by the
toolbox plugin.

The inclusion has to be done as follow:

> plugin.tx_dlf_fulltexttool {
  userFunc = Kitodo\Dlf\Plugin\Tools\FulltextTool->main
  templateFile = EXT:example/Resources/Private/Plugins/Kitodo/fulltext.tmpl
  pages = {$config.storagePid}
}

Inside the Fluid template:

> <f:cObject typoscriptObjectPath="plugin.tx_dlf_fulltexttool" />
2019-07-30 10:04:21 +02:00
Alexander Bigga 1cb7b94ef0 handle ephemera in document type switch similar to newspaper 2019-07-23 12:22:51 +02:00
Sebastian Meyer bfd418f618 Remove unnecessary GROUP and ORDER statements 2019-07-17 09:21:43 +02:00
Sebastian Meyer 3f5c3e119d Optimize SQL queries 2019-07-16 18:05:41 +02:00
Sebastian Meyer aedf9ae445
Merge pull request #352 from BFallert/temp/add_span_to_PageBrowser
adds span's so that pagebrowser can be formatted like a button bar
2019-06-27 10:47:17 +02:00
Sebastian Meyer 1826901a71
Merge pull request #347 from chrizzor/collection_filter_configuration
add filter configuration for collections
2019-06-27 10:44:49 +02:00
Bernd Fallert ee177a8f28
Update Classes/Plugin/PageGrid.php
change 'act-page' to 'active'
2019-06-27 10:42:01 +02:00
Bernd Fallert f7407542ff
Update Classes/Plugin/PageGrid.php
change 'first-page' to 'prev-page'
2019-06-27 10:38:22 +02:00
Christopher 9d0209eb7e
Remove character "|" from regex
Co-Authored-By: Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
2019-06-27 10:37:53 +02:00
Sebastian Meyer 8149d6ea65
Add <span> for skipped pages as well 2019-06-27 10:25:28 +02:00
BFallert be5f3eea02 adds span's so that pagebrowser can be formatted like a button bar 2019-06-26 09:24:53 +02:00
Christopher Timm 243fc85513 fix code formatting 2019-06-25 20:16:03 +02:00
Christopher Timm 8a1d520089 add translation and perform single mysql select instead of one select for each collection 2019-06-25 20:06:15 +02:00
Lutz Helm 2866613831 Correct whitespaces 2019-06-17 14:00:51 +02:00
Lutz Helm 0988d31862 Correct whitespaces 2019-06-17 13:50:06 +02:00
Lutz Helm 9a10f8d5f7 Organize TODOs and FIXMEs 2019-06-17 13:29:54 +02:00
Lutz Helm f65161a90a Remove unnecessary variable declaration 2019-06-17 13:29:54 +02:00
Lutz Helm 5a1ced2193 Improve PHPDoc for IiifManifest 2019-06-17 13:29:54 +02:00
Lutz Helm ae7a76353b Move METS specific code from Document to MetsDocument 2019-06-17 13:29:54 +02:00
Lutz Helm f6278323a3 Revert renaming of xpath to metadataquery 2019-06-17 13:29:54 +02:00
Lutz Helm b005b5af40 Improve documentation 2019-06-17 13:29:54 +02:00
Lutz Helm 706aeebd38 Remove classname and add unique pseudo root for IIIF formats 2019-06-17 13:29:54 +02:00
Lutz Helm 319be37852 Clarify PHPDoc for Document->getRawText() and Document->getRawTextFromXml() 2019-06-17 13:29:54 +02:00
Lutz Helm 1f6051fe89 Handle newspaper related types for IIIF in DocumentTypeCheck 2019-06-17 13:29:54 +02:00