You are here

function template_preprocess_filedepot_notifications_folder in filedepot 7

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

File

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

Code

function template_preprocess_filedepot_notifications_folder(&$variables) {
  $filedepot = filedepot_filedepot();
  $rec = $variables['rec'];
  $variables['recid'] = $rec['id'];
  $variables['date'] = strftime($filedepot->shortdate, $rec['date']);
  $variables['folderid'] = $rec['cid'];
  $variables['LANG_delete'] = t('Delete');
  if ($rec['cid_newfiles'] == 1) {
    $variables['chk_newfiles'] = 'CHECKED=checked';
  }
  else {
    $variables['chk_newfiles'] = '';
  }
  if ($rec['cid_changes'] == 1) {
    $variables['chk_filechanges'] = 'CHECKED=checked';
  }
  else {
    $variables['chk_filechanges'] = '';
  }
  $folder = db_query("SELECT name FROM {filedepot_categories} WHERE cid=:cid", array(
    ':cid' => $rec['cid'],
  ))
    ->fetchField();
  $variables['foldername'] = filter_xss($folder);
}