diff modules/apache/templates/vhost/_scriptalias.erb @ 437:b8d6ada284dd

Update Apache module to latest version Also converted some params to ints to match
author IBBoard <dev@ibboard.co.uk>
date Sun, 14 Aug 2022 11:30:13 +0100
parents 956e484adc12
children adf6fe9bbc17
line wrap: on
line diff
--- a/modules/apache/templates/vhost/_scriptalias.erb	Wed Apr 19 18:45:23 2023 +0100
+++ b/modules/apache/templates/vhost/_scriptalias.erb	Sun Aug 14 11:30:13 2022 +0100
@@ -1,17 +1,8 @@
-<%- if @scriptaliases.is_a?(Array) -%>
-<%-  aliases = @scriptaliases -%>
-<%- elsif @scriptaliases.is_a?(Hash) -%>
-<%-  aliases = [@scriptaliases] -%>
-<%- else -%>
-<%-  # Nothing to do with any other data type -%>
-<%-  aliases = [] -%>
-<%- end -%>
-<%- if @scriptalias or !aliases.empty? -%>
+<%- aliases = @scriptaliases -%>
   ## Script alias directives
-<%# Combine scriptalais and scriptaliases into a single data structure -%>
+<%# Combine scriptalias and scriptaliases into a single data structure -%>
 <%# for backward compatibility and ease of implementation -%>
 <%- aliases << { 'alias' => '/cgi-bin', 'path' => @scriptalias } if @scriptalias -%>
-<%- aliases.flatten.compact! -%>
 <%- aliases.each do |salias| -%>
   <%- if salias["path"] != '' -%>
     <%- if salias["alias"] and salias["alias"] != '' -%>
@@ -21,4 +12,3 @@
     <%- end -%>
   <%- end -%>
 <%- end -%>
-<%- end -%>