diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-09-10 00:16:37 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-09-10 00:16:37 +0000 |
commit | cb6369db6747c6421fb58de8229622fd20799c42 (patch) | |
tree | 99324752d3ed1a914f3464e7a6e0d157c065bf53 | |
parent | 6e81d5fd96738f555b6e24ecf892864b304c0b08 (diff) | |
download | forums-cb6369db6747c6421fb58de8229622fd20799c42.tar forums-cb6369db6747c6421fb58de8229622fd20799c42.tar.gz forums-cb6369db6747c6421fb58de8229622fd20799c42.tar.bz2 forums-cb6369db6747c6421fb58de8229622fd20799c42.tar.xz forums-cb6369db6747c6421fb58de8229622fd20799c42.zip |
Modified for modification to templates/themes
git-svn-id: file:///svn/phpbb/trunk@1021 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r-- | phpBB/admin/admin_board.php | 38 |
1 files changed, 12 insertions, 26 deletions
diff --git a/phpBB/admin/admin_board.php b/phpBB/admin/admin_board.php index cb75105dd7..9a9f1a5990 100644 --- a/phpBB/admin/admin_board.php +++ b/phpBB/admin/admin_board.php @@ -46,35 +46,21 @@ else if( isset($HTTP_POST_VARS['submit']) ) { - if( isset($HTTP_POST_VARS['board_style']) ) + if( $config_name == "default_theme" ) { - $default_template = substr($HTTP_POST_VARS['board_style'], 0, strrpos($HTTP_POST_VARS['board_style'], "_")); - $default_theme = substr($HTTP_POST_VARS['board_style'], strrpos($HTTP_POST_VARS['board_style'], "_") + 1); - - $sql = "UPDATE " . CONFIG_TABLE . " SET - config_value = '$default_template' - WHERE config_name = 'board_template'"; - if( !$db->sql_query($sql) ) - { - message_die(GENERAL_ERROR, "Failed to update general configuration for board_template", "", __LINE__, __FILE__, $sql); - } - $sql = "UPDATE " . CONFIG_TABLE . " SET - config_value = '$default_theme' - WHERE config_name = 'default_theme'"; - if( !$db->sql_query($sql) ) - { - message_die(GENERAL_ERROR, "Failed to update general configuration for default_theme", "", __LINE__, __FILE__, $sql); - } + $new[$config_name] = substr($HTTP_POST_VARS['board_style'], strrpos($HTTP_POST_VARS['board_style'], "_") + 1); + } + else if( $config_name == "board_template" ) + { + $new[$config_name] = substr($HTTP_POST_VARS['board_style'], 0, strrpos($HTTP_POST_VARS['board_style'], "_")); } - else + + $sql = "UPDATE " . CONFIG_TABLE . " SET + config_value = '".$new[$config_name]."' + WHERE config_name = '$config_name'"; + if( !$db->sql_query($sql) ) { - $sql = "UPDATE " . CONFIG_TABLE . " SET - config_value = '".$new[$config_name]."' - WHERE config_name = '$config_name'"; - if( !$db->sql_query($sql) ) - { - message_die(GENERAL_ERROR, "Failed to update general configuration for $config_name", "", __LINE__, __FILE__, $sql); - } + message_die(GENERAL_ERROR, "Failed to update general configuration for $config_name", "", __LINE__, __FILE__, $sql); } } } |