Model translation fix, exposing Observer::notify('log_event') for frontend
Marek Murawski
Branch: marekmurawski/dashboard:i18n-frontend-fix
Branch: mvdkleijn/dashboard:master
Merged
Merged pull request
Merged in marekmurawski/dashboard/i18n-frontend-fix (pull request #1)
In model DashboardLogEntry.php beforeSave()
$this->message = __($this->message, array(':username' => $this->username));
With Wolf 0.7.6+ is rendering MISSING_DEFAULT_STRING for DB entries since the message has already been translated with :tokens changed to unrecognizable string from __() point of view. Removed this line.
Second issue:
Moved Observer::notify('log_event') and it's dependent function out of if('CMS_BACKEND') if-clause, so the Observer::notify('log_event') is now possible to log events from Frontend.