Zeile 102 | Zeile 102 |
---|
$query = $db->simple_select("templatesets", "*", "", array('order_by' => 'title', 'order_dir' => 'ASC')); while($template_set = $db->fetch_array($query)) {
|
$query = $db->simple_select("templatesets", "*", "", array('order_by' => 'title', 'order_dir' => 'ASC')); while($template_set = $db->fetch_array($query)) {
|
$template_sets[$template_set['sid']] = $template_set['title'];
| $template_sets[$template_set['sid']] = htmlspecialchars_uni($template_set['title']);
|
}
$plugins->run_hooks("admin_style_templates");
| }
$plugins->run_hooks("admin_style_templates");
|
Zeile 157 | Zeile 157 |
---|
$form = new Form("index.php?module=style-templates&action=add_set", "post", "add_set");
$form_container = new FormContainer($lang->add_set);
|
$form = new Form("index.php?module=style-templates&action=add_set", "post", "add_set");
$form_container = new FormContainer($lang->add_set);
|
$form_container->output_row($lang->title, "", $form->generate_text_box('title', $mybb->input['title'], array('id' => 'title')), 'title');
| $form_container->output_row($lang->title, "", $form->generate_text_box('title', htmlspecialchars_uni($mybb->input['title']), array('id' => 'title')), 'title');
|
$form_container->end();
$buttons = array();
| $form_container->end();
$buttons = array();
|
Zeile 254 | Zeile 254 |
---|
if($admin_options['codepress'] != 0) { $page->extra_header .= '
|
if($admin_options['codepress'] != 0) { $page->extra_header .= '
|
<link href="./jscripts/codemirror/lib/codemirror.css" rel="stylesheet"> <link href="./jscripts/codemirror/theme/mybb.css?ver=1804" rel="stylesheet"> <script src="./jscripts/codemirror/lib/codemirror.js"></script> <script src="./jscripts/codemirror/mode/xml/xml.js"></script> <script src="./jscripts/codemirror/mode/javascript/javascript.js"></script> <script src="./jscripts/codemirror/mode/css/css.js"></script> <script src="./jscripts/codemirror/mode/htmlmixed/htmlmixed.js"></script> <link href="./jscripts/codemirror/addon/dialog/dialog-mybb.css" rel="stylesheet"> <script src="./jscripts/codemirror/addon/dialog/dialog.js"></script> <script src="./jscripts/codemirror/addon/search/searchcursor.js"></script> <script src="./jscripts/codemirror/addon/search/search.js?ver=1808"></script> <script src="./jscripts/codemirror/addon/fold/foldcode.js"></script> <script src="./jscripts/codemirror/addon/fold/xml-fold.js"></script> <script src="./jscripts/codemirror/addon/fold/foldgutter.js"></script> <link href="./jscripts/codemirror/addon/fold/foldgutter.css" rel="stylesheet">
| <link href="./jscripts/codemirror/lib/codemirror.css?ver=1813" rel="stylesheet"> <link href="./jscripts/codemirror/theme/mybb.css?ver=1813" rel="stylesheet"> <script src="./jscripts/codemirror/lib/codemirror.js?ver=1813"></script> <script src="./jscripts/codemirror/mode/xml/xml.js?ver=1813"></script> <script src="./jscripts/codemirror/mode/javascript/javascript.js?ver=1813"></script> <script src="./jscripts/codemirror/mode/css/css.js?ver=1813"></script> <script src="./jscripts/codemirror/mode/htmlmixed/htmlmixed.js?ver=1813"></script> <link href="./jscripts/codemirror/addon/dialog/dialog-mybb.css?ver=1813" rel="stylesheet"> <script src="./jscripts/codemirror/addon/dialog/dialog.js?ver=1813"></script> <script src="./jscripts/codemirror/addon/search/searchcursor.js?ver=1813"></script> <script src="./jscripts/codemirror/addon/search/search.js?ver=1813"></script> <script src="./jscripts/codemirror/addon/fold/foldcode.js?ver=1813"></script> <script src="./jscripts/codemirror/addon/fold/xml-fold.js?ver=1813"></script> <script src="./jscripts/codemirror/addon/fold/foldgutter.js?ver=1813"></script> <link href="./jscripts/codemirror/addon/fold/foldgutter.css?ver=1813" rel="stylesheet">
|
'; }
| '; }
|
Zeile 620 | Zeile 620 |
---|
if($errors) { $template = $mybb->input;
|
if($errors) { $template = $mybb->input;
|
} else
| } else
|
{ $query = $db->simple_select("templates", "*", "title='".$db->escape_string($mybb->input['title'])."' AND (sid='-2' OR sid='{$sid}')", array('order_by' => 'sid', 'order_dir' => 'DESC', 'limit' => 1)); $template = $db->fetch_array($query);
|
{ $query = $db->simple_select("templates", "*", "title='".$db->escape_string($mybb->input['title'])."' AND (sid='-2' OR sid='{$sid}')", array('order_by' => 'sid', 'order_dir' => 'DESC', 'limit' => 1)); $template = $db->fetch_array($query);
|
}
| }
|
$template['title'] = htmlspecialchars_uni($template['title']);
if($admin_options['codepress'] != 0)
|
$template['title'] = htmlspecialchars_uni($template['title']);
if($admin_options['codepress'] != 0)
|
{
| {
|
$page->extra_header .= '
|
$page->extra_header .= '
|
<link href="./jscripts/codemirror/lib/codemirror.css" rel="stylesheet"> <link href="./jscripts/codemirror/theme/mybb.css?ver=1804" rel="stylesheet"> <script src="./jscripts/codemirror/lib/codemirror.js"></script> <script src="./jscripts/codemirror/mode/xml/xml.js"></script> <script src="./jscripts/codemirror/mode/javascript/javascript.js"></script> <script src="./jscripts/codemirror/mode/css/css.js"></script> <script src="./jscripts/codemirror/mode/htmlmixed/htmlmixed.js"></script> <link href="./jscripts/codemirror/addon/dialog/dialog-mybb.css" rel="stylesheet"> <script src="./jscripts/codemirror/addon/dialog/dialog.js"></script> <script src="./jscripts/codemirror/addon/search/searchcursor.js"></script> <script src="./jscripts/codemirror/addon/search/search.js?ver=1808"></script> <script src="./jscripts/codemirror/addon/fold/foldcode.js"></script> <script src="./jscripts/codemirror/addon/fold/xml-fold.js"></script> <script src="./jscripts/codemirror/addon/fold/foldgutter.js"></script> <link href="./jscripts/codemirror/addon/fold/foldgutter.css" rel="stylesheet">
| <link href="./jscripts/codemirror/lib/codemirror.css?ver=1813" rel="stylesheet"> <link href="./jscripts/codemirror/theme/mybb.css?ver=1813" rel="stylesheet"> <script src="./jscripts/codemirror/lib/codemirror.js?ver=1813"></script> <script src="./jscripts/codemirror/mode/xml/xml.js?ver=1813"></script> <script src="./jscripts/codemirror/mode/javascript/javascript.js?ver=1813"></script> <script src="./jscripts/codemirror/mode/css/css.js?ver=1813"></script> <script src="./jscripts/codemirror/mode/htmlmixed/htmlmixed.js?ver=1813"></script> <link href="./jscripts/codemirror/addon/dialog/dialog-mybb.css?ver=1813" rel="stylesheet"> <script src="./jscripts/codemirror/addon/dialog/dialog.js?ver=1813"></script> <script src="./jscripts/codemirror/addon/search/searchcursor.js?ver=1813"></script> <script src="./jscripts/codemirror/addon/search/search.js?ver=1813"></script> <script src="./jscripts/codemirror/addon/fold/foldcode.js?ver=1813"></script> <script src="./jscripts/codemirror/addon/fold/xml-fold.js?ver=1813"></script> <script src="./jscripts/codemirror/addon/fold/foldgutter.js?ver=1813"></script> <link href="./jscripts/codemirror/addon/fold/foldgutter.css?ver=1813" rel="stylesheet">
|
';
|
';
|
}
| }
|
$page->add_breadcrumb_item($template_sets[$sid], "index.php?module=style-templates&sid={$sid}{$expand_str}");
if(!isset($mybb->input['from'])) { $mybb->input['from'] = '';
|
$page->add_breadcrumb_item($template_sets[$sid], "index.php?module=style-templates&sid={$sid}{$expand_str}");
if(!isset($mybb->input['from'])) { $mybb->input['from'] = '';
|
}
| }
|
if($mybb->input['from'] == "diff_report") { $page->add_breadcrumb_item($lang->find_updated, "index.php?module=style-templates&action=find_updated");
| if($mybb->input['from'] == "diff_report") { $page->add_breadcrumb_item($lang->find_updated, "index.php?module=style-templates&action=find_updated");
|
Zeile 664 | Zeile 664 |
---|
$page->add_breadcrumb_item($lang->edit_template_breadcrumb.$template['title'], "index.php?module=style-templates&sid={$sid}");
$page->output_header($lang->sprintf($lang->editing_template, $template['title']));
|
$page->add_breadcrumb_item($lang->edit_template_breadcrumb.$template['title'], "index.php?module=style-templates&sid={$sid}");
$page->output_header($lang->sprintf($lang->editing_template, $template['title']));
|
|
|
$sub_tabs = array();
if($mybb->input['from'] == "diff_report")
|
$sub_tabs = array();
if($mybb->input['from'] == "diff_report")
|
{
| {
|
$sub_tabs['find_updated'] = array( 'title' => $lang->find_updated, 'link' => "index.php?module=style-templates&action=find_updated"
|
$sub_tabs['find_updated'] = array( 'title' => $lang->find_updated, 'link' => "index.php?module=style-templates&action=find_updated"
|
);
| );
|
$sub_tabs['diff_report'] = array( 'title' => $lang->diff_report, 'link' => "index.php?module=style-templates&action=diff_report&title=".$db->escape_string($template['title'])."&sid1=".(int)$template['sid']."&sid2=-2", );
|
$sub_tabs['diff_report'] = array( 'title' => $lang->diff_report, 'link' => "index.php?module=style-templates&action=diff_report&title=".$db->escape_string($template['title'])."&sid1=".(int)$template['sid']."&sid2=-2", );
|
}
| }
|
$sub_tabs['edit_template'] = array( 'title' => $lang->edit_template, 'link' => "index.php?module=style-templates&action=edit_template&title=".htmlspecialchars_uni($template['title']).$expand_str, 'description' => $lang->edit_template_desc
|
$sub_tabs['edit_template'] = array( 'title' => $lang->edit_template, 'link' => "index.php?module=style-templates&action=edit_template&title=".htmlspecialchars_uni($template['title']).$expand_str, 'description' => $lang->edit_template_desc
|
);
$page->output_nav_tabs($sub_tabs, 'edit_template');
if($errors) { $page->output_inline_error($errors); }
| );
$page->output_nav_tabs($sub_tabs, 'edit_template');
if($errors) { $page->output_inline_error($errors); }
|
$form = new Form("index.php?module=style-templates&action=edit_template{$expand_str}", "post", "edit_template"); echo $form->generate_hidden_field('tid', $template['tid'])."\n";
if($mybb->input['from'] == "diff_report") { echo $form->generate_hidden_field('from', "diff_report");
|
$form = new Form("index.php?module=style-templates&action=edit_template{$expand_str}", "post", "edit_template"); echo $form->generate_hidden_field('tid', $template['tid'])."\n";
if($mybb->input['from'] == "diff_report") { echo $form->generate_hidden_field('from', "diff_report");
|
}
| }
|
$form_container = new FormContainer($lang->edit_template_breadcrumb.$template['title'], 'tfixed'); $form_container->output_row($lang->template_name, $lang->template_name_desc, $form->generate_text_box('title', $template['title'], array('id' => 'title')), 'title');
|
$form_container = new FormContainer($lang->edit_template_breadcrumb.$template['title'], 'tfixed'); $form_container->output_row($lang->template_name, $lang->template_name_desc, $form->generate_text_box('title', $template['title'], array('id' => 'title')), 'title');
|
|
|
// Force users to save the default template to a specific set, rather than the "global" templates - where they can delete it if($template['sid'] == "-2") {
| // Force users to save the default template to a specific set, rather than the "global" templates - where they can delete it if($template['sid'] == "-2") {
|
Zeile 719 | Zeile 719 |
---|
$buttons[] = $form->generate_submit_button($lang->save_continue, array('name' => 'continue')); $buttons[] = $form->generate_submit_button($lang->save_close, array('name' => 'close'));
|
$buttons[] = $form->generate_submit_button($lang->save_continue, array('name' => 'continue')); $buttons[] = $form->generate_submit_button($lang->save_close, array('name' => 'close'));
|
$form->output_submit_wrapper($buttons);
$form->end();
| $form->output_submit_wrapper($buttons);
$form->end();
|
if($admin_options['codepress'] != 0) { echo '<script type="text/javascript">
| if($admin_options['codepress'] != 0) { echo '<script type="text/javascript">
|
Zeile 805 | Zeile 805 |
---|
);
$plugins->run_hooks('admin_style_templates_edit_template_group_commit');
|
);
$plugins->run_hooks('admin_style_templates_edit_template_group_commit');
|
|
|
$db->update_query('templategroups', $update_array, "gid = '{$template_group['gid']}'");
log_admin_action($template_group['gid'], htmlspecialchars_uni($title));
| $db->update_query('templategroups', $update_array, "gid = '{$template_group['gid']}'");
log_admin_action($template_group['gid'], htmlspecialchars_uni($title));
|
Zeile 813 | Zeile 813 |
---|
admin_redirect("index.php?module=style-templates&sid={$sid}"); } }
|
admin_redirect("index.php?module=style-templates&sid={$sid}"); } }
|
}
$lang->editing_template_group = $lang->sprintf($lang->editing_template_group, htmlspecialchars_uni($template_group['title']));
| }
$lang->editing_template_group = $lang->sprintf($lang->editing_template_group, htmlspecialchars_uni($template_group['title']));
|
$page->add_breadcrumb_item($template_sets[$sid], "index.php?module=style-templates&sid={$sid}{$expand_str}"); $page->add_breadcrumb_item($lang->editing_template_group, "index.php?module=style-templates&sid={$sid}");
|
$page->add_breadcrumb_item($template_sets[$sid], "index.php?module=style-templates&sid={$sid}{$expand_str}"); $page->add_breadcrumb_item($lang->editing_template_group, "index.php?module=style-templates&sid={$sid}");
|
|
|
$page->output_header($lang->editing_template_group);
if($errors) { $template_group['prefix'] = $prefix; $template_group['title'] = $title;
|
$page->output_header($lang->editing_template_group);
if($errors) { $template_group['prefix'] = $prefix; $template_group['title'] = $title;
|
|
|
$page->output_inline_error($errors); }
$form = new Form("index.php?module=style-templates&action=edit_template_group", "post"); echo $form->generate_hidden_field('sid', $sid); echo $form->generate_hidden_field('gid', $template_group['gid']);
|
$page->output_inline_error($errors); }
$form = new Form("index.php?module=style-templates&action=edit_template_group", "post"); echo $form->generate_hidden_field('sid', $sid); echo $form->generate_hidden_field('gid', $template_group['gid']);
|
|
|
$form_container = new FormContainer($lang->edit_template_group); $form_container->output_row($lang->template_group_prefix, $lang->template_group_prefix_desc, $form->generate_text_box('prefix', $template_group['prefix'], array('id' => 'prefix')), 'prefix'); $form_container->output_row($lang->template_group_title, $lang->template_group_title_desc, $form->generate_text_box('title', $template_group['title'], array('id' => 'title')), 'title');
| $form_container = new FormContainer($lang->edit_template_group); $form_container->output_row($lang->template_group_prefix, $lang->template_group_prefix_desc, $form->generate_text_box('prefix', $template_group['prefix'], array('id' => 'prefix')), 'prefix'); $form_container->output_row($lang->template_group_title, $lang->template_group_title_desc, $form->generate_text_box('title', $template_group['title'], array('id' => 'title')), 'title');
|
Zeile 860 | Zeile 860 |
---|
// Search and replace in templates
if(!$mybb->input['find'])
|
// Search and replace in templates
if(!$mybb->input['find'])
|
{ flash_message($lang->search_noneset, "error");
| { flash_message($lang->search_noneset, "error");
|
admin_redirect("index.php?module=style-templates&action=search_replace"); } else
| admin_redirect("index.php?module=style-templates&action=search_replace"); } else
|
Zeile 1179 | Zeile 1179 |
---|
if($admin_options['codepress'] != 0) { $page->extra_header .= '
|
if($admin_options['codepress'] != 0) { $page->extra_header .= '
|
<link href="./jscripts/codemirror/lib/codemirror.css" rel="stylesheet"> <link href="./jscripts/codemirror/theme/mybb.css?ver=1804" rel="stylesheet"> <script src="./jscripts/codemirror/lib/codemirror.js"></script> <script src="./jscripts/codemirror/mode/xml/xml.js"></script> <script src="./jscripts/codemirror/mode/javascript/javascript.js"></script> <script src="./jscripts/codemirror/mode/css/css.js"></script> <script src="./jscripts/codemirror/mode/htmlmixed/htmlmixed.js"></script> <link href="./jscripts/codemirror/addon/dialog/dialog-mybb.css" rel="stylesheet"> <script src="./jscripts/codemirror/addon/dialog/dialog.js"></script> <script src="./jscripts/codemirror/addon/search/searchcursor.js"></script> <script src="./jscripts/codemirror/addon/search/search.js?ver=1808"></script> <script src="./jscripts/codemirror/addon/fold/foldcode.js"></script> <script src="./jscripts/codemirror/addon/fold/xml-fold.js"></script> <script src="./jscripts/codemirror/addon/fold/foldgutter.js"></script> <link href="./jscripts/codemirror/addon/fold/foldgutter.css" rel="stylesheet">
| <link href="./jscripts/codemirror/lib/codemirror.css?ver=1813" rel="stylesheet"> <link href="./jscripts/codemirror/theme/mybb.css?ver=1813" rel="stylesheet"> <script src="./jscripts/codemirror/lib/codemirror.js?ver=1813"></script> <script src="./jscripts/codemirror/mode/xml/xml.js?ver=1813"></script> <script src="./jscripts/codemirror/mode/javascript/javascript.js?ver=1813"></script> <script src="./jscripts/codemirror/mode/css/css.js?ver=1813"></script> <script src="./jscripts/codemirror/mode/htmlmixed/htmlmixed.js?ver=1813"></script> <link href="./jscripts/codemirror/addon/dialog/dialog-mybb.css?ver=1813" rel="stylesheet"> <script src="./jscripts/codemirror/addon/dialog/dialog.js?ver=1813"></script> <script src="./jscripts/codemirror/addon/search/searchcursor.js?ver=1813"></script> <script src="./jscripts/codemirror/addon/search/search.js?ver=1813"></script> <script src="./jscripts/codemirror/addon/fold/foldcode.js?ver=1813"></script> <script src="./jscripts/codemirror/addon/fold/xml-fold.js?ver=1813"></script> <script src="./jscripts/codemirror/addon/fold/foldgutter.js?ver=1813"></script> <link href="./jscripts/codemirror/addon/fold/foldgutter.css?ver=1813" rel="stylesheet">
|
'; }
| '; }
|
Zeile 1325 | Zeile 1325 |
---|
LEFT JOIN ".TABLE_PREFIX."templates m ON (m.title=t.title AND m.sid=-2 AND m.version > t.version) WHERE t.sid > 0 AND m.template != t.template ORDER BY t.sid ASC, title ASC
|
LEFT JOIN ".TABLE_PREFIX."templates m ON (m.title=t.title AND m.sid=-2 AND m.version > t.version) WHERE t.sid > 0 AND m.template != t.template ORDER BY t.sid ASC, title ASC
|
"); while($template = $db->fetch_array($query))
| "); while($template = $db->fetch_array($query))
|
{ $templates[$template['sid']][] = $template; }
| { $templates[$template['sid']][] = $template; }
|
Zeile 1334 | Zeile 1334 |
---|
foreach($templates as $sid => $templates) { if(!$done_set[$sid])
|
foreach($templates as $sid => $templates) { if(!$done_set[$sid])
|
{ $table->construct_header($templatesets[$sid]['title'], array("colspan" => 2));
| { $table->construct_header(htmlspecialchars_uni($templatesets[$sid]['title']), array("colspan" => 2));
|
$done_set[$sid] = 1; ++$count;
|
$done_set[$sid] = 1; ++$count;
|
}
| }
|
foreach($templates as $template) {
| foreach($templates as $template) {
|
Zeile 1352 | Zeile 1352 |
---|
$table->construct_cell($popup->fetch(), array("class" => "align_center"));
$table->construct_row();
|
$table->construct_cell($popup->fetch(), array("class" => "align_center"));
$table->construct_row();
|
}
| }
|
if($done_set[$sid] && !$done_output[$sid]) { $done_output[$sid] = 1; if($count == 1)
|
if($done_set[$sid] && !$done_output[$sid]) { $done_output[$sid] = 1; if($count == 1)
|
{
| {
|
$table->output($lang->find_updated); } else
| $table->output($lang->find_updated); } else
|
Zeile 1375 | Zeile 1375 |
---|
{ $gid = $mybb->get_input('gid', MyBB::INPUT_INT); $query = $db->simple_select("templategroups", "*", "gid='{$gid}'");
|
{ $gid = $mybb->get_input('gid', MyBB::INPUT_INT); $query = $db->simple_select("templategroups", "*", "gid='{$gid}'");
|
|
|
if(!$db->num_rows($query)) { flash_message($lang->error_missing_template_group, 'error');
|
if(!$db->num_rows($query)) { flash_message($lang->error_missing_template_group, 'error');
|
admin_redirect("index.php?module=style-templates&sid={$sid}"); }
| admin_redirect("index.php?module=style-templates&sid={$sid}"); }
|
// User clicked no if($mybb->input['no'])
|
// User clicked no if($mybb->input['no'])
|
{ admin_redirect("index.php?module=style-templates&sid={$sid}");
| { admin_redirect("index.php?module=style-templates&sid={$sid}");
|
}
$plugins->run_hooks("admin_style_template_group_delete");
| }
$plugins->run_hooks("admin_style_template_group_delete");
|
Zeile 1408 | Zeile 1408 |
---|
else { $page->output_confirm_action("index.php?module=style-templates&action=delete_template_group&gid={$template_group['gid']}&sid={$sid}", $lang->confirm_template_group_delete);
|
else { $page->output_confirm_action("index.php?module=style-templates&action=delete_template_group&gid={$template_group['gid']}&sid={$sid}", $lang->confirm_template_group_delete);
|
} }
| } }
|
if($mybb->input['action'] == "delete_set") {
| if($mybb->input['action'] == "delete_set") {
|
Zeile 1418 | Zeile 1418 |
---|
// Does the template not exist? if(!$set['sid'])
|
// Does the template not exist? if(!$set['sid'])
|
{
| {
|
flash_message($lang->error_invalid_template_set, 'error'); admin_redirect("index.php?module=style-templates");
|
flash_message($lang->error_invalid_template_set, 'error'); admin_redirect("index.php?module=style-templates");
|
}
| }
|
$plugins->run_hooks("admin_style_templates_delete_set");
| $plugins->run_hooks("admin_style_templates_delete_set");
|
Zeile 1436 | Zeile 1436 |
---|
admin_redirect("index.php?module=style-templates"); break; }
|
admin_redirect("index.php?module=style-templates"); break; }
|
}
| }
|
// User clicked no if($mybb->input['no'])
|
// User clicked no if($mybb->input['no'])
|
{ admin_redirect("index.php?module=style-templates"); }
| { admin_redirect("index.php?module=style-templates"); }
|
if($mybb->request_method == "post") { // Delete the templateset
| if($mybb->request_method == "post") { // Delete the templateset
|
Zeile 1457 | Zeile 1457 |
---|
log_admin_action($set['sid'], $set['title']);
flash_message($lang->success_template_set_deleted, 'success');
|
log_admin_action($set['sid'], $set['title']);
flash_message($lang->success_template_set_deleted, 'success');
|
admin_redirect("index.php?module=style-templates"); } else { $page->output_confirm_action("index.php?module=style-templates&action=delete_set&sid={$set['sid']}", $lang->confirm_template_set_deletion); }
}
| admin_redirect("index.php?module=style-templates"); } else { $page->output_confirm_action("index.php?module=style-templates&action=delete_set&sid={$set['sid']}", $lang->confirm_template_set_deletion); }
}
|
if($mybb->input['action'] == "delete_template") { $query = $db->query("
| if($mybb->input['action'] == "delete_template") { $query = $db->query("
|
Zeile 1549 | Zeile 1549 |
---|
$template1 = $db->fetch_array($query);
$query = $db->simple_select("templates", "*", "title='".$db->escape_string($mybb->input['title'])."' AND sid='".$mybb->get_input('sid2', MyBB::INPUT_INT)."'");
|
$template1 = $db->fetch_array($query);
$query = $db->simple_select("templates", "*", "title='".$db->escape_string($mybb->input['title'])."' AND sid='".$mybb->get_input('sid2', MyBB::INPUT_INT)."'");
|
$template2 = $db->fetch_array($query);
if($mybb->input['sid2'] == -2) {
| $template2 = $db->fetch_array($query);
if($mybb->input['sid2'] == -2) {
|
$sub_tabs['full_edit'] = array( 'title' => $lang->full_edit, 'link' => "index.php?module=style-templates&action=edit_template&title=".urlencode($template1['title'])."&sid=".$mybb->get_input('sid1', MyBB::INPUT_INT)."&from=diff_report",
| $sub_tabs['full_edit'] = array( 'title' => $lang->full_edit, 'link' => "index.php?module=style-templates&action=edit_template&title=".urlencode($template1['title'])."&sid=".$mybb->get_input('sid1', MyBB::INPUT_INT)."&from=diff_report",
|
Zeile 1560 | Zeile 1560 |
---|
}
if($template1['template'] == $template2['template'])
|
}
if($template1['template'] == $template2['template'])
|
{
| {
|
flash_message($lang->templates_the_same, 'error'); admin_redirect("index.php?module=style-templates&sid=".$mybb->get_input('sid2', MyBB::INPUT_INT).$expand_str); }
$template1['template'] = explode("\n", $template1['template']); $template2['template'] = explode("\n", $template2['template']);
|
flash_message($lang->templates_the_same, 'error'); admin_redirect("index.php?module=style-templates&sid=".$mybb->get_input('sid2', MyBB::INPUT_INT).$expand_str); }
$template1['template'] = explode("\n", $template1['template']); $template2['template'] = explode("\n", $template2['template']);
|
|
|
$plugins->run_hooks("admin_style_templates_diff_report_run");
require_once MYBB_ROOT."inc/3rdparty/diff/Diff.php";
| $plugins->run_hooks("admin_style_templates_diff_report_run");
require_once MYBB_ROOT."inc/3rdparty/diff/Diff.php";
|
Zeile 1580 | Zeile 1580 |
---|
if($sid) { $page->add_breadcrumb_item($template_sets[$sid], "index.php?module=style-templates&sid={$sid}{$expand_str}");
|
if($sid) { $page->add_breadcrumb_item($template_sets[$sid], "index.php?module=style-templates&sid={$sid}{$expand_str}");
|
}
| }
|
if($mybb->input['sid2'] == -2) { $page->add_breadcrumb_item($lang->find_updated, "index.php?module=style-templates&action=find_updated");
| if($mybb->input['sid2'] == -2) { $page->add_breadcrumb_item($lang->find_updated, "index.php?module=style-templates&action=find_updated");
|
Zeile 1777 | Zeile 1777 |
---|
else { $group = -1;
|
else { $group = -1;
|
}
| }
|
$template['gid'] = -1; if(isset($template_groups[$exploded[0]]['gid']))
|
$template['gid'] = -1; if(isset($template_groups[$exploded[0]]['gid']))
|
{
| {
|
$template['gid'] = $template_groups[$exploded[0]]['gid']; }
| $template['gid'] = $template_groups[$exploded[0]]['gid']; }
|
Zeile 1806 | Zeile 1806 |
---|
{ // Master template that hasn't been customised in the set we have expanded if(!isset($template_groups[$group]['templates'][$template['title']]) || $template_groups[$group]['templates'][$template['title']]['template'] == $template['template'])
|
{ // Master template that hasn't been customised in the set we have expanded if(!isset($template_groups[$group]['templates'][$template['title']]) || $template_groups[$group]['templates'][$template['title']]['template'] == $template['template'])
|
{
| {
|
$template['original'] = true; $template_groups[$group]['templates'][$template['title']] = $template;
|
$template['original'] = true; $template_groups[$group]['templates'][$template['title']] = $template;
|
}
| }
|
// Template has been modified in the set we have expanded (it doesn't match the master) else if($template_groups[$group]['templates'][$template['title']]['template'] != $template['template'] && $template_groups[$group]['templates'][$template['title']]['sid'] != -2) {
| // Template has been modified in the set we have expanded (it doesn't match the master) else if($template_groups[$group]['templates'][$template['title']]['template'] != $template['template'] && $template_groups[$group]['templates'][$template['title']]['sid'] != -2) {
|
Zeile 1833 | Zeile 1833 |
---|
$unsetgid = array_search($group['gid'], $tmp_expand); unset($tmp_expand[$unsetgid]); $group['expand_str'] = implode("|", $tmp_expand);
|
$unsetgid = array_search($group['gid'], $tmp_expand); unset($tmp_expand[$unsetgid]); $group['expand_str'] = implode("|", $tmp_expand);
|
} else
| } else
|
{ $expand = $lang->expand; $expanded = false;
| { $expand = $lang->expand; $expanded = false;
|
Zeile 1946 | Zeile 1946 |
---|
$template_sets = array(); $template_sets[-1]['title'] = $lang->global_templates; $template_sets[-1]['sid'] = -1;
|
$template_sets = array(); $template_sets[-1]['title'] = $lang->global_templates; $template_sets[-1]['sid'] = -1;
|
|
|
$query = $db->simple_select("templatesets", "*", "", array('order_by' => 'title', 'order_dir' => 'ASC')); while($template_set = $db->fetch_array($query)) {
| $query = $db->simple_select("templatesets", "*", "", array('order_by' => 'title', 'order_dir' => 'ASC')); while($template_set = $db->fetch_array($query)) {
|
Zeile 2003 | Zeile 2003 |
---|
$actions = $popup->fetch(); }
|
$actions = $popup->fetch(); }
|
| $set['title'] = htmlspecialchars_uni($set['title']);
|
$table->construct_cell("<strong><a href=\"index.php?module=style-templates&sid={$set['sid']}\">{$set['title']}</a></strong><br /><small>{$used_by_note}</small>"); $table->construct_cell($actions, array("class" => "align_center"));
| $table->construct_cell("<strong><a href=\"index.php?module=style-templates&sid={$set['sid']}\">{$set['title']}</a></strong><br /><small>{$used_by_note}</small>"); $table->construct_cell($actions, array("class" => "align_center"));
|