In most places in the GUI a little pencil symbol appears before text input fields. For example it already appears for the Host, Domain and Description fields in this very form when you "Enter additional names for this host."
But in the main 4 fields of this form, the pencil does not display.
This fixes it to be the same as elsewhere.
I guess this is the "standard" supposed to be used. If so, then I will find the other places where class="formfld unknown" has the "unknown" missing.
In 2.2 when I go to Diagnostics->Authentication the password field shows the little lock icon, but the text input area starts over the top of the icon and as I type in the field the password "dots" go over the lock icon.
This does not happen in 2.1.5 - the password entry cursor sits after the lock icon. This problem is also not evident on most other password entry fields in 2.2
I stared at it for a while, then saw that in other places the password field is not literally called "password", so I thought what the heck, I will change the field name - it fixed the display issue!!! What???
Anyway, this fixes the display issue on my system. If someone knows really why having the field name/id="password" is a problem then they could fix the underlying reason - but this works around whatever is the issue.
If you think this is an OK fix then I will also find the couple of other places swhere this happens and make the same "fix".
I noticed that this looked a little odd, the boxes for AC and Battery Power Mode are 1 after the other on the same line, then the 3rd box for unknown power mode is on a new line.
Maybe make them all on their own line, like this?
I was testing code and just doing stuff like:
require_once("zeromq.inc");
in Diagnostics->Command Prompt, PHP Execute
That brings an error because underneath that PHP Execute code it has already included auth.inc
I guess zeromq.inc is used quite separately to the rest of the system, and must be OK just having a "require" here. But it seems safer to always use require_once, just in case it gets called in a new way/sequence.
Comments welcome.
This code looked silly the way it was, with the construct:
$var = $var;
unset($var);
Seems it was accidentally changed to this way many years ago by 588a183b0e
IMHO we want to do the conversion to $config['system']['gateway'] here so that later config conversion will then process it as expected.
Note that in a current (2.2) config there is not $config['system']['gateway'] but that is switched over later in upgrade_021_to_022 - which switches back to $config['interfaces']['wan']['gateway'] and then later config conversions do their thing with that.
I guess this will only effect people who upgrade from some really old config (or monowall?)
This routine seems to go looking to see if the passed-in interface is PPP-style. At the end, if it is not PPP-style then it calls pfsense_ngctl_detach.
This foreach loop in its current state will always exit after the first iteration that is not mode "server". But it looks like it should look through all the 'pppoe' entries until it finds the interface or gets to the end.
In theory the code will sometimes miss setting $found = true when it should have. And thus pfsense_ngctl_detach would get called later for a PPP-style interface.
I noticed this while reviewing for code style guide - it is an example where the indenting shows the intention but there are no curlies to implement it.