function _prod_check_functions in Production check & Production monitor 7
Same name and namespace in other branches
- 6 prod_check.module \_prod_check_functions()
Keyed array containing all check functions and their description so they can be easily executed from a simple loop. If you add a new function, add it here as well, or it will never be executed. NOTE: NO use of t() here since we'll be doing that later! This content has to be translated by the site displaying it: Prod check or Prod monitor!
4 calls to _prod_check_functions()
- drush_prod_check_status in ./
prod_check.drush.inc - Status page callback
- prod_check_get_settings in ./
prod_check.module - XMLRPC version of _prod_check_functions() Returnes a keyed array of functions that can be parsed by the reciever into a form or status page.
- prod_check_status in includes/
prod_check.admin.inc - Build status page.
- _prod_check_functions_as_form in includes/
prod_check.admin.inc - Parse the functions array and return a form fieldset with different sets of checkboxes so it can be inserted 'as is' in another form array for rendering. This is primlarily still here for integration with Nagios. Though not in use now since…
File
- ./
prod_check.module, line 569
Code
function _prod_check_functions() {
$functions = array();
// Settings
$functions['settings'] = array(
'title' => 'Settings',
'description' => 'Checks wether various settings are fit for a production environment.',
'functions' => array(
'_prod_check_error_reporting' => 'Error reporting',
'_prod_check_user_register' => 'User registration',
'_prod_check_site_mail' => 'Site e-mail',
'_prod_check_poormanscron' => 'Cron',
),
);
// Server
$functions['server'] = array(
'title' => 'Server',
'description' => 'Checks certain server side parameters such as APC.',
'functions' => array(
'_prod_check_apc_opc' => 'APC/OPcache',
'_prod_check_dblog_php' => 'PHP errors',
'_prod_check_release_notes' => 'Release notes',
),
);
// Performance settings
$functions['performance'] = array(
'title' => 'Performance',
'description' => 'Checks if performance settings are OK for production use.',
'functions' => array(
'_prod_check_page_cache' => 'Page caching',
'_prod_check_page_compression' => 'Page compression',
'_prod_check_boost' => 'Boost settings',
'_prod_check_block_cache' => 'Block cache',
'_prod_check_preprocess_css' => 'Optimize CSS files',
'_prod_check_preprocess_js' => 'Optimize JavaScript files',
),
);
// Security
$functions['security'] = array(
'title' => 'Security',
'description' => 'Various security related checks.',
'functions' => array(
'_prod_check_node_available' => 'Is /node available?',
/*'_prod_check_user_pass' => 'User passwords',*/
'_prod_check_anonymous_rights' => 'Anonymous user rights',
'_prod_check_admin_username' => 'Is user 1 named "admin"?',
),
);
// Modules
$functions['modules'] = array(
'title' => 'Modules',
'description' => "Checks if certain modules are on or off and if they're properly configured.",
'functions' => array(
'_prod_check_contact' => 'Contact',
'_prod_check_devel' => 'Devel',
'_prod_check_search_config' => 'Search config',
'_prod_check_update_status' => 'Update status',
'_prod_check_webform' => 'Webform',
'_prod_check_mimemail' => 'Mimemail',
'_prod_check_missing_module_files' => 'Active modules',
),
);
// SEO
$functions['seo'] = array(
'title' => 'SEO',
'description' => 'Checks if basic SEO modules are enabled.',
'functions' => array(
'_prod_check_googleanalytics' => 'Google Analytics',
'_prod_check_metatag' => 'Metatag',
'_prod_check_page_title' => 'Page titles',
'_prod_check_pathauto' => 'Path auto',
'_prod_check_redirect' => 'Redirect',
'_prod_check_www' => 'WWW redirect',
'_prod_check_xmlsitemap' => 'XML sitemap',
),
);
// Production monitor only!
$functions['prod_mon'] = array(
'title' => 'Production monitor',
'description' => 'Specific checks that only work with Production monitor!',
'functions' => array(
'_prod_check_module_list' => 'Check module updates',
'_prod_check_cron_last' => 'Report last cron run',
),
);
// Invoke hook_prod_check_alter() here to add additional checks implemented by third
// party modules.
drupal_alter('prod_check', $functions);
return $functions;
}