- Modificatie & Versie:
Directe link naar de modificatie: http://phpbb3.oxpus.net/downloads.php?v ... il&df_id=1 / https://www.phpbb.com/customise/db/mod/ultimate_points/
Adres van je forum: http://www.roddelkwartier.nl
phpBB versie: 3.0.12
Wat is het probleem?
En wanneer ik nu een bestand wil uploaden in die dowload modificatie krijg ik deze SQL fout.
Wat heel raar is, want het punten systeem heeft niets te maken met die download mod..
Gebruikers ontvangen geen punten voor het up / downloaden
Code: Selecteer alles
SQL ERROR [ mysqli ]
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 'WHERE user_id = 0' at line 3 [1064]
SQL
UPDATE phpbb_users SET user_points = user_points - WHERE user_id = 0
BACKTRACE
FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()
FILE: [ROOT]/includes/db/dbal.php
LINE: 757
CALL: trigger_error()
FILE: [ROOT]/includes/db/mysqli.php
LINE: 189
CALL: dbal->sql_error()
FILE: [ROOT]/includes/points/functions_points.php
LINE: 385
CALL: dbal_mysqli->sql_query()
FILE: [ROOT]/includes/functions_posting.php
LINE: 2531
CALL: substract_points()
FILE: [ROOT]/dl_mod/classes/class_dl_topic.php
LINE: 589
CALL: submit_post()
FILE: [ROOT]/dl_mod/includes/dl_modcp.php
LINE: 675
CALL: dl_topic::update_topic()
FILE: [ROOT]/downloads.php
LINE: 860
CALL: include('[ROOT]/dl_mod/includes/dl_modcp.php')
het heeft te maken met deze code, Want het gebeurd enkel als je een download bewerkt zie ik net..
Bij het uploaden van een nieuw bestand gaat alles goed..
Code: Selecteer alles
/*
* reset reported broken download if allowed
*/
if ($view == 'unbroken' && $df_id && $cat_id)
{
$cat_auth = array();
$cat_auth = dl_auth::dl_cat_auth($cat_id);
if (isset($index[$cat_id]['auth_mod']) && $index[$cat_id]['auth_mod'] || isset($cat_auth['auth_mod']) && $cat_auth['auth_mod'] || ($auth->acl_get('a_') && $user->data['is_registered']))
{
$sql = 'UPDATE ' . DOWNLOADS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', array(
'broken' => 0)) . ' WHERE id = ' . (int) $df_id;
$db->sql_query($sql);
}
redirect(append_sid("{$phpbb_root_path}downloads.$phpEx", "view=detail&df_id=$df_id&cat_id=$cat_id"));
}