dokuwiki-plugin-bureaucracy icon indicating copy to clipboard operation
dokuwiki-plugin-bureaucracy copied to clipboard

Fix replacedate to handle empty input; see Issue #192

Open tomio13 opened this issue 7 years ago • 3 comments

DATE() will return 1970-01-01 for an empty input. Now, if using a year or part of the date to create namespaces dynamically, this can throw things quite off. This patch adds a check if the supplied date is empty or the strototime() throws an error, and returns an empty string for this case.

This behavior is especially useful for complex forms, where multiple input is possible for the date, and either one or the other is valid only. In my example, running projects and planned projects evaluate differently, and the namespace is composed dynamically based on the input.

tomio13 avatar Oct 27 '18 07:10 tomio13

can you remove the patch file from the PR please?

splitbrain avatar Oct 28 '18 12:10 splitbrain

#This e-mail is a reply to the message of Andreas Gohr [email protected], sent on Sun, 28 Oct 2018 05:42:56 -0700:

#" can you remove the patch file from the PR please?

#end of previous message"

sure. Done. T.

tomio13 avatar Oct 29 '18 10:10 tomio13

Any reason why this does not get merged?

tomio13 avatar Jan 11 '19 15:01 tomio13