system/modules/DocumentManagementSystem/dca/tl_dms_documents.php
public static function getValidFileTypesForCategory()
  {
    $db = \Database::getInstance();
    $input = \Input::getInstance();
    if($db->tableExists('tl_dms_categories') && $db->tableExists('tl_dms_documents'))
    {
      $objCategory = $db->prepare('SELECT cat.* FROM tl_dms_categories cat JOIN tl_dms_documents doc ON doc.pid = cat.id WHERE doc.id = ?')->execute($input->get('id'));
      if ($objCategory->numRows)
      {
        return $objCategory->file_types;
      }
    }
    return "";
  }
public static function getValidFileTypesForCategory()
  {
    $db = \Database::getInstance();
    $input = \Input::getInstance();
    if($db->tableExists('tl_dms_categories') && $db->tableExists('tl_dms_documents'))
    {
      $objCategory = $db->prepare('SELECT cat.* FROM tl_dms_categories cat JOIN tl_dms_documents doc ON doc.pid = cat.id WHERE doc.id = ?')->execute($input->get('id'));
      if ($objCategory->numRows)
      {
        return $objCategory->file_types;
      }
    }
    return "";
  }
public static function getValidFileTypesForCategory ( ) { $ db = \ Database :: getInstance ( ) ; $ input = \ Input :: getInstance ( ) ; if ( $ db -> tableExists ( 'tl_dms_categories' ) && $ db -> tableExists ( 'tl_dms_documents' ) ) { $ objCategory = $ db -> prepare ( 'SELECT cat.* FROM tl_dms_categories cat JOIN tl_dms_documents doc ON doc.pid = cat.id WHERE doc.id = ?' ) -> execute ( $ input -> get ( 'id' ) ) ; if ( $ objCategory -> numRows ) { return $ objCategory -> file_types ; } } return "" ; }
Determine the valid file types for the current category
Determine the valid file types for the current category