Zeile 340 | Zeile 340 |
---|
$properties = unserialize($theme['properties']); $xml = "<?xml version=\"1.0\" encoding=\"{$lang->settings['charset']}\"?".">\r\n";
|
$properties = unserialize($theme['properties']); $xml = "<?xml version=\"1.0\" encoding=\"{$lang->settings['charset']}\"?".">\r\n";
|
$xml .= "<theme name=\"".$theme['name']."\" version=\"".$mybb->version_code."\">\r\n";
| $xml .= "<theme name=\"".htmlspecialchars_uni($theme['name'])."\" version=\"".$mybb->version_code."\">\r\n";
|
$xml .= "\t<properties>\r\n"; foreach($properties as $property => $value) {
| $xml .= "\t<properties>\r\n"; foreach($properties as $property => $value) {
|
Zeile 467 | Zeile 467 |
---|
$theme['name'] = rawurlencode($theme['name']); header("Content-disposition: attachment; filename=".$theme['name']."-theme.xml");
|
$theme['name'] = rawurlencode($theme['name']); header("Content-disposition: attachment; filename=".$theme['name']."-theme.xml");
|
header("Content-Length: ".my_strlen($xml));
| |
header("Content-type: application/octet-stream");
|
header("Content-type: application/octet-stream");
|
| header("Content-Length: ".my_strlen($xml));
|
header("Pragma: no-cache"); header("Expires: 0"); echo $xml;
| header("Pragma: no-cache"); header("Expires: 0"); echo $xml;
|
Zeile 476 | Zeile 476 |
---|
} $page->add_breadcrumb_item(htmlspecialchars_uni($theme['name']), "index.php?module=style/themes&action=edit&tid={$mybb->input['tid']}");
|
} $page->add_breadcrumb_item(htmlspecialchars_uni($theme['name']), "index.php?module=style/themes&action=edit&tid={$mybb->input['tid']}");
|
|
|
$page->add_breadcrumb_item($lang->export_theme, "index.php?module=style/themes&action=export"); $page->output_header("{$lang->themes} - {$lang->export_theme}");
| $page->add_breadcrumb_item($lang->export_theme, "index.php?module=style/themes&action=export"); $page->output_header("{$lang->themes} - {$lang->export_theme}");
|
Zeile 496 | Zeile 496 |
---|
'link' => "index.php?module=style/themes&action=export&tid={$mybb->input['tid']}", 'description' => $lang->export_theme_desc );
|
'link' => "index.php?module=style/themes&action=export&tid={$mybb->input['tid']}", 'description' => $lang->export_theme_desc );
|
|
|
$page->output_nav_tabs($sub_tabs, 'export_theme'); if($errors)
| $page->output_nav_tabs($sub_tabs, 'export_theme'); if($errors)
|
Zeile 525 | Zeile 525 |
---|
if($mybb->input['action'] == "add") { if($mybb->request_method == "post")
|
if($mybb->input['action'] == "add") { if($mybb->request_method == "post")
|
{
| {
|
if(!$mybb->input['name']) { $errors[] = $lang->error_missing_name;
| if(!$mybb->input['name']) { $errors[] = $lang->error_missing_name;
|
Zeile 545 | Zeile 545 |
---|
$query = $db->simple_select("themes", "tid, name"); while($theme = $db->fetch_array($query))
|
$query = $db->simple_select("themes", "tid, name"); while($theme = $db->fetch_array($query))
|
{ $themes[$theme['tid']] = $theme['name'];
| { $themes[$theme['tid']] = $theme['name'];
|
}
|
}
|
|
|
$page->add_breadcrumb_item($lang->create_new_theme, "index.php?module=style/themes&action=add");
|
$page->add_breadcrumb_item($lang->create_new_theme, "index.php?module=style/themes&action=add");
|
|
|
$page->output_header("{$lang->themes} - {$lang->create_new_theme}"); $page->output_nav_tabs($sub_tabs, 'create_theme'); if($errors)
|
$page->output_header("{$lang->themes} - {$lang->create_new_theme}"); $page->output_nav_tabs($sub_tabs, 'create_theme'); if($errors)
|
{
| {
|
$page->output_inline_error($errors); }
| $page->output_inline_error($errors); }
|
Zeile 576 | Zeile 576 |
---|
$page->output_footer(); }
|
$page->output_footer(); }
|
|
|
if($mybb->input['action'] == "delete") { $query = $db->simple_select("themes", "*", "tid='".intval($mybb->input['tid'])."'");
| if($mybb->input['action'] == "delete") { $query = $db->simple_select("themes", "*", "tid='".intval($mybb->input['tid'])."'");
|
Zeile 586 | Zeile 586 |
---|
if(!$theme['tid'] || $theme['tid'] == 1) { flash_message($lang->error_invalid_theme, 'error');
|
if(!$theme['tid'] || $theme['tid'] == 1) { flash_message($lang->error_invalid_theme, 'error');
|
admin_redirect("index.php?module=style/themes");
| admin_redirect("index.php?module=style/themes");
|
}
// User clicked no
| }
// User clicked no
|
Zeile 624 | Zeile 624 |
---|
if(strpos($filepath, "cache/themes/theme{$theme['tid']}") !== false) { $inherited_stylesheets = true;
|
if(strpos($filepath, "cache/themes/theme{$theme['tid']}") !== false) { $inherited_stylesheets = true;
|
} }
| } }
|
} }
| } }
|
Zeile 704 | Zeile 704 |
---|
foreach($mybb->input['allowedgroups'] as $gid) { if($gid == "all")
|
foreach($mybb->input['allowedgroups'] as $gid) { if($gid == "all")
|
{
| {
|
$allowedgroups = "all"; break; }
| $allowedgroups = "all"; break; }
|
Zeile 1103 | Zeile 1103 |
---|
$stylesheets[basename($file)] = $stylesheet2; }
|
$stylesheets[basename($file)] = $stylesheet2; }
|
$this_stylesheet = $stylesheets[$stylesheet['cachefile']];
| if(!array_key_exists($stylesheet['cachefile'], $stylesheets) && array_key_exists("css.php?stylesheet=".$stylesheet['tid'], $stylesheets)) { $stylesheet['cachefile'] = "css.php?stylesheet=".$stylesheet['tid']; } $this_stylesheet = $stylesheets[$stylesheet['cachefile']];
|
unset($stylesheets); if($mybb->request_method == "post")
| unset($stylesheets); if($mybb->request_method == "post")
|
Zeile 1155 | Zeile 1160 |
---|
// Update Stylesheet $update_array = array( 'name' => $db->escape_string($mybb->input['name']),
|
// Update Stylesheet $update_array = array( 'name' => $db->escape_string($mybb->input['name']),
|
'attachedto' => $db->escape_string(implode('|', $attached)), 'lastmodified' => TIME_NOW
| 'attachedto' => $db->escape_string(implode('|', $attached))
|
); if($stylesheet['name'] != $mybb->input['name'])
| ); if($stylesheet['name'] != $mybb->input['name'])
|
Zeile 1169 | Zeile 1173 |
---|
// If the name changed, re-cache our stylesheet if($stylesheet['name'] != $mybb->input['name']) {
|
// If the name changed, re-cache our stylesheet if($stylesheet['name'] != $mybb->input['name']) {
|
| $db->update_query("themestylesheets", array('lastmodified' => TIME_NOW), "sid='{$stylesheet['sid']}'", 1);
|
if(!cache_stylesheet($theme['tid'], str_replace('/', '', $mybb->input['name']), $theme['stylesheet'])) { $db->update_query("themestylesheets", array('cachefile' => "css.php?stylesheet={$stylesheet['sid']}"), "sid='{$stylesheet['sid']}'", 1);
| if(!cache_stylesheet($theme['tid'], str_replace('/', '', $mybb->input['name']), $theme['stylesheet'])) { $db->update_query("themestylesheets", array('cachefile' => "css.php?stylesheet={$stylesheet['sid']}"), "sid='{$stylesheet['sid']}'", 1);
|