You are here

function patterns_db_restore_pattern in Patterns 7.2

Same name and namespace in other branches
  1. 7 includes/db.inc \patterns_db_restore_pattern()

Mark that pattern status as OK in the database.

Parameters

mixed $pid: The id of the pattern to remove.

Return value

bool TRUE on success, FALSE otherwise.

1 call to patterns_db_restore_pattern()
patterns_restore_pattern_submit in ./patterns.module
Executes patterns_db_restore_pattern($pid) and display a message.

File

includes/db.inc, line 104
Retrieve, save, and remove patterns from the database.

Code

function patterns_db_restore_pattern($pid) {
  $ok = db_update('patterns')
    ->fields(array(
    'status' => PATTERNS_STATUS_OK,
  ))
    ->condition('pid', $pid)
    ->execute();
  return $ok == 1 ? TRUE : FALSE;
}