From d78d1b149ed45d0b442ef287392200e1c0a4da97 Mon Sep 17 00:00:00 2001
From: Liam Morland <lkmorlan@uwaterloo.ca>
Date: Fri, 7 Jun 2019 10:54:45 -0400
Subject: [PATCH] Issue #3040903: Use file_get_stream_wrappers() in
 fillpdf_scheme_options()

---
 fillpdf.module | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/fillpdf.module b/fillpdf.module
index ec92688..1642cad 100644
--- a/fillpdf.module
+++ b/fillpdf.module
@@ -2063,10 +2063,11 @@ function fillpdf_build_uri($path) {
  *   Array of acceptable file scheme options as identifier => translated title.
  */
 function fillpdf_scheme_options() {
-  return array(
-    'private' => t('Private files'),
-    'public' => t('Public files'),
-  );
+  $options = array();
+  foreach (file_get_stream_wrappers(STREAM_WRAPPERS_WRITE_VISIBLE) as $scheme => $info) {
+    $options[$scheme] = check_plain($info['description']);
+  }
+  return $options;
 }
 
 /**
-- 
GitLab