Changeset View
Changeset View
Standalone View
Standalone View
core/units/modules/modules_tag_processor.php
Show All 30 Lines | |||||
if (!$this->_hasPrivileges()) { | if (!$this->_hasPrivileges()) { | ||||
// don't show licenses status for non-privileged users | // don't show licenses status for non-privileged users | ||||
return true; | return true; | ||||
} | } | ||||
$object = $this->getObject($params); | $object = $this->getObject($params); | ||||
/* @var $object kDBList */ | /* @var $object kDBList */ | ||||
$modules_helper = $this->Application->recallObject('ModulesHelper'); | $modules_helper = $this->Application->recallObject('kModulesHelper'); | ||||
/* @var $modules_helper kModulesHelper */ | /* @var $modules_helper kModulesHelper */ | ||||
return $modules_helper->moduleInstalled( $object->GetDBField('Name') ); | return $modules_helper->moduleInstalled( $object->GetDBField('Name') ); | ||||
} | } | ||||
function ModuleLicensed($params) | function ModuleLicensed($params) | ||||
{ | { | ||||
if (!$this->_hasPrivileges()) { | if (!$this->_hasPrivileges()) { | ||||
// don't show licenses status for non-privileged users | // don't show licenses status for non-privileged users | ||||
return true; | return true; | ||||
} | } | ||||
$object = $this->getObject($params); | $object = $this->getObject($params); | ||||
/* @var $object kDBList */ | /* @var $object kDBList */ | ||||
$modules_helper = $this->Application->recallObject('ModulesHelper'); | $modules_helper = $this->Application->recallObject('kModulesHelper'); | ||||
/* @var $modules_helper kModulesHelper */ | /* @var $modules_helper kModulesHelper */ | ||||
$licensed_modules = array_map('strtolower', $modules_helper->_GetModules()); | $licensed_modules = array_map('strtolower', $modules_helper->_GetModules()); | ||||
return in_array(strtolower($object->GetDBField('Name')), $licensed_modules); | return in_array(strtolower($object->GetDBField('Name')), $licensed_modules); | ||||
} | } | ||||
function PrerequisitesMet($params) | function PrerequisitesMet($params) | ||||
▲ Show 20 Lines • Show All 45 Lines • ▼ Show 20 Line(s) | |||||
/* @var $object kDBList */ | /* @var $object kDBList */ | ||||
$module_path = strtolower( $object->GetDBField('Path') ); | $module_path = strtolower( $object->GetDBField('Path') ); | ||||
$url_params = Array ('redirect' => 1, 'admin' => 1); | $url_params = Array ('redirect' => 1, 'admin' => 1); | ||||
return $this->Application->HREF('dummy', '_FRONT_END_', $url_params, $module_path . 'install.php'); | return $this->Application->HREF('dummy', '_FRONT_END_', $url_params, $module_path . 'install.php'); | ||||
} | } | ||||
} | } | ||||
No newline at end of file |