You are here

function filebrowser_load in Filebrowser 7.4

Same name and namespace in other branches
  1. 8 filebrowser.module \filebrowser_load()
  2. 6.2 filebrowser.module \filebrowser_load()
  3. 7.2 filebrowser.module \filebrowser_load()
  4. 7.3 filebrowser.module \filebrowser_load()

Implements hook_load(). @inheritdoc

File

./filebrowser.module, line 355

Code

function filebrowser_load($nodes) {
  $query = db_select('node_dir_listing', 'n');
  $query
    ->condition('nid', array_keys($nodes));
  $query
    ->fields('n');
  foreach ($query
    ->execute() as $data) {
    $additions = (object) unserialize($data->properties);
    $additions->folder_path = $data->folder_path;
    $additions->nid = $data->nid;
    _filebrowser_prepare_record($additions, TRUE);
    foreach ($additions as $key => $value) {
      $nodes[$data->nid]->{$key} = $value;
    }
  }
}