/** * Get system parameters * * @param string $xmlstring XML String * * @return string */ function getSystemParams($xmlstring) { // Initialize variables $params = null; $item = $this->getDatabaseValue(); if (isset($item->params)) { // $params = new JParameter($item->params); // Strict standards: Declaration of JParameter::loadSetupFile() should be compatible with that of JRegistry::loadSetupFile() $params = $item->params; if (!$item->params instanceof JRegistry) { $params = new JRegistry($item->params); } //update value to make it compatible with old parameter if (!$params->get('mega_subcontent_mod_modules', '') && $params->get('mega_subcontent-mod-modules')) { $params->set('mega_subcontent_mod_modules', $params->get('mega_subcontent-mod-modules')); } if (!$params->get('mega_subcontent_pos_positions', '') && $params->get('mega_subcontent-pos-positions')) { $params->set('mega_subcontent_pos_positions', $params->get('mega_subcontent-pos-positions')); } } else { // $params = new JParameter(""); // Strict standards: Declaration of JParameter::loadSetupFile() should be compatible with that of JRegistry::loadSetupFile() $params = new JRegistry(''); } $xml = JFactory::getXML($xmlstring, false); if ($xml) { $document =& $xml->document; $params->setXML($document->getElementByPath('state/params')); } return $params->render('params'); }