You are here

function ultimate_cron_get_default_settings in Ultimate Cron 8

Same name and namespace in other branches
  1. 6 ultimate_cron.module \ultimate_cron_get_default_settings()
  2. 7 ultimate_cron.module \ultimate_cron_get_default_settings()

Get default settings for job.

Parameters

type $module:

type $name:

Return value

array

1 call to ultimate_cron_get_default_settings()
ultimate_cron_get_hooks in ./ultimate_cron.module
Get cron hooks available.

File

./ultimate_cron.module, line 1072
@todo Add filter on overview page. @todo Add log view (with graph). @todo Make proper markup for overview page. @todo Refactor drush stuff, too many intimate relations with Background Process @todo Refactor Cron % offset stuff. Too mixed up and…

Code

function ultimate_cron_get_default_settings($module, $name, $default_rule) {
  $conf = module_invoke($module, 'cronapi', 'settings', $name);
  if (!is_array($conf)) {
    $conf = array();
  }
  $rule = module_invoke($module, 'cronapi', 'rule', $name);
  if (empty($conf['rules']) && !empty($rule)) {
    $conf['rules'] = is_array($rule) ? $rule : array(
      $rule,
    );
  }
  $conf += _ultimate_cron_default_settings($default_rule);
  return $conf;
}