Small fixes

This commit is contained in:
RainLoop Team 2014-08-01 11:07:54 +04:00
parent 3b29e93db1
commit d8bef79fc5
6 changed files with 175 additions and 155 deletions

View file

@ -2,7 +2,7 @@
"name": "RainLoop",
"title": "RainLoop Webmail",
"version": "1.6.8",
"release": "153",
"release": "154",
"description": "Simple, modern & fast web-based email client",
"homepage": "http://rainloop.net",
"main": "gulpfile.js",

View file

@ -82,19 +82,39 @@
@chmod(APP_DATA_FOLDER_PATH, 0755);
}
if (
!@is_dir(APP_DATA_FOLDER_PATH) || !is_readable(APP_DATA_FOLDER_PATH) || !is_writable(APP_DATA_FOLDER_PATH) ||
!@mkdir($sCheckFolder, 0755) ||
false === @file_put_contents($sCheckFilePath, time()) ||
!@unlink($sCheckFilePath) ||
!@rmdir($sCheckFolder)
)
$sTest = '';
switch (true)
{
echo '[202] Data folder permisions error';
case !@is_dir(APP_DATA_FOLDER_PATH):
$sTest = 'is_dir';
break;
case !@is_readable(APP_DATA_FOLDER_PATH):
$sTest = 'is_readable';
break;
case !@is_writable(APP_DATA_FOLDER_PATH):
$sTest = 'is_writable';
break;
case !@mkdir($sCheckFolder, 0755):
$sTest = 'mkdir';
break;
case false === @file_put_contents($sCheckFilePath, time()):
$sTest = 'file_put_contents';
break;
case !@unlink($sCheckFilePath):
$sTest = 'unlink';
break;
case !@rmdir($sCheckFolder):
$sTest = 'rmdir';
break;
}
if (!empty($sTest))
{
echo '[202] Data folder permisions error ['.$sTest.']';
exit(202);
}
unset($sCheckName, $sCheckFilePath, $sCheckFolder);
unset($sCheckName, $sCheckFilePath, $sCheckFolder, $sTest);
}
if (false === $sSalt || false === $sData)