1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-09 10:16:36 +02:00

Fixed bug #492183, added checking on theme name when creating new theme.

git-svn-id: file:///svn/phpbb/trunk@1620 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
James Atkinson
2001-12-17 10:03:33 +00:00
parent 4f2db0f414
commit 4a6c692484
2 changed files with 17 additions and 0 deletions

View File

@@ -69,6 +69,7 @@ switch( $mode )
if( isset($install_to) )
{
include($phpbb_root_dir . "templates/" . $install_to . "/theme_info.cfg");
$template_name = $$install_to;
@@ -374,6 +375,21 @@ switch( $mode )
}
else
{
//
// First, check if we already have a style by this name
//
$sql = "SELECT themes_id FROM " . THEMES_TABLE . " WHERE style_name = '" . $updated['style_name'] . "'";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not query themes table", "Error", __LINE__, __FILE__, $sql);
}
if($db->sql_numrows($result))
{
message_die(GENERAL_ERROR, $lang['Style_exists'], $lang['Error']);
}
while(list($key, $val) = each($updated))
{
$field_names[] = $key;