Zeile 425 | Zeile 425 |
---|
if(($existing_sid == -2 && $existing_rows == 1) || $existing_rows == 0) {
|
if(($existing_sid == -2 && $existing_rows == 1) || $existing_rows == 0) {
|
$tid = $db->insert_query("templates", $template_array);
| $template['tid'] = $db->insert_query("templates", $template_array);
|
} else {
| } else {
|
Zeile 455 | Zeile 455 |
---|
}
// Log admin action
|
}
// Log admin action
|
log_admin_action($tid, $mybb->input['title'], $mybb->input['sid'], $set['title']);
| log_admin_action($template['tid'], $mybb->input['title'], $mybb->input['sid'], $set['title']);
|
flash_message($lang->success_template_saved, 'success');
| flash_message($lang->success_template_saved, 'success');
|
Zeile 493 | Zeile 493 |
---|
$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) {
| if($admin_options['codepress'] != 0) {
|
Zeile 638 | Zeile 639 |
---|
FROM ".TABLE_PREFIX."templates t LEFT JOIN ".TABLE_PREFIX."templatesets s ON (t.sid=s.sid) LEFT JOIN ".TABLE_PREFIX."templates t2 ON (t.title=t2.title AND t2.sid='1')
|
FROM ".TABLE_PREFIX."templates t LEFT JOIN ".TABLE_PREFIX."templatesets s ON (t.sid=s.sid) LEFT JOIN ".TABLE_PREFIX."templates t2 ON (t.title=t2.title AND t2.sid='1')
|
WHERE t.template LIKE '%".$db->escape_string_like($mybb->input['find'])."%' AND NOT (t.sid = -2 AND NOT ISNULL(t2.tid))
| WHERE t.template LIKE '%".$db->escape_string_like($mybb->input['find'])."%' AND NOT (t.sid = -2 AND (t2.tid) IS NOT NULL)
|
ORDER BY t.title ASC "); if($db->num_rows($query) == 0)
| ORDER BY t.title ASC "); if($db->num_rows($query) == 0)
|
Zeile 1325 | Zeile 1326 |
---|
$plugins->run_hooks("admin_style_templates_revert_commit");
// Log admin action
|
$plugins->run_hooks("admin_style_templates_revert_commit");
// Log admin action
|
log_admin_action($template['tid'], $template['sid'], $template['sid'], $template['set_title']);
| log_admin_action($template['tid'], $template['title'], $template['sid'], $template['set_title']);
|
flash_message($lang->success_template_reverted, 'success');
| flash_message($lang->success_template_reverted, 'success');
|