diff --git a/lang/en/blog.php b/lang/en/blog.php index 5f10488ae7b..edf9dab207d 100644 --- a/lang/en/blog.php +++ b/lang/en/blog.php @@ -88,7 +88,6 @@ $string['entrysaved'] = 'Your entry has been saved'; $string['entrytitle'] = 'Entry title'; $string['entryupdated'] = 'Blog entry updated'; $string['evententryadded'] = 'Blog entry added'; -$string['evententryaddeddesc'] = 'Blog entry "{$a->subject}" was created by user with id {$a->userid}'; $string['externalblogcrontime'] = 'External blog cron schedule'; $string['externalblogdeleteconfirm'] = 'Unregister this external blog?'; $string['externalblogdeleted'] = 'External blog unregistered'; diff --git a/lib/classes/event/blog_entry_created.php b/lib/classes/event/blog_entry_created.php index a78161e29d5..9c2718b3334 100644 --- a/lib/classes/event/blog_entry_created.php +++ b/lib/classes/event/blog_entry_created.php @@ -61,22 +61,19 @@ class blog_entry_created extends \core\event\base { /** * Returns localised general event name. * - * @return \lang_string + * @return string */ public static function get_name() { - return new \lang_string("evententryadded", "core_blog"); + return get_string("evententryadded", "core_blog"); } /** - * Returns localised description of what happened. + * Returns non-localised event description with id's for admin use only. * - * @return \lang_string + * @return string */ public function get_description() { - $a = new \stdClass(); - $a->subject = $this->other['subject']; - $a->userid = $this->userid; - return new \lang_string("evententryaddeddesc", "core_blog", $a); + return 'Blog entry "'. $this->other['subject']. '" was created by user with id '. $this->userid; } /**