aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/admin
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/admin')
-rw-r--r--phpBB/admin/admin_styles.php25
1 files changed, 9 insertions, 16 deletions
diff --git a/phpBB/admin/admin_styles.php b/phpBB/admin/admin_styles.php
index 75ac5d318d..0d15d94983 100644
--- a/phpBB/admin/admin_styles.php
+++ b/phpBB/admin/admin_styles.php
@@ -504,7 +504,13 @@ switch( $mode )
message_die(GENERAL_ERROR, "Could not get data from themes table", "", __LINE__, __FILE__, $sql);
}
- $selected_values = $db->sql_fetchrow($result);
+ if ( $selected_values = $db->sql_fetchrow($result) )
+ {
+ while(list($key, $val) = @each($selected_values))
+ {
+ $selected[$key] = $val;
+ }
+ }
//
// Fetch the Themes Name data
@@ -517,27 +523,14 @@ switch( $mode )
message_die(GENERAL_ERROR, "Could not get data from themes name table", "", __LINE__, __FILE__, $sql);
}
- $selected_names = $db->sql_fetchrow($result);
-
- reset($selected_values);
- //$selected = array_merge($selected_values, $selected_names);
- if(count($selected_values))
+ if ( $selected_names = $db->sql_fetchrow($result) )
{
- while(list($key, $val) = each($selected_values))
+ while(list($key, $val) = @each($selected_names))
{
$selected[$key] = $val;
}
}
- reset($selected_names);
- if($selected_names)
- {
- while(list($key, $val) = each($selected_names))
- {
- $selected[$key] = $val;
- }
- }
-
$s_hidden_fields = '<input type="hidden" name="style_id" value="' . $style_id . '" />';
}
else