[Bps-public-commit] rt-extension-formtools branch dynamic-forms-from-config updated. 0.53-32-g8b09c33

BPS Git Server git at git.bestpractical.com
Thu Oct 5 13:52:03 UTC 2023


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt-extension-formtools".

The branch, dynamic-forms-from-config has been updated
       via  8b09c335da5af3d0360a727be64bf2cd129c6dbe (commit)
      from  03ce4ee935190e379769071c5542fbabd72327cb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 8b09c335da5af3d0360a727be64bf2cd129c6dbe
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Oct 5 09:47:07 2023 -0400

    No need to add the OR("|") inside "[]" in regexes
    
    "|" doesn't have a special meaning inside "[]"

diff --git a/README b/README
index 2e3d8ff..2509a8f 100644
--- a/README
+++ b/README
@@ -89,6 +89,11 @@ FUNCTIONS
   has_value value
     Returns true if the value is defined and non-empty.
 
+  LoadFormIcon($current_user, $form_id)
+    Loads the form icon attribute associated with the passed form id.
+
+    Returns a tuple of attribute object or false, and a message.
+
 AUTHOR
     Best Practical Solutions, LLC <modules at bestpractical.com>
 
diff --git a/html/Forms/dhandler b/html/Forms/dhandler
index 9854928..45da273 100644
--- a/html/Forms/dhandler
+++ b/html/Forms/dhandler
@@ -28,7 +28,7 @@ foreach my $element ( @{$form_config->{'formtools-pages'}{$page}{'content'}} ) {
 my $path = $m->dhandler_arg;
 my ($form_name, $page_name);
 
-if ( $path =~ /^([\w|\s]+)\/([-\w]+)$/ ) {
+if ( $path =~ /^([\w\s]+)\/([-\w]+)$/ ) {
     $form_name = $1;
     $page_name = $2;
 }
@@ -37,7 +37,7 @@ else {
 }
 
 # Limit to names to letters, numbers, underscore, spaces
-unless ( $form_name =~ /^[\w|\s]+$/ ) {
+unless ( $form_name =~ /^[\w\s]+$/ ) {
     RT->Logger->error("FormTools called with invalid form name: $form_name");
     Abort('Invalid form name');
 }

-----------------------------------------------------------------------

Summary of changes:
 README              | 5 +++++
 html/Forms/dhandler | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
rt-extension-formtools


More information about the Bps-public-commit mailing list