/** * Searches for and returnes installed extensions. * * @access private * * @param boolean $fullInfo provide full info (read XML files) if true, otherwise only DB stored data * * @return array list of extensions */ private function _discoverInstalled($fullInfo = FALSE) { $result = array(); $dao = new CRM_Core_DAO_Extension(); $dao->find(); // TODO need bool? while ($dao->fetch()) { $ext = new CRM_Core_Extensions_Extension($dao->full_name, $dao->type, $dao->name, $dao->label, $dao->file, $dao->is_active); $ext->setInstalled(); $ext->setId((int) $dao->id); if ($fullInfo) { if ($ext->hasXMLInfo()) { $ext->readXMLInfo(); } else { $ext->setMissing(); CRM_Core_Session::setStatus(ts('The extension %1 (%2) is listed as installed, but expected files(s) including info.xml are missing. Has this site been moved to a different server location?', array(1 => $dao->label, 2 => $dao->full_name)) . '<br/>'); } } $result[(int) $dao->id] = $ext; } return $result; }