/** * Check if the module has a correct name * Check (if trusted module is on) if the module name belongs to the trusted module list * Check if there is a module.xml file * Handles a cache as it is called very very very often */ function isValid($moduleName) { static $okNames = array(); if (isset($okNames[$moduleName])) { return $okNames[$moduleName]; } return $okNames[$moduleName] = CopixModule::_isValid($moduleName); }