Merged from MOODLE_14_STABLE: Default course id for htmlarea insert image to 0 rather than empty string to prevent invalid sql. Credit: Patrick Li

This commit is contained in:
mjollnir_
2005-05-11 02:05:59 +00:00
parent 4fd5abaa74
commit 7088c65545
+3 -3
View File
@@ -1501,13 +1501,13 @@ HTMLArea.prototype._insertImage = function(image) {
if(!empty($id)) {
if(isteacher($id)) {
echo "insert_image.php?id=";
print(isset($id) && !empty($id)) ? $id : "";
print(isset($id) && !empty($id)) ? $id : "0";
} else {
echo "insert_image_std.php?id=";
print(isset($id) && !empty($id)) ? $id : "";
print(isset($id) && !empty($id)) ? $id : "0";
}
} else {
echo "insert_image_std.php?id=";
echo "insert_image_std.php?id=0";
}?>", function(param) {
if (!param) { // user must have pressed Cancel
return false;