nocte Well-known member Feb 16, 2018 #1 This works: PHP: if (\XF::finder('XF::Addon')->where('active', 1)->where('addon_id', 'XFMG')->fetchOne()) { $this->activeAddons[] = 'XFMG'; } But how can I check if an addon is installed without a db query?
This works: PHP: if (\XF::finder('XF::Addon')->where('active', 1)->where('addon_id', 'XFMG')->fetchOne()) { $this->activeAddons[] = 'XFMG'; } But how can I check if an addon is installed without a db query?
DragonByte Tech Well-known member Feb 16, 2018 #2 PHP: $addOns = \XF::app()->container('addon.cache'); $hasCredits = array_key_exists('DBTech/Credits', $addOns); Fillip
PHP: $addOns = \XF::app()->container('addon.cache'); $hasCredits = array_key_exists('DBTech/Credits', $addOns); Fillip
Jaxel Well-known member Apr 10, 2018 #3 Does this cache only cache addons that are installed AND enabled?