provide os_mkdir to workaround permission issues with php mkdir

This commit is contained in:
friendica
2014-07-16 01:07:00 -07:00
parent 0435a08f3b
commit 3a31ddea2b
9 changed files with 60 additions and 9 deletions

View File

@@ -1168,6 +1168,15 @@ function absurl($path) {
return $path;
}
function os_mkdir($path,$mode = 0777,$recursive = false) {
$oldumask = @umask(0);
@mkdir($path, $mode, $recursive);
@umask($oldumask);
}
function is_ajax() {
return (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');
}