예제 #1
0
		}
	}
	
	// Enable modules
	elseif($get_action == "enable" && $get_module)
	{
		// Check if this module licensed
		if (!License::IsModuleLicensed($get_module))
			throw new LicensingException("Your license does not permit module {$get_module}. For additional module purchases, please contact sales@webta.net");
 
		if (CONFIG::$DEV_DEMOMODE != 1)
		{
			$get_module = preg_replace("/[^A-Za-z0-9_-]+/", "", $get_module);
		    
			// Validate Manifest
			RegistryManifest::LoadCompiledManifest(CONFIG::$PATH."/modules/registries/{$get_module}/module.xml", true);
			$res = RegistryManifest::Validate(CONFIG::$PATH."/modules/registries/{$get_module}/module.xml");
			if ($res !== true)
			{
				Log::Log($res, E_USER_ERROR);
				$errmsg = sprintf(_("Module %s XML manifest did not pass validation. The following errors occured:"), $get_module);
				$err[] = $res;
			}
			
			if (!$errmsg)
			{
				try
				{
			    	$Registry = $RegistryModuleFactory->GetRegistryByName($get_module, true);
				}
				catch (Exception $e)