mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-04 22:58:10 +02:00
add warning to ACP index if config file is writeable
git-svn-id: file:///svn/phpbb/trunk@8689 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
41d3effa19
commit
d8f2c4a1c4
@ -21,6 +21,13 @@
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF S_WRITEABLE_CONFIG -->
|
||||
<div class="errorbox">
|
||||
<h3>{L_WARNING}</h3>
|
||||
<p>{L_WRITEABLE_CONFIG}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<table cellspacing="1">
|
||||
<caption>{L_FORUM_STATS}</caption>
|
||||
<col class="col1" /><col class="col2" /><col class="col1" /><col class="col2" />
|
||||
|
@ -167,7 +167,7 @@ class acp_main
|
||||
$result = $db->sql_query($sql);
|
||||
set_config('upload_dir_size', (int) $db->sql_fetchfield('stat'), true);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
||||
if (!function_exists('update_last_username'))
|
||||
{
|
||||
include(PHPBB_ROOT_PATH . 'includes/functions_user.' . PHP_EXT);
|
||||
@ -198,7 +198,7 @@ class acp_main
|
||||
add_log('admin', 'LOG_RESYNC_POSTCOUNTS');
|
||||
|
||||
break;
|
||||
|
||||
|
||||
case 'date':
|
||||
if (!$auth->acl_get('a_board'))
|
||||
{
|
||||
@ -208,7 +208,7 @@ class acp_main
|
||||
set_config('board_startdate', time() - 1);
|
||||
add_log('admin', 'LOG_RESET_DATE');
|
||||
break;
|
||||
|
||||
|
||||
case 'db_track':
|
||||
if ($db->truncate)
|
||||
{
|
||||
@ -227,7 +227,7 @@ class acp_main
|
||||
FROM ' . FORUMS_TABLE . '
|
||||
WHERE forum_type <> ' . FORUM_CAT;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
|
||||
$forum_ids = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
@ -277,7 +277,7 @@ class acp_main
|
||||
$db->sql_multi_insert(TOPICS_POSTED_TABLE, $sql_ary);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
add_log('admin', 'LOG_RESYNC_POST_MARKING');
|
||||
break;
|
||||
|
||||
@ -316,7 +316,7 @@ class acp_main
|
||||
$files_per_day = sprintf('%.2f', $total_files / $boarddays);
|
||||
|
||||
$upload_dir_size = get_formatted_filesize($config['upload_dir_size']);
|
||||
|
||||
|
||||
$avatar_dir_size = 0;
|
||||
|
||||
if ($avatar_dir = @opendir(PHPBB_ROOT_PATH . $config['avatar_path']))
|
||||
@ -459,6 +459,11 @@ class acp_main
|
||||
$template->assign_var('S_REMOVE_INSTALL', true);
|
||||
}
|
||||
|
||||
if (file_exists(PHPBB_ROOT_PATH . 'config.' . PHP_EXT) && is_writeable(PHPBB_ROOT_PATH . 'config.' . PHP_EXT))
|
||||
{
|
||||
$template->assign_var('S_WRITEABLE_CONFIG', true);
|
||||
}
|
||||
|
||||
$this->tpl_name = 'acp_main';
|
||||
$this->page_title = 'ACP_MAIN';
|
||||
}
|
||||
|
@ -269,7 +269,7 @@ $lang = array_merge($lang, array(
|
||||
'SELECT_OPTION' => 'Select option',
|
||||
|
||||
'SETTING_TOO_LOW' => 'The entered value for the setting “%1$s” is too low. The minimal allowed value is %2$d.',
|
||||
'SETTING_TOO_BIG' => 'The entered value for the setting “%1$s” is too big. The maximal allowed value is %2$d.',
|
||||
'SETTING_TOO_BIG' => 'The entered value for the setting “%1$s” is too big. The maximal allowed value is %2$d.',
|
||||
'SETTING_TOO_LONG' => 'The entered value for the setting “%1$s” is too long. The maximal allowed length is %2$d.',
|
||||
'SETTING_TOO_SHORT' => 'The entered value for the setting “%1$s” is not long enough. The minimal allowed length is %2$d.',
|
||||
|
||||
@ -363,6 +363,7 @@ $lang = array_merge($lang, array(
|
||||
'VIEW_INACTIVE_USERS' => 'View inactive users',
|
||||
|
||||
'WELCOME_PHPBB' => 'Welcome to phpBB',
|
||||
'WRITEABLE_CONFIG' => 'Your config file (config.php) is currently world-writeable. We strongly encourage you to change the permissions to 640 or at least to 644 (for example: <a href="http://en.wikipedia.org/wiki/Chmod" rel="external">chmod</a> 640 config.php).',
|
||||
));
|
||||
|
||||
// Inactive Users
|
||||
|
Loading…
x
Reference in New Issue
Block a user