diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2009-06-07 11:34:01 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2009-06-07 11:34:01 +0000 |
commit | a539fca62b10f53a5f5dadf07f9ab07340fdabf9 (patch) | |
tree | 28f4ab59d1564aefd30709748ce245f993be5f7c /phpBB/includes/functions.php | |
parent | 711f482cb62070ab2340aa27c736a85cc6e8c518 (diff) | |
download | forums-a539fca62b10f53a5f5dadf07f9ab07340fdabf9.tar forums-a539fca62b10f53a5f5dadf07f9ab07340fdabf9.tar.gz forums-a539fca62b10f53a5f5dadf07f9ab07340fdabf9.tar.bz2 forums-a539fca62b10f53a5f5dadf07f9ab07340fdabf9.tar.xz forums-a539fca62b10f53a5f5dadf07f9ab07340fdabf9.zip |
some corrections, only very minor things.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9554 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r-- | phpBB/includes/functions.php | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 78905beff6..f958a204b6 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -670,17 +670,17 @@ function phpbb_chmod($filename, $perms = CHMOD_READ) } /** - * Test if a file/directory is writable - * - * This function calls the native is_writable() when not running under - * Windows and it is not disabled. - * - * @param string $file Path to perform write test on - * @return bool True when the path is writable, otherwise false. - */ +* Test if a file/directory is writable +* +* This function calls the native is_writable() when not running under +* Windows and it is not disabled. +* +* @param string $file Path to perform write test on +* @return bool True when the path is writable, otherwise false. +*/ function phpbb_is_writable($file) { - if (substr(PHP_OS, 0, 3) === 'WIN' || !function_exists('is_writable')) + if (strtolower(substr(PHP_OS, 0, 3)) === 'win' || !function_exists('is_writable')) { if (file_exists($file)) { @@ -714,7 +714,6 @@ function phpbb_is_writable($file) else { // file does not exist test if we can write to the directory - $dir = dirname($file); if (file_exists($dir) && is_dir($dir) && phpbb_is_writable($dir)) @@ -722,6 +721,7 @@ function phpbb_is_writable($file) return true; } } + return false; } else @@ -2585,7 +2585,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa { include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx); } - + $err = ''; // Make sure user->setup() has been called @@ -2700,14 +2700,12 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa $captcha->init(CONFIRM_LOGIN); $captcha->reset(); - $template->assign_vars(array( 'S_CONFIRM_CODE' => true, 'CONFIRM' => $captcha->get_template(''), )); $err = $user->lang[$result['error_msg']]; - break; case LOGIN_ERROR_PASSWORD_CONVERT: |