- Модуль: main
- Путь к файлу: ~/bitrix/modules/main/classes/general/update_client_partner.php
- Класс: CUpdateClientPartner
- Вызов: CUpdateClientPartner::__GetModuleInfo
static function __GetModuleInfo($path)
{
$arModuleVersion = array();
include_once($path."/install/index.php");
$module_code = basename($path);
$class_name = str_replace(".", "_", $module_code);
if (!class_exists($class_name))
{
return array();
}
$cls = new $class_name;
if (!method_exists($cls, '__construct') && method_exists($cls, $class_name))
{
// old classes don't have a constructor
$cls->$class_name();
}
$result = array(
"VERSION" => $cls->MODULE_VERSION,
"VERSION_DATE" => $cls->MODULE_VERSION_DATE,
"IS_DEMO" => ((defined($class_name."_DEMO") && constant($class_name."_DEMO")) ? "Y" : "N"),
"ACTIVE" => "Y",
);
if($result["IS_DEMO"] == "Y" && IsModuleInstalled($module_code) && CModule::IncludeModuleEx($module_code) == MODULE_DEMO_EXPIRED)
$result["ACTIVE"] = "N";
return $result;
}