1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-05-17 16:28:19 +03:00

fix plugins

This commit is contained in:
Mzhelskiy Maxim 2011-08-29 14:48:36 +00:00
parent e93c02ced7
commit a163705e50

View file

@ -122,10 +122,11 @@ class ModulePlugin extends Module {
*/
protected function Xlang($oXml,$sProperty,$sLang) {
$sProperty=trim($sProperty);
$oXml->$sProperty->data = count($data=$oXml->xpath("{$sProperty}/lang[@name='{$sLang}']"))
? $this->Text_Parser(trim((string)array_shift($data)))
: $this->Text_Parser(trim((string)array_shift($oXml->xpath("{$sProperty}/lang[@name='default']"))));
if (!count($data=$oXml->xpath("{$sProperty}/lang[@name='{$sLang}']"))) {
$data=$oXml->xpath("{$sProperty}/lang[@name='default']");
}
$oXml->$sProperty->data=$this->Text_Parser(trim((string)array_shift($data)));
}
public function Toggle($sPlugin,$sAction) {