[svn r15157] escaping the title of each slides when inserting into the database: using Database::

skala
Arnaud Ligot 17 years ago
parent 941a296905
commit cd431ec2eb
  1. 4
      main/inc/lib/fileUpload.lib.php

@ -1189,8 +1189,8 @@ function add_document($_course,$path,$filetype,$filesize,$title,$comment=NULL, $
$table_document = Database::get_course_table(TABLE_DOCUMENT,$_course['dbName']);
$sql="INSERT INTO $table_document
(`path`,`filetype`,`size`,`title`, `comment`, readonly)
VALUES ('$path','$filetype','$filesize','".mysql_escape_string($title)."
', '$comment',$readonly)";
VALUES ('$path','$filetype','$filesize','".
Database::escape_string($title)."', '$comment',$readonly)";
if(api_sql_query($sql,__FILE__,__LINE__))
{
//display_message("Added to database (id ".mysql_insert_id().")!");

Loading…
Cancel
Save