cameronsto
01-02-2006, 18:12
Tried to add a service (not linked to a trigger or with 'show sla' marked) with an apostrophe in the name and got a sql error. I was able to fix this by making the following change.
Add this line:
$name=addslashes($name);
right before this line (line 50) in include/services.inc.php:
$sql="insert into services (name,status,algorithm,showsla,goodsla,sortorder) values ('$name',0,$algorithm,$showsla,$goodsla,$sortorder )";
-cameron
Add this line:
$name=addslashes($name);
right before this line (line 50) in include/services.inc.php:
$sql="insert into services (name,status,algorithm,showsla,goodsla,sortorder) values ('$name',0,$algorithm,$showsla,$goodsla,$sortorder )";
-cameron