<?php
//Check all of this on the pre-page
$out = FreePBX::Modules()->getInfo("digiumaddoninstaller");
//only do this if they have sysadmin installed
if(!empty($out['digiumaddoninstaller']['status']) &&
		($out['digiumaddoninstaller']['status'] == MODULE_STATUS_ENABLED || $out['digiumaddoninstaller']['status'] == MODULE_STATUS_NEEDUPGRADE || $out['digiumaddoninstaller']['status'] == MODULE_STATUS_DISABLED) &&
		version_compare_freepbx($out['digiumaddoninstaller']['version'],'2.11.0.10','le')) {
	out(_("Digium Addon Installer needs to be version 2.11.0.11 or higher before an upgrade is allowed"));
	return false;
}
