public static function checkAddon($addons) { $return = ''; foreach ($addons as $name => $version) { if (is_int($name)) { $name = $version; $version = false; } if (isset(rp::get('addons')[$name])) { $config = rp::get('addons')[$name]; } if (!isset($config) || !is_array($config)) { $return .= sprintf(lang::get('addon_not_found'), $name); continue; } if (!addonConfig::isActive($name)) { $return .= sprintf(lang::get('addon_not_install_active'), $name); continue; } if (rp::checkVersion($config['version'], $version) === false) { $return .= sprintf(lang::get('addon_need_version'), $name, $version); continue; } } if ($return == '') { return true; } else { return $return; } }