1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-06-26 03:30:48 +03:00

исправлен баг со сменой прав при загрузке аватара

This commit is contained in:
Mzhelskiy Maxim 2008-09-26 20:33:51 +00:00
parent 2d33666477
commit 67ee904f88

View file

@ -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.'/';
}
}
}
/**