You are here

function s3_set_db_content_updir in Filebrowser 7.3

Same name and namespace in other branches
  1. 7.4 modules/s3_fb.module \s3_set_db_content_updir()
1 call to s3_set_db_content_updir()
_filebrowser_load_files in ./filebrowser.common.inc

File

modules/s3_fb.module, line 79

Code

function s3_set_db_content_updir($nid) {
  $content = (array) db_query("SELECT * FROM {node_dir_listing_content} WHERE nid = :nid and path = :path", array(
    ':nid' => $nid,
    ':path' => '/',
  ))
    ->fetch();
  if ($content) {
    $content_arr =& $content;
  }
  else {

    // set an error. This is an sub directory, so the 'up directory' should already exist in the DB
    drupal_set_message(t('Parent directory reference error.'), 'error');
  }
  $content_arr['exists'] = true;
  $content_arr['display-name'] = '..';
  return $content_arr;
}