public static function checkSettings()
{
$warnings = array();
$akismetModules = self::getModulesThatRequireAkismet();
$googleMapsModules = self::getModulesThatRequireGoogleMaps();
// check if this action is allowed
if (BackendAuthentication::isAllowedAction('Index', 'Settings')) {
// check if the akismet key is available if there are modules that require it
if (!empty($akismetModules) && BackendModel::get('fork.settings')->get('Core', 'akismet_key', null) == '') {
// add warning
$warnings[] = array('message' => sprintf(BL::err('AkismetKey'), BackendModel::createURLForAction('Index', 'Settings')));
}
// check if the google maps key is available if there are modules that require it
if (!empty($googleMapsModules) && BackendModel::get('fork.settings')->get('Core', 'google_maps_key', null) == '') {
// add warning
$warnings[] = array('message' => sprintf(BL::err('GoogleMapsKey'), BackendModel::createURLForAction('Index', 'Settings')));
}
}
// check if this action is allowed
if (BackendAuthentication::isAllowedAction('Modules', 'Extensions')) {
// check if there are cronjobs that are not yet set
$modules = self::getModules();
foreach ($modules as $module) {
if (isset($module['cronjobs_active']) && !$module['cronjobs_active']) {
// add warning
$warnings[] = array('message' => sprintf(BL::err('CronjobsNotSet', 'Extensions'), BackendModel::createURLForAction('Modules', 'Extensions')));
break;
}
}
}
return $warnings;
}