From: toyomoyo Date: Fri, 21 Apr 2006 02:47:01 +0000 (+0000) Subject: nothing much here either X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=e315e16c684cb0238087fa63d96160f6acee934b;p=moodle.git nothing much here either --- diff --git a/blog/edit.php b/blog/edit.php index 5e8ef8f9be..8878f46ae9 100755 --- a/blog/edit.php +++ b/blog/edit.php @@ -226,23 +226,25 @@ function do_save($post) { update_record('post', $dataobject); /// Associate tags with entries - $otags = optional_param('otags','', PARAM_INT); - $ptags = optional_param('ptags','', PARAM_INT); - + $tag = NULL; $tag->entryid = $entryID; $tag->userid = $USER->id; $tag->timemodified = time(); /// Add tags information - foreach ($otags as $otag) { - $tag->tagid = $otag; - insert_record('blog_tag_instance',$tag); + if ($otags = optional_param('otags','', PARAM_INT)) { + foreach ($otags as $otag) { + $tag->tagid = $otag; + insert_record('blog_tag_instance',$tag); + } } - foreach ($ptags as $ptag) { - $tag->tagid = $ptag; - insert_record('blog_tag_instance',$tag); + if ($ptags = optional_param('ptags','', PARAM_INT)) { + foreach ($ptags as $ptag) { + $tag->tagid = $ptag; + insert_record('blog_tag_instance',$tag); + } } print ''. get_string('entrysaved', 'blog') .'
';