Zeile 6 | Zeile 6 |
---|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* $Id: management.php 4092 2008-08-10 03:03:04Z Tikitiki $
| * $Id: management.php 5379 2011-02-21 11:06:42Z Tomm $
|
*/
// Disallow direct access to this file for security reasons
| */
// Disallow direct access to this file for security reasons
|
Zeile 88 | Zeile 88 |
---|
$errors[] = $lang->error_new_forum_needs_name; }
|
$errors[] = $lang->error_new_forum_needs_name; }
|
if($mybb->input['pid'] == 0 && $mybb->input['type'] == 'f')
| if($mybb->input['pid'] == -1 && $mybb->input['type'] == 'f')
|
{
|
{
|
$errors[] = $lang->error_forum_noparent;
| $errors[] = $lang->error_no_parent;
|
} if(!$errors)
| } if(!$errors)
|
Zeile 890 | Zeile 890 |
---|
$usergroups[$usergroup['gid']] = $usergroup; }
|
$usergroups[$usergroup['gid']] = $usergroup; }
|
| $cached_forum_perms = $cache->read("forumpermissions");
|
$field_list = array('canview', 'canpostthreads', 'canpostreplys', 'canpostpolls', 'canpostattachments'); $form_container = new FormContainer($lang->forum_permissions);
| $field_list = array('canview', 'canpostthreads', 'canpostreplys', 'canpostpolls', 'canpostattachments'); $form_container = new FormContainer($lang->forum_permissions);
|
Zeile 906 | Zeile 907 |
---|
if(isset($mybb->input['default_permissions'])) { if($mybb->input['default_permissions'][$usergroup['gid']])
|
if(isset($mybb->input['default_permissions'])) { if($mybb->input['default_permissions'][$usergroup['gid']])
|
{
| {
|
if(is_array($existing_permissions) && $existing_permissions[$usergroup['gid']])
|
if(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 916 | Zeile 917 |
---|
{ $perms = $cached_forum_perms[$mybb->input['pid']][$usergroup['gid']]; $default_checked = true;
|
{ $perms = $cached_forum_perms[$mybb->input['pid']][$usergroup['gid']]; $default_checked = true;
|
} } if(!$perms) { $perms = $usergroup; $default_checked = true; } }
| } } if(!$perms) { $perms = $usergroup; $default_checked = true; } }
|
else { if(is_array($existing_permissions) && $existing_permissions[$usergroup['gid']]) { $perms = $existing_permissions[$usergroup['gid']]; $default_checked = false;
|
else { if(is_array($existing_permissions) && $existing_permissions[$usergroup['gid']]) { $perms = $existing_permissions[$usergroup['gid']]; $default_checked = false;
|
}
| }
|
else if(is_array($cached_forum_perms) && $cached_forum_perms[$mybb->input['pid']][$usergroup['gid']])
|
else if(is_array($cached_forum_perms) && $cached_forum_perms[$mybb->input['pid']][$usergroup['gid']])
|
{
| {
|
$perms = $cached_forum_perms[$mybb->input['pid']][$usergroup['gid']]; $default_checked = true; }
| $perms = $cached_forum_perms[$mybb->input['pid']][$usergroup['gid']]; $default_checked = true; }
|
Zeile 942 | Zeile 943 |
---|
{ $perms = $usergroup; $default_checked = true;
|
{ $perms = $usergroup; $default_checked = true;
|
}
| }
|
}
|
}
|
| $all_check = "";
|
$perm_check = ""; $all_checked = true; foreach($field_list as $forum_permission) { if($usergroup[$forum_permission] == 1)
|
$perm_check = ""; $all_checked = true; foreach($field_list as $forum_permission) { if($usergroup[$forum_permission] == 1)
|
{
| {
|
$value = "true";
|
$value = "true";
|
}
| }
|
else
|
else
|
{
| {
|
$value = "false"; } if($mybb->input['permissions'][$usergroup['gid']][$forum_permission])
|
$value = "false"; } if($mybb->input['permissions'][$usergroup['gid']][$forum_permission])
|
{
| {
|
$value = $mybb->input['permissions'][$usergroup['gid']][$forum_permission]; } if(isset($mybb->input['permissions'])) { if($mybb->input['permissions'][$usergroup['gid']]['all'])
|
$value = $mybb->input['permissions'][$usergroup['gid']][$forum_permission]; } if(isset($mybb->input['permissions'])) { if($mybb->input['permissions'][$usergroup['gid']]['all'])
|
{
| {
|
$all_checked = false; } if($mybb->input['permissions'][$usergroup['gid']][$forum_permission])
|
$all_checked = false; } 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 {
| } else {
|
Zeile 1013 | Zeile 1015 |
---|
$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();
|
|
|
$page->output_footer(); }
if($mybb->input['action'] == "edit") { $plugins->run_hooks("admin_forum_management_edit");
|
$page->output_footer(); }
if($mybb->input['action'] == "edit") { $plugins->run_hooks("admin_forum_management_edit");
|
|
|
if(!$mybb->input['fid'])
|
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"); }
|
$query = $db->simple_select("forums", "*", "fid='{$mybb->input['fid']}'"); $forum_data = $db->fetch_array($query); if(!$forum_data) { flash_message($lang->error_invalid_fid, 'error');
|
$query = $db->simple_select("forums", "*", "fid='{$mybb->input['fid']}'"); $forum_data = $db->fetch_array($query); if(!$forum_data) { flash_message($lang->error_invalid_fid, 'error');
|
admin_redirect("index.php?module=forum/management"); } $fid = intval($mybb->input['fid']);
| admin_redirect("index.php?module=forum/management"); } $fid = intval($mybb->input['fid']);
|
if($mybb->request_method == "post") { if(!trim($mybb->input['title']))
|
if($mybb->request_method == "post") { if(!trim($mybb->input['title']))
|
{
| {
|
$errors[] = $lang->error_missing_title;
|
$errors[] = $lang->error_missing_title;
|
}
| }
|
$pid = intval($mybb->input['pid']); if($pid == $mybb->input['fid'])
|
$pid = intval($mybb->input['pid']); if($pid == $mybb->input['fid'])
|
{
| {
|
$errors[] = $lang->error_forum_parent_itself; } else { $query = $db->simple_select("forums", "*", "pid='{$mybb->input['fid']}'"); while($child = $db->fetch_array($query))
|
$errors[] = $lang->error_forum_parent_itself; } else { $query = $db->simple_select("forums", "*", "pid='{$mybb->input['fid']}'"); while($child = $db->fetch_array($query))
|
{
| {
|
if($child['fid'] == $pid) { $errors[] = $lang->error_forum_parent_child; break; }
|
if($child['fid'] == $pid) { $errors[] = $lang->error_forum_parent_child; break; }
|
} }
| } }
|
$type = $mybb->input['type'];
| $type = $mybb->input['type'];
|
Zeile 1069 | Zeile 1071 |
---|
{ $errors[] = $lang->error_no_parent; }
|
{ $errors[] = $lang->error_no_parent; }
|
| if($type == 'c' && $forum_data['type'] == 'f') { $query = $db->simple_select('threads', 'COUNT(tid) as num_threads', "fid = '{$fid}'"); if($db->fetch_field($query, "num_threads") > 0) { $errors[] = $lang->error_not_empty; } }
|
if(!$errors) {
| if(!$errors) {
|
Zeile 1118 | Zeile 1129 |
---|
{ case "sqlite3": case "sqlite2":
|
{ case "sqlite3": case "sqlite2":
|
| case "pgsql":
|
$query = $db->simple_select("forums", "fid", "','||parentlist||',' LIKE '%,$fid,%'"); break; default:
| $query = $db->simple_select("forums", "fid", "','||parentlist||',' LIKE '%,$fid,%'"); break; default:
|
Zeile 1151 | Zeile 1163 |
---|
$canview = $permissions['canview']; $canpostthreads = $permissions['canpostthreads'];
|
$canview = $permissions['canview']; $canpostthreads = $permissions['canpostthreads'];
|
$canpostreplies = $permissions['canpostreplies'];
| |
$canpostpolls = $permissions['canpostpolls']; $canpostattachments = $permissions['canpostattachments']; $canpostreplies = $permissions['canpostreplys'];
| $canpostpolls = $permissions['canpostpolls']; $canpostattachments = $permissions['canpostattachments']; $canpostreplies = $permissions['canpostreplys'];
|
Zeile 1180 | Zeile 1191 |
---|
$page->output_inline_error($errors); $forum_data = $mybb->input; }
|
$page->output_inline_error($errors); $forum_data = $mybb->input; }
|
else { $forum_data['title'] = $forum_data['name']; }
| else { $forum_data['title'] = $forum_data['name']; }
|
$query = $db->simple_select("usergroups", "*", "", array("order_dir" => "name")); while($usergroup = $db->fetch_array($query)) { $usergroups[$usergroup['gid']] = $usergroup;
|
$query = $db->simple_select("usergroups", "*", "", array("order_dir" => "name")); while($usergroup = $db->fetch_array($query)) { $usergroups[$usergroup['gid']] = $usergroup;
|
}
| }
|
$query = $db->simple_select("forumpermissions", "*", "fid='{$fid}'"); while($existing = $db->fetch_array($query))
| $query = $db->simple_select("forumpermissions", "*", "fid='{$fid}'"); while($existing = $db->fetch_array($query))
|
Zeile 1200 | Zeile 1211 |
---|
$types = array( 'f' => $lang->forum, 'c' => $lang->category
|
$types = array( 'f' => $lang->forum, 'c' => $lang->category
|
);
| );
|
$create_a_options_f = array( 'id' => 'forum'
| $create_a_options_f = array( 'id' => 'forum'
|
Zeile 1289 | Zeile 1300 |
---|
100 => $lang->datelimit_100days, 365 => $lang->datelimit_lastyear, 9999 => $lang->datelimit_beginning,
|
100 => $lang->datelimit_100days, 365 => $lang->datelimit_lastyear, 9999 => $lang->datelimit_beginning,
|
);
| );
|
$default_sort_by = array( "" => $lang->board_default, "subject" => $lang->sort_by_subject,
| $default_sort_by = array( "" => $lang->board_default, "subject" => $lang->sort_by_subject,
|
Zeile 1326 | Zeile 1337 |
---|
$form->generate_check_box('showinjump', 1, $lang->show_forum_jump, array('checked' => $forum_data['showinjump'], 'id' => 'showinjump')), $form->generate_check_box('usepostcounts', 1, $lang->use_postcounts, array('checked' => $forum_data['usepostcounts'], 'id' => 'usepostcounts')) );
|
$form->generate_check_box('showinjump', 1, $lang->show_forum_jump, array('checked' => $forum_data['showinjump'], 'id' => 'showinjump')), $form->generate_check_box('usepostcounts', 1, $lang->use_postcounts, array('checked' => $forum_data['usepostcounts'], 'id' => 'usepostcounts')) );
|
|
|
$form_container->output_row($lang->misc_options, "", "<div class=\"forum_settings_bit\">".implode("</div><div class=\"forum_settings_bit\">", $misc_options)."</div>"); $form_container->end();
| $form_container->output_row($lang->misc_options, "", "<div class=\"forum_settings_bit\">".implode("</div><div class=\"forum_settings_bit\">", $misc_options)."</div>"); $form_container->end();
|
Zeile 1345 | Zeile 1356 |
---|
foreach($usergroups as $usergroup) { $perms = array();
|
foreach($usergroups as $usergroup) { $perms = array();
|
$all_check = "";
| $all_check = "";
|
if(isset($mybb->input['default_permissions'])) { if($mybb->input['default_permissions'][$usergroup['gid']])
| if(isset($mybb->input['default_permissions'])) { if($mybb->input['default_permissions'][$usergroup['gid']])
|
Zeile 1381 | Zeile 1392 |
---|
$default_checked = false; } elseif(is_array($cached_forum_perms) && $cached_forum_perms[$forum_data['fid']][$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']];
|
$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']])
|
else if(is_array($cached_forum_perms) && $cached_forum_perms[$forum_data['pid']][$usergroup['gid']])
|
{
| {
|
$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 1397 | Zeile 1408 |
---|
$default_checked = true; } }
|
$default_checked = true; } }
|
| $all_check = "";
|
$perm_check = ""; $all_checked = true;
|
$perm_check = ""; $all_checked = true;
|
foreach($field_list as $forum_permission)
| foreach($field_list as $forum_permission)
|
{ if($usergroup[$forum_permission] == 1)
|
{ if($usergroup[$forum_permission] == 1)
|
{
| {
|
$value = "true";
|
$value = "true";
|
}
| }
|
else { $value = "false";
|
else { $value = "false";
|
}
| }
|
if($mybb->input['permissions'][$usergroup['gid']][$forum_permission])
|
if($mybb->input['permissions'][$usergroup['gid']][$forum_permission])
|
{
| {
|
$value = $mybb->input['permissions'][$usergroup['gid']][$forum_permission]; } if(isset($mybb->input['permissions'])) { if($mybb->input['permissions'][$usergroup['gid']]['all'])
|
$value = $mybb->input['permissions'][$usergroup['gid']][$forum_permission]; } if(isset($mybb->input['permissions'])) { if($mybb->input['permissions'][$usergroup['gid']]['all'])
|
{ $all_checked = false;
| { $all_checked = false;
|
} if($mybb->input['permissions'][$usergroup['gid']][$forum_permission])
|
} if($mybb->input['permissions'][$usergroup['gid']][$forum_permission])
|
{
| {
|
$perms_checked[$forum_permission] = 1;
|
$perms_checked[$forum_permission] = 1;
|
}
| }
|
else
|
else
|
{
| {
|
$perms_checked[$forum_permission] = 0;
|
$perms_checked[$forum_permission] = 0;
|
}
| }
|
} else { if($perms[$forum_permission] != 1)
|
} else { if($perms[$forum_permission] != 1)
|
{ $all_checked = false; }
| { $all_checked = false; }
|
if($perms[$forum_permission] == 1) { $perms_checked[$forum_permission] = 1;
| if($perms[$forum_permission] == 1) { $perms_checked[$forum_permission] = 1;
|
Zeile 1454 | Zeile 1466 |
---|
$usergroup['title'] = htmlspecialchars_uni($usergroup['title']); $form_container->output_cell("<strong>{$usergroup['title']}</strong><br /><small style=\"vertical-align: middle;\">".$form->generate_check_box("default_permissions[{$usergroup['gid']}];", 1, "", array("id" => "default_permissions_{$usergroup['gid']}", "checked" => $default_checked, "onclick" => $default_click))." <label for=\"default_permissions_{$usergroup['gid']}\">{$lang->permissions_use_group_default}</label></small>"); foreach($field_list as $forum_permission)
|
$usergroup['title'] = htmlspecialchars_uni($usergroup['title']); $form_container->output_cell("<strong>{$usergroup['title']}</strong><br /><small style=\"vertical-align: middle;\">".$form->generate_check_box("default_permissions[{$usergroup['gid']}];", 1, "", array("id" => "default_permissions_{$usergroup['gid']}", "checked" => $default_checked, "onclick" => $default_click))." <label for=\"default_permissions_{$usergroup['gid']}\">{$lang->permissions_use_group_default}</label></small>"); foreach($field_list as $forum_permission)
|
{
| {
|
$form_container->output_cell($form->generate_check_box("permissions[{$usergroup['gid']}][{$forum_permission}]", 1, "", array("id" => "permissions_{$usergroup['gid']}_{$forum_permission}", "checked" => $perms_checked[$forum_permission], "onclick" => $reset_default)), array('class' => 'align_center')); } $form_container->output_cell($form->generate_check_box("permissions[{$usergroup['gid']}][all]", 1, "", array("id" => "permissions_{$usergroup['gid']}_all", "checked" => $all_checked, "onclick" => $all_check)), array('class' => 'align_center'));
| $form_container->output_cell($form->generate_check_box("permissions[{$usergroup['gid']}][{$forum_permission}]", 1, "", array("id" => "permissions_{$usergroup['gid']}_{$forum_permission}", "checked" => $perms_checked[$forum_permission], "onclick" => $reset_default)), array('class' => 'align_center')); } $form_container->output_cell($form->generate_check_box("permissions[{$usergroup['gid']}][all]", 1, "", array("id" => "permissions_{$usergroup['gid']}_all", "checked" => $all_checked, "onclick" => $all_check)), array('class' => 'align_center'));
|
Zeile 1472 | Zeile 1484 |
---|
$form_container->end(); $buttons[] = $form->generate_submit_button($lang->save_forum);
|
$form_container->end(); $buttons[] = $form->generate_submit_button($lang->save_forum);
|
$form->output_submit_wrapper($buttons);
| $form->output_submit_wrapper($buttons);
|
$form->end(); $page->output_footer();
| $form->end(); $page->output_footer();
|
Zeile 1511 | Zeile 1523 |
---|
$db->delete_query("moderators", "mid='{$mid}'"); $query = $db->simple_select("moderators", "*", "uid='{$mod['uid']}'");
|
$db->delete_query("moderators", "mid='{$mid}'"); $query = $db->simple_select("moderators", "*", "uid='{$mod['uid']}'");
|
if($db->fetch_array($query))
| if($db->num_rows($query) == 0)
|
{ $updatequery = array( "usergroup" => "2"
| { $updatequery = array( "usergroup" => "2"
|
Zeile 1626 | Zeile 1638 |
---|
$db->delete_query("threads", "fid='{$fid}' {$delquery}"); $db->delete_query("posts", "fid='{$fid}' {$delquery}"); $db->delete_query("moderators", "fid='{$fid}' {$delquery}");
|
$db->delete_query("threads", "fid='{$fid}' {$delquery}"); $db->delete_query("posts", "fid='{$fid}' {$delquery}"); $db->delete_query("moderators", "fid='{$fid}' {$delquery}");
|
| $db->delete_query("forumsubscriptions", "fid='{$fid}' {$delquery}");
|
$cache->update_forums(); $cache->update_moderators();
| $cache->update_forums(); $cache->update_moderators();
|
Zeile 1658 | Zeile 1671 |
---|
if($mybb->input['update'] == "permissions") { $inherit = $mybb->input['default_permissions'];
|
if($mybb->input['update'] == "permissions") { $inherit = $mybb->input['default_permissions'];
|
| if(empty($mybb->input['permissions'])) { $mybb->input['permissions'] = array(); }
|
foreach($mybb->input['permissions'] as $gid => $permission) {
| foreach($mybb->input['permissions'] as $gid => $permission) {
|
Zeile 1681 | Zeile 1699 |
---|
$canpostattachments = $permissions['canpostattachments']; $canpostreplies = $permissions['canpostreplys']; save_quick_perms($fid);
|
$canpostattachments = $permissions['canpostattachments']; $canpostreplies = $permissions['canpostreplys']; save_quick_perms($fid);
|
|
|
$plugins->run_hooks("admin_forum_management_start_permissions_commit"); // Log admin action
| $plugins->run_hooks("admin_forum_management_start_permissions_commit"); // Log admin action
|
Zeile 1720 | Zeile 1738 |
---|
$mid = $db->insert_query("moderators", $new_mod); $db->update_query("users", array('usergroup' => 6), "uid='{$user['uid']}' AND usergroup='2'"); $cache->update_moderators();
|
$mid = $db->insert_query("moderators", $new_mod); $db->update_query("users", array('usergroup' => 6), "uid='{$user['uid']}' AND usergroup='2'"); $cache->update_moderators();
|
|
|
$plugins->run_hooks("admin_forum_management_start_moderators_commit"); // Log admin action
| $plugins->run_hooks("admin_forum_management_start_moderators_commit"); // Log admin action
|
Zeile 1728 | Zeile 1746 |
---|
flash_message($lang->success_moderator_added, 'success'); admin_redirect("index.php?module=forum/management&action=editmod&mid={$mid}");
|
flash_message($lang->success_moderator_added, 'success'); admin_redirect("index.php?module=forum/management&action=editmod&mid={$mid}");
|
}
| }
|
else { flash_message($lang->error_moderator_already_added, 'error'); admin_redirect("index.php?module=forum/management&fid={$fid}#tab_moderators");
|
else { flash_message($lang->error_moderator_already_added, 'error'); admin_redirect("index.php?module=forum/management&fid={$fid}#tab_moderators");
|
}
| }
|
} else {
| } else {
|
Zeile 1759 | Zeile 1777 |
---|
flash_message($lang->success_forum_disporder_updated, 'success'); admin_redirect("index.php?module=forum/management&fid=".$mybb->input['fid']);
|
flash_message($lang->success_forum_disporder_updated, 'success'); admin_redirect("index.php?module=forum/management&fid=".$mybb->input['fid']);
|
} } } if($fid) { $page->add_breadcrumb_item($lang->view_forum, "index.php?module=forum/management");
| } } } if($fid) { $page->add_breadcrumb_item($lang->view_forum, "index.php?module=forum/management");
|
} $page->output_header($lang->forum_management);
| } $page->output_header($lang->forum_management);
|
Zeile 1781 | Zeile 1799 |
---|
$form = new Form("index.php?module=forum/management", "post", "management"); echo $form->generate_hidden_field("fid", $mybb->input['fid']);
|
$form = new Form("index.php?module=forum/management", "post", "management"); echo $form->generate_hidden_field("fid", $mybb->input['fid']);
|
if($fid) {
| if($fid) {
|
$tabs = array( 'subforums' => $lang->subforums, 'permissions' => $lang->forum_permissions,
| $tabs = array( 'subforums' => $lang->subforums, 'permissions' => $lang->forum_permissions,
|
Zeile 1816 | Zeile 1834 |
---|
$form_container->output_cell($lang->no_forums, array('colspan' => 3)); $form_container->construct_row(); $submit_options = array('disabled' => true);
|
$form_container->output_cell($lang->no_forums, array('colspan' => 3)); $form_container->construct_row(); $submit_options = array('disabled' => true);
|
} $form_container->end();
| } $form_container->end();
|
$buttons[] = $form->generate_submit_button($lang->update_forum_orders, $submit_options); $buttons[] = $form->generate_reset_button($lang->reset);
|
$buttons[] = $form->generate_submit_button($lang->update_forum_orders, $submit_options); $buttons[] = $form->generate_reset_button($lang->reset);
|
$form->output_submit_wrapper($buttons);
| $form->output_submit_wrapper($buttons);
|
if(!$fid)
|
if(!$fid)
|
{
| {
|
$form->end(); }
| $form->end(); }
|
Zeile 1837 | Zeile 1855 |
---|
$query = $db->simple_select("usergroups", "*", "", array("order_dir" => "name")); while($usergroup = $db->fetch_array($query))
|
$query = $db->simple_select("usergroups", "*", "", array("order_dir" => "name")); while($usergroup = $db->fetch_array($query))
|
{
| {
|
$usergroups[$usergroup['gid']] = $usergroup; }
| $usergroups[$usergroup['gid']] = $usergroup; }
|
Zeile 1892 | Zeile 1910 |
---|
if(!$perms) { $perms = $usergroup;
|
if(!$perms) { $perms = $usergroup;
|
$default_checked = true;
| $default_checked = true;
|
} } else
| } } else
|
Zeile 1901 | Zeile 1919 |
---|
{ $perms = $existing_permissions[$usergroup['gid']]; $default_checked = false;
|
{ $perms = $existing_permissions[$usergroup['gid']]; $default_checked = false;
|
}
| }
|
elseif($cached_forum_perms[$forum_data['fid']][$usergroup['gid']]) { $perms = $cached_forum_perms[$forum_data['fid']][$usergroup['gid']];
| elseif($cached_forum_perms[$forum_data['fid']][$usergroup['gid']]) { $perms = $cached_forum_perms[$forum_data['fid']][$usergroup['gid']];
|
Zeile 1910 | Zeile 1928 |
---|
else if($cached_forum_perms[$forum_data['pid']][$usergroup['gid']]) { $perms = $cached_forum_perms[$forum_data['pid']][$usergroup['gid']];
|
else if($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 1919 | Zeile 1937 |
---|
$default_checked = true; } }
|
$default_checked = true; } }
|
| $all_check = "";
|
$perm_check = ""; $all_checked = true; foreach($field_list as $forum_permission)
| $perm_check = ""; $all_checked = true; foreach($field_list as $forum_permission)
|
Zeile 1964 | Zeile 1984 |
---|
{ $form_container->output_cell("<a href=\"index.php?module=forum/management&action=permissions&gid={$usergroup['gid']}&fid={$fid}\">{$lang->set_permissions}</a>", array("class" => "align_center")); }
|
{ $form_container->output_cell("<a href=\"index.php?module=forum/management&action=permissions&gid={$usergroup['gid']}&fid={$fid}\">{$lang->set_permissions}</a>", array("class" => "align_center")); }
|
$form_container->construct_row(); }
| $form_container->construct_row(); }
|
$form_container->end(); $buttons = array();
| $form_container->end(); $buttons = array();
|
Zeile 1998 | Zeile 2018 |
---|
{ $form_container->output_cell($lang->no_moderators, array('colspan' => 3)); $form_container->construct_row();
|
{ $form_container->output_cell($lang->no_moderators, array('colspan' => 3)); $form_container->construct_row();
|
} $form_container->end();
| } $form_container->end();
|
$buttons = array(); $form = new Form("index.php?module=forum/management", "post", "management"); echo $form->generate_hidden_field("fid", $mybb->input['fid']);
| $buttons = array(); $form = new Form("index.php?module=forum/management", "post", "management"); echo $form->generate_hidden_field("fid", $mybb->input['fid']);
|
Zeile 2043 | Zeile 2063 |
---|
foreach($forum_cache as $forum) {
|
foreach($forum_cache as $forum) {
|
$forums_by_parent[$forum['pid']][$val['disporder']][$forum['fid']] = $forum;
| $forums_by_parent[$forum['pid']][$forum['disporder']][$forum['fid']] = $forum;
|
} }
| } }
|
Zeile 2056 | Zeile 2076 |
---|
{ foreach($children as $forum) {
|
{ foreach($children as $forum) {
|
$forum['name'] = htmlspecialchars_uni($forum['name']);
| $forum['name'] = preg_replace("#&(?!\#[0-9]+;)#si", "&", $forum['name']);
|
if($forum['active'] == 0) { $forum['name'] = "<em>".$forum['name']."</em>";
| if($forum['active'] == 0) { $forum['name'] = "<em>".$forum['name']."</em>";
|
Zeile 2150 | Zeile 2170 |
---|
++$donecount; if($donecount == $mybb->settings['subforumsindex']) {
|
++$donecount; if($donecount == $mybb->settings['subforumsindex']) {
|
if(count($children) > $donecount)
| if(subforums_count($forums_by_parent[$pid]) > $donecount)
|
{
|
{
|
$sub_forums .= $comma.$lang->sprintf($lang->more_subforums, (count($children) - $donecount));
| $sub_forums .= $comma.$lang->sprintf($lang->more_subforums, (subforums_count($forums_by_parent[$pid]) - $donecount));
|
return; } }
| return; } }
|