From 06981cb97bd6b8252f5ad5a65672390c33a12deb Mon Sep 17 00:00:00 2001 From: Graham Eames Date: Fri, 9 Jun 2006 20:34:09 +0000 Subject: Check permissions on avatar upload folder git-svn-id: file:///svn/phpbb/trunk@6033 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/install/install_install.php | 41 +++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index ac3333f33e..9a09d1f7ba 100755 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -320,31 +320,34 @@ class install_install extends module 'LEGEND_EXPLAIN' => $lang['FILES_OPTIONAL_EXPLAIN'], )); - // config.php ... let's just warn the user it's not writeable - $dir = 'config.'.$phpEx; - $write = $exists = true; - if (file_exists($phpbb_root_path . $dir)) + $directories = array('config.'.$phpEx, 'images/avatars/upload/'); + + foreach ($directories as $dir) { - if (!is_writeable($phpbb_root_path . $dir)) + $write = $exists = true; + if (file_exists($phpbb_root_path . $dir)) { - $write = false; + if (!is_writeable($phpbb_root_path . $dir)) + { + $write = false; + } + } + else + { + $write = $exists = false; } - } - else - { - $write = $exists = false; - } - $exists_str = ($exists) ? '' . $lang['FOUND'] . '' : '' . $lang['NOT_FOUND'] . ''; - $write_str = ($write) ? ', ' . $lang['WRITEABLE'] . '' : (($exists) ? ', ' . $lang['UNWRITEABLE'] . '' : ''); + $exists_str = ($exists) ? '' . $lang['FOUND'] . '' : '' . $lang['NOT_FOUND'] . ''; + $write_str = ($write) ? ', ' . $lang['WRITEABLE'] . '' : (($exists) ? ', ' . $lang['UNWRITEABLE'] . '' : ''); - $template->assign_block_vars('checks', array( - 'TITLE' => $dir, - 'RESULT' => $exists_str . $write_str, + $template->assign_block_vars('checks', array( + 'TITLE' => $dir, + 'RESULT' => $exists_str . $write_str, - 'S_EXPLAIN' => false, - 'S_LEGEND' => false, - )); + 'S_EXPLAIN' => false, + 'S_LEGEND' => false, + )); + } // And finally where do we want to go next (well today is taken isn't it :P) $s_hidden_fields = ($img_imagick) ? '' : ''; -- cgit v1.2.1