projects
/
bizou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c4491b6
)
An error message for permissions problems
author
Marc MAURICE
<marc-bizou@pub.positon.org>
Sat, 17 Aug 2013 17:14:48 +0000
(19:14 +0200)
committer
Marc MAURICE
<marc-bizou@pub.positon.org>
Sat, 17 Aug 2013 17:14:48 +0000
(19:14 +0200)
functions.php
patch
|
blob
|
history
diff --git
a/functions.php
b/functions.php
index
630be00
..
ebad504
100644
(file)
--- a/
functions.php
+++ b/
functions.php
@@
-67,7
+67,8
@@
function getPreview($imgFile, $maxSize = THUMB_SIZE)
# config to allow group writable files
umask(DATA_UMASK);
# create the thumbs directory recursively
# config to allow group writable files
umask(DATA_UMASK);
# create the thumbs directory recursively
- if (! is_dir(dirname($newImgFile))) mkdir(dirname($newImgFile), 0777, true);
+ if (! is_dir(dirname($newImgFile))) @mkdir(dirname($newImgFile), 0777, true)
+ or die("Could not write in data dir. Please fix permissions.");
if ($w > $h) {
$newW = $maxSize;
if ($w > $h) {
$newW = $maxSize;
@@
-108,7
+109,8
@@
function getAlbumPreview($dir)
# config to allow group writable files
umask(DATA_UMASK);
# create the thumbs directory recursively
# config to allow group writable files
umask(DATA_UMASK);
# create the thumbs directory recursively
- if (! is_dir(dirname($previewFile))) mkdir(dirname($previewFile), 0777, true);
+ if (! is_dir(dirname($previewFile))) @mkdir(dirname($previewFile), 0777, true)
+ or die("Could not write in data dir. Please fix permissions.");
// no preview: look for a preview in current dir, write it, return it
foreach (scandir($dir) as $file) if ($file[0] != '.') {
// no preview: look for a preview in current dir, write it, return it
foreach (scandir($dir) as $file) if ($file[0] != '.') {