function flipping_book_delete in Flipping Book 7
Delete a flipping_book.
Parameters
int $fbid: The Flipping Book ID.
Return value
bool
1 call to flipping_book_delete()
- flipping_book_delete_confirm_submit in includes/
flipping_book.admin.inc - Executes flipping book deletion.
File
- ./
flipping_book.module, line 143 - Manage Flipping Book packages into Drupal
Code
function flipping_book_delete($fbid) {
$flipping_book = flipping_book_load($fbid);
$path = pathinfo(drupal_realpath($flipping_book->uri), PATHINFO_DIRNAME);
if (file_unmanaged_delete_recursive($path)) {
$result = db_delete('flipping_book')
->condition('fbid', $fbid, '=')
->execute();
}
else {
$result = FALSE;
}
return $result;
}