You are here

function _webfm_dbdelete_file_fid in Web File Manager 5

Same name and namespace in other branches
  1. 5.2 webfm.module \_webfm_dbdelete_file_fid()

Helper function that deletes db entries from the webfm_file table given an fid called from webfm_dbdelete_file

Parameters

int $fid:

Return value

bool

2 calls to _webfm_dbdelete_file_fid()
webfm_cron in ./webfm.module
Implementation of hook_cron().
webfm_dbdelete_file in ./webfm.module
webfm_dbdelete_file - Deletes all database references to a file given and fid Calling this function will delete the file from the webfm_file table AS WELL AS the webfm_attach table therefore any nodes that have this file attached to them will lose…

File

./webfm.module, line 2923

Code

function _webfm_dbdelete_file_fid($fid) {
  $query = 'DELETE FROM {webfm_file} WHERE fid = %d';
  $result = db_query($query, $fid);
  if ($result === FALSE) {
    drupal_set_message(t('Query Failed: Could not delete file %fid .', array(
      '%fid' => $fid,
    ), error));
    return FALSE;
  }
  return TRUE;
}