mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-06 15:45:34 +02:00
set correct dynamic config field if config name not present
git-svn-id: file:///svn/phpbb/trunk@4994 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
cd7e18e9f2
commit
a50b38c277
@ -62,7 +62,7 @@ function request_var($var_name, $default)
|
||||
}
|
||||
}
|
||||
|
||||
function set_config($config_name, $config_value, $is_dynamic = FALSE)
|
||||
function set_config($config_name, $config_value, $is_dynamic = false)
|
||||
{
|
||||
global $db, $cache, $config;
|
||||
|
||||
@ -73,8 +73,10 @@ function set_config($config_name, $config_value, $is_dynamic = FALSE)
|
||||
|
||||
if (!$db->sql_affectedrows() && !isset($config[$config_name]))
|
||||
{
|
||||
$sql = 'INSERT INTO ' . CONFIG_TABLE . " (config_name, config_value)
|
||||
VALUES ('" . $db->sql_escape($config_name) . "', '" . $db->sql_escape($config_value) . "')";
|
||||
$sql = 'INSERT INTO ' . CONFIG_TABLE . ' ' . $db->sql_build_array('INSERT', array(
|
||||
'config_name' => $config_name,
|
||||
'config_value' => $config_value,
|
||||
'is_dynamic' => ($is_dynamic) ? 1 : 0));
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
@ -801,8 +803,6 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add
|
||||
}
|
||||
|
||||
$page_string .= ($on_page == $total_pages) ? '<strong>' . $total_pages . '</strong>' : '<a href="' . $base_url . '&start=' . (($total_pages - 1) * $per_page) . '">' . $total_pages . '</a>';
|
||||
// $page_string = $user->lang['GOTO_PAGE'] . ' ' . $page_string;
|
||||
// $page_string = '<a href="javascript:jumpto();">' . $user->lang['GOTO_PAGE'] . '</a> ' . $page_string;
|
||||
|
||||
$template->assign_vars(array(
|
||||
$tpl_prefix . 'BASE_URL' => $base_url,
|
||||
|
Loading…
x
Reference in New Issue
Block a user