mark nullable types explicitlyPHP 8.4 will throw a warning where type hints without a ?prefix are usedand nullable parameters can be passed.I'm not sure if I found all occurances, but we still r
mark nullable types explicitlyPHP 8.4 will throw a warning where type hints without a ?prefix are usedand nullable parameters can be passed.I'm not sure if I found all occurances, but we still rarely use typehints, so it might not be many indeed.
show more ...
Use str_starts_with/str_ends_with
code style: line breaks
code style: operator spacing
coding style: control flow line breaks
update some plugin classes in phpdocs, reformatting
recover comments in list
codestyle adjustments: class declaration braces
Apply rector renames
Apply rector fixes to inc/Subscriptions
fix accidental overwriting of variable in bulkmailer #3862When the bulkmailer tries to skip own or minor edits, it was overwriting$rev with a timestamp instead of using the proper array structure
fix accidental overwriting of variable in bulkmailer #3862When the bulkmailer tries to skip own or minor edits, it was overwriting$rev with a timestamp instead of using the proper array structurereturned by getRevisionInfo().This also moves the initialization of the PageChangeLog object out ofthe while loop to ensure it's inner caching mechanism is utilized whenfetching the info.This should fix #3862
avoid warning for new subscribersWhen a subscriber never received an email no last sent timestamp is set.PHP8 threw a warning on a missing array key, there.
coding style of functions using ChangeLog
:fire: fix the calculation of file permissonsOur config allows to set the values for `dmode` and `fmode` to allowusers to explicitly define which permissions directories and filesshould have.To
:fire: fix the calculation of file permissonsOur config allows to set the values for `dmode` and `fmode` to allowusers to explicitly define which permissions directories and filesshould have.To avoid unnessary chmod operations, we check the current umask tocompare what permissions files and directories would get witout ourintervention. If the result is already what the user wants, no chmodswill happen later on. Otherwise we set new configs called `dperm` and`fperm` which will be used in chmod ops. This is done in`init_creationmodes()`When we created new directories, we used to pass the original `dmode`config to `mkdir()`. The system will then apply the umask to that`dmode`.This means the resulting directory will *always* have differentpermissions than `dmode`, *always* requiring a chmod operation.That's silly.**Breaking Change:** This patch removes the passing of `dmode` assecond parameter to all `mkdir` calls, making it default to `0700`which is also what we test against in `init_creationmodes()`.Plugins not relying on our `io_*` functions and do create their owndirectories and which currenlty pass `dmode` to it need to beadjusted to remove that second parameter.Users may want to reapply the proper file permissions to their datafolder.**Revert:** In 9fdcc8fcd87114ca59a1764a84d213a53c655c8c @movaticaintroduced a change to `init_creationmodes()` that compared the umaskagainst `fmode` instead of `0666`. I merged it because it looked logicalwhen compared to the code for directories which compared against `dmode`as described above. However we do not pass `fmode` to any file creationmethods (that's not possible).The result is that all changes made in the `fmode` setting resultedin the wrong permissions for newly created files as first reported inhttps://forum.dokuwiki.org/d/19463-setting-fmode-not-working-as-intendedI'm unsure about the orginal motivation behind @movatica's change. The"fix" however, is wrong.**Tests:** This patch introduces an integration test that will check theactual results of directory and file creations under various umask,`dmode` and `fmode` settings.
Fix Undefined array key "fperm" warningAlso removed a few, now unnecessary `!empty` checksFixes #3382
check if user is empty in userSubscription, fixes #2003This makes sure SubscriberRegexBuilder is used properly and won't throw exception in userSubscription.
Include rev_id in new revision link in notification emailOlder versions have a "This is an old revision of the document!" message on the top of the page. By including rev_id, user can always see th
Include rev_id in new revision link in notification emailOlder versions have a "This is an old revision of the document!" message on the top of the page. By including rev_id, user can always see the version the email is referring to, while knowing if it is the latest version by looking at the wiki page.A hint about this is also added to email text.This fixes #2196.
♻️ Split up ChangesSubscriptionSender into multiple classesThis should better adhere to SRP and simplify things.
Automatic code style fixes for subscription classes
✅ Fix Subscriptions testsThis splits up and slightly refactors the tests for the refactored subscriptions classes
♻️ Extract subscription classes for PSR 2This allows us to rename the snake_case methods and to group them in amore sensible manner.