You are here

function drush_patterns_allow_publish in Patterns 7

Same name and namespace in other branches
  1. 7.2 patterns.drush.inc \drush_patterns_allow_publish()

patterns list command callback.

File

./patterns.drush.inc, line 278
Drush Patterns module commands

Code

function drush_patterns_allow_publish($action) {
  if (in_array($action, 'enable', 'en', 'yes', 'y')) {
    drush_print("Patterns publishing patterns enabled.");
    variable_set('patterns_allow_publish', TRUE);
  }
  else {
    if (in_array($action, 'disable', 'dis', 'no', 'n')) {
      drush_print("Patterns publishing patterns disabled.");
      variable_set('patterns_allow_publish', FALSE);
    }
    else {
      drush_set_error(dt("Unrecognized option."));
    }
  }
}