aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2008-07-28 13:12:18 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2008-07-28 13:12:18 +0000
commit0ce66e65520e2950d8e8288897a3b4263bc4bb8f (patch)
treea29a45333177a0c6bb0d09a91d4c559797f2b3c5 /phpBB
parent04814560c89eac2a0aaf83277b8fd4511e7adcf7 (diff)
downloadforums-0ce66e65520e2950d8e8288897a3b4263bc4bb8f.tar
forums-0ce66e65520e2950d8e8288897a3b4263bc4bb8f.tar.gz
forums-0ce66e65520e2950d8e8288897a3b4263bc4bb8f.tar.bz2
forums-0ce66e65520e2950d8e8288897a3b4263bc4bb8f.tar.xz
forums-0ce66e65520e2950d8e8288897a3b4263bc4bb8f.zip
add warning to ACP index if config file is writeable
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8688 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/adm/style/acp_main.html7
-rw-r--r--phpBB/includes/acp/acp_main.php17
-rw-r--r--phpBB/language/en/acp/common.php3
3 files changed, 20 insertions, 7 deletions
diff --git a/phpBB/adm/style/acp_main.html b/phpBB/adm/style/acp_main.html
index bad15bef30..6126c16d63 100644
--- a/phpBB/adm/style/acp_main.html
+++ b/phpBB/adm/style/acp_main.html
@@ -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" />
diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php
index 7498ab2aef..523fcc98f3 100644
--- a/phpBB/includes/acp/acp_main.php
+++ b/phpBB/includes/acp/acp_main.php
@@ -168,7 +168,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.$phpEx");
@@ -199,7 +199,7 @@ class acp_main
add_log('admin', 'LOG_RESYNC_POSTCOUNTS');
break;
-
+
case 'date':
if (!$auth->acl_get('a_board'))
{
@@ -209,7 +209,7 @@ class acp_main
set_config('board_startdate', time() - 1);
add_log('admin', 'LOG_RESET_DATE');
break;
-
+
case 'db_track':
switch ($db->sql_layer)
{
@@ -231,7 +231,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))
{
@@ -281,7 +281,7 @@ class acp_main
$db->sql_multi_insert(TOPICS_POSTED_TABLE, $sql_ary);
}
}
-
+
add_log('admin', 'LOG_RESYNC_POST_MARKING');
break;
@@ -320,7 +320,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']))
@@ -463,6 +463,11 @@ class acp_main
$template->assign_var('S_REMOVE_INSTALL', true);
}
+ if (file_exists($phpbb_root_path . 'config.' . $phpEx) && is_writeable($phpbb_root_path . 'config.' . $phpEx))
+ {
+ $template->assign_var('S_WRITEABLE_CONFIG', true);
+ }
+
$this->tpl_name = 'acp_main';
$this->page_title = 'ACP_MAIN';
}
diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php
index 9ed92bfcfb..7c7ae08707 100644
--- a/phpBB/language/en/acp/common.php
+++ b/phpBB/language/en/acp/common.php
@@ -268,7 +268,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.',
@@ -362,6 +362,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