Code: Select all
Failed to update log
DEBUG MODE
SQL Error : 1064 You have an error in your SQL syntax near ')' at line 2
INSERT INTO phpbb_czfxpboardlog_mod_admin ( done_by, action_date, action, cat, oldvalue, changed_id) VALUES ( 3, 1027002382, '' , 'poll', '', )
Line : 138
File : /home/virtual/site7/fst/var/www/html/czfxpboard/includes/functions_log_mod_admin.php
Code: Select all
#-----[ FIND ]------------------------------------------
#
//
// Got all required info so go ahead and start deleting everything
//
#
#-----[ BEFORE, ADD ]------------------------------------------
#
# changed in v0.81
//log
$sql = "SELECT forum_id, topic_title
FROM " . TOPICS_TABLE . "
WHERE topic_id IN ($topic_id_sql)
OR topic_moved_id IN ($topic_id_sql)";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not delete topics', '', __LINE__, __FILE__, $sql);
}
while ( $row = $db->sql_fetchrow($result) )
{
add_to_log ( $userdata['user_id'], 'delete', 'f', $row['forum_id'], $row['topic_title'], $newvalue, $userdata['user_level'] );
}
$db->sql_freeresult($result);
// log
#
#-----[ FIND ]------------------------------------------
#
$vote_id_sql .= ( ( $vote_id_sql != '' ) ? ', ' : '' ) . $row['vote_id'];
}
$db->sql_freeresult($result);
#
#-----[ AFTER, ADD ]------------------------------------------
#
//log mod
$sql = "SELECT forum_id, topic_title
FROM " . TOPICS_TABLE . "
WHERE topic_id IN ($topic_id_sql)
OR topic_moved_id IN ($topic_id_sql)";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete topics', '', __LINE__, __FILE__, $sql);
}
while ( $row = $db->sql_fetchrow($result) )
{
add_to_log ( $userdata['user_id'], 'delete', 'f', $row['forum_id'], $row['topic_title'], $newvalue, $userdata['user_level'] );
}
$db->sql_freeresult($result);
// log mod
#
#-----[ FIND ]------------------------------------------
#
$sql = "DELETE FROM " . TOPICS_WATCH_TABLE . "
WHERE topic_id = $topic_id";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
}
}
}
remove_search_post($post_id);
#
#-----[ REPLACE WITH ]------------------------------------------
#
$sql = "DELETE FROM " . TOPICS_WATCH_TABLE . "
WHERE topic_id = $topic_id";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
}
add_to_log ( $userdata['user_id'], 'delete', 'f', $forum_id, $topic_tit, $newvalue, $userdata['user_level'] );
}
else
{
add_to_log ( $userdata['user_id'], 'delete', 't', $topic_id, $oldvalue, $newvalue, $userdata['user_level'] );
}
}
else
{
add_to_log ( $userdata['user_id'], 'delete', 't', $topic_id, $oldvalue, $newvalue, $userdata['user_level'] );
}
remove_search_post($post_id);
scoobie wrote: Oh Yeah I left that out and uploaded it but there was a problem with functions.php too one of the lines didn't exist
I had to leave that file unchanged - seems to work though
Excellent MOD