|
From: James A. <th...@us...> - 2001-12-17 10:03:37
|
Update of /cvsroot/phpbb/phpBB2/admin
In directory usw-pr-cvs1:/tmp/cvs-serv23609/admin
Modified Files:
admin_styles.php
Log Message:
Fixed bug #492183, added checking on theme name when creating new theme.
Index: admin_styles.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/admin/admin_styles.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** admin_styles.php 2001/12/16 02:45:06 1.11
--- admin_styles.php 2001/12/17 10:03:33 1.12
***************
*** 70,73 ****
--- 70,74 ----
if( isset($install_to) )
{
+
include($phpbb_root_dir . "templates/" . $install_to . "/theme_info.cfg");
***************
*** 375,378 ****
--- 376,394 ----
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))
{
|