splitbrain / dokuwiki-plugin-bureaucracy

Create forms and generate pages or emails from them
http://www.dokuwiki.org/plugin:bureaucracy
GNU General Public License v2.0
43 stars 47 forks source link

Fix replacedate to handle empty input; see Issue #192 #256

Open tomio13 opened 6 years ago

tomio13 commented 6 years ago

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.

splitbrain commented 6 years ago

can you remove the patch file from the PR please?

tomio13 commented 6 years ago

This e-mail is a reply to the message of Andreas Gohr

notifications@github.com, 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 commented 5 years ago

Any reason why this does not get merged?