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:38 +00:00
parent 10ed56e401
commit 82078e47be
+3 -3
View File
@@ -1441,13 +1441,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;