Zeile 94 | Zeile 94 |
---|
if(!$errors) {
|
if(!$errors) {
|
| if($mybb->input['pid'] < 0) { $mybb->input['pid'] = 0; }
|
$new_forum = $from_forum; unset($new_forum['fid'], $new_forum['threads'], $new_forum['posts'], $new_forum['lastpost'], $new_forum['lastposter'], $new_forum['lastposteruid'], $new_forum['lastposttid'], $new_forum['lastpostsubject'], $new_forum['unapprovedthreads'], $new_forum['unapprovedposts']);
|
$new_forum = $from_forum; unset($new_forum['fid'], $new_forum['threads'], $new_forum['posts'], $new_forum['lastpost'], $new_forum['lastposter'], $new_forum['lastposteruid'], $new_forum['lastposttid'], $new_forum['lastpostsubject'], $new_forum['unapprovedthreads'], $new_forum['unapprovedposts']);
|
$new_forum['name'] = $db->escape_string($mybb->input['title']); $new_forum['description'] = $db->escape_string($mybb->input['description']); $new_forum['type'] = $db->escape_string($mybb->input['type']);
| $new_forum['name'] = $mybb->input['title']; $new_forum['description'] = $mybb->input['description']; $new_forum['type'] = $mybb->input['type'];
|
$new_forum['pid'] = $mybb->get_input('pid', MyBB::INPUT_INT);
|
$new_forum['pid'] = $mybb->get_input('pid', MyBB::INPUT_INT);
|
$new_forum['rulestitle'] = $db->escape_string($new_forum['rulestitle']); $new_forum['rules'] = $db->escape_string($new_forum['rules']);
| |
$new_forum['parentlist'] = '';
|
$new_forum['parentlist'] = '';
|
| foreach($new_forum as $key => $value) { $new_forum[$key] = $db->escape_string($value); }
|
$to = $db->insert_query("forums", $new_forum);
| $to = $db->insert_query("forums", $new_forum);
|
Zeile 122 | Zeile 129 |
---|
if(!$db->num_rows($query)) { $errors[] = $lang->error_invalid_destination_forum;
|
if(!$db->num_rows($query)) { $errors[] = $lang->error_invalid_destination_forum;
|
}
| }
|
if(!$errors) { $new_forum = $from_forum; unset($new_forum['fid'], $new_forum['threads'], $new_forum['posts'], $new_forum['lastpost'], $new_forum['lastposter'], $new_forum['lastposteruid'], $new_forum['lastposttid'], $new_forum['lastpostsubject'], $new_forum['unapprovedthreads'], $new_forum['unapprovedposts']);
|
if(!$errors) { $new_forum = $from_forum; unset($new_forum['fid'], $new_forum['threads'], $new_forum['posts'], $new_forum['lastpost'], $new_forum['lastposter'], $new_forum['lastposteruid'], $new_forum['lastposttid'], $new_forum['lastpostsubject'], $new_forum['unapprovedthreads'], $new_forum['unapprovedposts']);
|
$new_forum['name'] = $db->escape_string($to_forum['name']); $new_forum['description'] = $db->escape_string($to_forum['description']); $new_forum['pid'] = $db->escape_string($to_forum['pid']); $new_forum['parentlist'] = $db->escape_string($to_forum['parentlist']); $new_forum['rulestitle'] = $db->escape_string($new_forum['rulestitle']); $new_forum['rules'] = $db->escape_string($new_forum['rules']);
| $new_forum['name'] = $to_forum['name']; $new_forum['description'] = $to_forum['description']; $new_forum['pid'] = $to_forum['pid']; $new_forum['parentlist'] = $to_forum['parentlist'];
foreach($new_forum as $key => $value) { $new_forum[$key] = $db->escape_string($value); }
|
$db->update_query("forums", $new_forum, "fid='{$to}'"); } }
if(!$errors)
|
$db->update_query("forums", $new_forum, "fid='{$to}'"); } }
if(!$errors)
|
{
| {
|
// Copy permissions
|
// Copy permissions
|
if(is_array($mybb->input['copygroups']) && count($mybb->input['copygroups'] > 0))
| if(is_array($mybb->input['copygroups']) && count($mybb->input['copygroups']) > 0)
|
{ foreach($mybb->input['copygroups'] as $gid) {
| { foreach($mybb->input['copygroups'] as $gid) {
|
Zeile 176 | Zeile 186 |
---|
flash_message($lang->success_forum_copied, 'success'); admin_redirect("index.php?module=forum-management&action=edit&fid={$to}"); }
|
flash_message($lang->success_forum_copied, 'success'); admin_redirect("index.php?module=forum-management&action=edit&fid={$to}"); }
|
}
| }
|
$page->add_breadcrumb_item($lang->copy_forum); $page->output_header($lang->copy_forum); $page->output_nav_tabs($sub_tabs, 'copy_forum');
| $page->add_breadcrumb_item($lang->copy_forum); $page->output_header($lang->copy_forum); $page->output_nav_tabs($sub_tabs, 'copy_forum');
|
Zeile 198 | Zeile 208 |
---|
if(!$mybb->input['pid']) { $copy_data['pid'] = "-1";
|
if(!$mybb->input['pid']) { $copy_data['pid'] = "-1";
|
} else {
| } else {
|
$copy_data['pid'] = $mybb->get_input('pid', MyBB::INPUT_INT); } $copy_data['disporder'] = "1";
| $copy_data['pid'] = $mybb->get_input('pid', MyBB::INPUT_INT); } $copy_data['disporder'] = "1";
|
Zeile 221 | Zeile 231 |
---|
$create_a_options_c = array( 'id' => 'category' );
|
$create_a_options_c = array( 'id' => 'category' );
|
|
|
if($copy_data['type'] == "f")
|
if($copy_data['type'] == "f")
|
{
| {
|
$create_a_options_f['checked'] = true;
|
$create_a_options_f['checked'] = true;
|
}
| }
|
else { $create_a_options_c['checked'] = true;
|
else { $create_a_options_c['checked'] = true;
|
}
$usergroups = array();
| }
$usergroups = array();
|
$query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title')); while($usergroup = $db->fetch_array($query)) {
| $query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title')); while($usergroup = $db->fetch_array($query)) {
|
Zeile 244 | Zeile 254 |
---|
$form_container->output_row($lang->destination_forum." <em>*</em>", $lang->destination_forum_desc, $form->generate_forum_select('to', $copy_data['to'], array('id' => 'to', 'main_option' => $lang->copy_to_new_forum)), 'to'); $form_container->output_row($lang->copy_settings_and_properties, $lang->copy_settings_and_properties_desc, $form->generate_yes_no_radio('copyforumsettings', $copy_data['copyforumsettings'])); $form_container->output_row($lang->copy_user_group_permissions, $lang->copy_user_group_permissions_desc, $form->generate_select_box('copygroups[]', $usergroups, $mybb->input['copygroups'], array('id' => 'copygroups', 'multiple' => true, 'size' => 5)), 'copygroups');
|
$form_container->output_row($lang->destination_forum." <em>*</em>", $lang->destination_forum_desc, $form->generate_forum_select('to', $copy_data['to'], array('id' => 'to', 'main_option' => $lang->copy_to_new_forum)), 'to'); $form_container->output_row($lang->copy_settings_and_properties, $lang->copy_settings_and_properties_desc, $form->generate_yes_no_radio('copyforumsettings', $copy_data['copyforumsettings'])); $form_container->output_row($lang->copy_user_group_permissions, $lang->copy_user_group_permissions_desc, $form->generate_select_box('copygroups[]', $usergroups, $mybb->input['copygroups'], array('id' => 'copygroups', 'multiple' => true, 'size' => 5)), 'copygroups');
|
|
|
$form_container->end();
$form_container = new FormContainer($lang->new_forum_settings);
| $form_container->end();
$form_container = new FormContainer($lang->new_forum_settings);
|
Zeile 291 | Zeile 301 |
---|
{ flash_message($lang->error_incorrect_moderator, 'error'); admin_redirect("index.php?module=forum-management");
|
{ flash_message($lang->error_incorrect_moderator, 'error'); admin_redirect("index.php?module=forum-management");
|
}
if(!$errors) {
| }
if(!$errors) {
|
$fid = $mybb->get_input('fid', MyBB::INPUT_INT); $forum = get_forum($fid); if($mod_data['isgroup'])
| $fid = $mybb->get_input('fid', MyBB::INPUT_INT); $forum = get_forum($fid); if($mod_data['isgroup'])
|
Zeile 577 | Zeile 587 |
---|
);
$page->add_breadcrumb_item($lang->forum_permissions2, "index.php?module=forum-management&fid=".$mybb->input['fid']."#tab_permissions");
|
);
$page->add_breadcrumb_item($lang->forum_permissions2, "index.php?module=forum-management&fid=".$mybb->input['fid']."#tab_permissions");
|
}
| }
|
$page->add_breadcrumb_item($lang->forum_permissions); $page->output_header($lang->forum_permissions); $page->output_nav_tabs($sub_tabs, 'edit_permissions');
| $page->add_breadcrumb_item($lang->forum_permissions); $page->output_header($lang->forum_permissions); $page->output_nav_tabs($sub_tabs, 'edit_permissions');
|
Zeile 767 | Zeile 777 |
---|
}
foreach(array_unique(array_values($groups)) as $group)
|
}
foreach(array_unique(array_values($groups)) as $group)
|
{
| {
|
$lang_group = "group_".$group; echo "<div id=\"tab_".$group."\">\n"; $form_container = new FormContainer("\"".htmlspecialchars_uni($usergroup['title'])."\" {$lang->custom_permissions_for} \"".htmlspecialchars_uni($forum['name'])."\"");
| $lang_group = "group_".$group; echo "<div id=\"tab_".$group."\">\n"; $form_container = new FormContainer("\"".htmlspecialchars_uni($usergroup['title'])."\" {$lang->custom_permissions_for} \"".htmlspecialchars_uni($forum['name'])."\"");
|
Zeile 779 | Zeile 789 |
---|
} $form_container->output_row("", "", "<div class=\"forum_settings_bit\">".implode("</div><div class=\"forum_settings_bit\">", $fields)."</div>"); $form_container->end();
|
} $form_container->output_row("", "", "<div class=\"forum_settings_bit\">".implode("</div><div class=\"forum_settings_bit\">", $fields)."</div>"); $form_container->end();
|
echo "</div>";
| echo "</div>";
|
}
if($mybb->input['ajax'] == 1)
| }
if($mybb->input['ajax'] == 1)
|
Zeile 862 | Zeile 872 |
---|
"defaultsortby" => $db->escape_string($mybb->input['defaultsortby']), "defaultsortorder" => $db->escape_string($mybb->input['defaultsortorder']), );
|
"defaultsortby" => $db->escape_string($mybb->input['defaultsortby']), "defaultsortorder" => $db->escape_string($mybb->input['defaultsortorder']), );
|
| $plugins->run_hooks("admin_forum_management_add_start");
|
$fid = $db->insert_query("forums", $insert_array);
$parentlist = make_parent_list($fid);
| $fid = $db->insert_query("forums", $insert_array);
$parentlist = make_parent_list($fid);
|
Zeile 2286 | Zeile 2299 |
---|
$form_container = new FormContainer($lang->manage_forums); } $form_container->output_row_header($lang->forum);
|
$form_container = new FormContainer($lang->manage_forums); } $form_container->output_row_header($lang->forum);
|
$form_container->output_row_header($lang->order, array("class" => "align_center", 'width' => '5%'));
| $form_container->output_row_header($lang->order, array("class" => "align_center", 'width' => '6%'));
|
$form_container->output_row_header($lang->controls, array("class" => "align_center", 'style' => 'width: 200px'));
build_admincp_forums_list($form_container, $form, $fid);
| $form_container->output_row_header($lang->controls, array("class" => "align_center", 'style' => 'width: 200px'));
build_admincp_forums_list($form_container, $form, $fid);
|
Zeile 2718 | Zeile 2731 |
---|
$popup->add_item($lang->subforums, "index.php?module=forum-management&fid={$forum['fid']}"); $popup->add_item($lang->moderators, "index.php?module=forum-management&fid={$forum['fid']}#tab_moderators"); $popup->add_item($lang->permissions, "index.php?module=forum-management&fid={$forum['fid']}#tab_permissions");
|
$popup->add_item($lang->subforums, "index.php?module=forum-management&fid={$forum['fid']}"); $popup->add_item($lang->moderators, "index.php?module=forum-management&fid={$forum['fid']}#tab_moderators"); $popup->add_item($lang->permissions, "index.php?module=forum-management&fid={$forum['fid']}#tab_permissions");
|
| $popup->add_item($lang->forum_thread_prefixes, "index.php?module=config-thread_prefixes&fid={$forum['fid']}");
|
$popup->add_item($lang->add_child_forum, "index.php?module=forum-management&action=add&pid={$forum['fid']}"); $popup->add_item($lang->copy_forum, "index.php?module=forum-management&action=copy&fid={$forum['fid']}"); $popup->add_item($lang->delete_forum, "index.php?module=forum-management&action=delete&fid={$forum['fid']}&my_post_key={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->confirm_forum_deletion}')");
| $popup->add_item($lang->add_child_forum, "index.php?module=forum-management&action=add&pid={$forum['fid']}"); $popup->add_item($lang->copy_forum, "index.php?module=forum-management&action=copy&fid={$forum['fid']}"); $popup->add_item($lang->delete_forum, "index.php?module=forum-management&action=delete&fid={$forum['fid']}&my_post_key={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->confirm_forum_deletion}')");
|
Zeile 2758 | Zeile 2772 |
---|
$popup->add_item($lang->subforums, "index.php?module=forum-management&fid={$forum['fid']}"); $popup->add_item($lang->moderators, "index.php?module=forum-management&fid={$forum['fid']}#tab_moderators"); $popup->add_item($lang->permissions, "index.php?module=forum-management&fid={$forum['fid']}#tab_permissions");
|
$popup->add_item($lang->subforums, "index.php?module=forum-management&fid={$forum['fid']}"); $popup->add_item($lang->moderators, "index.php?module=forum-management&fid={$forum['fid']}#tab_moderators"); $popup->add_item($lang->permissions, "index.php?module=forum-management&fid={$forum['fid']}#tab_permissions");
|
| $popup->add_item($lang->forum_thread_prefixes, "index.php?module=config-thread_prefixes&fid={$forum['fid']}");
|
$popup->add_item($lang->add_child_forum, "index.php?module=forum-management&action=add&pid={$forum['fid']}"); $popup->add_item($lang->copy_forum, "index.php?module=forum-management&action=copy&fid={$forum['fid']}"); $popup->add_item($lang->delete_forum, "index.php?module=forum-management&action=delete&fid={$forum['fid']}&my_post_key={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->confirm_forum_deletion}')");
| $popup->add_item($lang->add_child_forum, "index.php?module=forum-management&action=add&pid={$forum['fid']}"); $popup->add_item($lang->copy_forum, "index.php?module=forum-management&action=copy&fid={$forum['fid']}"); $popup->add_item($lang->delete_forum, "index.php?module=forum-management&action=delete&fid={$forum['fid']}&my_post_key={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->confirm_forum_deletion}')");
|