Zeile 68 | Zeile 68 |
---|
if($mybb->request_method == "post") {
|
if($mybb->request_method == "post") {
|
$from = (int)$mybb->input['from']; $to = (int)$mybb->input['to'];
| $from = $mybb->get_input('from', MyBB::INPUT_INT); $to = $mybb->get_input('to', MyBB::INPUT_INT);
|
// Find the source forum $query = $db->simple_select("forums", '*', "fid='{$from}'");
| // Find the source forum $query = $db->simple_select("forums", '*', "fid='{$from}'");
|
Zeile 99 | Zeile 99 |
---|
$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'] = $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['pid'] = $mybb->get_input('pid', 1);
| $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['rulestitle'] = $db->escape_string($new_forum['rulestitle']); $new_forum['rules'] = $db->escape_string($new_forum['rules']); $new_forum['parentlist'] = '';
|
Zeile 201 | Zeile 201 |
---|
} else {
|
} else {
|
$copy_data['pid'] = $mybb->get_input('pid', 1);
| $copy_data['pid'] = $mybb->get_input('pid', MyBB::INPUT_INT);
|
} $copy_data['disporder'] = "1"; $copy_data['from'] = $mybb->input['fid'];
| } $copy_data['disporder'] = "1"; $copy_data['from'] = $mybb->input['fid'];
|
Zeile 236 | Zeile 236 |
---|
$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)) {
|
$usergroups[$usergroup['gid']] = $usergroup['title'];
| $usergroups[$usergroup['gid']] = htmlspecialchars_uni($usergroup['title']);
|
}
$form_container = new FormContainer($lang->copy_forum);
| }
$form_container = new FormContainer($lang->copy_forum);
|
Zeile 264 | Zeile 264 |
---|
if($mybb->input['action'] == "editmod") {
|
if($mybb->input['action'] == "editmod") {
|
$query = $db->simple_select("moderators", "*", "mid='".$mybb->get_input('mid', 1)."'");
| $query = $db->simple_select("moderators", "*", "mid='".$mybb->get_input('mid', MyBB::INPUT_INT)."'");
|
$mod_data = $db->fetch_array($query);
if(!$mod_data['id'])
| $mod_data = $db->fetch_array($query);
if(!$mod_data['id'])
|
Zeile 286 | Zeile 286 |
---|
if($mybb->request_method == "post") {
|
if($mybb->request_method == "post") {
|
$mid = $mybb->get_input('mid', 1);
| $mid = $mybb->get_input('mid', MyBB::INPUT_INT);
|
if(!$mid) { flash_message($lang->error_incorrect_moderator, 'error');
| if(!$mid) { flash_message($lang->error_incorrect_moderator, 'error');
|
Zeile 295 | Zeile 295 |
---|
if(!$errors) {
|
if(!$errors) {
|
$fid = $mybb->get_input('fid', 1);
| $fid = $mybb->get_input('fid', MyBB::INPUT_INT);
|
$forum = get_forum($fid); if($mod_data['isgroup']) {
| $forum = get_forum($fid); if($mod_data['isgroup']) {
|
Zeile 307 | Zeile 307 |
---|
} $update_array = array( 'fid' => (int)$fid,
|
} $update_array = array( 'fid' => (int)$fid,
|
'caneditposts' => (int)$mybb->input['caneditposts'], 'cansoftdeleteposts' => (int)$mybb->input['cansoftdeleteposts'], 'canrestoreposts' => (int)$mybb->input['canrestoreposts'], 'candeleteposts' => (int)$mybb->input['candeleteposts'], 'cansoftdeletethreads' => (int)$mybb->input['cansoftdeletethreads'], 'canrestorethreads' => (int)$mybb->input['canrestorethreads'], 'candeletethreads' => (int)$mybb->input['candeletethreads'], 'canviewips' => (int)$mybb->input['canviewips'], 'canviewunapprove' => (int)$mybb->input['canviewunapprove'], 'canviewdeleted' => (int)$mybb->input['canviewdeleted'], 'canopenclosethreads' => (int)$mybb->input['canopenclosethreads'], 'canstickunstickthreads' => (int)$mybb->input['canstickunstickthreads'], 'canapproveunapprovethreads' => (int)$mybb->input['canapproveunapprovethreads'], 'canapproveunapproveposts' => (int)$mybb->input['canapproveunapproveposts'], 'canapproveunapproveattachs' => (int)$mybb->input['canapproveunapproveattachs'], 'canmanagethreads' => (int)$mybb->input['canmanagethreads'], 'canmanagepolls' => (int)$mybb->input['canmanagepolls'], 'canpostclosedthreads' => (int)$mybb->input['canpostclosedthreads'], 'canmovetononmodforum' => (int)$mybb->input['canmovetononmodforum'], 'canusecustomtools' => (int)$mybb->input['canusecustomtools'], 'canmanageannouncements' => (int)$mybb->input['canmanageannouncements'], 'canmanagereportedposts' => (int)$mybb->input['canmanagereportedposts'], 'canviewmodlog' => (int)$mybb->input['canviewmodlog']
| 'caneditposts' => $mybb->get_input('caneditposts', MyBB::INPUT_INT), 'cansoftdeleteposts' => $mybb->get_input('cansoftdeleteposts', MyBB::INPUT_INT), 'canrestoreposts' => $mybb->get_input('canrestoreposts', MyBB::INPUT_INT), 'candeleteposts' => $mybb->get_input('candeleteposts', MyBB::INPUT_INT), 'cansoftdeletethreads' => $mybb->get_input('cansoftdeletethreads', MyBB::INPUT_INT), 'canrestorethreads' => $mybb->get_input('canrestorethreads', MyBB::INPUT_INT), 'candeletethreads' => $mybb->get_input('candeletethreads', MyBB::INPUT_INT), 'canviewips' => $mybb->get_input('canviewips', MyBB::INPUT_INT), 'canviewunapprove' => $mybb->get_input('canviewunapprove', MyBB::INPUT_INT), 'canviewdeleted' => $mybb->get_input('canviewdeleted', MyBB::INPUT_INT), 'canopenclosethreads' => $mybb->get_input('canopenclosethreads', MyBB::INPUT_INT), 'canstickunstickthreads' => $mybb->get_input('canstickunstickthreads', MyBB::INPUT_INT), 'canapproveunapprovethreads' => $mybb->get_input('canapproveunapprovethreads', MyBB::INPUT_INT), 'canapproveunapproveposts' => $mybb->get_input('canapproveunapproveposts', MyBB::INPUT_INT), 'canapproveunapproveattachs' => $mybb->get_input('canapproveunapproveattachs', MyBB::INPUT_INT), 'canmanagethreads' => $mybb->get_input('canmanagethreads', MyBB::INPUT_INT), 'canmanagepolls' => $mybb->get_input('canmanagepolls', MyBB::INPUT_INT), 'canpostclosedthreads' => $mybb->get_input('canpostclosedthreads', MyBB::INPUT_INT), 'canmovetononmodforum' => $mybb->get_input('canmovetononmodforum', MyBB::INPUT_INT), 'canusecustomtools' => $mybb->get_input('canusecustomtools', MyBB::INPUT_INT), 'canmanageannouncements' => $mybb->get_input('canmanageannouncements', MyBB::INPUT_INT), 'canmanagereportedposts' => $mybb->get_input('canmanagereportedposts', MyBB::INPUT_INT), 'canviewmodlog' => $mybb->get_input('canviewmodlog', MyBB::INPUT_INT)
|
);
$plugins->run_hooks("admin_forum_management_editmod_commit");
|
);
$plugins->run_hooks("admin_forum_management_editmod_commit");
|
$db->update_query("moderators", $update_array, "mid='".$mybb->get_input('mid', 1)."'");
| $db->update_query("moderators", $update_array, "mid='".$mybb->get_input('mid', MyBB::INPUT_INT)."'");
|
$cache->update_moderators();
| $cache->update_moderators();
|
Zeile 342 | Zeile 342 |
---|
log_admin_action($fid, $forum['name'], $mid, $mod[$fieldname]);
flash_message($lang->success_moderator_updated, 'success');
|
log_admin_action($fid, $forum['name'], $mid, $mod[$fieldname]);
flash_message($lang->success_moderator_updated, 'success');
|
admin_redirect("index.php?module=forum-management&fid=".$mybb->get_input('fid', 1)."#tab_moderators");
| admin_redirect("index.php?module=forum-management&fid=".$mybb->get_input('fid', MyBB::INPUT_INT)."#tab_moderators");
|
} }
| } }
|
Zeile 424 | Zeile 424 |
---|
if($mybb->input['action'] == "clear_permission") {
|
if($mybb->input['action'] == "clear_permission") {
|
$pid = $mybb->get_input('pid', 1); $fid = $mybb->get_input('fid', 1); $gid = (int)$mybb->input['gid'];
| $pid = $mybb->get_input('pid', 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'])
| // User clicked no if($mybb->input['no'])
|
Zeile 434 | Zeile 434 |
---|
admin_redirect("index.php?module=forum-management&fid={$fid}"); }
|
admin_redirect("index.php?module=forum-management&fid={$fid}"); }
|
$plugins->run_hooks("admin_forum_management_deletemod");
| $plugins->run_hooks("admin_forum_management_clear_permission");
|
if($mybb->request_method == "post") {
| if($mybb->request_method == "post") {
|
Zeile 447 | Zeile 447 |
---|
}
if($pid)
|
}
if($pid)
|
{
| {
|
$db->delete_query("forumpermissions", "pid='{$pid}'"); } else { $db->delete_query("forumpermissions", "gid='{$gid}' AND fid='{$fid}'"); }
|
$db->delete_query("forumpermissions", "pid='{$pid}'"); } else { $db->delete_query("forumpermissions", "gid='{$gid}' AND fid='{$fid}'"); }
|
| $plugins->run_hooks('admin_forum_management_clear_permission_commit');
|
$cache->update_forumpermissions();
| $cache->update_forumpermissions();
|
Zeile 469 | Zeile 471 |
---|
if($mybb->input['action'] == "permissions") { $plugins->run_hooks("admin_forum_management_permissions");
|
if($mybb->input['action'] == "permissions") { $plugins->run_hooks("admin_forum_management_permissions");
|
|
|
if($mybb->request_method == "post") {
|
if($mybb->request_method == "post") {
|
$pid = $mybb->get_input('pid', 1); $fid = $mybb->get_input('fid', 1); $gid = (int)$mybb->input['gid'];
| $pid = $mybb->get_input('pid', MyBB::INPUT_INT); $fid = $mybb->get_input('fid', MyBB::INPUT_INT); $gid = $mybb->get_input('gid', MyBB::INPUT_INT);
|
$forum = get_forum($fid);
if((!$fid || !$gid) && $pid)
| $forum = get_forum($fid);
if((!$fid || !$gid) && $pid)
|
Zeile 503 | Zeile 505 |
---|
{ $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 516 | Zeile 518 |
---|
$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;
|
$update_array['gid'] = (int)$mybb->input['gid'];
| $update_array['gid'] = $mybb->get_input('gid', MyBB::INPUT_INT);
|
$db->insert_query("forumpermissions", $update_array);
|
$db->insert_query("forumpermissions", $update_array);
|
}
$plugins->run_hooks("admin_forum_management_permissions_commit");
| }
$plugins->run_hooks("admin_forum_management_permissions_commit");
|
if(!($fid && !$pid)) { $db->update_query("forumpermissions", $update_array, "pid='{$pid}'");
| if(!($fid && !$pid)) { $db->update_query("forumpermissions", $update_array, "pid='{$pid}'");
|
Zeile 541 | Zeile 543 |
---|
{ 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;
|
} else {
| } else {
|
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();
|
|
|
if($mybb->input['fid'] && $mybb->input['gid']) { $sub_tabs['edit_permissions'] = array( 'title' => $lang->forum_permissions, 'link' => "index.php?module=forum-management&action=permissions&fid=".$mybb->input['fid']."&gid=".$mybb->input['gid'],
|
if($mybb->input['fid'] && $mybb->input['gid']) { $sub_tabs['edit_permissions'] = array( 'title' => $lang->forum_permissions, 'link' => "index.php?module=forum-management&action=permissions&fid=".$mybb->input['fid']."&gid=".$mybb->input['gid'],
|
'description' => $lang->forum_permissions_desc );
$page->add_breadcrumb_item($lang->forum_permissions2, "index.php?module=forum-management&fid=".$mybb->input['fid']."#tab_permissions");
| 'description' => $lang->forum_permissions_desc );
$page->add_breadcrumb_item($lang->forum_permissions2, "index.php?module=forum-management&fid=".$mybb->input['fid']."#tab_permissions");
|
} else {
|
} else {
|
$query = $db->simple_select("forumpermissions", "fid", "pid='".$mybb->get_input('pid', 1)."'");
| $query = $db->simple_select("forumpermissions", "fid", "pid='".$mybb->get_input('pid', MyBB::INPUT_INT)."'");
|
$mybb->input['fid'] = $db->fetch_field($query, "fid");
$sub_tabs['edit_permissions'] = array( 'title' => $lang->forum_permissions,
|
$mybb->input['fid'] = $db->fetch_field($query, "fid");
$sub_tabs['edit_permissions'] = array( 'title' => $lang->forum_permissions,
|
'link' => "index.php?module=forum-management&action=permissions&pid=".$mybb->get_input('pid', 1),
| 'link' => "index.php?module=forum-management&action=permissions&pid=".$mybb->get_input('pid', MyBB::INPUT_INT),
|
'description' => $lang->forum_permissions_desc );
| 'description' => $lang->forum_permissions_desc );
|
Zeile 580 | Zeile 582 |
---|
$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');
|
}
| }
|
else { echo "
| else { echo "
|
Zeile 622 | Zeile 624 |
---|
} else {
|
} else {
|
$form = new Form("index.php?module=forum-management&action=permissions&ajax=1&pid=".$mybb->get_input('pid', 1)."&gid=".(int)$mybb->input['gid']."&fid=".(int)$mybb->input['gid'], "post", "modal_form");
| $form = new Form("index.php?module=forum-management&action=permissions&ajax=1&pid=".$mybb->get_input('pid', MyBB::INPUT_INT)."&gid=".$mybb->get_input('gid', MyBB::INPUT_INT)."&fid=".$mybb->get_input('gid', MyBB::INPUT_INT), "post", "modal_form");
|
} echo $form->generate_hidden_field("usecustom", "1");
| } echo $form->generate_hidden_field("usecustom", "1");
|
Zeile 639 | Zeile 641 |
---|
} else {
|
} else {
|
$pid = $mybb->get_input('pid', 1); $gid = (int)$mybb->input['gid']; $fid = $mybb->get_input('fid', 1);
| $pid = $mybb->get_input('pid', MyBB::INPUT_INT); $gid = $mybb->get_input('gid', MyBB::INPUT_INT); $fid = $mybb->get_input('fid', MyBB::INPUT_INT);
|
if($pid) {
| if($pid) {
|
Zeile 655 | Zeile 657 |
---|
$permission_data = $db->fetch_array($query);
if(!$fid)
|
$permission_data = $db->fetch_array($query);
if(!$fid)
|
{
| {
|
$fid = $permission_data['fid']; }
| $fid = $permission_data['fid']; }
|
Zeile 726 | Zeile 728 |
---|
'canpostpolls' => 'polls', 'canvotepolls' => 'polls', 'cansearch' => 'misc',
|
'canpostpolls' => 'polls', 'canvotepolls' => 'polls', 'cansearch' => 'misc',
|
);
| );
|
$groups = $plugins->run_hooks("admin_forum_management_permission_groups", $groups);
$tabs = array();
| $groups = $plugins->run_hooks("admin_forum_management_permission_groups", $groups);
$tabs = array();
|
Zeile 735 | Zeile 737 |
---|
{ $lang_group = "group_".$group; $tabs[$group] = $lang->$lang_group;
|
{ $lang_group = "group_".$group; $tabs[$group] = $lang->$lang_group;
|
}
| }
|
if($mybb->input['ajax'] == 1) {
| if($mybb->input['ajax'] == 1) {
|
Zeile 755 | Zeile 757 |
---|
if(array_key_exists($field['Field'], $groups)) { $field_list[$groups[$field['Field']]][] = $field['Field'];
|
if(array_key_exists($field['Field'], $groups)) { $field_list[$groups[$field['Field']]][] = $field['Field'];
|
}
| }
|
else { $field_list['misc'][] = $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 776 | Zeile 778 |
---|
} $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 786 | Zeile 788 |
---|
$form->output_submit_wrapper($buttons); $form->end(); echo "</div>";
|
$form->output_submit_wrapper($buttons); $form->end(); echo "</div>";
|
echo "</div>";
| echo "</div>";
|
} else {
| } else {
|
Zeile 794 | Zeile 796 |
---|
$form->output_submit_wrapper($buttons);
$form->end();
|
$form->output_submit_wrapper($buttons);
$form->end();
|
}
| }
|
}
if($mybb->input['ajax'] != 1)
| }
if($mybb->input['ajax'] != 1)
|
Zeile 814 | Zeile 816 |
---|
$errors[] = $lang->error_missing_title; }
|
$errors[] = $lang->error_missing_title; }
|
$pid = $mybb->get_input('pid', 1);
| $pid = $mybb->get_input('pid', MyBB::INPUT_INT);
|
$type = $mybb->input['type'];
if($pid <= 0 && $type == "f")
| $type = $mybb->input['type'];
if($pid <= 0 && $type == "f")
|
Zeile 835 | Zeile 837 |
---|
"type" => $db->escape_string($type), "pid" => $pid, "parentlist" => '',
|
"type" => $db->escape_string($type), "pid" => $pid, "parentlist" => '',
|
"disporder" => (int)$mybb->input['disporder'], "active" => (int)$mybb->input['active'], "open" => (int)$mybb->input['open'], "allowhtml" => (int)$mybb->input['allowhtml'], "allowmycode" => (int)$mybb->input['allowmycode'], "allowsmilies" => (int)$mybb->input['allowsmilies'], "allowimgcode" => (int)$mybb->input['allowimgcode'], "allowvideocode" => (int)$mybb->input['allowvideocode'], "allowpicons" => (int)$mybb->input['allowpicons'], "allowtratings" => (int)$mybb->input['allowtratings'], "usepostcounts" => (int)$mybb->input['usepostcounts'], "usethreadcounts" => (int)$mybb->input['usethreadcounts'], "requireprefix" => (int)$mybb->input['requireprefix'],
| "disporder" => $mybb->get_input('disporder', MyBB::INPUT_INT), "active" => $mybb->get_input('active', MyBB::INPUT_INT), "open" => $mybb->get_input('open', MyBB::INPUT_INT), "allowhtml" => $mybb->get_input('allowhtml', MyBB::INPUT_INT), "allowmycode" => $mybb->get_input('allowmycode', MyBB::INPUT_INT), "allowsmilies" => $mybb->get_input('allowsmilies', MyBB::INPUT_INT), "allowimgcode" => $mybb->get_input('allowimgcode', MyBB::INPUT_INT), "allowvideocode" => $mybb->get_input('allowvideocode', MyBB::INPUT_INT), "allowpicons" => $mybb->get_input('allowpicons', MyBB::INPUT_INT), "allowtratings" => $mybb->get_input('allowtratings', MyBB::INPUT_INT), "usepostcounts" => $mybb->get_input('usepostcounts', MyBB::INPUT_INT), "usethreadcounts" => $mybb->get_input('usethreadcounts', MyBB::INPUT_INT), "requireprefix" => $mybb->get_input('requireprefix', MyBB::INPUT_INT),
|
"password" => $db->escape_string($mybb->input['password']),
|
"password" => $db->escape_string($mybb->input['password']),
|
"showinjump" => (int)$mybb->input['showinjump'], "style" => (int)$mybb->input['style'], "overridestyle" => (int)$mybb->input['overridestyle'], "rulestype" => (int)$mybb->input['rulestype'],
| "showinjump" => $mybb->get_input('showinjump', MyBB::INPUT_INT), "style" => $mybb->get_input('style', MyBB::INPUT_INT), "overridestyle" => $mybb->get_input('overridestyle', MyBB::INPUT_INT), "rulestype" => $mybb->get_input('rulestype', MyBB::INPUT_INT),
|
"rulestitle" => $db->escape_string($mybb->input['rulestitle']), "rules" => $db->escape_string($mybb->input['rules']),
|
"rulestitle" => $db->escape_string($mybb->input['rulestitle']), "rules" => $db->escape_string($mybb->input['rules']),
|
"defaultdatecut" => (int)$mybb->input['defaultdatecut'],
| "defaultdatecut" => $mybb->get_input('defaultdatecut', MyBB::INPUT_INT),
|
"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']), );
|
Zeile 915 | Zeile 917 |
---|
flash_message($lang->success_forum_added, 'success'); admin_redirect("index.php?module=forum-management");
|
flash_message($lang->success_forum_added, 'success'); admin_redirect("index.php?module=forum-management");
|
} }
| } }
|
$page->extra_header .= "<script src=\"jscripts/quick_perm_editor.js\" type=\"text/javascript\"></script>\n";
| $page->extra_header .= "<script src=\"jscripts/quick_perm_editor.js\" type=\"text/javascript\"></script>\n";
|
Zeile 943 | Zeile 945 |
---|
} else {
|
} else {
|
$forum_data['pid'] = $mybb->get_input('pid', 1);
| $forum_data['pid'] = $mybb->get_input('pid', MyBB::INPUT_INT);
|
} $forum_data['disporder'] = "1"; $forum_data['linkto'] = "";
| } $forum_data['disporder'] = "1"; $forum_data['linkto'] = "";
|
Zeile 998 | Zeile 1000 |
---|
$form_container->output_row($lang->title." <em>*</em>", "", $form->generate_text_box('title', $forum_data['title'], array('id' => 'title')), 'title'); $form_container->output_row($lang->description, "", $form->generate_text_area('description', $forum_data['description'], array('id' => 'description')), 'description'); $form_container->output_row($lang->parent_forum." <em>*</em>", $lang->parent_forum_desc, $form->generate_forum_select('pid', $forum_data['pid'], array('id' => 'pid', 'main_option' => $lang->none)), 'pid');
|
$form_container->output_row($lang->title." <em>*</em>", "", $form->generate_text_box('title', $forum_data['title'], array('id' => 'title')), 'title'); $form_container->output_row($lang->description, "", $form->generate_text_area('description', $forum_data['description'], array('id' => 'description')), 'description'); $form_container->output_row($lang->parent_forum." <em>*</em>", $lang->parent_forum_desc, $form->generate_forum_select('pid', $forum_data['pid'], array('id' => 'pid', 'main_option' => $lang->none)), 'pid');
|
$form_container->output_row($lang->display_order, "", $form->generate_numeric_field('disporder', $forum_data['disporder'], array('id' => 'disporder')), 'disporder');
| $form_container->output_row($lang->display_order, "", $form->generate_numeric_field('disporder', $forum_data['disporder'], array('id' => 'disporder', 'min' => 0)), 'disporder');
|
$form_container->end();
echo "<div id=\"additional_options_link\"><strong><a href=\"#\" onclick=\"$('#additional_options_link').toggle(); $('#additional_options').fadeToggle('fast'); return false;\">{$lang->show_additional_options}</a></strong><br /><br /></div>";
| $form_container->end();
echo "<div id=\"additional_options_link\"><strong><a href=\"#\" onclick=\"$('#additional_options_link').toggle(); $('#additional_options').fadeToggle('fast'); return false;\">{$lang->show_additional_options}</a></strong><br /><br /></div>";
|
Zeile 1022 | Zeile 1024 |
---|
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(
| }
$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,
| '0' => $lang->dont_display_rules, '1' => $lang->display_rules_inline, '3' => $lang->display_rules_inline_new,
|
Zeile 1138 | Zeile 1140 |
---|
{ $input_permissions = $mybb->input['fields_'.$usergroup['gid']]; if(!is_array($input_permissions))
|
{ $input_permissions = $mybb->input['fields_'.$usergroup['gid']]; if(!is_array($input_permissions))
|
{
| {
|
// Convering the comma separated list from Javascript form into a variable $input_permissions = explode(',' , $input_permissions); }
| // Convering the comma separated list from Javascript form into a variable $input_permissions = explode(',' , $input_permissions); }
|
Zeile 1146 | Zeile 1148 |
---|
{ $mybb->input['permissions'][$usergroup['gid']][$input_permission] = 1; }
|
{ $mybb->input['permissions'][$usergroup['gid']][$input_permission] = 1; }
|
} }
| } }
|
}
foreach($usergroups as $usergroup)
| }
foreach($usergroups as $usergroup)
|
Zeile 1156 | Zeile 1158 |
---|
if(isset($mybb->input['default_permissions']) && $mybb->input['default_permissions'][$usergroup['gid']]) { if(is_array($existing_permissions) && $existing_permissions[$usergroup['gid']])
|
if(isset($mybb->input['default_permissions']) && $mybb->input['default_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 1173 | Zeile 1175 |
---|
}
if(!$perms)
|
}
if(!$perms)
|
{
| {
|
$perms = $usergroup; $default_checked = true; }
| $perms = $usergroup; $default_checked = true; }
|
Zeile 1304 | Zeile 1306 |
---|
admin_redirect("index.php?module=forum-management"); }
|
admin_redirect("index.php?module=forum-management"); }
|
$fid = $mybb->get_input('fid', 1);
| $fid = $mybb->get_input('fid', MyBB::INPUT_INT);
|
$plugins->run_hooks("admin_forum_management_edit");
| $plugins->run_hooks("admin_forum_management_edit");
|
Zeile 1313 | Zeile 1315 |
---|
if(!trim($mybb->input['title'])) { $errors[] = $lang->error_missing_title;
|
if(!trim($mybb->input['title'])) { $errors[] = $lang->error_missing_title;
|
}
$pid = $mybb->get_input('pid', 1);
| }
$pid = $mybb->get_input('pid', MyBB::INPUT_INT);
|
if($pid == $mybb->input['fid'])
|
if($pid == $mybb->input['fid'])
|
{
| {
|
$errors[] = $lang->error_forum_parent_itself; } else
|
$errors[] = $lang->error_forum_parent_itself; } else
|
{ $query = $db->simple_select("forums", "*", "pid='{$mybb->input['fid']}'"); while($child = $db->fetch_array($query))
| { $query = $db->simple_select('forums', 'parentlist', "fid='{$pid}'"); $parents = explode(',', $db->fetch_field($query, 'parentlist')); if(in_array($mybb->input['fid'], $parents))
|
{
|
{
|
if($child['fid'] == $pid) { $errors[] = $lang->error_forum_parent_child; break; }
| $errors[] = $lang->error_forum_parent_child;
|
} }
$type = $mybb->input['type'];
if($pid <= 0 && $type == "f")
|
} }
$type = $mybb->input['type'];
if($pid <= 0 && $type == "f")
|
{ $errors[] = $lang->error_no_parent;
| { $errors[] = $lang->error_no_parent;
|
}
if($type == 'c' && $forum_data['type'] == 'f')
|
}
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;
|
$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(!empty($mybb->input['linkto']) && empty($forum_data['linkto']))
| }
if(!empty($mybb->input['linkto']) && empty($forum_data['linkto']))
|
Zeile 1356 | Zeile 1355 |
---|
if($db->fetch_field($query, "num_threads") > 0) { $errors[] = $lang->error_forum_link_not_empty;
|
if($db->fetch_field($query, "num_threads") > 0) { $errors[] = $lang->error_forum_link_not_empty;
|
} }
| } }
|
if(!$errors) { if($pid < 0)
|
if(!$errors) { if($pid < 0)
|
{
| {
|
$pid = 0; } $update_array = array(
| $pid = 0; } $update_array = array(
|
Zeile 1371 | Zeile 1370 |
---|
"linkto" => $db->escape_string($mybb->input['linkto']), "type" => $db->escape_string($type), "pid" => $pid,
|
"linkto" => $db->escape_string($mybb->input['linkto']), "type" => $db->escape_string($type), "pid" => $pid,
|
"disporder" => (int)$mybb->input['disporder'], "active" => (int)$mybb->input['active'], "open" => (int)$mybb->input['open'], "allowhtml" => (int)$mybb->input['allowhtml'], "allowmycode" => (int)$mybb->input['allowmycode'], "allowsmilies" => (int)$mybb->input['allowsmilies'], "allowimgcode" => (int)$mybb->input['allowimgcode'], "allowvideocode" => (int)$mybb->input['allowvideocode'], "allowpicons" => (int)$mybb->input['allowpicons'], "allowtratings" => (int)$mybb->input['allowtratings'], "usepostcounts" => (int)$mybb->input['usepostcounts'], "usethreadcounts" => (int)$mybb->input['usethreadcounts'], "requireprefix" => (int)$mybb->input['requireprefix'],
| "disporder" => $mybb->get_input('disporder', MyBB::INPUT_INT), "active" => $mybb->get_input('active', MyBB::INPUT_INT), "open" => $mybb->get_input('open', MyBB::INPUT_INT), "allowhtml" => $mybb->get_input('allowhtml', MyBB::INPUT_INT), "allowmycode" => $mybb->get_input('allowmycode', MyBB::INPUT_INT), "allowsmilies" => $mybb->get_input('allowsmilies', MyBB::INPUT_INT), "allowimgcode" => $mybb->get_input('allowimgcode', MyBB::INPUT_INT), "allowvideocode" => $mybb->get_input('allowvideocode', MyBB::INPUT_INT), "allowpicons" => $mybb->get_input('allowpicons', MyBB::INPUT_INT), "allowtratings" => $mybb->get_input('allowtratings', MyBB::INPUT_INT), "usepostcounts" => $mybb->get_input('usepostcounts', MyBB::INPUT_INT), "usethreadcounts" => $mybb->get_input('usethreadcounts', MyBB::INPUT_INT), "requireprefix" => $mybb->get_input('requireprefix', MyBB::INPUT_INT),
|
"password" => $db->escape_string($mybb->input['password']),
|
"password" => $db->escape_string($mybb->input['password']),
|
"showinjump" => (int)$mybb->input['showinjump'], "style" => (int)$mybb->input['style'], "overridestyle" => (int)$mybb->input['overridestyle'], "rulestype" => (int)$mybb->input['rulestype'],
| "showinjump" => $mybb->get_input('showinjump', MyBB::INPUT_INT), "style" => $mybb->get_input('style', MyBB::INPUT_INT), "overridestyle" => $mybb->get_input('overridestyle', MyBB::INPUT_INT), "rulestype" => $mybb->get_input('rulestype', MyBB::INPUT_INT),
|
"rulestitle" => $db->escape_string($mybb->input['rulestitle']), "rules" => $db->escape_string($mybb->input['rules']),
|
"rulestitle" => $db->escape_string($mybb->input['rulestitle']), "rules" => $db->escape_string($mybb->input['rules']),
|
"defaultdatecut" => (int)$mybb->input['defaultdatecut'],
| "defaultdatecut" => $mybb->get_input('defaultdatecut', MyBB::INPUT_INT),
|
"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']), );
|
Zeile 1410 | Zeile 1409 |
---|
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)) {
| while($child = $db->fetch_array($query)) {
|
Zeile 1424 | Zeile 1423 |
---|
{ // 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))
|
{ // 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; }
| { continue; }
|
list(, $gid) = explode('fields_', $id);
if($mybb->input['fields_default_'.$gid] == $permission && $mybb->input['fields_inherit_'.$gid] == 1)
|
list(, $gid) = explode('fields_', $id);
if($mybb->input['fields_default_'.$gid] == $permission && $mybb->input['fields_inherit_'.$gid] == 1)
|
{
| {
|
$inherit[$gid] = 1; continue; }
| $inherit[$gid] = 1; continue; }
|
Zeile 1445 | Zeile 1444 |
---|
foreach($permission as $name => $value) { $permission[$name] = 1;
|
foreach($permission as $name => $value) { $permission[$name] = 1;
|
} }
| } }
|
foreach(array('canview','canpostthreads','canpostreplys','canpostpolls') as $name) { if(in_array($name, $permission) || $permission[$name]) { $permissions[$name][$gid] = 1;
|
foreach(array('canview','canpostthreads','canpostreplys','canpostpolls') as $name) { if(in_array($name, $permission) || $permission[$name]) { $permissions[$name][$gid] = 1;
|
}
| }
|
else { $permissions[$name][$gid] = 0;
| else { $permissions[$name][$gid] = 0;
|
Zeile 1470 | Zeile 1469 |
---|
$canpostreplies = $permissions['canpostreplys'];
save_quick_perms($fid);
|
$canpostreplies = $permissions['canpostreplys'];
save_quick_perms($fid);
|
|
|
$plugins->run_hooks("admin_forum_management_edit_commit");
// Log admin action
| $plugins->run_hooks("admin_forum_management_edit_commit");
// Log admin action
|
Zeile 1479 | Zeile 1478 |
---|
flash_message($lang->success_forum_updated, 'success'); admin_redirect("index.php?module=forum-management&fid={$fid}"); }
|
flash_message($lang->success_forum_updated, 'success'); admin_redirect("index.php?module=forum-management&fid={$fid}"); }
|
}
$page->extra_header .= "<script src=\"jscripts/quick_perm_editor.js\" type=\"text/javascript\"></script>\n";
| }
$page->extra_header .= "<script src=\"jscripts/quick_perm_editor.js\" type=\"text/javascript\"></script>\n";
|
$page->add_breadcrumb_item($lang->edit_forum); $page->output_header($lang->edit_forum);
| $page->add_breadcrumb_item($lang->edit_forum); $page->output_header($lang->edit_forum);
|
Zeile 1490 | Zeile 1489 |
---|
$form = new Form("index.php?module=forum-management&action=edit", "post"); echo $form->generate_hidden_field("fid", $fid);
|
$form = new Form("index.php?module=forum-management&action=edit", "post"); echo $form->generate_hidden_field("fid", $fid);
|
|
|
if($errors) { $page->output_inline_error($errors); $forum_data = $mybb->input;
|
if($errors) { $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))
|
$query = $db->simple_select("usergroups", "*", "", array("order_dir" => "name")); while($usergroup = $db->fetch_array($query))
|
{
| {
|
$usergroups[$usergroup['gid']] = $usergroup; }
| $usergroups[$usergroup['gid']] = $usergroup; }
|
Zeile 1516 | Zeile 1515 |
---|
$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'
|
);
| );
|
$create_a_options_c = array( 'id' => 'category'
|
$create_a_options_c = array( 'id' => 'category'
|
);
| );
|
if($forum_data['type'] == "f") {
| if($forum_data['type'] == "f") {
|
Zeile 1540 | Zeile 1539 |
---|
$form_container->output_row($lang->title." <em>*</em>", "", $form->generate_text_box('title', $forum_data['title'], array('id' => 'title')), 'title'); $form_container->output_row($lang->description, "", $form->generate_text_area('description', $forum_data['description'], array('id' => 'description')), 'description'); $form_container->output_row($lang->parent_forum." <em>*</em>", $lang->parent_forum_desc, $form->generate_forum_select('pid', $forum_data['pid'], array('id' => 'pid', 'main_option' => $lang->none)), 'pid');
|
$form_container->output_row($lang->title." <em>*</em>", "", $form->generate_text_box('title', $forum_data['title'], array('id' => 'title')), 'title'); $form_container->output_row($lang->description, "", $form->generate_text_area('description', $forum_data['description'], array('id' => 'description')), 'description'); $form_container->output_row($lang->parent_forum." <em>*</em>", $lang->parent_forum_desc, $form->generate_forum_select('pid', $forum_data['pid'], array('id' => 'pid', 'main_option' => $lang->none)), 'pid');
|
$form_container->output_row($lang->display_order, "", $form->generate_numeric_field('disporder', $forum_data['disporder'], array('id' => 'disporder')), 'disporder');
| $form_container->output_row($lang->display_order, "", $form->generate_numeric_field('disporder', $forum_data['disporder'], array('id' => 'disporder', 'min' => 0)), 'disporder');
|
$form_container->end();
$form_container = new FormContainer($lang->additional_forum_options);
| $form_container->end();
$form_container = new FormContainer($lang->additional_forum_options);
|
Zeile 1550 | Zeile 1549 |
---|
$access_options = array( $form->generate_check_box('active', 1, $lang->forum_is_active."<br />\n<small>{$lang->forum_is_active_desc}</small>", array('checked' => $forum_data['active'], 'id' => 'active')), $form->generate_check_box('open', 1, $lang->forum_is_open."<br />\n<small>{$lang->forum_is_open_desc}</small>", array('checked' => $forum_data['open'], 'id' => 'open'))
|
$access_options = array( $form->generate_check_box('active', 1, $lang->forum_is_active."<br />\n<small>{$lang->forum_is_active_desc}</small>", array('checked' => $forum_data['active'], 'id' => 'active')), $form->generate_check_box('open', 1, $lang->forum_is_open."<br />\n<small>{$lang->forum_is_open_desc}</small>", array('checked' => $forum_data['open'], 'id' => 'open'))
|
);
$form_container->output_row($lang->access_options, "", "<div class=\"forum_settings_bit\">".implode("</div><div class=\"forum_settings_bit\">", $access_options)."</div>");
| );
$form_container->output_row($lang->access_options, "", "<div class=\"forum_settings_bit\">".implode("</div><div class=\"forum_settings_bit\">", $access_options)."</div>");
|
$styles = array( '0' => $lang->use_default );
| $styles = array( '0' => $lang->use_default );
|
Zeile 1623 | Zeile 1622 |
---|
);
$form_container->output_row($lang->default_view_options, "", "<div class=\"forum_settings_bit\">".implode("</div><div class=\"forum_settings_bit\">", $view_options)."</div>");
|
);
$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')),
| $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')),
|
Zeile 1729 | Zeile 1728 |
---|
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 1743 |
---|
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] = 1; } else {
|
$perms_checked[$forum_permission] = 0; } }
| $perms_checked[$forum_permission] = 0; } }
|
Zeile 1765 | Zeile 1764 |
---|
} } $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 1836 | Zeile 1835 |
---|
$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();
|
Zeile 1854 | Zeile 1853 |
---|
if($mybb->input['action'] == "deletemod") {
|
if($mybb->input['action'] == "deletemod") {
|
$modid = (int)$mybb->input['id']; $isgroup = (int)$mybb->input['isgroup']; $fid = $mybb->get_input('fid', 1);
| $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 1909 | Zeile 1908 |
---|
// Log admin action if($isgroup)
|
// Log admin action if($isgroup)
|
{
| {
|
log_admin_action($mid, $mod['title'], $forum['fid'], $forum['name']); } else
| log_admin_action($mid, $mod['title'], $forum['fid'], $forum['name']); } else
|
Zeile 1921 | Zeile 1920 |
---|
admin_redirect("index.php?module=forum-management&fid={$fid}#tab_moderators"); } else
|
admin_redirect("index.php?module=forum-management&fid={$fid}#tab_moderators"); } else
|
{
| {
|
$page->output_confirm_action("index.php?module=forum-management&action=deletemod&fid={$mod['fid']}&uid={$mod['uid']}", $lang->confirm_moderator_deletion); } }
| $page->output_confirm_action("index.php?module=forum-management&action=deletemod&fid={$mod['fid']}&uid={$mod['uid']}", $lang->confirm_moderator_deletion); } }
|
Zeile 1938 | Zeile 1937 |
---|
admin_redirect("index.php?module=forum-management"); }
|
admin_redirect("index.php?module=forum-management"); }
|
// User clicked no if($mybb->input['no']) { admin_redirect("index.php?module=forum-management"); }
$plugins->run_hooks("admin_forum_management_delete");
| // User clicked no if($mybb->input['no']) { admin_redirect("index.php?module=forum-management"); }
$plugins->run_hooks("admin_forum_management_delete");
|
if($mybb->request_method == "post") {
|
if($mybb->request_method == "post") {
|
$fid = $mybb->get_input('fid', 1);
| $fid = $mybb->get_input('fid', MyBB::INPUT_INT);
|
$forum_info = get_forum($fid);
$query = $db->simple_select("forums", "posts,unapprovedposts,threads,unapprovedthreads", "fid='{$fid}'");
| $forum_info = get_forum($fid);
$query = $db->simple_select("forums", "posts,unapprovedposts,threads,unapprovedthreads", "fid='{$fid}'");
|
Zeile 1991 | Zeile 1990 |
---|
$db->delete_query("posts", "fid='{$fid}' {$delquery}"); $db->delete_query("moderators", "fid='{$fid}' {$delquery}"); $db->delete_query("forumsubscriptions", "fid='{$fid}' {$delquery}");
|
$db->delete_query("posts", "fid='{$fid}' {$delquery}"); $db->delete_query("moderators", "fid='{$fid}' {$delquery}"); $db->delete_query("forumsubscriptions", "fid='{$fid}' {$delquery}");
|
| $db->delete_query("forumpermissions", "fid='{$fid}' {$delquery}");
|
$update_stats = array( 'numthreads' => "-".$stats['threads'],
| $update_stats = array( 'numthreads' => "-".$stats['threads'],
|
Zeile 2015 | Zeile 2015 |
---|
else { $page->output_confirm_action("index.php?module=forum-management&action=delete&fid={$forum['fid']}", $lang->confirm_forum_deletion);
|
else { $page->output_confirm_action("index.php?module=forum-management&action=delete&fid={$forum['fid']}", $lang->confirm_forum_deletion);
|
}
| }
|
}
if(!$mybb->input['action'])
| }
if(!$mybb->input['action'])
|
Zeile 2025 | Zeile 2025 |
---|
$mybb->input['fid'] = 0; }
|
$mybb->input['fid'] = 0; }
|
$fid = $mybb->get_input('fid', 1);
| $fid = $mybb->get_input('fid', MyBB::INPUT_INT);
|
if($fid) { $forum = get_forum($fid);
| if($fid) { $forum = get_forum($fid);
|
Zeile 2107 | Zeile 2107 |
---|
if(!empty($mybb->input['usergroup'])) { $isgroup = 1;
|
if(!empty($mybb->input['usergroup'])) { $isgroup = 1;
|
$gid = (int)$mybb->input['usergroup'];
| $gid = $mybb->get_input('usergroup', MyBB::INPUT_INT);
|
if(!$groupscache[$gid]) {
| if(!$groupscache[$gid]) {
|
Zeile 2119 | Zeile 2119 |
---|
$newmod = array( "id" => $gid, "name" => $groupscache[$gid]['title']
|
$newmod = array( "id" => $gid, "name" => $groupscache[$gid]['title']
|
); } else {
| ); } else {
|
$options = array( 'fields' => array('uid AS id', 'username AS name') );
| $options = array( 'fields' => array('uid AS id', 'username AS name') );
|
Zeile 2193 | Zeile 2193 |
---|
{ flash_message($lang->error_moderator_already_added, 'error'); admin_redirect("index.php?module=forum-management&fid={$fid}#tab_moderators");
|
{ flash_message($lang->error_moderator_already_added, 'error'); admin_redirect("index.php?module=forum-management&fid={$fid}#tab_moderators");
|
} } else
| } } else
|
{ flash_message($lang->error_moderator_not_found, 'error'); admin_redirect("index.php?module=forum-management&fid={$fid}#tab_moderators");
| { flash_message($lang->error_moderator_not_found, 'error'); admin_redirect("index.php?module=forum-management&fid={$fid}#tab_moderators");
|
Zeile 2221 | Zeile 2221 |
---|
admin_redirect("index.php?module=forum-management&fid=".$mybb->input['fid']); } }
|
admin_redirect("index.php?module=forum-management&fid=".$mybb->input['fid']); } }
|
}
$page->extra_header .= "<script src=\"jscripts/quick_perm_editor.js\" type=\"text/javascript\"></script>\n";
| }
$page->extra_header .= "<script src=\"jscripts/quick_perm_editor.js\" type=\"text/javascript\"></script>\n";
|
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);
|
if($fid) { $page->output_nav_tabs($sub_tabs, 'view_forum');
| if($fid) { $page->output_nav_tabs($sub_tabs, 'view_forum');
|
Zeile 2301 | Zeile 2301 |
---|
while($usergroup = $db->fetch_array($query)) { $usergroups[$usergroup['gid']] = $usergroup;
|
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 2408 | Zeile 2408 |
---|
{ if($perms[$forum_permission] == 1) {
|
{ if($perms[$forum_permission] == 1) {
|
$perms_checked[$forum_permission] = 1;
| $perms_checked[$forum_permission] = 1;
|
} else {
| } else {
|
Zeile 2417 | Zeile 2417 |
---|
} } $usergroup['title'] = htmlspecialchars_uni($usergroup['title']);
|
} } $usergroup['title'] = htmlspecialchars_uni($usergroup['title']);
|
|
|
if($default_checked == 1) { $inherited_text = $lang->inherited_permission;
| if($default_checked == 1) { $inherited_text = $lang->inherited_permission;
|
Zeile 2425 | Zeile 2425 |
---|
else { $inherited_text = $lang->custom_permission;
|
else { $inherited_text = $lang->custom_permission;
|
}
| }
|
$form_container->output_cell("<strong>{$usergroup['title']}</strong> <small style=\"vertical-align: middle;\">({$inherited_text})</small>");
$field_select = "<div class=\"quick_perm_fields\">\n";
| $form_container->output_cell("<strong>{$usergroup['title']}</strong> <small style=\"vertical-align: middle;\">({$inherited_text})</small>");
$field_select = "<div class=\"quick_perm_fields\">\n";
|
Zeile 2443 | Zeile 2443 |
---|
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 2459 | Zeile 2459 |
---|
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 2468 | Zeile 2468 |
---|
{ $field_selected[] = $forum_permission; }
|
{ $field_selected[] = $forum_permission; }
|
}
| }
|
$field_select .= "<noscript>".$form->generate_select_box('fields_'.$usergroup['gid'].'[]', $field_options, $field_selected, array('id' => 'fields_'.$usergroup['gid'].'[]', 'multiple' => true))."</noscript>\n"; $form_container->output_cell($field_select, array('colspan' => 2));
| $field_select .= "<noscript>".$form->generate_select_box('fields_'.$usergroup['gid'].'[]', $field_options, $field_selected, array('id' => 'fields_'.$usergroup['gid'].'[]', 'multiple' => true))."</noscript>\n"; $form_container->output_cell($field_select, array('colspan' => 2));
|
Zeile 2477 | Zeile 2477 |
---|
{ $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
| } 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->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)); }
|
Zeile 2556 | Zeile 2556 |
---|
foreach($usergroups as $group) {
|
foreach($usergroups as $group) {
|
$modgroups[$group['gid']] = $lang->usergroup." ".$group['gid'].": ".$group['title'];
| $modgroups[$group['gid']] = $lang->usergroup." ".$group['gid'].": ".htmlspecialchars_uni($group['title']);
|
}
if(!isset($mybb->input['usergroup']))
| }
if(!isset($mybb->input['usergroup']))
|
Zeile 2582 | Zeile 2582 |
---|
echo $form->generate_hidden_field("fid", $mybb->input['fid']); echo $form->generate_hidden_field("add", "moderators"); $form_container = new FormContainer($lang->add_user_as_moderator);
|
echo $form->generate_hidden_field("fid", $mybb->input['fid']); echo $form->generate_hidden_field("add", "moderators"); $form_container = new FormContainer($lang->add_user_as_moderator);
|
$form_container->output_row($lang->username." <em>*</em>", $lang->moderator_username_desc, $form->generate_text_box('username', $mybb->input['username'], array('id' => 'username')), 'username');
| $form_container->output_row($lang->username." <em>*</em>", $lang->moderator_username_desc, $form->generate_text_box('username', htmlspecialchars_uni($mybb->get_input('username')), array('id' => 'username')), 'username');
|
$form_container->end();
// Autocompletion for usernames echo ' <link rel="stylesheet" href="../jscripts/select2/select2.css">
|
$form_container->end();
// Autocompletion for usernames echo ' <link rel="stylesheet" href="../jscripts/select2/select2.css">
|
<script type="text/javascript" src="../jscripts/select2/select2.min.js"></script>
| <script type="text/javascript" src="../jscripts/select2/select2.min.js?ver=1804"></script>
|
<script type="text/javascript"> <!-- $("#username").select2({
|
<script type="text/javascript"> <!-- $("#username").select2({
|
placeholder: "Search for a user", minimumInputLength: 3, maximumSelectionSize: 3,
| placeholder: "'.$lang->search_for_a_user.'", minimumInputLength: 2,
|
multiple: false, ajax: { // instead of writing the function to execute the request we use Select2\'s convenient helper url: "../xmlhttp.php?action=get_users",
| multiple: false, ajax: { // instead of writing the function to execute the request we use Select2\'s convenient helper url: "../xmlhttp.php?action=get_users",
|
Zeile 2620 | Zeile 2619 |
---|
}).done(function(data) { callback(data); }); } },
|
}).done(function(data) { callback(data); }); } },
|
| });
$(\'[for=username]\').click(function(){ $("#username").select2(\'open\'); return false;
|
}); // --> </script>';
| }); // --> </script>';
|
Zeile 2637 | Zeile 2641 |
---|
}
/**
|
}
/**
|
*
| * @param DefaultFormContainer $form_container * @param int $pid * @param int $depth
|
*/ function build_admincp_forums_list(&$form_container, $pid=0, $depth=1) {
| */ function build_admincp_forums_list(&$form_container, $pid=0, $depth=1) {
|
Zeile 2686 | Zeile 2692 |
---|
$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("<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"));
|
$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->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}')");
$form_container->output_cell($popup->fetch(), array("class" => "align_center"));
$form_container->construct_row();
| $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->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}')");
$form_container->output_cell($popup->fetch(), array("class" => "align_center"));
$form_container->construct_row();
|
// 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']]) {
|
Zeile 2768 | Zeile 2774 |
---|
} }
|
} }
|
| /** * @param int $gid * @param int $fid * * @return string */
|
function retrieve_single_permissions_row($gid, $fid) { global $mybb, $lang, $cache, $db;
| function retrieve_single_permissions_row($gid, $fid) { global $mybb, $lang, $cache, $db;
|