diff --git a/e107_handlers/plugin_class.php b/e107_handlers/plugin_class.php index d5c6336d5..aed062675 100644 --- a/e107_handlers/plugin_class.php +++ b/e107_handlers/plugin_class.php @@ -2850,14 +2850,26 @@ class e107plugin $this->plug_vars['category'] = (isset($this->plug_vars['category'])) ? $this->manage_category($this->plug_vars['category']) : "misc"; $this->plug_vars['folder'] = $plugName; // remove the need for tag in plugin.xml. - if(varset($this->plug_vars['description']) && !is_array($this->plug_vars['description'])) + if(varset($this->plug_vars['description'])) { - $diz = $this->plug_vars['description']; - unset($this->plug_vars['description']); - - $this->plug_vars['description']['@value'] = $diz; + if (is_array($this->plug_vars['description'])) + { + if (isset($this->plug_vars['description']['@attributes']['lan']) && defined($this->plug_vars['description']['@attributes']['lan'])) + { + // Pick up the language-specific description if it exists. + $this->plug_vars['description']['@value'] = constant($this->plug_vars['description']['@attributes']['lan']); + } + } + else + { + $diz = $this->plug_vars['description']; + unset($this->plug_vars['description']); + + $this->plug_vars['description']['@value'] = $diz; + } } + // Very useful debug code.to compare plugin.php vs plugin.xml /* $testplug = 'forum';