1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-21 18:03:18 +01:00

Fix for bug #528319, can't check currval of a sequence when the sequence doesn't exist... We manually determine and assign the forum id so no need to get currval anyway :D

git-svn-id: file:///svn/phpbb/trunk@2298 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
the_systech 2002-03-12 21:46:34 +00:00
parent 9135d2f63c
commit 3d375a794e

View File

@ -390,7 +390,6 @@ if( !empty($mode) )
if( $HTTP_POST_VARS['prune_enable'] )
{
$new_forum_id = $db->sql_nextid();
if( $HTTP_POST_VARS['prune_days'] == "" || $HTTP_POST_VARS['prune_freq'] == "")
{
@ -398,7 +397,7 @@ if( !empty($mode) )
}
$sql = "INSERT INTO " . PRUNE_TABLE . " (forum_id, prune_days, prune_freq)
VALUES($new_forum_id, " . intval($HTTP_POST_VARS['prune_days']) . ", " . intval($HTTP_POST_VARS['prune_freq']) . ")";
VALUES('" . $next_id . "', " . intval($HTTP_POST_VARS['prune_days']) . ", " . intval($HTTP_POST_VARS['prune_freq']) . ")";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't insert row in prune table", "", __LINE__, __FILE__, $sql);
@ -647,6 +646,13 @@ if( !empty($mode) )
{
message_die(GENERAL_ERROR, "Couldn't delete forum", "", __LINE__, __FILE__, $sql);
}
$sql = "DELETE FROM " . PRUNE_TABLE . "
WHERE forum_id = $from_id";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't delete forum prune information!", "", __LINE__, __FILE__, $sql);
}
$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>");