function patterns_db_trash_pattern in Patterns 7.2
Same name and namespace in other branches
- 7 includes/db.inc \patterns_db_trash_pattern()
Mark that pattern status as trashed 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_trash_pattern()
- patterns_trash_pattern_submit in ./
patterns.module - Executes patterns_db_trash_pattern() and display a message.
File
- includes/
db.inc, line 87 - Retrieve, save, and remove patterns from the database.
Code
function patterns_db_trash_pattern($pid) {
$trashed = db_update('patterns')
->fields(array(
'status' => PATTERNS_STATUS_TRASHED,
))
->condition('pid', $pid)
->execute();
return $trashed == 1 ? TRUE : FALSE;
}