projects
/
bizou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fa074d0
)
added the DATA_UMASK config option
v1.6.1
author
dooble M
<marc@pub.positon.org>
Sun, 19 Aug 2012 08:22:37 +0000
(10:22 +0200)
committer
dooble M
<marc@pub.positon.org>
Sun, 19 Aug 2012 08:22:37 +0000
(10:22 +0200)
config.php
patch
|
blob
|
history
functions.php
patch
|
blob
|
history
diff --git
a/config.php
b/config.php
index
703626c
..
f81eeeb
100644
(file)
--- a/
config.php
+++ b/
config.php
@@
-2,4
+2,5
@@
define('THUMB_SIZE', 100);
define('DATA_DIR', 'data');
define('IMAGES_DIR', 'images');
define('THUMB_SIZE', 100);
define('DATA_DIR', 'data');
define('IMAGES_DIR', 'images');
+define('DATA_UMASK', 0002); # 0002: allow group to write for files created in data dir. change to 0022 to be more strict.
?>
?>
diff --git
a/functions.php
b/functions.php
index
162b01e
..
b60543e
100644
(file)
--- a/
functions.php
+++ b/
functions.php
@@
-63,8
+63,8
@@
function getPreview($imgFile, $maxSize = THUMB_SIZE)
return $imgFile;
}
return $imgFile;
}
- # uncomment this if you need group writable files
- #umask(0002);
+ # config to allow group writable files
+ umask(DATA_UMASK);
# create the thumbs directory recursively
if (! is_dir(dirname($newImgFile))) mkdir(dirname($newImgFile), 0777, true);
# create the thumbs directory recursively
if (! is_dir(dirname($newImgFile))) mkdir(dirname($newImgFile), 0777, true);
@@
-103,8
+103,8
@@
function getAlbumPreview($dir)
} else if (is_file("$previewFile.png")) {
return "$previewFile.png";
} else {
} else if (is_file("$previewFile.png")) {
return "$previewFile.png";
} else {
- # uncomment this if you need group writable files
- #umask(0002);
+ # config to allow group writable files
+ umask(DATA_UMASK);
# create the thumbs directory recursively
if (! is_dir(dirname($previewFile))) mkdir(dirname($previewFile), 0777, true);
# create the thumbs directory recursively
if (! is_dir(dirname($previewFile))) mkdir(dirname($previewFile), 0777, true);