with this additional change we can allow infinite number of entries
rather than just 500 due to the for loop set to a max of 500 because the
rowhelper control doesnt post as an array but just adds a number at the
end of the variable and we try and modify the pkg_edit.php file then it
would affect other packages
Forum: https://forum.pfsense.org/index.php?topic=86808.0
Redmine: https://redmine.pfsense.org/issues/3886
print_info_box_np() when called with just the first $msg parameter has some rough tests to decide if the "Apply" button should be displayed. It checks if the translation of "apply", "save" or "create" appears in the $msg string (which is a translated string itself). If the $msg string did not translate, and thus remains in English, but gettext("apply") does translate then the e.g. Turkish word for "apply" is not going to appear in the English $msg string. So things go wrong.
print_info_box_np already has extra parameters to tell it explicitly $showapply - and for this stuff we know we want the apply button, regardless of how the various text string translations work out. Thus I have provided those parameters here.
I also changed the construction of the text to pass as $msg, breaking it up like in firewall_aliases.php - this means that the string "You must apply the changes in order for them to take effect." translates and you get at least that Turkish displayed.
IMHO it would be beneficial to change lots of these print_info_box_np calls to explicitly set $showapply=true - that will ensure that the apply button shows (and thus the user can perform the needed actions) regardless of how well/not well the translation of the text turns out.
Obviously a typo. But this section is inside:
if (isset($_POST['add_x']) && isset($_POST['if_add'])) {
and I cannot find where 'add_x' is ever sent here, so I do not see how this whole code section is ever executed (and that will be why this typo bug has no symptoms). What is the history here? Can the whole block of code be removed?
The code normally executed is the section for 'Submit' lower down.
Fix various files that can emit messages like:
PHP Strict Standards: Non-static method SimplePie_Misc::array_unique()
should not be called statically, assuming $this from incompatible
context in /etc/inc/simplepie/simplepie.inc on line 5508
php-fpm[16262]: /rc.newipsecdns: PHP ERROR: Type: 8192, File:
/etc/inc/shaper.inc, Line: 4365, Message: Assigning the return value of
new by reference is deprecated
Some of these style messages have been reported on the forum, e.g.
https://forum.pfsense.org/index.php?topic=86448.0
I had RSS widget on, and simplepie sent the system beserk telling about
all this stuff.
- Move redundant code to a function parse_aliases_file(). Before the max
number of items was not being respected when URL content is updated,
only when alias was saved. Same was happening with ip/subnet/port
validation and user could end up with a bad pf.conf
- Remove unused variables
These changes were based on Pull Request #1264. It should fix#4189
Submitted by:▸ PiBa-NL