/**
  * Creates a new AccessibleFileVersionList object.
  */
 public function __construct()
 {
     parent::__construct();
     if (!WCF::getSession()->getPermission('mod.filebase.canModerateEntry')) {
         $this->getConditionBuilder()->add('file.isDisabled = 0');
     }
     if (!WCF::getSession()->getPermission('mod.filebase.canViewDeletedEntry')) {
         $this->getConditionBuilder()->add('file.isDeleted = 0');
     }
 }
 /**
  * Creates a new DeletedVersionFileList object.
  */
 public function __construct()
 {
     parent::__construct();
     // categories
     $accessibleCategoryIDs = FilebaseCategory::getAccessibleCategoryIDs();
     if (!empty($accessibleCategoryIDs)) {
         $this->getConditionBuilder()->add('file.entryID IN (SELECT entryID FROM filebase' . WCF_N . '_entry_to_category WHERE categoryID IN (?))', array($accessibleCategoryIDs));
     } else {
         $this->getConditionBuilder()->add('1=0');
     }
     $this->getConditionBuilder()->add('file.isDeleted = ?', array(1));
 }