You are here

function webfm_cron in Web File Manager 5

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

Implementation of hook_cron().

2 string references to 'webfm_cron'
webfm_admin_settings in ./webfm.module
Implementation of hook_settings().
webfm_uninstall in ./webfm.install
Implementation of hook_uninstall().

File

./webfm.module, line 533

Code

function webfm_cron() {

  //cleanup any corrupted file records that have no physical files

  //Warning - running this after renaming a directory outside of WebFM will

  //          delete all file records contained in that directory
  if (variable_get('webfm_cron', '')) {
    $result = db_query('SELECT fpath, fid FROM {webfm_file}');
    while ($f = db_fetch_array($result)) {
      if (!is_file($f['fpath'])) {
        _webfm_dbdelete_file_fid($f['fid']);
      }
    }
  }
}