From b7bad38b377c83ad2655a2e5a35d3c2c5a129d5d Mon Sep 17 00:00:00 2001 From: skodak Date: Sat, 28 Mar 2009 22:18:53 +0000 Subject: [PATCH] DML fix --- repository/ws.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repository/ws.php b/repository/ws.php index 95c4fc461b..bda2dfdb65 100644 --- a/repository/ws.php +++ b/repository/ws.php @@ -84,8 +84,8 @@ /// Get repository instance information $sql = 'SELECT i.name, i.typeid, r.type FROM {repository} r, {repository_instances} i '. - 'WHERE i.id='.$repo_id.' AND i.typeid=r.id'; - if (!$repository = $DB->get_record_sql($sql)) { + 'WHERE i.id=? AND i.typeid=r.id'; + if (!$repository = $DB->get_record_sql($sql, array($repo_id))) { $err = new stdclass; $err->e = get_string('invalidrepositoryid', 'repository'); die(json_encode($err)); -- 2.39.5