MDL-51395 blog: Fix output of strings for blog comments
authorJun Pataleta <jun@moodle.com>
Mon, 12 Oct 2015 20:47:57 +0000 (15:47 -0500)
committerJun Pataleta <jun@moodle.com>
Thu, 5 Nov 2015 05:46:31 +0000 (23:46 -0600)
blog/edit.php

index d82b244..7ff8333 100644 (file)
@@ -26,6 +26,7 @@
 require_once(dirname(dirname(__FILE__)).'/config.php');
 require_once('lib.php');
 require_once('locallib.php');
+require_once($CFG->dirroot .'/comment/lib.php');
 
 $action   = required_param('action', PARAM_ALPHA);
 $id       = optional_param('entryid', 0, PARAM_INT);
@@ -115,6 +116,9 @@ $output = $PAGE->get_renderer('blog');
 $strblogs = get_string('blogs', 'blog');
 
 if ($action === 'delete') {
+    // Init comment JS strings.
+    comment::init();
+
     if (empty($entry->id)) {
         print_error('wrongentryid', 'blog');
     }