Commit Graph

208 Commits

Author SHA1 Message Date
79b29326ae Use new \dokuwiki\plugin\sqlite\SQLiteDB class for DB access 2023-05-24 16:38:34 +02:00
da776bcd8d Fix type errors with empty 'roundto' setting in decimals 2023-04-18 13:11:08 +02:00
460e822f15 code style fixes 2023-04-06 08:47:33 +02:00
6a819106d9 more test and deprecation fixes 2023-04-05 13:39:15 +02:00
efb07f2728 Merge pull request #605 from cmacmackin/fix_datetime_filter
Fixed issue #437, filtering DateTime
2023-04-05 08:33:14 +02:00
df2cde2508 remove tab 2022-09-14 14:27:20 +02:00
df51922444 fix format 2022-09-13 23:55:42 +02:00
521d4beb40 catch numbers higher/lower than available prefixes 2022-09-13 23:52:26 +02:00
51dec36840 add eng notation 2022-09-13 23:10:21 +02:00
8957961015 Fixed issue #437, filtering DateTime
Applying a filter on a DateTime column in an aggregation was causing
an uncaught error to occur and prevent the page being rendered at
all. Fortunately, this turned out to be a very simple issue to resolve.
2022-04-14 19:53:31 +01:00
1ca21e1738 Multiple fixes for PHP 8 (#600) 2022-03-31 13:06:54 +02:00
17a3a57826 Manual code style adjustments 2022-01-13 15:52:53 +01:00
0549dcc5bc PHP code sniffer autofixes 2022-01-13 14:50:12 +01:00
95507c0866 Cleanup to make checks and tests pass 2021-07-05 22:18:30 +02:00
c7273e8ec4 Better output mechanisms for URL Type 2021-06-28 09:31:55 +02:00
9dc9943d76 Always display page ids in %pageid% columns
Fixes #504
2020-11-17 11:10:20 +01:00
565b4cc172 Add wrapper function for json_decode() 2020-04-16 12:49:17 +02:00
fbbae12a9b Lookup types use a composite id
JSON encoded pid and rid, together with lastst = 1, offer a unique identifier for fetching all types of referenced data
2020-04-14 17:52:53 +02:00
748e747f37 Manual coding style fixes
Method and variable visibility, camel case method names. Some exclusions due to inheritance
2020-04-14 14:22:27 +02:00
d6d97f6064 Automatic coding style fixes 2020-04-14 14:22:27 +02:00
59b3d05c27 Fix page access check in Tag type 2020-04-07 21:03:25 +02:00
7f803aa873 Fix data access for lookup types 2020-04-07 20:56:49 +02:00
0ceefd5c55 Start unifying schema types
Schemas per se are type agnostic, isLookup property is removed. Data is stored and accessed differently based on how it is entered and retrieved.

The crucial change is introduction of the composite key of pid and rid. Previous page data utilizes rid = 0 to differentiate itself. Other types, notably lookup, have autoincrementing rid.

Database migration is not implemented yet.
2020-03-18 19:42:48 +01:00
d8bfcd0367 Add missing translations 2019-09-30 16:38:45 +02:00
733fd33b72 Clearer names of date constraints 2019-09-18 13:46:52 +02:00
218490cffe Add past and future date(time) constraints 2019-09-17 22:13:44 +02:00
6781c68df4 change prefix from Abstract to Auto 2019-06-06 11:52:11 +02:00
2096ed951c Prefix Summary type with "Abstract" to hide it in Schema Editor.
Fixes #451
2019-05-30 12:15:43 +02:00
16daff3da5 Fix default datetime format
fixes #427
2019-04-03 16:54:24 +02:00
9c75d051e6 🐛 Fix autocompletion for tags in lookups
See issue #422
2018-10-22 21:43:18 +02:00
64a9487800 Merge pull request #390 from solewniczak/feature-lastsummary-field-in-page-schema
Feature %lastsummary% column in page schema
2018-08-06 09:22:24 +02:00
6822dd25a0 fix: Export wiki field data in aggregation table CSV exports
Fixes #341
2018-05-22 16:48:14 +02:00
9007da58b3 Fix PHP notices 2018-04-24 15:39:20 +02:00
88b58a212b This commit adds '%lastsummary%' special column for page schemas. The column contains the summary of last page revision. 2018-03-30 11:01:43 +02:00
554da625ec Merge pull request #370 from solewniczak/feature-add-special-columns-to-lookup-select-fields
special columns for lookup select fields
2018-03-28 17:38:03 +02:00
b80ca5e1e3 fix: make html5 datetime picker actually work
The datetime picker expects and produces dates / time pairs separated by
the "T" character, not a space. Further, it does not handle seconds at
all.

Therefore, we have to provide the timestamp in the input field separated
by a "T" and for consistency drop seconds altogether. Hence, it
becomes necessary to replace the "T" by a space again before providing it to jQuery
date picker fallback.

Further, we have to actually parse the "T" when validating the
timestamps we receive from the user.
2018-01-26 12:20:51 +01:00
e79e41afc3 fix: use built-in function nl2br 2018-01-18 17:02:59 +01:00
f72220850e feat: render new lines as <br> in LongText 2018-01-18 16:52:31 +01:00
10b11cc50b special columns for lookup select fields
I'm not quite sure if it's more feature or bugfix but i think that special columns of struct schemas should also be available for struct lookup field.
2018-01-11 15:36:47 +01:00
34f483db19 use HTML5 date and datetime-local inputs with jquery as fallback, make the year easier to edit 2018-01-04 01:57:12 +01:00
b0002ceb97 inherit Wiki type from LongText to reduce code duplication 2018-01-02 23:03:35 +01:00
ef7146c1c8 made size of textarea configurable 2017-12-26 23:56:41 +01:00
9503405bd5 added LongText type based on #349 2017-12-26 23:44:26 +01:00
3e7a5b3c23 Refactor to use buildAttributes -> cleaner code 2017-06-14 10:22:36 +02:00
ee9831356b Fix multiple inputs in one label: it's invalid 🙅
Multiple inputs within a single label in invalid HTML. This bug can not
only occur in multi-fields but also in plugin-provided single fields
which may contain multiple input-fields which are then only combined by
javascript.

Thus, we provide an id which every type can assign to the edit-field
best suited. For multi-types this is usually the new-input-template.

Fixes #292
2017-06-14 10:22:36 +02:00
7717c082e7 Add compareValue() abstract base type & lookup
This fixes a bug, that caused the $STRUCT.table.field$ filter syntax to
be broken for lookup fields.  Struct was comparing the row-id of the
argument-column to the raw value of the referenced column at the
filtered lookup.

There were multiple options to fix this bug:
1. Add a new function to the AbstractBaseType() that return raw value by
default (this is the approach implemented by this commit)
2. Add a function to the lookup type only and use introspection to call
it if it exists.
3. Do not compare the values in the referenced columns, but compare only
the row-ids

The problem with approach 3: It is not possible to compare such
lookup-column to any other column except lookups and this is not what we
want.
Approaches 1 and 2 have different trade-offs on where additional
code/complexity is created. I decided for approach 1 because it is the
cleaner overall approach and we might want to use this functionality for future
types as well.

SPR-875
2017-03-14 13:11:33 +01:00
f800af69c9 refactor: use trait to reduce duplicate code 2017-03-01 17:58:25 +01:00
9ebd2ed6a4 use prefix/postfix for wiki type. fixes #254
The filter mechanism is the same for text and wiki, but inheritance
didn't make sense, so this was moved to a trait instead.
2017-01-24 16:08:19 +01:00
f9a2fce682 Decimal: fix empty checks for mutliple given values 2017-01-24 15:56:58 +01:00
dc7d8d082c do not match in pre/postfix of empty fields
Empty fields where pre and postfixed just as any other field. When
searching for a string that matched a pre/postfix all empty fields where
returned because the pre/postfix matched.
2017-01-24 15:55:12 +01:00