aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorLudovic Arnaud <ludovic_arnaud@users.sourceforge.net>2003-05-23 23:55:39 +0000
committerLudovic Arnaud <ludovic_arnaud@users.sourceforge.net>2003-05-23 23:55:39 +0000
commitbea13814e7831d3a5f19709e598dbefbae6e222d (patch)
tree703f7b7b50c4c424e1ca9e45a8716c1f4734798a /phpBB/includes/functions.php
parentd2f1d9e8bc8f7584f9ad9bae133add937466343c (diff)
downloadforums-bea13814e7831d3a5f19709e598dbefbae6e222d.tar
forums-bea13814e7831d3a5f19709e598dbefbae6e222d.tar.gz
forums-bea13814e7831d3a5f19709e598dbefbae6e222d.tar.bz2
forums-bea13814e7831d3a5f19709e598dbefbae6e222d.tar.xz
forums-bea13814e7831d3a5f19709e598dbefbae6e222d.zip
Changed: set_config() won't actually update the database if config values match
git-svn-id: file:///svn/phpbb/trunk@4053 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 552d2e8da6..de1f7064e8 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -25,10 +25,13 @@ function set_config($config_name, $config_value, $is_dynamic = FALSE)
if (isset($config[$config_name]))
{
- $sql = 'UPDATE ' . CONFIG_TABLE . "
- SET config_value = '" . $db->sql_escape($config_value) . "'
- WHERE config_name = '$config_name'";
- $db->sql_query($sql);
+ if ($config[$config_name] != $config_value)
+ {
+ $sql = 'UPDATE ' . CONFIG_TABLE . "
+ SET config_value = '" . $db->sql_escape($config_value) . "'
+ WHERE config_name = '$config_name'";
+ $db->sql_query($sql);
+ }
}
else
{
@@ -1339,7 +1342,6 @@ function page_footer()
);
$template->display('body');
-
exit;
}