XF 2.0 Check if an addon is installed

nocte

Well-known member
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?
 
Top Bottom