I don't understand your comment.  This function [ snort_expand_port_range() ] is required to address an issue that has existed in the Snort package for quite some time.  The Snort Variables tab was changed quite some time ago so that only Aliases could be entered for the servers and port variables.  These port variable aliases are substituted into an array replacing any default values for the port variables (via an array in the snort_generate_conf() function).  These same port array values are then used when building the configurations for the preprocessors.  On the Aliases tab in pfSense, a user is able to create a port Alias that contains either discrete values or a port range.  Here is an example a user submitted via the forum:

FTPports == 20, 21, 15002:15012

This gets interpreted by the existing code in the snort_define_servers.php file and substituted into the default ports array.  When the code that generates the ftp_telnet preprocessor configuration line hits this Alias value, it uses it faithfully including the port range string.  Unfortunately, the preprocessor code for ftp_telnet will not accept a true port range in the 15002:15012 format.  It will only accept the individual ports separated by spaces.  So this new function simply takes the Alias and expands any embedded port range into the list of ports.  So the example given becomes { 20 21 15002 15003 15004 15005 15006 15007 15008 15009 15010 15011 15012 }.  The preprocessor code wants the ports defined this way.

So this function addresses a bug in the existing code and is required.  Do you want the ability to define custom port ranges removed from Snort, or do you want to remove the ability to use Aliases for the Snort variables?