You are here

function patterns_publish_pattern in Patterns 6

Same name and namespace in other branches
  1. 6.2 patterns.module \patterns_publish_pattern()
  2. 7.2 includes/servers.inc \patterns_publish_pattern()
  3. 7 includes/servers.inc \patterns_publish_pattern()
1 string reference to 'patterns_publish_pattern'
patterns_menu in ./patterns.module
Implementation of hook_menu().

File

./patterns.module, line 502
Enables extremely simple adding/removing features to your site with minimal to no configuration

Code

function patterns_publish_pattern($pid) {
  if (is_numeric($pid)) {
    $result = db_query("UPDATE {patterns} SET public = 1 WHERE pid = %d", $pid);
  }
  drupal_set_message('Pattern published.');
  drupal_goto('admin/build/patterns');
}