You are here

function drush_classified_notify in Classified Ads 6.3

Same name and namespace in other branches
  1. 7.3 classified.drush.inc \drush_classified_notify()

Command callback for classified-notify

Return value

void No output: nothing to return.

File

./classified.drush.inc, line 129
Drush plugin for classified.module

Code

function drush_classified_notify($kind = NULL) {
  if (!in_array($kind, _classified_get_notify_kinds())) {
    drush_set_error(dt('Incorrect notify kind: @kind', array(
      '@kind' => $kind,
    )));
    return FALSE;
  }
  module_load_include('inc', 'classified', 'classified.scheduled');
  $notify = _classified_scheduled_build_notify($kind);
  $params = _classified_drush_get_action_stats($notify);
  $params['@kind'] = $kind;
  drush_log(dt('Notifications for @kind sent to @user_count users about @node_count ads.', $params), 'success');
}