You are here

function webfm_dbdelete_file in Web File Manager 5

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

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 that file.

Parameters

int $fid - file id of the file:

Return value

bool True if it worked False if it didn't

2 calls to webfm_dbdelete_file()
webfm_ajax in ./webfm.module
Ajax post requests
webfm_delete_file in ./webfm_file.inc

File

./webfm.module, line 2907

Code

function webfm_dbdelete_file($fid) {
  if (_webfm_dbdelete_file_fid($fid)) {

    //ignore err return of _webfm_dbdelete_attach_fid()
    _webfm_dbdelete_attach_fid($fid);
    return TRUE;
  }
  return FALSE;
}