function prod_check_prod_mode_form in Production check & Production monitor 7
Same name and namespace in other branches
- 6 includes/prod_check.admin.inc \prod_check_prod_mode_form()
Setup site for production mode.
1 string reference to 'prod_check_prod_mode_form'
- prod_check_menu in ./
prod_check.module - Implementation of hook_menu()
File
- includes/
prod_check.admin.inc, line 528
Code
function prod_check_prod_mode_form() {
drupal_set_title(t('Switch to production mode'));
$form = array();
// Put this in hook_help() first but some themes hide the help text. It's too
// important to be hidden, so moved it here.
$form['help'] = array(
'#markup' => '<p>' . t('Submitting this form will switch this website to <em>production mode</em>. This means that various settings will be adjusted in order to fix most of the problems reported on the status page. <strong>Some modules will be disabled as well!</strong>') . '</p>',
);
$form['site_mail'] = array(
'#type' => 'textfield',
'#title' => t('Site e-mail address'),
'#description' => t('This field is optional and will be used to setup the default e-mail address of this site. <strong>Currently set to %mail.</strong>', array(
'%mail' => variable_get('site_mail', '[not set]'),
)),
);
if (module_exists('webform')) {
$form['webform_default_from_address'] = array(
'#type' => 'textfield',
'#title' => t('Webform default from e-mail address'),
'#description' => t('This field is optional and will be used to setup the default from e-mail address for <em>Webform</em>. <strong>Currently set to %mail.</strong>', array(
'%mail' => variable_get('webform_default_from_address', '[not set]'),
)),
);
}
if (module_exists('googleanalytics')) {
$form['googleanalytics_account'] = array(
'#type' => 'textfield',
'#title' => t('Google Analytics Web Property ID'),
'#description' => t('This field is optional and will be used to setup the <em>Google Analytics</em> account. <strong>Currently set to %account.</strong>', array(
'%account' => variable_get('googleanalytics_account', '[not set]'),
)),
);
}
$form['block_cache'] = array(
'#type' => 'checkbox',
'#title' => t('Enable <em>Block cache</em>'),
'#description' => t("If ticked, this will enable block caching. <strong>This can cause unwanted results if custom blocks don't handle caching well!</strong>"),
);
if (module_exists('dblog')) {
$form['dblog'] = array(
'#type' => 'checkbox',
'#title' => t('Disable <em>Database logging</em>'),
'#description' => t('If ticked, this will disable the <em>dblog</em> module wich could generate too much overhead on high traffic sites.'),
);
}
$form['nagios'] = array(
'#type' => 'checkbox',
'#title' => t('Enable <em>Nagios</em>'),
'#description' => t('If ticked, this will enable the <em>Nagios</em> monitoring module if it is present.'),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Enable production mode'),
);
return $form;
}