From 55c6372e288bfa71022e6968aa4802d17b6190dc Mon Sep 17 00:00:00 2001 From: David Mudrak Date: Thu, 22 Apr 2010 21:13:53 +0000 Subject: [PATCH] MDL-15252 Fixed regression: XMLDB action using optionally defined strings To prevent debugging warning, we check if the string is defined first. In this case it does not make sense to add new string for every action as the title is not actually displayed anywhere. --- admin/xmldb/actions/XMLDBAction.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/admin/xmldb/actions/XMLDBAction.class.php b/admin/xmldb/actions/XMLDBAction.class.php index 6e757318fb9..c388ced9ca3 100644 --- a/admin/xmldb/actions/XMLDBAction.class.php +++ b/admin/xmldb/actions/XMLDBAction.class.php @@ -126,7 +126,11 @@ class XMLDBAction { */ function loadStrings($strings) { /// Load some commonly used strings - $this->str['title'] = get_string($this->title, 'xmldb'); + if (get_string_manager()->string_exists($this->title, 'xmldb')) { + $this->str['title'] = get_string($this->title, 'xmldb'); + } else { + $this->str['title'] = $this->title; + } /// Now process the $strings array loading it in the $str atribute if ($strings) { -- 2.43.0