History log of /dokuwiki/inc/io.php (Results 1 – 25 of 115)
Revision Date Author Comments
# 109ebc86 25-Nov-2024 Andreas Gohr <andi@splitbrain.org>

io_replaceInFile: replace warning with logging call


# 2fb31c4f 26-Jan-2024 Andreas Gohr <andi@splitbrain.org>

io_deleteFromFile: pass a string not null


# 6c16a3a9 14-Sep-2023 fiwswe <fiwswe@fwml.de>

Use str_starts_with/str_ends_with


# c347b097 02-Sep-2023 splitbrain <splitbrain@users.noreply.github.com>

�� Rector and PHPCS fixes


# c826df86 02-Sep-2023 Andreas Gohr <andi@splitbrain.org>

adjust typhints in io_(read|write)WikiPage

current revision is often passed as empty string


# 679f3774 31-Aug-2023 Gerrit Uitslag <klapinklapin@gmail.com>

return bool for io_mkdir_p()


# aa659bba 31-Aug-2023 Gerrit Uitslag <klapinklapin@gmail.com>

brackets after if, phpdocs, reformatting


# 4e2eb11e 31-Aug-2023 Gerrit Uitslag <klapinklapin@gmail.com>

fix comment


# d4f83172 31-Aug-2023 Andreas Gohr <andi@splitbrain.org>

code style: line breaks


# 90fb952c 31-Aug-2023 Andreas Gohr <andi@splitbrain.org>

code style: operator spacing


# 4b230b99 31-Aug-2023 Andreas Gohr <andi@splitbrain.org>

code style: indent fixes


# 7d34963b 31-Aug-2023 Andreas Gohr <andi@splitbrain.org>

coding style: control flow line breaks


# 177d6836 31-Aug-2023 Andreas Gohr <andi@splitbrain.org>

coding style: control flow whitespaces


# dccd6b2b 30-Aug-2023 Andreas Gohr <andi@splitbrain.org>

coding style: function call spacing


# d868eb89 30-Aug-2023 Andreas Gohr <andi@splitbrain.org>

codestyle adjustments: function declaration braces/spaces


# c1482d1c 30-Aug-2023 Andreas Gohr <andi@splitbrain.org>

codestyle adjustments: function argument spacing


# 24870174 29-Aug-2023 Andreas Gohr <andi@splitbrain.org>

Apply rector fixes to the rest of inc


# bd539124 14-Aug-2021 Andreas Gohr <andi@splitbrain.org>

:fire: fix the calculation of file permissons

Our config allows to set the values for `dmode` and `fmode` to allow
users to explicitly define which permissions directories and files
should have.

To

:fire: fix the calculation of file permissons

Our config allows to set the values for `dmode` and `fmode` to allow
users to explicitly define which permissions directories and files
should have.

To avoid unnessary chmod operations, we check the current umask to
compare what permissions files and directories would get witout our
intervention. If the result is already what the user wants, no chmods
will 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 different
permissions than `dmode`, *always* requiring a chmod operation.
That's silly.

**Breaking Change:** This patch removes the passing of `dmode` as
second 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 own
directories and which currenlty pass `dmode` to it need to be
adjusted to remove that second parameter.

Users may want to reapply the proper file permissions to their data
folder.

**Revert:** In 9fdcc8fcd87114ca59a1764a84d213a53c655c8c @movatica
introduced a change to `init_creationmodes()` that compared the umask
against `fmode` instead of `0666`. I merged it because it looked logical
when compared to the code for directories which compared against `dmode`
as described above. However we do not pass `fmode` to any file creation
methods (that's not possible).

The result is that all changes made in the `fmode` setting resulted
in the wrong permissions for newly created files as first reported in
https://forum.dokuwiki.org/d/19463-setting-fmode-not-working-as-intended

I'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 the
actual results of directory and file creations under various umask,
`dmode` and `fmode` settings.

show more ...


# 23420346 26-Jan-2021 Damien Regad <dregad@mantisbt.org>

Fix Undefined array key "fperm" warning

Also removed a few, now unnecessary `!empty` checks

Fixes #3382


# 3aa75874 18-Feb-2020 movatica <c0d3@movatica.com>

Fixed inconsistent handling of falsy values on fperm setting

The $conf['fperm'] value was checked in multiple files using different methods.
This can cause permission trouble with restricted environ

Fixed inconsistent handling of falsy values on fperm setting

The $conf['fperm'] value was checked in multiple files using different methods.
This can cause permission trouble with restricted environments, i.e. when chmod is forbidden and file permissions are non-default.
Now, all checks use implicit cast to boolean which leads to consistent behaviour.

Also, a misleading variable was renamed in context to better understand one of the checks.

show more ...


# 8cbc5ee8 10-Jun-2019 Andreas Gohr <andi@splitbrain.org>

replaced deprecated utf8 functions

For now this uses full qualified namespaces, sensible imports may come
later.


# cbb44eab 15-Jun-2018 Andreas Gohr <andi@splitbrain.org>

deprecated trigger_event() in favor of a static method on Event


# 5a8d6e48 26-Mar-2019 Michael Große <mic.grosse@googlemail.com>

Rename HTTPClient namespace to HTTP

This should make namespace a bit more flexible in scope and allow us to
move more functionality there later.


# 198564ab 17-Mar-2019 Michael Große <mic.grosse@googlemail.com>

Refactor HTTPClient into different files


# 277113f1 27-Jul-2018 Andreas Gohr <andi@splitbrain.org>

Merge branch 'master' into psr2

* master:
upgraded JSON class to latest (2006) version
continue is break in switch
translation update
reference existing proper progress gif. fixes #2441
Fi

Merge branch 'master' into psr2

* master:
upgraded JSON class to latest (2006) version
continue is break in switch
translation update
reference existing proper progress gif. fixes #2441
Fix missing ui-bg_glass_95_fef1ec_1x400.png and be/jquery.ui.datepicker.js for jquery
removed accidental merges of outdated translations
Change `const` use to `var` for Safari 9 (on iOS)
Fix .htaccess files for Apache 2.4 (and 2.2)
add logic if the server uses unlimited memory settings in is_mem_available()
removed safemode hack

show more ...


12345