w pliku admin_forums.php nastepuje konflikt pomiędzy ww. modyfikacjami.
instrukcja karze:
[phpbb]---[ FIND ]---
//
// Default permissions of public ::
//
$field_sql = "";
$value_sql = "";
while( list($field, $value) = each($forum_auth_ary) )
{
$field_sql .= ", $field";
$value_sql .= ", $value";
}
// There is no problem having duplicate forum names so we won't check for it.
$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;
$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 insert row in forums table", "", __LINE__, __FILE__, $sql);
}
---[ REPLACE, WITH ]---
//
// Default permissions of public ::
//
/*Complete Messages System*/
while( list($field, $value) = each($forum_auth_ary) )
{
$FielVal_sql .= $field .'='.$value.', ';
}
if(isset($_POST['message_posting']))
{
$sqlUpdate .= "message_posting = '";
ForEach($_POST['message_posting'] as $IDMessage => $True)
{
$sqlUpdate .= $IDMessage.';';
}
$sqlUpdate .= "', ";
}
if(isset($_POST['message_viewtopic']))
{
$sqlUpdate .= "message_viewtopic = '";
ForEach($_POST['message_viewtopic'] as $IDMessage => $True)
{
$sqlUpdate .= $IDMessage.';';
}
$sqlUpdate .= "', ";
}
if(isset($_POST['message_viewforum']))
{
$sqlUpdate .= "message_viewforum = '";
ForEach($_POST['message_viewforum'] as $IDMessage => $True)
{
$sqlUpdate .= $IDMessage.';';
}
$sqlUpdate .= "',";
}
// There is no problem having duplicate forum names so we won't check for it.
$sql = "INSERT INTO " . FORUMS_TABLE . "
SET $sqlUpdate
forum_id = '" . $next_id . "',
forum_name = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "',
cat_id = " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ",
forum_desc = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "',
forum_status = " . intval($HTTP_POST_VARS['forumstatus']) . ",
forum_order = $next_order,
$FielVal_sql
prune_enable = " . intval($HTTP_POST_VARS['prune_enable']) . "";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't insert row in forums table", "", __LINE__, __FILE__, $sql);
}
[/phpbb]
Natomiast mój plik w tym miejscu wygląda inaczej:
[phpbb] //
// Default permissions of public ::
//
$field_sql = "";
$value_sql = "";
while( list($field, $value) = each($forum_auth_ary) )
{
$field_sql .= ", $field";
$value_sql .= ", $value";
}
// There is no problem having duplicate forum names so we won't check for it.
// Modified by Attached Forums MOD
if (intval($HTTP_POST_VARS['old_cat_id']) != intval($HTTP_POST_VARS[POST_CAT_URL]))
{
$HTTP_POST_VARS['attached_forum_id']=-1;
}
$sql = "INSERT INTO " . FORUMS_TABLE . " (forum_id, forum_name, cat_id, attached_forum_id, forum_desc, forum_order, forum_status, prune_enable" . $field_sql . ")
VALUES ('" . $next_id . "', '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", " . intval($HTTP_POST_VARS['attached_forum_id']) . ", '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', $next_order, " . intval($HTTP_POST_VARS['forumstatus']) . ", " . intval($HTTP_POST_VARS['prune_enable']) . $value_sql . ")";
// End Added by Attached Forums MOD
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't insert row in forums table", "", __LINE__, __FILE__, $sql);
}[/phpbb]
Pomóżcie mi, proszę, zamienić to w taki sposób, żeby działało.