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['name'] = $db->escape_string($mybb->input['title']);
| $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']);
|
Zeile 142 | Zeile 146 |
---|
if(!$errors) { // Copy permissions
|
if(!$errors) { // 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 175 | Zeile 179 |
---|
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 256 | Zeile 260 |
---|
$form_container->end();
$buttons[] = $form->generate_submit_button($lang->copy_forum);
|
$form_container->end();
$buttons[] = $form->generate_submit_button($lang->copy_forum);
|
$form->output_submit_wrapper($buttons); $form->end();
$page->output_footer(); }
| $form->output_submit_wrapper($buttons); $form->end();
$page->output_footer(); }
|
if($mybb->input['action'] == "editmod") {
| if($mybb->input['action'] == "editmod") {
|
Zeile 425 | Zeile 429 |
---|
if($mybb->input['action'] == "clear_permission") { $pid = $mybb->get_input('pid', MyBB::INPUT_INT);
|
if($mybb->input['action'] == "clear_permission") { $pid = $mybb->get_input('pid', MyBB::INPUT_INT);
|
$fid = $mybb->get_input('fid', MyBB::INPUT_INT);
| $fid = $mybb->get_input('fid', MyBB::INPUT_INT);
|
$gid = $mybb->get_input('gid', MyBB::INPUT_INT);
// User clicked no if($mybb->input['no']) { admin_redirect("index.php?module=forum-management&fid={$fid}");
|
$gid = $mybb->get_input('gid', MyBB::INPUT_INT);
// User clicked no if($mybb->input['no']) { admin_redirect("index.php?module=forum-management&fid={$fid}");
|
}
$plugins->run_hooks("admin_forum_management_clear_permission");
| }
$plugins->run_hooks("admin_forum_management_clear_permission");
|
if($mybb->request_method == "post") { if((!$fid || !$gid) && $pid)
|
if($mybb->request_method == "post") { if((!$fid || !$gid) && $pid)
|
{
| {
|
$query = $db->simple_select("forumpermissions", "fid, gid", "pid='{$pid}'"); $result = $db->fetch_array($query); $fid = $result['fid']; $gid = $result['gid'];
|
$query = $db->simple_select("forumpermissions", "fid, gid", "pid='{$pid}'"); $result = $db->fetch_array($query); $fid = $result['fid']; $gid = $result['gid'];
|
}
| }
|
if($pid) { $db->delete_query("forumpermissions", "pid='{$pid}'");
|
if($pid) { $db->delete_query("forumpermissions", "pid='{$pid}'");
|
}
| }
|
else { $db->delete_query("forumpermissions", "gid='{$gid}' AND fid='{$fid}'"); }
|
else { $db->delete_query("forumpermissions", "gid='{$gid}' AND fid='{$fid}'"); }
|
|
|
$plugins->run_hooks('admin_forum_management_clear_permission_commit');
$cache->update_forumpermissions();
| $plugins->run_hooks('admin_forum_management_clear_permission_commit');
$cache->update_forumpermissions();
|
Zeile 465 | Zeile 469 |
---|
else { $page->output_confirm_action("index.php?module=forum-management&action=clear_permission&pid={$pid}&gid={$gid}&fid={$fid}", $lang->confirm_clear_custom_permission);
|
else { $page->output_confirm_action("index.php?module=forum-management&action=clear_permission&pid={$pid}&gid={$gid}&fid={$fid}", $lang->confirm_clear_custom_permission);
|
} }
| } }
|
if($mybb->input['action'] == "permissions") { $plugins->run_hooks("admin_forum_management_permissions");
| if($mybb->input['action'] == "permissions") { $plugins->run_hooks("admin_forum_management_permissions");
|
Zeile 505 | Zeile 509 |
---|
{ $update_array[$db->escape_string($field['Field'])] = 0; }
|
{ $update_array[$db->escape_string($field['Field'])] = 0; }
|
} } } else
| } } } else
|
{ // Else, we assume that the group has no permissions... foreach($fields_array as $field)
| { // Else, we assume that the group has no permissions... foreach($fields_array as $field)
|
Zeile 518 | Zeile 522 |
---|
$update_array[$db->escape_string($field['Field'])] = 0; } }
|
$update_array[$db->escape_string($field['Field'])] = 0; } }
|
}
| }
|
if($fid && !$pid) { $update_array['fid'] = $fid;
| if($fid && !$pid) { $update_array['fid'] = $fid;
|
Zeile 535 | Zeile 539 |
---|
}
$cache->update_forumpermissions();
|
}
$cache->update_forumpermissions();
|
|
|
// Log admin action log_admin_action($fid, $forum['name']);
if($mybb->input['ajax'] == 1)
|
// Log admin action log_admin_action($fid, $forum['name']);
if($mybb->input['ajax'] == 1)
|
{
| {
|
echo json_encode("<script type=\"text/javascript\">$('#row_{$gid}').html('".str_replace(array("'", "\t", "\n"), array("\\'", "", ""), retrieve_single_permissions_row($gid, $fid))."'); QuickPermEditor.init({$gid});</script>"); die; }
| echo json_encode("<script type=\"text/javascript\">$('#row_{$gid}').html('".str_replace(array("'", "\t", "\n"), array("\\'", "", ""), retrieve_single_permissions_row($gid, $fid))."'); QuickPermEditor.init({$gid});</script>"); die; }
|
Zeile 548 | Zeile 552 |
---|
{ flash_message($lang->success_forum_permissions_saved, 'success'); admin_redirect("index.php?module=forum-management&fid={$fid}#tab_permissions");
|
{ flash_message($lang->success_forum_permissions_saved, 'success'); admin_redirect("index.php?module=forum-management&fid={$fid}#tab_permissions");
|
} }
| } }
|
if($mybb->input['ajax'] != 1) { $sub_tabs = array();
| if($mybb->input['ajax'] != 1) { $sub_tabs = array();
|
Zeile 632 | Zeile 636 |
---|
{ $page->output_inline_error($errors); $permission_data = $mybb->input;
|
{ $page->output_inline_error($errors); $permission_data = $mybb->input;
|
|
|
$query = $db->simple_select("usergroups", "*", "gid='{$permission_data['gid']}'"); $usergroup = $db->fetch_array($query);
| $query = $db->simple_select("usergroups", "*", "gid='{$permission_data['gid']}'"); $usergroup = $db->fetch_array($query);
|
Zeile 756 | Zeile 760 |
---|
if(strpos($field['Field'], 'can') !== false || strpos($field['Field'], 'mod') !== false) { if(array_key_exists($field['Field'], $groups))
|
if(strpos($field['Field'], 'can') !== false || strpos($field['Field'], 'mod') !== false) { if(array_key_exists($field['Field'], $groups))
|
{
| {
|
$field_list[$groups[$field['Field']]][] = $field['Field']; } else { $field_list['misc'][] = $field['Field']; }
|
$field_list[$groups[$field['Field']]][] = $field['Field']; } else { $field_list['misc'][] = $field['Field']; }
|
} }
| } }
|
foreach(array_unique(array_values($groups)) as $group) {
| foreach(array_unique(array_values($groups)) as $group) {
|
Zeile 788 | Zeile 792 |
---|
$buttons[] = $form->generate_submit_button($lang->save_permissions, array('id' => 'savePermissions')); $form->output_submit_wrapper($buttons); $form->end();
|
$buttons[] = $form->generate_submit_button($lang->save_permissions, array('id' => 'savePermissions')); $form->output_submit_wrapper($buttons); $form->end();
|
echo "</div>";
| echo "</div>";
|
echo "</div>"; } else
| echo "</div>"; } else
|
Zeile 797 | Zeile 801 |
---|
$form->output_submit_wrapper($buttons);
$form->end();
|
$form->output_submit_wrapper($buttons);
$form->end();
|
}
| }
|
}
if($mybb->input['ajax'] != 1)
|
}
if($mybb->input['ajax'] != 1)
|
{
| {
|
$page->output_footer(); } }
|
$page->output_footer(); } }
|
|
|
if($mybb->input['action'] == "add") { $plugins->run_hooks("admin_forum_management_add");
| if($mybb->input['action'] == "add") { $plugins->run_hooks("admin_forum_management_add");
|
Zeile 823 | Zeile 827 |
---|
if($pid <= 0 && $type == "f") { $errors[] = $lang->error_no_parent;
|
if($pid <= 0 && $type == "f") { $errors[] = $lang->error_no_parent;
|
}
| }
|
if(!$errors) {
| if(!$errors) {
|
Zeile 862 | Zeile 866 |
---|
"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 1025 | Zeile 1032 |
---|
while($style = $db->fetch_array($query)) { $styles[$style['tid']] = htmlspecialchars_uni($style['name']);
|
while($style = $db->fetch_array($query)) { $styles[$style['tid']] = htmlspecialchars_uni($style['name']);
|
}
$style_options = array( $form->generate_check_box('overridestyle', 1, $lang->override_user_style, array('checked' => $forum_data['overridestyle'], 'id' => 'overridestyle')), $lang->forum_specific_style."<br />\n".$form->generate_select_box('style', $styles, $forum_data['style'], array('id' => 'style')) );
$form_container->output_row($lang->style_options, "", "<div class=\"forum_settings_bit\">".implode("</div><div class=\"forum_settings_bit\">", $style_options)."</div>");
$display_methods = array( '0' => $lang->dont_display_rules, '1' => $lang->display_rules_inline, '3' => $lang->display_rules_inline_new, '2' => $lang->display_rules_link );
$forum_rules = array( $lang->display_method."<br />\n".$form->generate_select_box('rulestype', $display_methods, $forum_data['rulestype'], array('checked' => $forum_data['rulestype'], 'id' => 'rulestype')), $lang->title."<br />\n".$form->generate_text_box('rulestitle', $forum_data['rulestitle'], array('checked' => $forum_data['rulestitle'], 'id' => 'rulestitle')), $lang->rules."<br />\n".$form->generate_text_area('rules', $forum_data['rules'], array('checked' => $forum_data['rules'], 'id' => 'rules')) );
$form_container->output_row($lang->forum_rules, "", "<div class=\"forum_settings_bit\">".implode("</div><div class=\"forum_settings_bit\">", $forum_rules)."</div>");
$default_date_cut = array( 0 => $lang->board_default, 1 => $lang->datelimit_1day, 5 => $lang->datelimit_5days, 10 => $lang->datelimit_10days, 20 => $lang->datelimit_20days, 50 => $lang->datelimit_50days, 75 => $lang->datelimit_75days, 100 => $lang->datelimit_100days, 365 => $lang->datelimit_lastyear, 9999 => $lang->datelimit_beginning, );
$default_sort_by = array( "" => $lang->board_default, "subject" => $lang->sort_by_subject, "lastpost" => $lang->sort_by_lastpost, "starter" => $lang->sort_by_starter, "started" => $lang->sort_by_started, "rating" => $lang->sort_by_rating, "replies" => $lang->sort_by_replies, "views" => $lang->sort_by_views, );
$default_sort_order = array( "" => $lang->board_default, "asc" => $lang->sort_order_asc, "desc" => $lang->sort_order_desc, );
$view_options = array( $lang->default_date_cut."<br />\n".$form->generate_select_box('defaultdatecut', $default_date_cut, $forum_data['defaultdatecut'], array('checked' => $forum_data['defaultdatecut'], 'id' => 'defaultdatecut')), $lang->default_sort_by."<br />\n".$form->generate_select_box('defaultsortby', $default_sort_by, $forum_data['defaultsortby'], array('checked' => $forum_data['defaultsortby'], 'id' => 'defaultsortby')), $lang->default_sort_order."<br />\n".$form->generate_select_box('defaultsortorder', $default_sort_order, $forum_data['defaultsortorder'], array('checked' => $forum_data['defaultsortorder'], 'id' => 'defaultsortorder')), );
$form_container->output_row($lang->default_view_options, "", "<div class=\"forum_settings_bit\">".implode("</div><div class=\"forum_settings_bit\">", $view_options)."</div>");
$misc_options = array(
| }
$style_options = array( $form->generate_check_box('overridestyle', 1, $lang->override_user_style, array('checked' => $forum_data['overridestyle'], 'id' => 'overridestyle')), $lang->forum_specific_style."<br />\n".$form->generate_select_box('style', $styles, $forum_data['style'], array('id' => 'style')) );
$form_container->output_row($lang->style_options, "", "<div class=\"forum_settings_bit\">".implode("</div><div class=\"forum_settings_bit\">", $style_options)."</div>");
$display_methods = array( '0' => $lang->dont_display_rules, '1' => $lang->display_rules_inline, '3' => $lang->display_rules_inline_new, '2' => $lang->display_rules_link );
$forum_rules = array( $lang->display_method."<br />\n".$form->generate_select_box('rulestype', $display_methods, $forum_data['rulestype'], array('checked' => $forum_data['rulestype'], 'id' => 'rulestype')), $lang->title."<br />\n".$form->generate_text_box('rulestitle', $forum_data['rulestitle'], array('checked' => $forum_data['rulestitle'], 'id' => 'rulestitle')), $lang->rules."<br />\n".$form->generate_text_area('rules', $forum_data['rules'], array('checked' => $forum_data['rules'], 'id' => 'rules')) );
$form_container->output_row($lang->forum_rules, "", "<div class=\"forum_settings_bit\">".implode("</div><div class=\"forum_settings_bit\">", $forum_rules)."</div>");
$default_date_cut = array( 0 => $lang->board_default, 1 => $lang->datelimit_1day, 5 => $lang->datelimit_5days, 10 => $lang->datelimit_10days, 20 => $lang->datelimit_20days, 50 => $lang->datelimit_50days, 75 => $lang->datelimit_75days, 100 => $lang->datelimit_100days, 365 => $lang->datelimit_lastyear, 9999 => $lang->datelimit_beginning, );
$default_sort_by = array( "" => $lang->board_default, "subject" => $lang->sort_by_subject, "lastpost" => $lang->sort_by_lastpost, "starter" => $lang->sort_by_starter, "started" => $lang->sort_by_started, "rating" => $lang->sort_by_rating, "replies" => $lang->sort_by_replies, "views" => $lang->sort_by_views, );
$default_sort_order = array( "" => $lang->board_default, "asc" => $lang->sort_order_asc, "desc" => $lang->sort_order_desc, );
$view_options = array( $lang->default_date_cut."<br />\n".$form->generate_select_box('defaultdatecut', $default_date_cut, $forum_data['defaultdatecut'], array('checked' => $forum_data['defaultdatecut'], 'id' => 'defaultdatecut')), $lang->default_sort_by."<br />\n".$form->generate_select_box('defaultsortby', $default_sort_by, $forum_data['defaultsortby'], array('checked' => $forum_data['defaultsortby'], 'id' => 'defaultsortby')), $lang->default_sort_order."<br />\n".$form->generate_select_box('defaultsortorder', $default_sort_order, $forum_data['defaultsortorder'], array('checked' => $forum_data['defaultsortorder'], 'id' => 'defaultsortorder')), );
$form_container->output_row($lang->default_view_options, "", "<div class=\"forum_settings_bit\">".implode("</div><div class=\"forum_settings_bit\">", $view_options)."</div>");
$misc_options = array(
|
$form->generate_check_box('allowhtml', 1, $lang->allow_html, array('checked' => $forum_data['allowhtml'], 'id' => 'allowhtml')), $form->generate_check_box('allowmycode', 1, $lang->allow_mycode, array('checked' => $forum_data['allowmycode'], 'id' => 'allowmycode')), $form->generate_check_box('allowsmilies', 1, $lang->allow_smilies, array('checked' => $forum_data['allowsmilies'], 'id' => 'allowsmilies')),
| $form->generate_check_box('allowhtml', 1, $lang->allow_html, array('checked' => $forum_data['allowhtml'], 'id' => 'allowhtml')), $form->generate_check_box('allowmycode', 1, $lang->allow_mycode, array('checked' => $forum_data['allowmycode'], 'id' => 'allowmycode')), $form->generate_check_box('allowsmilies', 1, $lang->allow_smilies, array('checked' => $forum_data['allowsmilies'], 'id' => 'allowsmilies')),
|
Zeile 1294 | Zeile 1301 |
---|
if($mybb->input['action'] == "edit") { if(!$mybb->input['fid'])
|
if($mybb->input['action'] == "edit") { if(!$mybb->input['fid'])
|
{
| {
|
flash_message($lang->error_invalid_fid, 'error'); admin_redirect("index.php?module=forum-management"); }
| flash_message($lang->error_invalid_fid, 'error'); admin_redirect("index.php?module=forum-management"); }
|
Zeile 1410 | Zeile 1417 |
---|
break; default: $query = $db->simple_select("forums", "fid", "CONCAT(',',parentlist,',') LIKE '%,$fid,%'");
|
break; default: $query = $db->simple_select("forums", "fid", "CONCAT(',',parentlist,',') LIKE '%,$fid,%'");
|
}
while($child = $db->fetch_array($query)) { $db->update_query("forums", array("parentlist" => make_parent_list($child['fid'])), "fid='{$child['fid']}'"); } }
$inherit = $mybb->input['default_permissions'];
| }
while($child = $db->fetch_array($query)) { $db->update_query("forums", array("parentlist" => make_parent_list($child['fid'])), "fid='{$child['fid']}'"); } }
$inherit = $mybb->input['default_permissions'];
|
foreach($mybb->input as $id => $permission) { // Make sure we're only skipping inputs that don't start with "fields_" and aren't fields_default_ or fields_inherit_ if(strpos($id, 'fields_') === false || (strpos($id, 'fields_default_') !== false || strpos($id, 'fields_inherit_') !== false))
|
foreach($mybb->input as $id => $permission) { // Make sure we're only skipping inputs that don't start with "fields_" and aren't fields_default_ or fields_inherit_ if(strpos($id, 'fields_') === false || (strpos($id, 'fields_default_') !== false || strpos($id, 'fields_inherit_') !== false))
|
{ continue; }
list(, $gid) = explode('fields_', $id);
| { continue; }
list(, $gid) = explode('fields_', $id);
|
if($mybb->input['fields_default_'.$gid] == $permission && $mybb->input['fields_inherit_'.$gid] == 1) { $inherit[$gid] = 1; continue;
|
if($mybb->input['fields_default_'.$gid] == $permission && $mybb->input['fields_inherit_'.$gid] == 1) { $inherit[$gid] = 1; continue;
|
}
| }
|
$inherit[$gid] = 0;
// If it isn't an array then it came from the javascript form if(!is_array($permission))
|
$inherit[$gid] = 0;
// If it isn't an array then it came from the javascript form if(!is_array($permission))
|
{
| {
|
$permission = explode(',', $permission); $permission = array_flip($permission); foreach($permission as $name => $value) { $permission[$name] = 1;
|
$permission = explode(',', $permission); $permission = array_flip($permission); foreach($permission as $name => $value) { $permission[$name] = 1;
|
}
| }
|
}
foreach(array('canview','canpostthreads','canpostreplys','canpostpolls') as $name)
| }
foreach(array('canview','canpostthreads','canpostreplys','canpostpolls') as $name)
|
Zeile 1458 | Zeile 1465 |
---|
{ $permissions[$name][$gid] = 0; }
|
{ $permissions[$name][$gid] = 0; }
|
} }
| } }
|
$cache->update_forums();
$canview = $permissions['canview'];
| $cache->update_forums();
$canview = $permissions['canview'];
|
Zeile 1582 | Zeile 1589 |
---|
$lang->display_method."<br />\n".$form->generate_select_box('rulestype', $display_methods, $forum_data['rulestype'], array('checked' => $forum_data['rulestype'], 'id' => 'rulestype')), $lang->title."<br />\n".$form->generate_text_box('rulestitle', $forum_data['rulestitle'], array('checked' => $forum_data['rulestitle'], 'id' => 'rulestitle')), $lang->rules."<br />\n".$form->generate_text_area('rules', $forum_data['rules'], array('checked' => $forum_data['rules'], 'id' => 'rules'))
|
$lang->display_method."<br />\n".$form->generate_select_box('rulestype', $display_methods, $forum_data['rulestype'], array('checked' => $forum_data['rulestype'], 'id' => 'rulestype')), $lang->title."<br />\n".$form->generate_text_box('rulestitle', $forum_data['rulestitle'], array('checked' => $forum_data['rulestitle'], 'id' => 'rulestitle')), $lang->rules."<br />\n".$form->generate_text_area('rules', $forum_data['rules'], array('checked' => $forum_data['rules'], 'id' => 'rules'))
|
);
$form_container->output_row($lang->forum_rules, "", "<div class=\"forum_settings_bit\">".implode("</div><div class=\"forum_settings_bit\">", $forum_rules)."</div>");
| );
$form_container->output_row($lang->forum_rules, "", "<div class=\"forum_settings_bit\">".implode("</div><div class=\"forum_settings_bit\">", $forum_rules)."</div>");
|
$default_date_cut = array( 0 => $lang->board_default,
| $default_date_cut = array( 0 => $lang->board_default,
|
Zeile 1667 | Zeile 1674 |
---|
if($mybb->request_method == "post") { foreach($usergroups as $usergroup)
|
if($mybb->request_method == "post") { foreach($usergroups as $usergroup)
|
{
| {
|
if(isset($mybb->input['fields_'.$usergroup['gid']])) { $input_permissions = $mybb->input['fields_'.$usergroup['gid']];
| if(isset($mybb->input['fields_'.$usergroup['gid']])) { $input_permissions = $mybb->input['fields_'.$usergroup['gid']];
|
Zeile 1706 | Zeile 1713 |
---|
$perms = $cached_forum_perms[$forum_data['pid']][$usergroup['gid']]; $default_checked = true; }
|
$perms = $cached_forum_perms[$forum_data['pid']][$usergroup['gid']]; $default_checked = true; }
|
}
if(!$perms) { $perms = $usergroup;
| }
if(!$perms) { $perms = $usergroup;
|
$default_checked = true; } } else
|
$default_checked = true; } } else
|
{
| {
|
if(is_array($existing_permissions) && $existing_permissions[$usergroup['gid']]) { $perms = $existing_permissions[$usergroup['gid']]; $default_checked = false;
|
if(is_array($existing_permissions) && $existing_permissions[$usergroup['gid']]) { $perms = $existing_permissions[$usergroup['gid']]; $default_checked = false;
|
}
| }
|
elseif(is_array($cached_forum_perms) && $cached_forum_perms[$forum_data['fid']][$usergroup['gid']]) { $perms = $cached_forum_perms[$forum_data['fid']][$usergroup['gid']];
|
elseif(is_array($cached_forum_perms) && $cached_forum_perms[$forum_data['fid']][$usergroup['gid']]) { $perms = $cached_forum_perms[$forum_data['fid']][$usergroup['gid']];
|
$default_checked = true;
| $default_checked = true;
|
} else if(is_array($cached_forum_perms) && $cached_forum_perms[$forum_data['pid']][$usergroup['gid']]) { $perms = $cached_forum_perms[$forum_data['pid']][$usergroup['gid']];
|
} else if(is_array($cached_forum_perms) && $cached_forum_perms[$forum_data['pid']][$usergroup['gid']]) { $perms = $cached_forum_perms[$forum_data['pid']][$usergroup['gid']];
|
$default_checked = true;
| $default_checked = true;
|
}
if(!$perms)
| }
if(!$perms)
|
Zeile 1744 | Zeile 1751 |
---|
if(isset($mybb->input['permissions'])) { if($mybb->input['permissions'][$usergroup['gid']][$forum_permission])
|
if(isset($mybb->input['permissions'])) { if($mybb->input['permissions'][$usergroup['gid']][$forum_permission])
|
{ $perms_checked[$forum_permission] = 1; } else { $perms_checked[$forum_permission] = 0;
| { $perms_checked[$forum_permission] = 1; } else { $perms_checked[$forum_permission] = 0;
|
} } else { if($perms[$forum_permission] == 1)
|
} } else { if($perms[$forum_permission] == 1)
|
{
| {
|
$perms_checked[$forum_permission] = 1; } else
| $perms_checked[$forum_permission] = 1; } else
|
Zeile 1765 | Zeile 1772 |
---|
} } $usergroup['title'] = htmlspecialchars_uni($usergroup['title']);
|
} } $usergroup['title'] = htmlspecialchars_uni($usergroup['title']);
|
|
|
if($default_checked) { $inherited_text = $lang->inherited_permission;
| if($default_checked) { $inherited_text = $lang->inherited_permission;
|
Zeile 1791 | Zeile 1798 |
---|
foreach($perms_checked as $perm => $value) { if($value == 0)
|
foreach($perms_checked as $perm => $value) { if($value == 0)
|
{
| {
|
$field_select .= "<li id=\"field-{$perm}\">{$field_list2[$perm]}</li>"; } }
| $field_select .= "<li id=\"field-{$perm}\">{$field_list2[$perm]}</li>"; } }
|
Zeile 1807 | Zeile 1814 |
---|
document.write('".str_replace("/", "\/", $field_select)."'); //]]> </script>\n";
|
document.write('".str_replace("/", "\/", $field_select)."'); //]]> </script>\n";
|
|
|
$field_selected = array(); foreach($field_list as $forum_permission => $permission_title) {
| $field_selected = array(); foreach($field_list as $forum_permission => $permission_title) {
|
Zeile 1822 | Zeile 1829 |
---|
$form_container->output_cell($field_select, array('colspan' => 2)); if(!$default_checked)
|
$form_container->output_cell($field_select, array('colspan' => 2)); if(!$default_checked)
|
{
| {
|
$form_container->output_cell("<a href=\"index.php?module=forum-management&action=permissions&pid={$perms['pid']}\" onclick=\"MyBB.popupWindow('index.php?module=forum-management&action=permissions&pid={$perms['pid']}&ajax=1', null, true); return false;\">{$lang->edit_permissions}</a>", array("class" => "align_center")); $form_container->output_cell("<a href=\"index.php?module=forum-management&action=clear_permission&pid={$perms['pid']}&my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->confirm_clear_custom_permission}')\">{$lang->clear_custom_perms}</a>", array("class" => "align_center")); }
| $form_container->output_cell("<a href=\"index.php?module=forum-management&action=permissions&pid={$perms['pid']}\" onclick=\"MyBB.popupWindow('index.php?module=forum-management&action=permissions&pid={$perms['pid']}&ajax=1', null, true); return false;\">{$lang->edit_permissions}</a>", array("class" => "align_center")); $form_container->output_cell("<a href=\"index.php?module=forum-management&action=clear_permission&pid={$perms['pid']}&my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->confirm_clear_custom_permission}')\">{$lang->clear_custom_perms}</a>", array("class" => "align_center")); }
|
Zeile 1832 | Zeile 1839 |
---|
} $form_container->construct_row(array('id' => 'row_'.$usergroup['gid']));
|
} $form_container->construct_row(array('id' => 'row_'.$usergroup['gid']));
|
|
|
$ids[] = $usergroup['gid']; } $form_container->end();
|
$ids[] = $usergroup['gid']; } $form_container->end();
|
|
|
$buttons[] = $form->generate_submit_button($lang->save_forum); $form->output_submit_wrapper($buttons); $form->end();
|
$buttons[] = $form->generate_submit_button($lang->save_forum); $form->output_submit_wrapper($buttons); $form->end();
|
|
|
// Write in our JS based field selector echo "<script type=\"text/javascript\">\n<!--\n"; foreach($ids as $id)
|
// Write in our JS based field selector echo "<script type=\"text/javascript\">\n<!--\n"; foreach($ids as $id)
|
{
| {
|
echo "$(function() { QuickPermEditor.init(".$id."); });\n"; } echo "// -->\n</script>\n";
|
echo "$(function() { QuickPermEditor.init(".$id."); });\n"; } echo "// -->\n</script>\n";
|
|
|
$page->output_footer(); }
| $page->output_footer(); }
|
Zeile 1857 | Zeile 1864 |
---|
$modid = $mybb->get_input('id', MyBB::INPUT_INT); $isgroup = $mybb->get_input('isgroup', MyBB::INPUT_INT); $fid = $mybb->get_input('fid', MyBB::INPUT_INT);
|
$modid = $mybb->get_input('id', MyBB::INPUT_INT); $isgroup = $mybb->get_input('isgroup', MyBB::INPUT_INT); $fid = $mybb->get_input('fid', MyBB::INPUT_INT);
|
|
|
$query = $db->simple_select("moderators", "*", "id='{$modid}' AND isgroup = '{$isgroup}' AND fid='{$fid}'"); $mod = $db->fetch_array($query);
| $query = $db->simple_select("moderators", "*", "id='{$modid}' AND isgroup = '{$isgroup}' AND fid='{$fid}'"); $mod = $db->fetch_array($query);
|
Zeile 1866 | Zeile 1873 |
---|
{ flash_message($lang->error_invalid_moderator, 'error'); admin_redirect("index.php?module=forum-management&fid={$fid}");
|
{ flash_message($lang->error_invalid_moderator, 'error'); admin_redirect("index.php?module=forum-management&fid={$fid}");
|
}
// User clicked no if($mybb->input['no']) { admin_redirect("index.php?module=forum-management&fid={$fid}"); }
$plugins->run_hooks("admin_forum_management_deletemod");
| }
// User clicked no if($mybb->input['no']) { admin_redirect("index.php?module=forum-management&fid={$fid}"); }
$plugins->run_hooks("admin_forum_management_deletemod");
|
if($mybb->request_method == "post") { $mid = $mod['mid']; if($mybb->input['isgroup'])
|
if($mybb->request_method == "post") { $mid = $mod['mid']; if($mybb->input['isgroup'])
|
{
| {
|
$query = $db->query(" SELECT m.*, g.title FROM ".TABLE_PREFIX."moderators m LEFT JOIN ".TABLE_PREFIX."usergroups g ON (g.gid=m.id)
|
$query = $db->query(" SELECT m.*, g.title FROM ".TABLE_PREFIX."moderators m LEFT JOIN ".TABLE_PREFIX."usergroups g ON (g.gid=m.id)
|
WHERE m.mid='{$mid}'
| WHERE m.mid='{$mid}'
|
"); } else
| "); } else
|
Zeile 1900 | Zeile 1907 |
---|
$mod = $db->fetch_array($query);
$db->delete_query("moderators", "mid='{$mid}'");
|
$mod = $db->fetch_array($query);
$db->delete_query("moderators", "mid='{$mid}'");
|
|
|
$plugins->run_hooks("admin_forum_management_deletemod_commit");
$cache->update_moderators();
| $plugins->run_hooks("admin_forum_management_deletemod_commit");
$cache->update_moderators();
|
Zeile 1915 | Zeile 1922 |
---|
else { log_admin_action($mid, $mod['username'], $forum['fid'], $forum['name']);
|
else { log_admin_action($mid, $mod['username'], $forum['fid'], $forum['name']);
|
}
| }
|
flash_message($lang->success_moderator_deleted, 'success'); admin_redirect("index.php?module=forum-management&fid={$fid}#tab_moderators");
| flash_message($lang->success_moderator_deleted, 'success'); admin_redirect("index.php?module=forum-management&fid={$fid}#tab_moderators");
|
Zeile 1989 | Zeile 1996 |
---|
echo $form->generate_hidden_field("fid", $fid); echo $form->generate_hidden_field("action", "delete");
|
echo $form->generate_hidden_field("fid", $fid); echo $form->generate_hidden_field("action", "delete");
|
echo "<div class=\"confirm_action\">\n"; echo "<p>{$lang->confirm_proceed_deletion}</p>\n"; echo "<br />\n"; echo "<script type=\"text/javascript\">$(function() { var button = $(\"#proceed_button\"); if(button.length > 0) { button.val(\"{$lang->automatically_redirecting}\"); button.attr(\"disabled\", true); button.css(\"color\", \"#aaa\"); button.css(\"borderColor\", \"#aaa\"); document.forms[0].trigger('submit'); }})</script>"; echo "<p class=\"buttons\">\n"; echo $form->generate_submit_button($lang->proceed, array('class' => 'button_yes', 'id' => 'proceed_button')); echo "</p>\n"; echo "</div>\n";
| output_auto_redirect($form, $lang->confirm_proceed_deletion);
|
$form->end();
| $form->end();
|
Zeile 2088 | Zeile 2088 |
---|
$permission = explode(',', $permission); $permission = array_flip($permission); foreach($permission as $name => $value)
|
$permission = explode(',', $permission); $permission = array_flip($permission); foreach($permission as $name => $value)
|
{
| {
|
$permission[$name] = 1; } }
| $permission[$name] = 1; } }
|
Zeile 2103 | Zeile 2103 |
---|
$permissions[$name][$gid] = 0; } }
|
$permissions[$name][$gid] = 0; } }
|
}
| }
|
$canview = $permissions['canview']; $canpostthreads = $permissions['canpostthreads'];
| $canview = $permissions['canview']; $canpostthreads = $permissions['canpostthreads'];
|
Zeile 2129 | Zeile 2129 |
---|
if(!$forum) { flash_message($lang->error_invalid_forum, 'error');
|
if(!$forum) { flash_message($lang->error_invalid_forum, 'error');
|
admin_redirect("index.php?module=forum-management&fid={$fid}#tab_moderators"); }
| admin_redirect("index.php?module=forum-management&fid={$fid}#tab_moderators"); }
|
if(!empty($mybb->input['usergroup'])) { $isgroup = 1;
| if(!empty($mybb->input['usergroup'])) { $isgroup = 1;
|
Zeile 2293 | Zeile 2293 |
---|
$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'));
|
$form_container->output_row_header($lang->controls, array("class" => "align_center", 'style' => 'width: 200px'));
|
build_admincp_forums_list($form_container, $fid);
| build_admincp_forums_list($form_container, $form, $fid);
|
$submit_options = array();
if($form_container->num_rows() == 0)
| $submit_options = array();
if($form_container->num_rows() == 0)
|
Zeile 2379 | Zeile 2379 |
---|
elseif(is_array($cached_forum_perms) && $cached_forum_perms[$forum['fid']][$usergroup['gid']]) { $perms = $cached_forum_perms[$forum['fid']][$usergroup['gid']];
|
elseif(is_array($cached_forum_perms) && $cached_forum_perms[$forum['fid']][$usergroup['gid']]) { $perms = $cached_forum_perms[$forum['fid']][$usergroup['gid']];
|
$default_checked = true; }
| $default_checked = true; }
|
else if(is_array($cached_forum_perms) && $cached_forum_perms[$forum['pid']][$usergroup['gid']]) { $perms = $cached_forum_perms[$forum['pid']][$usergroup['gid']]; $default_checked = true; } }
|
else if(is_array($cached_forum_perms) && $cached_forum_perms[$forum['pid']][$usergroup['gid']]) { $perms = $cached_forum_perms[$forum['pid']][$usergroup['gid']]; $default_checked = true; } }
|
if(!$perms) { $perms = $usergroup; $default_checked = true; }
| if(!$perms) { $perms = $usergroup; $default_checked = true; }
|
} else
|
} else
|
{ if(isset($existing_permissions) && is_array($existing_permissions) && $existing_permissions[$usergroup['gid']])
| { if(isset($existing_permissions) && is_array($existing_permissions) && $existing_permissions[$usergroup['gid']])
|
{ $perms = $existing_permissions[$usergroup['gid']]; $default_checked = false;
| { $perms = $existing_permissions[$usergroup['gid']]; $default_checked = false;
|
Zeile 2421 | Zeile 2421 |
---|
foreach($field_list as $forum_permission => $forum_perm_title) { if(isset($mybb->input['permissions']))
|
foreach($field_list as $forum_permission => $forum_perm_title) { if(isset($mybb->input['permissions']))
|
{
| {
|
if($mybb->input['permissions'][$usergroup['gid']][$forum_permission])
|
if($mybb->input['permissions'][$usergroup['gid']][$forum_permission])
|
{ $perms_checked[$forum_permission] = 1; } else { $perms_checked[$forum_permission] = 0; } }
| { $perms_checked[$forum_permission] = 1; } else { $perms_checked[$forum_permission] = 0; } }
|
else { if($perms[$forum_permission] == 1) {
|
else { if($perms[$forum_permission] == 1) {
|
$perms_checked[$forum_permission] = 1;
| $perms_checked[$forum_permission] = 1;
|
} else {
| } else {
|
Zeile 2450 | Zeile 2450 |
---|
$inherited_text = $lang->inherited_permission; } else
|
$inherited_text = $lang->inherited_permission; } else
|
{
| {
|
$inherited_text = $lang->custom_permission; }
| $inherited_text = $lang->custom_permission; }
|
Zeile 2461 | Zeile 2461 |
---|
foreach($perms_checked as $perm => $value) { if($value == 1)
|
foreach($perms_checked as $perm => $value) { if($value == 1)
|
{ $field_select .= "<li id=\"field-{$perm}\">{$field_list2[$perm]}</li>"; }
| { $field_select .= "<li id=\"field-{$perm}\">{$field_list2[$perm]}</li>"; }
|
} $field_select .= "</ul></div>\n"; $field_select .= "<div class=\"disabled\"><ul id=\"fields_disabled_{$usergroup['gid']}\">\n";
| } $field_select .= "</ul></div>\n"; $field_select .= "<div class=\"disabled\"><ul id=\"fields_disabled_{$usergroup['gid']}\">\n";
|
Zeile 2489 | Zeile 2489 |
---|
$field_selected = array(); foreach($field_list as $forum_permission => $permission_title)
|
$field_selected = array(); foreach($field_list as $forum_permission => $permission_title)
|
{
| {
|
$field_options[$forum_permission] = $permission_title; if($perms_checked[$forum_permission]) {
| $field_options[$forum_permission] = $permission_title; if($perms_checked[$forum_permission]) {
|
Zeile 2504 | Zeile 2504 |
---|
{ $form_container->output_cell("<a href=\"index.php?module=forum-management&action=permissions&pid={$perms['pid']}\" onclick=\"MyBB.popupWindow('index.php?module=forum-management&action=permissions&pid={$perms['pid']}&ajax=1', null, true); return false;\">{$lang->edit_permissions}</a>", array("class" => "align_center")); $form_container->output_cell("<a href=\"index.php?module=forum-management&action=clear_permission&pid={$perms['pid']}&my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->confirm_clear_custom_permission}')\">{$lang->clear_custom_perms}</a>", array("class" => "align_center"));
|
{ $form_container->output_cell("<a href=\"index.php?module=forum-management&action=permissions&pid={$perms['pid']}\" onclick=\"MyBB.popupWindow('index.php?module=forum-management&action=permissions&pid={$perms['pid']}&ajax=1', null, true); return false;\">{$lang->edit_permissions}</a>", array("class" => "align_center")); $form_container->output_cell("<a href=\"index.php?module=forum-management&action=clear_permission&pid={$perms['pid']}&my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->confirm_clear_custom_permission}')\">{$lang->clear_custom_perms}</a>", array("class" => "align_center"));
|
}
| }
|
else { $form_container->output_cell("<a href=\"index.php?module=forum-management&action=permissions&gid={$usergroup['gid']}&fid={$fid}\" onclick=\"MyBB.popupWindow('index.php?module=forum-management&action=permissions&gid={$usergroup['gid']}&fid={$fid}&ajax=1', null, true); return false;\">{$lang->set_custom_perms}</a>", array("class" => "align_center", "colspan" => 2)); } $form_container->construct_row(array('id' => 'row_'.$usergroup['gid']));
|
else { $form_container->output_cell("<a href=\"index.php?module=forum-management&action=permissions&gid={$usergroup['gid']}&fid={$fid}\" onclick=\"MyBB.popupWindow('index.php?module=forum-management&action=permissions&gid={$usergroup['gid']}&fid={$fid}&ajax=1', null, true); return false;\">{$lang->set_custom_perms}</a>", array("class" => "align_center", "colspan" => 2)); } $form_container->construct_row(array('id' => 'row_'.$usergroup['gid']));
|
|
|
$ids[] = $usergroup['gid']; } $form_container->end();
| $ids[] = $usergroup['gid']; } $form_container->end();
|
Zeile 2520 | Zeile 2520 |
---|
$buttons[] = $form->generate_reset_button($lang->reset);
$form->output_submit_wrapper($buttons);
|
$buttons[] = $form->generate_reset_button($lang->reset);
$form->output_submit_wrapper($buttons);
|
|
|
// Write in our JS based field selector echo "<script type=\"text/javascript\">\n<!--\n"; foreach($ids as $id)
| // Write in our JS based field selector echo "<script type=\"text/javascript\">\n<!--\n"; foreach($ids as $id)
|
Zeile 2546 | Zeile 2546 |
---|
while($moderator = $db->fetch_array($query)) { if($moderator['isgroup'])
|
while($moderator = $db->fetch_array($query)) { if($moderator['isgroup'])
|
{
| {
|
$moderator['img'] = "<img src=\"styles/{$page->style}/images/icons/group.png\" alt=\"{$lang->group}\" title=\"{$lang->group}\" />"; $form_container->output_cell("{$moderator['img']} <a href=\"index.php?module=user-groups&action=edit&gid={$moderator['id']}\">".htmlspecialchars_uni($moderator['title'])." ({$lang->usergroup} {$moderator['id']})</a>"); $form_container->output_cell("<a href=\"index.php?module=forum-management&action=editmod&mid={$moderator['mid']}\">{$lang->edit}</a>", array("class" => "align_center"));
| $moderator['img'] = "<img src=\"styles/{$page->style}/images/icons/group.png\" alt=\"{$lang->group}\" title=\"{$lang->group}\" />"; $form_container->output_cell("{$moderator['img']} <a href=\"index.php?module=user-groups&action=edit&gid={$moderator['id']}\">".htmlspecialchars_uni($moderator['title'])." ({$lang->usergroup} {$moderator['id']})</a>"); $form_container->output_cell("<a href=\"index.php?module=forum-management&action=editmod&mid={$moderator['mid']}\">{$lang->edit}</a>", array("class" => "align_center"));
|
Zeile 2577 | Zeile 2577 |
---|
// Usergroup Moderator if(!is_array($usergroups))
|
// Usergroup Moderator if(!is_array($usergroups))
|
{
| {
|
$usergroups = $groupscache; }
| $usergroups = $groupscache; }
|
Zeile 2587 | Zeile 2587 |
---|
}
if(!isset($mybb->input['usergroup']))
|
}
if(!isset($mybb->input['usergroup']))
|
{
| {
|
$mybb->input['usergroup'] = ''; }
| $mybb->input['usergroup'] = ''; }
|
Zeile 2669 | Zeile 2669 |
---|
/** * @param DefaultFormContainer $form_container
|
/** * @param DefaultFormContainer $form_container
|
| * @param DefaultForm $form
|
* @param int $pid * @param int $depth */
|
* @param int $pid * @param int $depth */
|
function build_admincp_forums_list(&$form_container, $pid=0, $depth=1)
| function build_admincp_forums_list(&$form_container, &$form, $pid=0, $depth=1)
|
{ global $mybb, $lang, $db, $sub_forums; static $forums_by_parent;
| { global $mybb, $lang, $db, $sub_forums; static $forums_by_parent;
|
Zeile 2704 | Zeile 2705 |
---|
}
if($forum['type'] == "c" && ($depth == 1 || $depth == 2))
|
}
if($forum['type'] == "c" && ($depth == 1 || $depth == 2))
|
{ $sub_forums = ''; if(isset($forums_by_parent[$forum['fid']]) && $depth == 2) { build_admincp_forums_list($form_container, $forum['fid'], $depth+1); } if($sub_forums) { $sub_forums = "<br /><small>{$lang->sub_forums}: {$sub_forums}</small>"; }
| { $sub_forums = ''; if(isset($forums_by_parent[$forum['fid']]) && $depth == 2) { build_admincp_forums_list($form_container, $form, $forum['fid'], $depth+1); } if($sub_forums) { $sub_forums = "<br /><small>{$lang->sub_forums}: {$sub_forums}</small>"; }
|
$form_container->output_cell("<div style=\"padding-left: ".(40*($depth-1))."px;\"><a href=\"index.php?module=forum-management&fid={$forum['fid']}\"><strong>{$forum['name']}</strong></a>{$sub_forums}</div>");
|
$form_container->output_cell("<div style=\"padding-left: ".(40*($depth-1))."px;\"><a href=\"index.php?module=forum-management&fid={$forum['fid']}\"><strong>{$forum['name']}</strong></a>{$sub_forums}</div>");
|
$form_container->output_cell("<input type=\"text\" name=\"disporder[".$forum['fid']."]\" value=\"".$forum['disporder']."\" class=\"text_input align_center\" style=\"width: 80%; font-weight: bold;\" />", array("class" => "align_center"));
| $form_container->output_cell($form->generate_numeric_field("disporder[{$forum['fid']}]", "{$forum['disporder']}", array('min' => 0, 'class' => 'align_center', 'style' => 'width:80%; font-weight:bold')), array("class" => "align_center"));
|
$popup = new PopupMenu("forum_{$forum['fid']}", $lang->options); $popup->add_item($lang->edit_forum, "index.php?module=forum-management&action=edit&fid={$forum['fid']}"); $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 = new PopupMenu("forum_{$forum['fid']}", $lang->options); $popup->add_item($lang->edit_forum, "index.php?module=forum-management&action=edit&fid={$forum['fid']}"); $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 2734 | Zeile 2736 |
---|
// Does this category have any sub forums? if($forums_by_parent[$forum['fid']])
|
// Does this category have any sub forums? if($forums_by_parent[$forum['fid']])
|
{ build_admincp_forums_list($form_container, $forum['fid'], $depth+1); }
| { build_admincp_forums_list($form_container, $form, $forum['fid'], $depth+1); }
|
} elseif($forum['type'] == "f" && ($depth == 1 || $depth == 2)) { if($forum['description'])
|
} elseif($forum['type'] == "f" && ($depth == 1 || $depth == 2)) { if($forum['description'])
|
{
| {
|
$forum['description'] = preg_replace("#&(?!\#[0-9]+;)#si", "&", $forum['description']); $forum['description'] = "<br /><small>".$forum['description']."</small>"; }
| $forum['description'] = preg_replace("#&(?!\#[0-9]+;)#si", "&", $forum['description']); $forum['description'] = "<br /><small>".$forum['description']."</small>"; }
|
Zeile 2749 | Zeile 2751 |
---|
$sub_forums = ''; if(isset($forums_by_parent[$forum['fid']]) && $depth == 2) {
|
$sub_forums = ''; if(isset($forums_by_parent[$forum['fid']]) && $depth == 2) {
|
build_admincp_forums_list($form_container, $forum['fid'], $depth+1);
| build_admincp_forums_list($form_container, $form, $forum['fid'], $depth+1);
|
} if($sub_forums) {
| } if($sub_forums) {
|
Zeile 2758 | Zeile 2760 |
---|
$form_container->output_cell("<div style=\"padding-left: ".(40*($depth-1))."px;\"><a href=\"index.php?module=forum-management&fid={$forum['fid']}\">{$forum['name']}</a>{$forum['description']}{$sub_forums}</div>");
|
$form_container->output_cell("<div style=\"padding-left: ".(40*($depth-1))."px;\"><a href=\"index.php?module=forum-management&fid={$forum['fid']}\">{$forum['name']}</a>{$forum['description']}{$sub_forums}</div>");
|
$form_container->output_cell("<input type=\"text\" name=\"disporder[".$forum['fid']."]\" value=\"".$forum['disporder']."\" class=\"text_input align_center\" style=\"width: 80%;\" />", array("class" => "align_center"));
| $form_container->output_cell($form->generate_numeric_field("disporder[{$forum['fid']}]", "{$forum['disporder']}", array('min' => 0, 'class' => 'align_center', 'style' => 'width:80%')), array("class" => "align_center"));
|
$popup = new PopupMenu("forum_{$forum['fid']}", $lang->options); $popup->add_item($lang->edit_forum, "index.php?module=forum-management&action=edit&fid={$forum['fid']}"); $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 = new PopupMenu("forum_{$forum['fid']}", $lang->options); $popup->add_item($lang->edit_forum, "index.php?module=forum-management&action=edit&fid={$forum['fid']}"); $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 2775 | Zeile 2777 |
---|
if(isset($forums_by_parent[$forum['fid']]) && $depth == 1) {
|
if(isset($forums_by_parent[$forum['fid']]) && $depth == 1) {
|
build_admincp_forums_list($form_container, $forum['fid'], $depth+1);
| build_admincp_forums_list($form_container, $form, $forum['fid'], $depth+1);
|
} } else if($depth == 3)
| } } else if($depth == 3)
|