From 7088c65545f22fe7d352811c84190776d370b005 Mon Sep 17 00:00:00 2001 From: mjollnir_ Date: Wed, 11 May 2005 02:05:59 +0000 Subject: [PATCH] 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 --- lib/editor/htmlarea.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/editor/htmlarea.php b/lib/editor/htmlarea.php index fc21d8c947e..f8937a6301e 100644 --- a/lib/editor/htmlarea.php +++ b/lib/editor/htmlarea.php @@ -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;