function _coder_get_default_settings in Coder 5
Same name and namespace in other branches
- 5.2 coder.module \_coder_get_default_settings()
- 6.2 coder.module \_coder_get_default_settings()
- 6 coder.module \_coder_get_default_settings()
2 calls to _coder_get_default_settings()
- coder_admin_settings in ./
coder.module - Implementation of settings page for Drupal 5
- coder_page_form in ./
coder.module
File
- ./
coder.module, line 393 - Developer Module that assists with code review and version upgrade that supports a plug-in extensible hook system so contributed modules can define additional review standards.
Code
function _coder_get_default_settings($args = 'default') {
$settings['coder_reviews'] = variable_get('coder_reviews', _coder_default_reviews());
$settings['coder_severity'] = variable_get('coder_severity', 5);
$settings['coder_cache'] = variable_get('coder_cache', 1);
// determine any options based on the passed in URL,
switch ($args) {
case 'settings':
$settings['coder_includes'] = 1;
break;
case 'active':
$settings['coder_active_modules'] = 1;
break;
case 'core':
$settings['coder_core'] = 1;
$settings['coder_includes'] = 1;
break;
case 'all':
$settings['coder_core'] = 1;
$settings['coder_includes'] = 1;
$settings['coder_all'] = 1;
break;
case 'default':
$settings['coder_active_modules'] = variable_get('coder_active_modules', 1);
$settings['coder_core'] = variable_get('coder_core', 0);
$settings['coder_includes'] = variable_get('coder_includes', 0);
$settings['coder_modules'] = variable_get('coder_modules', array());
$settings['coder_themes'] = variable_get('coder_themes', array());
break;
default:
$settings['coder_includes'] = 1;
// TODO: does this need to go into coder_themes sometimes?
$settings['coder_modules'] = array(
$args => $args,
);
break;
}
return $settings;
}