Commit beb47020 authored by slopez's avatar slopez
Browse files

une erreur sql

parent 5c4c0482
...@@ -49,12 +49,12 @@ class reactonforum extends stdcontents ...@@ -49,12 +49,12 @@ class reactonforum extends stdcontents
$conds = array(); $conds = array();
foreach ($params as $key => $value) foreach ($params as $key => $value)
{ {
if ( is_null($value) ) if ( is_null($value) )
$conds []= "(`frm_sujet`.`" . $key . "` is NULL)"; $conds []= "(`frm_sujet`.`" . $key . "` is NULL)";
else else
$conds []= "(`frm_sujet`.`" . $key . "`='" . mysql_escape_string($value) . "')"; $conds []= "(`frm_sujet`.`" . $key . "`='" . mysql_escape_string($value) . "')";
} }
$sqlconds = implode(" AND ",$conds); $sqlconds = implode(" AND ",$conds);
...@@ -68,7 +68,7 @@ class reactonforum extends stdcontents ...@@ -68,7 +68,7 @@ class reactonforum extends stdcontents
"WHERE ((droits_acces_forum & 0x1) OR " . "WHERE ((droits_acces_forum & 0x1) OR " .
"((droits_acces_forum & 0x10) AND id_groupe IN ($grps)) OR " . "((droits_acces_forum & 0x10) AND id_groupe IN ($grps)) OR " .
"(id_groupe_admin IN ($grps)) OR " . "(id_groupe_admin IN ($grps)) OR " .
"((droits_acces_forum & 0x100) AND id_utilisateur='".$user->id."')) ". "((droits_acces_forum & 0x100) AND frm_sujet.id_utilisateur='".$user->id."')) ".
"AND $sqlconds"); "AND $sqlconds");
} }
else else
...@@ -102,8 +102,8 @@ class reactonforum extends stdcontents ...@@ -102,8 +102,8 @@ class reactonforum extends stdcontents
} }
$context = ""; $context = "";
foreach ($params as $key => $value) foreach ($params as $key => $value)
$context .= " &".$key."=".urlencode($value); $context .= " &".$key."=".urlencode($value);
$id_forum = 3; $id_forum = 3;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment