You are here

function template_preprocess_filedepot_notifications_file in filedepot 7

Same name and namespace in other branches
  1. 6 lib-theme.php \template_preprocess_filedepot_notifications_file()

File

./lib-theme.php, line 858
lib-theme.php Theme support functions for the module

Code

function template_preprocess_filedepot_notifications_file(&$variables) {
  $filedepot = filedepot_filedepot();
  $rec = $variables['rec'];
  $variables['recid'] = $rec['id'];
  $variables['fid'] = $rec['fid'];
  $variables['date'] = strftime($filedepot->shortdate, $rec['date']);
  $variables['LANG_delete'] = t('Delete');
  $sql = "SELECT a.title,a.cid,b.name as folder FROM {filedepot_files} a ";
  $sql .= "LEFT JOIN {filedepot_categories} b ON b.cid = a.cid WHERE a.fid={$rec['fid']} ";
  list($filename, $cid, $folder) = array_values(db_query($sql)
    ->fetchAssoc());
  $variables['folderid'] = $cid;
  $variables['filename'] = filter_xss($filename);
  $variables['foldername'] = filter_xss($folder);
}