You are here

function fillpdf_default_scheme in FillPDF 7

Returns the default scheme for PDF files populated by FillPDF.

For security reasons we're picking the system's file default scheme, unless it is 'public' while the more secure 'private' is available.

2 calls to fillpdf_default_scheme()
fillpdf_build_uri in ./fillpdf.module
Constructs a URI to FillPDF's default files location given a relative path.
fillpdf_form_edit in ./fillpdf.admin.inc
Edit existing PDF form.

File

./fillpdf.module, line 2160

Code

function fillpdf_default_scheme() {
  $site_default_scheme = variable_get('file_default_scheme');
  if ($site_default_scheme == 'public') {
    $scheme_options = fillpdf_scheme_options();
    return isset($scheme_options['private']) ? 'private' : $site_default_scheme;
  }
  return $site_default_scheme ?: 'public';
}