Merge remote-tracking branch 'origin/pr-246'

https://github.com/AlternC/AlternC/pull/246
Fix #245: Files default to unwritable when permissions are changed in… #246
This commit is contained in:
Benjamin Sonntag 2018-06-21 17:43:31 +02:00
commit 0217985655
1 changed files with 6 additions and 0 deletions

View File

@ -559,6 +559,12 @@ class m_bro {
} }
for ($i = 0; $i < count($d); $i++) { for ($i = 0; $i < count($d); $i++) {
$d[$i] = ssla($d[$i]); // strip slashes if needed $d[$i] = ssla($d[$i]); // strip slashes if needed
// If the form checkboxes are not checked, PHP will not fill in a
// value at all for the permissions. Set the default to unwriteable
// unless explicitly marked as writable.
if (!isset($perm[$i])) {
$perm[$i]['w'] = False;
}
if (!strpos($d[$i], "/")) { // caractre / interdit dans le nom du fichier if (!strpos($d[$i], "/")) { // caractre / interdit dans le nom du fichier
$m = fileperms($absolute . "/" . $d[$i]); $m = fileperms($absolute . "/" . $d[$i]);