"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Upload/admin/modules/style/themes.php" between
mybb_1819.zip and mybb_1820.zip

About: MyBB is a multilingual, standards-compliant and free forum (discussion board) software.

themes.php  (mybb_1819):themes.php  (mybb_1820)
skipping to change at line 1460 skipping to change at line 1460
if(count($colors)) if(count($colors))
{ {
// Colors override files and are handled below. // Colors override files and are handled below.
continue; continue;
} }
// It's a file: // It's a file:
++$count; ++$count;
$name = htmlspecialchars_uni($name);
if($actions[0] != "global") if($actions[0] != "global")
{ {
$actions = array_map('htmlspecialchars_un
i', $actions);
$name = "{$name} ({$lang->actions}: ".imp lode(',', $actions).")"; $name = "{$name} ({$lang->actions}: ".imp lode(',', $actions).")";
} }
if($count == $applied_to_count && $count > 1) if($count == $applied_to_count && $count > 1)
{ {
$sep = " {$lang->and} "; $sep = " {$lang->and} ";
} }
$attached_to .= $sep.$name; $attached_to .= $sep.$name;
$sep = $lang->comma; $sep = $lang->comma;
skipping to change at line 1683 skipping to change at line 1687
if(!$mybb->input['name'] || $mybb->input['name'] == ".css") if(!$mybb->input['name'] || $mybb->input['name'] == ".css")
{ {
$errors[] = $lang->error_missing_stylesheet_name; $errors[] = $lang->error_missing_stylesheet_name;
} }
// Get 30 chars only because we don't want more than that // Get 30 chars only because we don't want more than that
$mybb->input['name'] = my_substr($mybb->input['name'], 0, 30); $mybb->input['name'] = my_substr($mybb->input['name'], 0, 30);
if(get_extension($mybb->input['name']) != "css") if(get_extension($mybb->input['name']) != "css")
{ {
// Does not end with '.css' // Does not end with '.css'
$errors[] = $lang->sprintf($lang->error_missing_styleshee $errors[] = $lang->sprintf(
t_extension, $mybb->input['name']); $lang->error_missing_stylesheet_extension,
htmlspecialchars_uni($mybb->input['name'])
);
} }
if(!$errors) if(!$errors)
{ {
// Theme & stylesheet theme ID do not match, editing inhe rited - we copy to local theme // Theme & stylesheet theme ID do not match, editing inhe rited - we copy to local theme
if($theme['tid'] != $stylesheet['tid']) if($theme['tid'] != $stylesheet['tid'])
{ {
$stylesheet['sid'] = copy_stylesheet_to_theme($st ylesheet, $theme['tid']); $stylesheet['sid'] = copy_stylesheet_to_theme($st ylesheet, $theme['tid']);
} }
skipping to change at line 1991 skipping to change at line 1998
$form_container->output_row($lang->attached_to, $lang->attached_to_desc, $actions); $form_container->output_row($lang->attached_to, $lang->attached_to_desc, $actions);
$form_container->end(); $form_container->end();
$buttons[] = $form->generate_submit_button($lang->save_stylesheet_propert ies); $buttons[] = $form->generate_submit_button($lang->save_stylesheet_propert ies);
$form->output_submit_wrapper($buttons); $form->output_submit_wrapper($buttons);
echo <<<EOF echo <<<EOF
<script type="text/javascript" src="./jscripts/theme_properties.js"></scr ipt> <script type="text/javascript" src="./jscripts/theme_properties.js?ver=18 20"></script>
<script type="text/javascript"> <script type="text/javascript">
<!--- <!---
themeProperties.setup('{$count}'); themeProperties.setup('{$count}');
// --> // -->
</script> </script>
EOF; EOF;
$form->end(); $form->end();
$page->output_footer(); $page->output_footer();
skipping to change at line 2256 skipping to change at line 2263
$buttons[] = $form->generate_reset_button($lang->reset); $buttons[] = $form->generate_reset_button($lang->reset);
$buttons[] = $form->generate_submit_button($lang->save_changes, array('id ' => 'save', 'name' => 'save')); $buttons[] = $form->generate_submit_button($lang->save_changes, array('id ' => 'save', 'name' => 'save'));
$buttons[] = $form->generate_submit_button($lang->save_changes_and_close, array('id' => 'save_close', 'name' => 'save_close')); $buttons[] = $form->generate_submit_button($lang->save_changes_and_close, array('id' => 'save_close', 'name' => 'save_close'));
$form->output_submit_wrapper($buttons); $form->output_submit_wrapper($buttons);
echo '<script type="text/javascript" src="./jscripts/themes.js?ver=1808"> </script>'; echo '<script type="text/javascript" src="./jscripts/themes.js?ver=1808"> </script>';
echo '<script type="text/javascript"> echo '<script type="text/javascript">
$(document).ready(function() { $(function() {
//<![CDATA[ //<![CDATA[
ThemeSelector.init("./index.php?module=style-themes&action=xmlhttp_styles heet", "./index.php?module=style-themes&action=edit_stylesheet", $("#selector"), $("#stylesheet"), "'.htmlspecialchars_uni($mybb->input['file']).'", $("#selecto r_form"), "'.$mybb->input['tid'].'"); ThemeSelector.init("./index.php?module=style-themes&action=xmlhttp_styles heet", "./index.php?module=style-themes&action=edit_stylesheet", $("#selector"), $("#stylesheet"), "'.htmlspecialchars_uni($mybb->input['file']).'", $("#selecto r_form"), "'.$mybb->input['tid'].'");
lang.saving = "'.$lang->saving.'"; lang.saving = "'.$lang->saving.'";
}); });
//]]> //]]>
</script>'; </script>';
$form->end(); $form->end();
$page->output_footer(); $page->output_footer();
skipping to change at line 2899 skipping to change at line 2906
lineWrapping: true, lineWrapping: true,
viewportMargin: Infinity, viewportMargin: Infinity,
indentWithTabs: true, indentWithTabs: true,
indentUnit: 4, indentUnit: 4,
mode: "text/css", mode: "text/css",
theme: "mybb" theme: "mybb"
});</script>'; });</script>';
} }
echo '<script type="text/javascript" src="./jscripts/themes.js?ver=1808"> </script>'; echo '<script type="text/javascript" src="./jscripts/themes.js?ver=1808"> </script>';
echo '<script type="text/javascript" src="./jscripts/theme_properties.js" ></script>'; echo '<script type="text/javascript" src="./jscripts/theme_properties.js? ver=1820"></script>';
echo '<script type="text/javascript"> echo '<script type="text/javascript">
$(function() { $(function() {
//<![CDATA[ //<![CDATA[
checkAction(\'add\'); checkAction(\'add\');
lang.saving = "'.$lang->saving.'"; lang.saving = "'.$lang->saving.'";
}); });
//]]> //]]>
</script>'; </script>';
$form->end(); $form->end();
 End of changes. 6 change blocks. 
5 lines changed or deleted 12 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)