mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-09 00:55:23 +02:00
Check permissions on avatar upload folder
git-svn-id: file:///svn/phpbb/trunk@6033 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
3152110bea
commit
06981cb97b
@ -320,31 +320,34 @@ class install_install extends module
|
|||||||
'LEGEND_EXPLAIN' => $lang['FILES_OPTIONAL_EXPLAIN'],
|
'LEGEND_EXPLAIN' => $lang['FILES_OPTIONAL_EXPLAIN'],
|
||||||
));
|
));
|
||||||
|
|
||||||
// config.php ... let's just warn the user it's not writeable
|
$directories = array('config.'.$phpEx, 'images/avatars/upload/');
|
||||||
$dir = 'config.'.$phpEx;
|
|
||||||
$write = $exists = true;
|
foreach ($directories as $dir)
|
||||||
if (file_exists($phpbb_root_path . $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;
|
||||||
|
}
|
||||||
|
|
||||||
|
$exists_str = ($exists) ? '<b style="color:green">' . $lang['FOUND'] . '</b>' : '<b style="color:red">' . $lang['NOT_FOUND'] . '</b>';
|
||||||
|
$write_str = ($write) ? ', <b style="color:green">' . $lang['WRITEABLE'] . '</b>' : (($exists) ? ', <b style="color:red">' . $lang['UNWRITEABLE'] . '</b>' : '');
|
||||||
|
|
||||||
|
$template->assign_block_vars('checks', array(
|
||||||
|
'TITLE' => $dir,
|
||||||
|
'RESULT' => $exists_str . $write_str,
|
||||||
|
|
||||||
|
'S_EXPLAIN' => false,
|
||||||
|
'S_LEGEND' => false,
|
||||||
|
));
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
$write = $exists = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
$exists_str = ($exists) ? '<b style="color:green">' . $lang['FOUND'] . '</b>' : '<b style="color:red">' . $lang['NOT_FOUND'] . '</b>';
|
|
||||||
$write_str = ($write) ? ', <b style="color:green">' . $lang['WRITEABLE'] . '</b>' : (($exists) ? ', <b style="color:red">' . $lang['UNWRITEABLE'] . '</b>' : '');
|
|
||||||
|
|
||||||
$template->assign_block_vars('checks', array(
|
|
||||||
'TITLE' => $dir,
|
|
||||||
'RESULT' => $exists_str . $write_str,
|
|
||||||
|
|
||||||
'S_EXPLAIN' => false,
|
|
||||||
'S_LEGEND' => false,
|
|
||||||
));
|
|
||||||
|
|
||||||
// And finally where do we want to go next (well today is taken isn't it :P)
|
// And finally where do we want to go next (well today is taken isn't it :P)
|
||||||
$s_hidden_fields = ($img_imagick) ? '<input type="hidden" name="img_imagick" value="' . addslashes($img_imagick) . '" />' : '';
|
$s_hidden_fields = ($img_imagick) ? '<input type="hidden" name="img_imagick" value="' . addslashes($img_imagick) . '" />' : '';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user