"Fossies" - the Fresh Open Source Software Archive  

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

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

management.php  (mybb_1821):management.php  (mybb_1822)
skipping to change at line 1992 skipping to change at line 1992
$query = $db->simple_select("threads", "tid", "fid='{$fid}' {$del query}"); $query = $db->simple_select("threads", "tid", "fid='{$fid}' {$del query}");
if($db->num_rows($query) > 0) if($db->num_rows($query) > 0)
{ {
$page->output_header(); $page->output_header();
$form = new Form("index.php?module=forum-management", 'po st'); $form = new Form("index.php?module=forum-management", 'po st');
echo $form->generate_hidden_field("fid", $fid); echo $form->generate_hidden_field("fid", $fid);
echo $form->generate_hidden_field("action", "delete"); echo $form->generate_hidden_field("action", "delete");
echo "<div class=\"confirm_action\">\n"; output_auto_redirect($form, $lang->confirm_proceed_deleti
echo "<p>{$lang->confirm_proceed_deletion}</p>\n"; on);
echo "<br />\n";
echo "<script type=\"text/javascript\">$(function() { var
button = $(\"#proceed_button\"); if(button.length > 0) { button.val(\"{$lang->a
utomatically_redirecting}\"); button.attr(\"disabled\", true); button.css(\"colo
r\", \"#aaa\"); button.css(\"borderColor\", \"#aaa\"); document.forms[0].trigger
('submit'); }})</script>";
echo "<p class=\"buttons\">\n";
echo $form->generate_submit_button($lang->proceed, array(
'class' => 'button_yes', 'id' => 'proceed_button'));
echo "</p>\n";
echo "</div>\n";
$form->end(); $form->end();
$page->output_footer(); $page->output_footer();
exit; exit;
} }
// End pagination // End pagination
// Delete the forum // Delete the forum
skipping to change at line 2299 skipping to change at line 2292
$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' => '5%'));
$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, $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();
$submit_options = array('disabled' => true); $submit_options = array('disabled' => true);
} }
skipping to change at line 2672 skipping to change at line 2665
echo "</div>\n"; echo "</div>\n";
$plugins->run_hooks("admin_forum_management_start_graph"); $plugins->run_hooks("admin_forum_management_start_graph");
} }
$page->output_footer(); $page->output_footer();
} }
/** /**
* @param DefaultFormContainer $form_container * @param DefaultFormContainer $form_container
* @param DefaultForm $form
* @param int $pid * @param int $pid
* @param int $depth * @param int $depth
*/ */
function build_admincp_forums_list(&$form_container, $pid=0, $depth=1) function build_admincp_forums_list(&$form_container, &$form, $pid=0, $depth=1)
{ {
global $mybb, $lang, $db, $sub_forums; global $mybb, $lang, $db, $sub_forums;
static $forums_by_parent; static $forums_by_parent;
if(!is_array($forums_by_parent)) if(!is_array($forums_by_parent))
{ {
$forum_cache = cache_forums(); $forum_cache = cache_forums();
foreach($forum_cache as $forum) foreach($forum_cache as $forum)
{ {
skipping to change at line 2711 skipping to change at line 2705
if($forum['active'] == 0) if($forum['active'] == 0)
{ {
$forum['name'] = "<em>".$forum['name']."</em>"; $forum['name'] = "<em>".$forum['name']."</em>";
} }
if($forum['type'] == "c" && ($depth == 1 || $depth == 2)) if($forum['type'] == "c" && ($depth == 1 || $depth == 2))
{ {
$sub_forums = ''; $sub_forums = '';
if(isset($forums_by_parent[$forum['fid']]) && $de pth == 2) if(isset($forums_by_parent[$forum['fid']]) && $de pth == 2)
{ {
build_admincp_forums_list($form_container , $forum['fid'], $depth+1); build_admincp_forums_list($form_container , $form, $forum['fid'], $depth+1);
} }
if($sub_forums) if($sub_forums)
{ {
$sub_forums = "<br /><small>{$lang->sub_f orums}: {$sub_forums}</small>"; $sub_forums = "<br /><small>{$lang->sub_f orums}: {$sub_forums}</small>";
} }
$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("<input type=\"text\ " name=\"disporder[".$forum['fid']."]\" value=\"".$forum['disporder']."\" class= \"text_input align_center\" style=\"width: 80%; font-weight: bold;\" />", array( "class" => "align_center")); $form_container->output_cell($form->generate_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->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']])
{ {
build_admincp_forums_list($form_container , $forum['fid'], $depth+1); build_admincp_forums_list($form_container , $form, $forum['fid'], $depth+1);
} }
} }
elseif($forum['type'] == "f" && ($depth == 1 || $depth == 2)) elseif($forum['type'] == "f" && ($depth == 1 || $depth == 2))
{ {
if($forum['description']) if($forum['description'])
{ {
$forum['description'] = preg_replace("#&( ?!\#[0-9]+;)#si", "&amp;", $forum['description']); $forum['description'] = preg_replace("#&( ?!\#[0-9]+;)#si", "&amp;", $forum['description']);
$forum['description'] = "<br /><small>".$forum['d escription']."</small>"; $forum['description'] = "<br /><small>".$forum['d escription']."</small>";
} }
$sub_forums = ''; $sub_forums = '';
if(isset($forums_by_parent[$forum['fid']]) && $de pth == 2) if(isset($forums_by_parent[$forum['fid']]) && $de pth == 2)
{ {
build_admincp_forums_list($form_container , $forum['fid'], $depth+1); build_admincp_forums_list($form_container , $form, $forum['fid'], $depth+1);
} }
if($sub_forums) if($sub_forums)
{ {
$sub_forums = "<br /><small>{$lang->sub_f orums}: {$sub_forums}</small>"; $sub_forums = "<br /><small>{$lang->sub_f orums}: {$sub_forums}</small>";
} }
$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("<input type=\"text\ $form_container->output_cell($form->generate_nume
" name=\"disporder[".$forum['fid']."]\" value=\"".$forum['disporder']."\" class= ric_field("disporder[{$forum['fid']}]", "{$forum['disporder']}", array('min' =>
\"text_input align_center\" style=\"width: 80%;\" />", array("class" => "align_c 0, 'class' => 'align_center', 'style' => 'width:80%')), array("class" => "align_
enter")); 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->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)
{ {
build_admincp_forums_list($form_container , $forum['fid'], $depth+1); build_admincp_forums_list($form_container , $form, $forum['fid'], $depth+1);
} }
} }
else if($depth == 3) else if($depth == 3)
{ {
if($donecount < $mybb->settings['subforumsindex'] ) if($donecount < $mybb->settings['subforumsindex'] )
{ {
$sub_forums .= "{$comma} <a href=\"index. php?module=forum-management&amp;fid={$forum['fid']}\">{$forum['name']}</a>"; $sub_forums .= "{$comma} <a href=\"index. php?module=forum-management&amp;fid={$forum['fid']}\">{$forum['name']}</a>";
$comma = $lang->comma; $comma = $lang->comma;
} }
 End of changes. 10 change blocks. 
25 lines changed or deleted 14 lines changed or added

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