Search code examples
drupaldrupal-7drupal-modules

remove "latest files" from Drupal module FileDepot


How can I prevent the Drupal module "FileDepot" from displaying "latest files" when a user first enters file depot?

Is is possible to have it display nothing until a user clicks on a folder?


Solution

  • In sites/all/modules/filedepot/lib-ajaxserver.php I added 1=2 and to sql you may check it with your original one. it worked for me

    // Default view - latest files
    if (!empty($filedepot->allowableViewFoldersSql)) {
      if ($filedepot->ogmode_enabled) {
        if (!empty($filedepot->allowableGroupViewFoldersSql)) {
          $sql .= "WHERE 1=2 and file.cid in ({$filedepot->allowableGroupViewFoldersSql}) ";
        }
        else {
          $sql .= "WHERE 1=2 and file.cid in ({$filedepot->allowableViewFoldersSql}) ";
        }
      }
      elseif (!user_access('administer filedepot', $user)) {
        if (empty($filedepot->allowableViewFoldersSql)) {
          $sql .= "WHERE 1=2 and file.cid is NULL ";
        }
        else {
          $sql .= "WHERE 1=2 and file.cid in ({$filedepot->allowableViewFoldersSql}) ";
        }
      }
    }