MDL-38091 fixed bug with SQL query on Oracle
authorMarina Glancy <marina@moodle.com>
Wed, 20 Feb 2013 01:52:33 +0000 (12:52 +1100)
committerMarina Glancy <marina@moodle.com>
Sat, 23 Feb 2013 01:06:21 +0000 (12:06 +1100)
lib/filestorage/file_storage.php

index 9c44430..aa41c1b 100644 (file)
@@ -1852,8 +1852,8 @@ class file_storage {
         $referencehash = sha1($reference);
 
         $sql = "SELECT repositoryid, id FROM {files_reference}
-                 WHERE referencehash = ? and reference = ?";
-        $rs = $DB->get_recordset_sql($sql, array($referencehash, $reference));
+                 WHERE referencehash = ?";
+        $rs = $DB->get_recordset_sql($sql, array($referencehash));
 
         $now = time();
         foreach ($rs as $record) {