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 4249 2008-10-25 05:37:16Z Tikitiki $
|
*/
// Disallow direct access to this file for security reasons
| */
// Disallow direct access to this file for security reasons
|
Zeile 945 | Zeile 945 |
---|
} }
|
} }
|
| $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 971 | Zeile 972 |
---|
} 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
| } } else
|
Zeile 990 | Zeile 991 |
---|
$perms_checked[$forum_permission] = 1; } else
|
$perms_checked[$forum_permission] = 1; } else
|
{
| {
|
$perms_checked[$forum_permission] = 0; } }
| $perms_checked[$forum_permission] = 0; } }
|
Zeile 1066 | Zeile 1067 |
---|
$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; }
|
Zeile 1397 | Zeile 1398 |
---|
$default_checked = true; } }
|
$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 { $value = "false"; }
| else { $value = "false"; }
|
if($mybb->input['permissions'][$usergroup['gid']][$forum_permission]) { $value = $mybb->input['permissions'][$usergroup['gid']][$forum_permission];
| if($mybb->input['permissions'][$usergroup['gid']][$forum_permission]) { $value = $mybb->input['permissions'][$usergroup['gid']][$forum_permission];
|
Zeile 1423 | Zeile 1425 |
---|
} 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; } } else
| { $perms_checked[$forum_permission] = 1; } else { $perms_checked[$forum_permission] = 0; } } else
|
{ if($perms[$forum_permission] != 1) {
| { if($perms[$forum_permission] != 1) {
|
Zeile 1462 | Zeile 1464 |
---|
if(!$default_checked) { $form_container->output_cell("<a href=\"index.php?module=forum/management&action=permissions&pid={$perms['pid']}\">{$lang->edit_permissions}</a>", array("class" => "align_center"));
|
if(!$default_checked) { $form_container->output_cell("<a href=\"index.php?module=forum/management&action=permissions&pid={$perms['pid']}\">{$lang->edit_permissions}</a>", array("class" => "align_center"));
|
}
| }
|
else { $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"));
| else { $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"));
|
Zeile 1470 | Zeile 1472 |
---|
$form_container->construct_row(); } $form_container->end();
|
$form_container->construct_row(); } $form_container->end();
|
|
|
$buttons[] = $form->generate_submit_button($lang->save_forum); $form->output_submit_wrapper($buttons); $form->end(); $page->output_footer();
|
$buttons[] = $form->generate_submit_button($lang->save_forum); $form->output_submit_wrapper($buttons); $form->end(); $page->output_footer();
|
}
| }
|
if($mybb->input['action'] == "deletemod") { $plugins->run_hooks("admin_forum_management_deletemod"); $query = $db->simple_select("moderators", "*", "uid='{$mybb->input['uid']}' AND fid='{$mybb->input['fid']}'"); $mod = $db->fetch_array($query);
|
if($mybb->input['action'] == "deletemod") { $plugins->run_hooks("admin_forum_management_deletemod"); $query = $db->simple_select("moderators", "*", "uid='{$mybb->input['uid']}' AND fid='{$mybb->input['fid']}'"); $mod = $db->fetch_array($query);
|
|
|
// Does the forum not exist? if(!$mod['mid']) { flash_message($lang->error_invalid_moderator, 'error');
|
// Does the forum not exist? if(!$mod['mid']) { flash_message($lang->error_invalid_moderator, 'error');
|
admin_redirect("index.php?module=forum/management&fid=".$mybb->input['fid']); } // User clicked no
| admin_redirect("index.php?module=forum/management&fid=".$mybb->input['fid']); } // User clicked no
|
if($mybb->input['no'])
|
if($mybb->input['no'])
|
{
| {
|
admin_redirect("index.php?module=forum/management&fid=".$mybb->input['fid']); }
| admin_redirect("index.php?module=forum/management&fid=".$mybb->input['fid']); }
|
Zeile 1508 | Zeile 1510 |
---|
WHERE m.mid='{$mid}' "); $mod = $db->fetch_array($query);
|
WHERE m.mid='{$mid}' "); $mod = $db->fetch_array($query);
|
|
|
$db->delete_query("moderators", "mid='{$mid}'"); $query = $db->simple_select("moderators", "*", "uid='{$mod['uid']}'"); if($db->fetch_array($query))
| $db->delete_query("moderators", "mid='{$mid}'"); $query = $db->simple_select("moderators", "*", "uid='{$mod['uid']}'"); if($db->fetch_array($query))
|
Zeile 1523 | Zeile 1525 |
---|
$plugins->run_hooks("admin_forum_management_deletemod_commit"); $forum = get_forum($mybb->input['fid']);
|
$plugins->run_hooks("admin_forum_management_deletemod_commit"); $forum = get_forum($mybb->input['fid']);
|
|
|
// Log admin action log_admin_action($mod['uid'], $mod['username'], $forum['fid'], $forum['name']);
| // Log admin action log_admin_action($mod['uid'], $mod['username'], $forum['fid'], $forum['name']);
|
Zeile 1552 | Zeile 1554 |
---|
// User clicked no if($mybb->input['no'])
|
// User clicked no if($mybb->input['no'])
|
{ admin_redirect("index.php?module=forum/management");
| { admin_redirect("index.php?module=forum/management");
|
}
if($mybb->request_method == "post")
| }
if($mybb->request_method == "post")
|
Zeile 1562 | Zeile 1564 |
---|
$forum_info = get_forum($fid); // Delete the forum $db->delete_query("forums", "fid='$fid'");
|
$forum_info = get_forum($fid); // Delete the forum $db->delete_query("forums", "fid='$fid'");
|
switch($db->type) { case "pgsql": case "sqlite3": case "sqlite2":
| switch($db->type) { case "pgsql": case "sqlite3": case "sqlite2":
|
$query = $db->simple_select("forums", "*", "','|| parentlist|| ',' LIKE '%,$fid,%'"); break; default:
| $query = $db->simple_select("forums", "*", "','|| parentlist|| ',' LIKE '%,$fid,%'"); break; default:
|
Zeile 1588 | Zeile 1590 |
---|
while($mod = $db->fetch_array($query)) { $moderators[$mod['uid']] = $mod['uid'];
|
while($mod = $db->fetch_array($query)) { $moderators[$mod['uid']] = $mod['uid'];
|
} if(is_array($moderators)) { $mod_list = implode(",", $moderators);
| } if(is_array($moderators)) { $mod_list = implode(",", $moderators);
|
$query = $db->simple_select("moderators", "*", "fid != '$fid' AND uid IN ($mod_list)"); while($mod = $db->fetch_array($query)) {
| $query = $db->simple_select("moderators", "*", "fid != '$fid' AND uid IN ($mod_list)"); while($mod = $db->fetch_array($query)) {
|
Zeile 1658 | Zeile 1660 |
---|
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 1919 | Zeile 1926 |
---|
$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 2043 | Zeile 2052 |
---|
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 2150 | Zeile 2159 |
---|
++$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; } }
|