Anlegen neuer Foren und löschen bestehender Foren klappt einwandfrei.
Hier die Zeilen um 543Couldn't update forum information
DEBUG MODE
SQL Error : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 0, 0)' at line 2
INSERT INTO phpbb_forums (forum_id, forum_name, cat_id, forum_parent, forum_desc, forum_order, forum_status, prune_enable) VALUES ('', 'test2', 2, 0, '', , 0, 0)
Line : 543
File : admin_forums.php
Code: Alles auswählen
$message = $lang['Forums_updated'] . "<br /><br />" . sprintf($lang['Click_return_forumadmin'], "<a href=\"" . append_sid("admin_forums.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
break;
case 'modforum':
// Begin Simple Subforums MOD
$forum_id = intval($HTTP_POST_VARS[POST_FORUM_URL]);
$row = get_info('forum', $forum_id);
$list = explode(',', $HTTP_POST_VARS[POST_CAT_URL]);
$new_cat = ( count($list) ) ? intval($list[0]) : intval($HTTP_POST_VARS[POST_CAT_URL]);
$new_parent = ( isset($list[1]) ) ? intval($list[1]) : 0;
if( !$row['forum_parent'] && $row['cat_id'] !== $new_cat )
{
// Move subforums to new category
$sql = "UPDATE " . FORUMS_TABLE . " SET cat_id='$new_cat' WHERE forum_parent='$forum_id'";
$db->sql_query($sql);
}
// End Simple Subforums MOD
// Modify a forum in the DB
if( isset($HTTP_POST_VARS['prune_enable']))
{
if( $HTTP_POST_VARS['prune_enable'] != 1 )
{
$HTTP_POST_VARS['prune_enable'] = 0;
}
}
// There is no problem having duplicate forum names so we won't check for it.
// Begin Simple Subforums MOD
$list = explode(',', $HTTP_POST_VARS[POST_CAT_URL]);
$new_cat = ( count($list) ) ? intval($list[0]) : intval($HTTP_POST_VARS[POST_CAT_URL]);
$new_parent = ( isset($list[1]) ) ? intval($list[1]) : 0;
// End Simple Subforums MOD
$sql = "INSERT INTO " . FORUMS_TABLE . " (forum_id, forum_name, cat_id, forum_parent, forum_desc, forum_order, forum_status, prune_enable" . $field_sql . ")
VALUES ('" . $next_id . "', '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', " . $new_cat . ', ' . $new_parent . ", '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', $next_order, " . intval($HTTP_POST_VARS['forumstatus']) . ", " . intval($HTTP_POST_VARS['prune_enable']) . $value_sql . ")";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't update forum information", "", __LINE__, __FILE__, $sql);
}