function patterns_db_restore_pattern in Patterns 7
Same name and namespace in other branches
- 7.2 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 in ./
patterns.module - Restores a previously trashed pattern.
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;
}