"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Upload/admin/modules/forum/management.php" between
mybb_1822.zip and mybb_1823.zip

About: MyBB is a multilingual, standards-compliant and free forum (discussion board) software.

management.php  (mybb_1822):management.php  (mybb_1823)
skipping to change at line 97 skipping to change at line 97
$errors[] = $lang->error_new_forum_needs_name; $errors[] = $lang->error_new_forum_needs_name;
} }
if($mybb->input['pid'] == -1 && $mybb->input['type'] == ' f') if($mybb->input['pid'] == -1 && $mybb->input['type'] == ' f')
{ {
$errors[] = $lang->error_no_parent; $errors[] = $lang->error_no_parent;
} }
if(!$errors) if(!$errors)
{ {
if($mybb->input['pid'] < 0)
{
$mybb->input['pid'] = 0;
}
$new_forum = $from_forum; $new_forum = $from_forum;
unset($new_forum['fid'], $new_forum['threads'], $ new_forum['posts'], $new_forum['lastpost'], $new_forum['lastposter'], $new_forum ['lastposteruid'], $new_forum['lastposttid'], $new_forum['lastpostsubject'], $ne w_forum['unapprovedthreads'], $new_forum['unapprovedposts']); unset($new_forum['fid'], $new_forum['threads'], $ new_forum['posts'], $new_forum['lastpost'], $new_forum['lastposter'], $new_forum ['lastposteruid'], $new_forum['lastposttid'], $new_forum['lastpostsubject'], $ne w_forum['unapprovedthreads'], $new_forum['unapprovedposts']);
$new_forum['name'] = $db->escape_string($mybb->in put['title']); $new_forum['name'] = $db->escape_string($mybb->in put['title']);
$new_forum['description'] = $db->escape_string($m ybb->input['description']); $new_forum['description'] = $db->escape_string($m ybb->input['description']);
$new_forum['type'] = $db->escape_string($mybb->in put['type']); $new_forum['type'] = $db->escape_string($mybb->in put['type']);
$new_forum['pid'] = $mybb->get_input('pid', MyBB: :INPUT_INT); $new_forum['pid'] = $mybb->get_input('pid', MyBB: :INPUT_INT);
$new_forum['rulestitle'] = $db->escape_string($ne w_forum['rulestitle']); $new_forum['rulestitle'] = $db->escape_string($ne w_forum['rulestitle']);
$new_forum['rules'] = $db->escape_string($new_for um['rules']); $new_forum['rules'] = $db->escape_string($new_for um['rules']);
$new_forum['parentlist'] = ''; $new_forum['parentlist'] = '';
skipping to change at line 145 skipping to change at line 149
$new_forum['rulestitle'] = $db->escape_string($ne w_forum['rulestitle']); $new_forum['rulestitle'] = $db->escape_string($ne w_forum['rulestitle']);
$new_forum['rules'] = $db->escape_string($new_for um['rules']); $new_forum['rules'] = $db->escape_string($new_for um['rules']);
$db->update_query("forums", $new_forum, "fid='{$t o}'"); $db->update_query("forums", $new_forum, "fid='{$t o}'");
} }
} }
if(!$errors) if(!$errors)
{ {
// Copy permissions // Copy permissions
if(is_array($mybb->input['copygroups']) && count($mybb->i nput['copygroups'] > 0)) if(is_array($mybb->input['copygroups']) && count($mybb->i nput['copygroups']) > 0)
{ {
foreach($mybb->input['copygroups'] as $gid) foreach($mybb->input['copygroups'] as $gid)
{ {
$groups[] = (int)$gid; $groups[] = (int)$gid;
} }
$groups = implode(',', $groups); $groups = implode(',', $groups);
$query = $db->simple_select("forumpermissions", ' *', "fid='{$from}' AND gid IN ({$groups})"); $query = $db->simple_select("forumpermissions", ' *', "fid='{$from}' AND gid IN ({$groups})");
$db->delete_query("forumpermissions", "fid='{$to} ' AND gid IN ({$groups})", 1); $db->delete_query("forumpermissions", "fid='{$to} ' AND gid IN ({$groups})", 1);
while($permissions = $db->fetch_array($query)) while($permissions = $db->fetch_array($query))
{ {
skipping to change at line 865 skipping to change at line 869
"showinjump" => $mybb->get_input('showinjump', My BB::INPUT_INT), "showinjump" => $mybb->get_input('showinjump', My BB::INPUT_INT),
"style" => $mybb->get_input('style', MyBB::INPUT_ INT), "style" => $mybb->get_input('style', MyBB::INPUT_ INT),
"overridestyle" => $mybb->get_input('overridestyl e', MyBB::INPUT_INT), "overridestyle" => $mybb->get_input('overridestyl e', MyBB::INPUT_INT),
"rulestype" => $mybb->get_input('rulestype', MyBB ::INPUT_INT), "rulestype" => $mybb->get_input('rulestype', MyBB ::INPUT_INT),
"rulestitle" => $db->escape_string($mybb->input[' rulestitle']), "rulestitle" => $db->escape_string($mybb->input[' rulestitle']),
"rules" => $db->escape_string($mybb->input['rules ']), "rules" => $db->escape_string($mybb->input['rules ']),
"defaultdatecut" => $mybb->get_input('defaultdate cut', MyBB::INPUT_INT), "defaultdatecut" => $mybb->get_input('defaultdate cut', MyBB::INPUT_INT),
"defaultsortby" => $db->escape_string($mybb->inpu t['defaultsortby']), "defaultsortby" => $db->escape_string($mybb->inpu t['defaultsortby']),
"defaultsortorder" => $db->escape_string($mybb->i nput['defaultsortorder']), "defaultsortorder" => $db->escape_string($mybb->i nput['defaultsortorder']),
); );
$plugins->run_hooks("admin_forum_management_add_start");
$fid = $db->insert_query("forums", $insert_array); $fid = $db->insert_query("forums", $insert_array);
$parentlist = make_parent_list($fid); $parentlist = make_parent_list($fid);
$db->update_query("forums", array("parentlist" => $parent list), "fid='$fid'"); $db->update_query("forums", array("parentlist" => $parent list), "fid='$fid'");
$inherit = $mybb->input['default_permissions']; $inherit = $mybb->input['default_permissions'];
foreach($mybb->input as $id => $permission) foreach($mybb->input as $id => $permission)
{ {
if(strpos($id, 'fields_') === false) if(strpos($id, 'fields_') === false)
skipping to change at line 2289 skipping to change at line 2296
{ {
cache_forums(); cache_forums();
} }
$form_container = new FormContainer($lang->sprintf($lang->in_foru ms, $forum_cache[$fid]['name'])); $form_container = new FormContainer($lang->sprintf($lang->in_foru ms, $forum_cache[$fid]['name']));
} }
else else
{ {
$form_container = new FormContainer($lang->manage_forums); $form_container = new FormContainer($lang->manage_forums);
} }
$form_container->output_row_header($lang->forum); $form_container->output_row_header($lang->forum);
$form_container->output_row_header($lang->order, array("class" => "align_ center", 'width' => '5%')); $form_container->output_row_header($lang->order, array("class" => "align_ center", 'width' => '6%'));
$form_container->output_row_header($lang->controls, array("class" => "ali gn_center", 'style' => 'width: 200px')); $form_container->output_row_header($lang->controls, array("class" => "ali gn_center", 'style' => 'width: 200px'));
build_admincp_forums_list($form_container, $form, $fid); build_admincp_forums_list($form_container, $form, $fid);
$submit_options = array(); $submit_options = array();
if($form_container->num_rows() == 0) if($form_container->num_rows() == 0)
{ {
$form_container->output_cell($lang->no_forums, array('colspan' => 3)); $form_container->output_cell($lang->no_forums, array('colspan' => 3));
$form_container->construct_row(); $form_container->construct_row();
skipping to change at line 2721 skipping to change at line 2728
$form_container->output_cell("<div style=\"paddin g-left: ".(40*($depth-1))."px;\"><a href=\"index.php?module=forum-management&amp ;fid={$forum['fid']}\"><strong>{$forum['name']}</strong></a>{$sub_forums}</div>" ); $form_container->output_cell("<div style=\"paddin g-left: ".(40*($depth-1))."px;\"><a href=\"index.php?module=forum-management&amp ;fid={$forum['fid']}\"><strong>{$forum['name']}</strong></a>{$sub_forums}</div>" );
$form_container->output_cell($form->generate_nume ric_field("disporder[{$forum['fid']}]", "{$forum['disporder']}", array('min' => 0, 'class' => 'align_center', 'style' => 'width:80%; font-weight:bold')), array( "class" => "align_center")); $form_container->output_cell($form->generate_nume ric_field("disporder[{$forum['fid']}]", "{$forum['disporder']}", array('min' => 0, 'class' => 'align_center', 'style' => 'width:80%; font-weight:bold')), array( "class" => "align_center"));
$popup = new PopupMenu("forum_{$forum['fid']}", $ lang->options); $popup = new PopupMenu("forum_{$forum['fid']}", $ lang->options);
$popup->add_item($lang->edit_forum, "index.php?mo dule=forum-management&amp;action=edit&amp;fid={$forum['fid']}"); $popup->add_item($lang->edit_forum, "index.php?mo dule=forum-management&amp;action=edit&amp;fid={$forum['fid']}");
$popup->add_item($lang->subforums, "index.php?mod ule=forum-management&amp;fid={$forum['fid']}"); $popup->add_item($lang->subforums, "index.php?mod ule=forum-management&amp;fid={$forum['fid']}");
$popup->add_item($lang->moderators, "index.php?mo dule=forum-management&amp;fid={$forum['fid']}#tab_moderators"); $popup->add_item($lang->moderators, "index.php?mo dule=forum-management&amp;fid={$forum['fid']}#tab_moderators");
$popup->add_item($lang->permissions, "index.php?m odule=forum-management&amp;fid={$forum['fid']}#tab_permissions"); $popup->add_item($lang->permissions, "index.php?m odule=forum-management&amp;fid={$forum['fid']}#tab_permissions");
$popup->add_item($lang->forum_thread_prefixes, "i ndex.php?module=config-thread_prefixes&amp;fid={$forum['fid']}");
$popup->add_item($lang->add_child_forum, "index.p hp?module=forum-management&amp;action=add&amp;pid={$forum['fid']}"); $popup->add_item($lang->add_child_forum, "index.p hp?module=forum-management&amp;action=add&amp;pid={$forum['fid']}");
$popup->add_item($lang->copy_forum, "index.php?mo dule=forum-management&amp;action=copy&amp;fid={$forum['fid']}"); $popup->add_item($lang->copy_forum, "index.php?mo dule=forum-management&amp;action=copy&amp;fid={$forum['fid']}");
$popup->add_item($lang->delete_forum, "index.php? module=forum-management&amp;action=delete&amp;fid={$forum['fid']}&amp;my_post_ke y={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->confirm _forum_deletion}')"); $popup->add_item($lang->delete_forum, "index.php? module=forum-management&amp;action=delete&amp;fid={$forum['fid']}&amp;my_post_ke y={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->confirm _forum_deletion}')");
$form_container->output_cell($popup->fetch(), arr ay("class" => "align_center")); $form_container->output_cell($popup->fetch(), arr ay("class" => "align_center"));
$form_container->construct_row(); $form_container->construct_row();
// Does this category have any sub forums? // Does this category have any sub forums?
if($forums_by_parent[$forum['fid']]) if($forums_by_parent[$forum['fid']])
skipping to change at line 2761 skipping to change at line 2769
} }
$form_container->output_cell("<div style=\"paddin g-left: ".(40*($depth-1))."px;\"><a href=\"index.php?module=forum-management&amp ;fid={$forum['fid']}\">{$forum['name']}</a>{$forum['description']}{$sub_forums}< /div>"); $form_container->output_cell("<div style=\"paddin g-left: ".(40*($depth-1))."px;\"><a href=\"index.php?module=forum-management&amp ;fid={$forum['fid']}\">{$forum['name']}</a>{$forum['description']}{$sub_forums}< /div>");
$form_container->output_cell($form->generate_nume ric_field("disporder[{$forum['fid']}]", "{$forum['disporder']}", array('min' => 0, 'class' => 'align_center', 'style' => 'width:80%')), array("class" => "align_ center")); $form_container->output_cell($form->generate_nume ric_field("disporder[{$forum['fid']}]", "{$forum['disporder']}", array('min' => 0, 'class' => 'align_center', 'style' => 'width:80%')), array("class" => "align_ center"));
$popup = new PopupMenu("forum_{$forum['fid']}", $ lang->options); $popup = new PopupMenu("forum_{$forum['fid']}", $ lang->options);
$popup->add_item($lang->edit_forum, "index.php?mo dule=forum-management&amp;action=edit&amp;fid={$forum['fid']}"); $popup->add_item($lang->edit_forum, "index.php?mo dule=forum-management&amp;action=edit&amp;fid={$forum['fid']}");
$popup->add_item($lang->subforums, "index.php?mod ule=forum-management&amp;fid={$forum['fid']}"); $popup->add_item($lang->subforums, "index.php?mod ule=forum-management&amp;fid={$forum['fid']}");
$popup->add_item($lang->moderators, "index.php?mo dule=forum-management&amp;fid={$forum['fid']}#tab_moderators"); $popup->add_item($lang->moderators, "index.php?mo dule=forum-management&amp;fid={$forum['fid']}#tab_moderators");
$popup->add_item($lang->permissions, "index.php?m odule=forum-management&amp;fid={$forum['fid']}#tab_permissions"); $popup->add_item($lang->permissions, "index.php?m odule=forum-management&amp;fid={$forum['fid']}#tab_permissions");
$popup->add_item($lang->forum_thread_prefixes, "i ndex.php?module=config-thread_prefixes&amp;fid={$forum['fid']}");
$popup->add_item($lang->add_child_forum, "index.p hp?module=forum-management&amp;action=add&amp;pid={$forum['fid']}"); $popup->add_item($lang->add_child_forum, "index.p hp?module=forum-management&amp;action=add&amp;pid={$forum['fid']}");
$popup->add_item($lang->copy_forum, "index.php?mo dule=forum-management&amp;action=copy&amp;fid={$forum['fid']}"); $popup->add_item($lang->copy_forum, "index.php?mo dule=forum-management&amp;action=copy&amp;fid={$forum['fid']}");
$popup->add_item($lang->delete_forum, "index.php? module=forum-management&amp;action=delete&amp;fid={$forum['fid']}&amp;my_post_ke y={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->confirm _forum_deletion}')"); $popup->add_item($lang->delete_forum, "index.php? module=forum-management&amp;action=delete&amp;fid={$forum['fid']}&amp;my_post_ke y={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->confirm _forum_deletion}')");
$form_container->output_cell($popup->fetch(), arr ay("class" => "align_center")); $form_container->output_cell($popup->fetch(), arr ay("class" => "align_center"));
$form_container->construct_row(); $form_container->construct_row();
if(isset($forums_by_parent[$forum['fid']]) && $de pth == 1) if(isset($forums_by_parent[$forum['fid']]) && $de pth == 1)
{ {
 End of changes. 6 change blocks. 
2 lines changed or deleted 11 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)