mvc/model/ContainerField - pass isFieldChanged() to children.
Noticed this issue while working on filter validations, which seemed to re-validate each item on every migration due to FieldTypes inheriting from ContainerField.
This is a minor change, but will prevent record validations from triggering unnecessary.
(cherry picked from commit 6f24db1a01602c646a64132d77f06de17e5b955c)
mvc/model/ContainerField - pass isFieldChanged() to children.
Noticed this issue while working on filter validations, which seemed to re-validate each item on every migration due to FieldTypes inheriting from ContainerField.
This is a minor change, but will prevent record validations from triggering unnecessary.
mvc/model - implement getDescription() in NetworkAliasField. As this field type acts as a single (non-list) type, we need to return the description from here as well as BaseListField's implementation doesn't apply here.
mvc/model - BaseListField replace array_map+strval for loop with cast to preserve execution time. The mapping with strval seems to be rather slow, a simple cast seems to be roughly 4 times faster.
MVC: deal with explicit buffering on Phalcon side
The start() and finish() methods in Phalcon start and close an output buffer respectively. If we clear this buffer prematurely, as is needed for streaming data, we must handle the exception that pops up as a result of Phalcon trying to close the buffer again. In cases where such control over the output is needed, we must also assume that the headers have already been sent, so silence the output in this case to prevent a PHP fatal error.
interfaces: move radvd and rtsold to system log where they belong
We've long moved dhcp6c to this spot but we're still missing a bit of
context during debugging, e.g. why rtsold keeps restarting dhcp6c with
a SIGHUP.
System: Trust: Revocation - forgot to persist new lifetime, causing the following exception:
Exception: Failed to parse time string (+ days) at position 0 (+): Unexpected character in /usr/local/opnsense/mvc/app/controllers/OPNsense/Trust/Api/CrlController.php:347
Stack trace:
System/Trust: Make description in Trust required (#7403)
* Make description in Trust required, since it is used to display the certificate in many parts of the system.
* Revert model version bump to 1.0.0
System: Settings: Logging - maximum log file size ignored when there's only one file in the directory. closes https://github.com/opnsense/core/issues/7397
The rotate function needed the next file to calculate the suffix, which is problematic if someone just cleaned all logs. This patch improves the match a bit (last _ instead of assuming _ doesn't exist in the name) and uses "1" for the first rotate action.
(cherry picked from commit 73c3b88eb0653898d067515b4860c3961a4f8c84)
System: Settings: Logging - maximum log file size ignored when there's only one file in the directory. closes https://github.com/opnsense/core/issues/7397
The rotate function needed the next file to calculate the suffix, which is problematic if someone just cleaned all logs. This patch improves the match a bit (last _ instead of assuming _ doesn't exist in the name) and uses "1" for the first rotate action.