aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCassio de Campos <cassiopc@gmail.com>2017-10-24 14:14:50 +0000
committerCassio de Campos <cassiopc@gmail.com>2017-10-24 14:14:50 +0000
commitc49b9ac202bf823f4ff332cc0fa8e55601e8b93c (patch)
treeb6b7594cdf248c185ca686669fe8d63ab7b2ef7d /src
parent618cb71ee7d196afe6fbf5ba82308e8afea24a20 (diff)
downloadboca-c49b9ac202bf823f4ff332cc0fa8e55601e8b93c.tar.gz
boca-c49b9ac202bf823f4ff332cc0fa8e55601e8b93c.zip
verb
Diffstat (limited to 'src')
-rwxr-xr-xsrc/globals.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/globals.php b/src/globals.php
index 952533e..d49a3c7 100755
--- a/src/globals.php
+++ b/src/globals.php
@@ -43,10 +43,10 @@ function filedownload($oid,$fname,$msg='') {
function dirrec($dir, $user, $group, $dirPermissions, $filePermissions, $avoid=array()) {
$ds = DIRECTORY_SEPARATOR;
if($ds=="") $ds = "/";
- chown($dir, $user);
- chgrp($dir, $group);
+ if(chown($dir, $user) === false) echo "cannot chown $dir\n";
+ if(chgrp($dir, $group) === false) echo "cannot chgrp $dir\n";
if(is_dir($dir)) {
- chmod($dir, $dirPermissions);
+ if(chmod($dir, $dirPermissions) === false) echo "cannot chmod $dir\n";
if(($dp = opendir($dir)) === false) return;
while($file = readdir($dp)) {
if (($file == ".") || ($file == ".."))
@@ -63,7 +63,7 @@ function dirrec($dir, $user, $group, $dirPermissions, $filePermissions, $avoid=a
}
closedir($dp);
} else {
- chmod($dir, $filePermissions);
+ if(chmod($dir, $filePermissions)=== false) echo "cannot chmod $dir\n";
}
}