1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-29 11:10:18 +02:00

add some properties

change phpbb_chmod to phpbb::$system->chmod()
also changed chmod behaviour to the most failsafe method. If we are not able to tell the exact outcome, we simply do not mess with it.

git-svn-id: file:///svn/phpbb/trunk@9296 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2009-01-22 15:59:00 +00:00
parent 6d380be53d
commit 950842de5c
17 changed files with 609 additions and 587 deletions

View File

@@ -506,13 +506,13 @@ class install_install extends module
if (!file_exists(PHPBB_ROOT_PATH . $dir))
{
@mkdir(PHPBB_ROOT_PATH . $dir, 0777);
phpbb_chmod(PHPBB_ROOT_PATH . $dir, phpbb::CHMOD_READ | phpbb::CHMOD_WRITE);
phpbb::$system->chmod(PHPBB_ROOT_PATH . $dir, phpbb::CHMOD_READ | phpbb::CHMOD_WRITE);
}
// Now really check
if (file_exists(PHPBB_ROOT_PATH . $dir) && is_dir(PHPBB_ROOT_PATH . $dir))
{
phpbb_chmod(PHPBB_ROOT_PATH . $dir, phpbb::CHMOD_READ | phpbb::CHMOD_WRITE);
phpbb::$system->chmod(PHPBB_ROOT_PATH . $dir, phpbb::CHMOD_READ | phpbb::CHMOD_WRITE);
$exists = true;
}
@@ -827,7 +827,7 @@ class install_install extends module
}
@fclose($fp);
@chmod(PHPBB_ROOT_PATH . 'cache/install_lock', 0666);
phpbb::$system->chmod(PHPBB_ROOT_PATH . 'cache/install_lock', phpbb::CHMOD_READ | phpbb::CHMOD_WRITE);
$load_extensions = implode(',', $load_extensions);
@@ -880,8 +880,7 @@ class install_install extends module
if ($written)
{
// We may revert back to chmod() if we see problems with users not able to change their config.php file directly
phpbb_chmod(PHPBB_ROOT_PATH . 'config.' . PHP_EXT, phpbb::CHMOD_READ | phpbb::CHMOD_WRITE);
@chmod(PHPBB_ROOT_PATH . 'config.' . PHP_EXT, 0644);
}
}