mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-06-26 03:30:48 +03:00
исправлен баг со сменой прав при загрузке аватара
This commit is contained in:
parent
2d33666477
commit
67ee904f88
|
@ -435,15 +435,19 @@ function func_img_resize($sFileSrc,$sDirDest,$sFileDest,$iWidthMax,$iHeightMax,$
|
|||
* @param unknown_type $sNewDir
|
||||
*/
|
||||
function func_mkdir($sBasePath,$sNewDir) {
|
||||
$sTempPath=$sBasePath;
|
||||
$aNewDir=explode('/',$sNewDir);
|
||||
foreach ($aNewDir as $sDir) {
|
||||
if ($sDir!='.') {
|
||||
@mkdir($sTempPath.$sDir.'/');
|
||||
@chmod($sTempPath.$sDir.'/',0777);
|
||||
$sTempPath=$sTempPath.$sDir.'/';
|
||||
}
|
||||
}
|
||||
$sBasePath=rtrim($sBasePath,'/');
|
||||
$sBasePath.='/';
|
||||
$sTempPath=$sBasePath;
|
||||
$aNewDir=explode('/',$sNewDir);
|
||||
foreach ($aNewDir as $sDir) {
|
||||
if ($sDir!='.' and $sDir!='') {
|
||||
if (!file_exists($sTempPath.$sDir.'/')) {
|
||||
@mkdir($sTempPath.$sDir.'/');
|
||||
@chmod($sTempPath.$sDir.'/',0755);
|
||||
}
|
||||
$sTempPath=$sTempPath.$sDir.'/';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue