diff --git a/phpBB/adm/admin_styles.php b/phpBB/adm/admin_styles.php
index 83ee23ccb3..551044712c 100644
--- a/phpBB/adm/admin_styles.php
+++ b/phpBB/adm/admin_styles.php
@@ -197,6 +197,12 @@ switch ($mode)
}
+ $active_yes = ($style_active) ? ' checked="checked"' : '';
+ $active_no = (!$style_active) ? ' checked="checked"' : '';
+ $default_style_yes = ($style_id == $config['default_style']) ? ' checked="checked"' : '';
+ $default_style_no = ($style_id != $config['default_style']) ? ' checked="checked"' : '';
+
+
// Output the page
adm_page_header($user->lang['EDIT_STYLE']);
@@ -225,11 +231,11 @@ switch ($mode)
?>
- Style Name |
+ Style Name: |
|
- Style Copyright |
+ Style Copyright: |
' . $style_copyright . '' : '';
@@ -237,20 +243,24 @@ switch ($mode)
?> |
- Template set: |
+ Template set: |
|
- Theme set: |
+ Theme set: |
|
- Imageset: |
+ Imageset: |
|
- Status: |
- /> Inactive /> Active |
+ Default style: |
+ /> Yes /> No |
+
+
+ Active: |
+ /> Yes /> No |
|
@@ -1444,9 +1454,8 @@ function viewsource(url)
{
$stylesheet = &$css_data;
}
- else if (is_writeable("{$phpbb_root_path}styles/themes/$theme_path/$theme_path.css"))
+ else
{
- // Grab template data
if (!($fp = fopen("{$phpbb_root_path}styles/themes/$theme_path/$theme_path.css", 'rb')))
{
trigger_error($user->lang['NO_THEME']);
@@ -1454,10 +1463,6 @@ function viewsource(url)
$stylesheet = fread($fp, filesize("{$phpbb_root_path}styles/themes/$theme_path/$theme_path.css"));
fclose($fp);
}
- else
- {
- trigger_error($user->lang['ERR_THEME_UNWRITEABLE']);
- }
// Pull out list of "custom" tags
@@ -1548,9 +1553,10 @@ function viewsource(url)
}
else
{
+ // We change the path to one relative to the root
$sql_ary = array(
'css_storedb' => 1,
- 'css_data' => $stylesheet,
+ 'css_data' => str_replace('./../', 'styles/themes/', $stylesheet),
);
$sql = 'UPDATE ' . STYLES_CSS_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '