wirelessclient.cgi: Fix for bug #12571

Message ID 20210211124129.3661993-1-adolf.belka@ipfire.org
State Accepted
Commit f90b0f24a21e95fea350262967558557b89145b8
Headers
Series wirelessclient.cgi: Fix for bug #12571 |

Commit Message

Adolf Belka Feb. 11, 2021, 12:41 p.m. UTC
  - Wirelessclient shows priority 0 to be most preferred and priority 4 as
least preferred. Based on forum posters experience and the wpa_supplicant
man page it is the other way round.
- This patch moves the least preferred title to priority 0 and vice versa
- Will ask bug reporter to test out the patch and confirm it works. The page
is only shown if you have a wifi connection on red.

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
 html/cgi-bin/wirelessclient.cgi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Michael Tremer Feb. 12, 2021, 11:48 a.m. UTC | #1
Hi,

This patch looks good.

What would help me a little bit more when writing the change log is to put what it does in the subject line (i.e. first line of the Git message).

In this case it could have been something along the lines of (Correct order of priority).

I noticed this when I wrote the change log for Core Update 154 and I had to go and lookup the bug number which took me some extra time.

So, not a big issue here, but it is easier to spot what the patch does when it is in the headline.

The bug number should be in the body with in a “Fixes: #12571” style.

Best,
-Michael

> On 11 Feb 2021, at 12:41, Adolf Belka <adolf.belka@ipfire.org> wrote:
> 
> - Wirelessclient shows priority 0 to be most preferred and priority 4 as
> least preferred. Based on forum posters experience and the wpa_supplicant
> man page it is the other way round.
> - This patch moves the least preferred title to priority 0 and vice versa
> - Will ask bug reporter to test out the patch and confirm it works. The page
> is only shown if you have a wifi connection on red.
> 
> Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
> ---
> html/cgi-bin/wirelessclient.cgi | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/html/cgi-bin/wirelessclient.cgi b/html/cgi-bin/wirelessclient.cgi
> index e8c3c9628..b1679c128 100644
> --- a/html/cgi-bin/wirelessclient.cgi
> +++ b/html/cgi-bin/wirelessclient.cgi
> @@ -602,11 +602,11 @@ sub showEditBox() {
> 					</td>
> 					<td width='40%'>
> 						<select name='PRIO'>
> -							<option value="0" $selected{'PRIO'}{'0'}>0 ($Lang::tr{'most preferred'})</option>
> +							<option value="0" $selected{'PRIO'}{'0'}>0 ($Lang::tr{'least preferred'})</option>
> 							<option value="1" $selected{'PRIO'}{'1'}>1</option>
> 							<option value="2" $selected{'PRIO'}{'2'}>2</option>
> 							<option value="3" $selected{'PRIO'}{'3'}>3</option>
> -							<option value="4" $selected{'PRIO'}{'4'}>4 ($Lang::tr{'least preferred'})</option>
> +							<option value="4" $selected{'PRIO'}{'4'}>4 ($Lang::tr{'most preferred'})</option>
> 						</select>
> 					</td>
> 					<td colspan="2" width='40%'></td>
> -- 
> 2.30.1
>
  
Adolf Belka Feb. 12, 2021, 12:05 p.m. UTC | #2
Hi Michael,

On 12/02/2021 12:48, Michael Tremer wrote:
> Hi,
> 
> This patch looks good.
> 
> What would help me a little bit more when writing the change log is to put what it does in the subject line (i.e. first line of the Git message).
> 
> In this case it could have been something along the lines of (Correct order of priority).
> 
> I noticed this when I wrote the change log for Core Update 154 and I had to go and lookup the bug number which took me some extra time.
> 
> So, not a big issue here, but it is easier to spot what the patch does when it is in the headline.
> 
> The bug number should be in the body with in a “Fixes: #12571” style.

Makes sense. If you have a few bug fixes in the update you don't want to have to go to bugzilla for each one to find out what it does.

I will keep that in mind.

Thanks for the input.

Regards,
Adolf.
> 
> Best,
> -Michael
> 
>> On 11 Feb 2021, at 12:41, Adolf Belka <adolf.belka@ipfire.org> wrote:
>>
>> - Wirelessclient shows priority 0 to be most preferred and priority 4 as
>> least preferred. Based on forum posters experience and the wpa_supplicant
>> man page it is the other way round.
>> - This patch moves the least preferred title to priority 0 and vice versa
>> - Will ask bug reporter to test out the patch and confirm it works. The page
>> is only shown if you have a wifi connection on red.
>>
>> Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
>> ---
>> html/cgi-bin/wirelessclient.cgi | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/html/cgi-bin/wirelessclient.cgi b/html/cgi-bin/wirelessclient.cgi
>> index e8c3c9628..b1679c128 100644
>> --- a/html/cgi-bin/wirelessclient.cgi
>> +++ b/html/cgi-bin/wirelessclient.cgi
>> @@ -602,11 +602,11 @@ sub showEditBox() {
>> 					</td>
>> 					<td width='40%'>
>> 						<select name='PRIO'>
>> -							<option value="0" $selected{'PRIO'}{'0'}>0 ($Lang::tr{'most preferred'})</option>
>> +							<option value="0" $selected{'PRIO'}{'0'}>0 ($Lang::tr{'least preferred'})</option>
>> 							<option value="1" $selected{'PRIO'}{'1'}>1</option>
>> 							<option value="2" $selected{'PRIO'}{'2'}>2</option>
>> 							<option value="3" $selected{'PRIO'}{'3'}>3</option>
>> -							<option value="4" $selected{'PRIO'}{'4'}>4 ($Lang::tr{'least preferred'})</option>
>> +							<option value="4" $selected{'PRIO'}{'4'}>4 ($Lang::tr{'most preferred'})</option>
>> 						</select>
>> 					</td>
>> 					<td colspan="2" width='40%'></td>
>> -- 
>> 2.30.1
>>
>
  
Michael Tremer Feb. 12, 2021, 12:11 p.m. UTC | #3
Yes, and I suppose other people who read the git change log do not need to do the same thing :)

> On 12 Feb 2021, at 12:05, Adolf Belka (ipfire-dev) <adolf.belka@ipfire.org> wrote:
> 
> Hi Michael,
> 
> On 12/02/2021 12:48, Michael Tremer wrote:
>> Hi,
>> This patch looks good.
>> What would help me a little bit more when writing the change log is to put what it does in the subject line (i.e. first line of the Git message).
>> In this case it could have been something along the lines of (Correct order of priority).
>> I noticed this when I wrote the change log for Core Update 154 and I had to go and lookup the bug number which took me some extra time.
>> So, not a big issue here, but it is easier to spot what the patch does when it is in the headline.
>> The bug number should be in the body with in a “Fixes: #12571” style.
> 
> Makes sense. If you have a few bug fixes in the update you don't want to have to go to bugzilla for each one to find out what it does.
> 
> I will keep that in mind.
> 
> Thanks for the input.
> 
> Regards,
> Adolf.
>> Best,
>> -Michael
>>> On 11 Feb 2021, at 12:41, Adolf Belka <adolf.belka@ipfire.org> wrote:
>>> 
>>> - Wirelessclient shows priority 0 to be most preferred and priority 4 as
>>> least preferred. Based on forum posters experience and the wpa_supplicant
>>> man page it is the other way round.
>>> - This patch moves the least preferred title to priority 0 and vice versa
>>> - Will ask bug reporter to test out the patch and confirm it works. The page
>>> is only shown if you have a wifi connection on red.
>>> 
>>> Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
>>> ---
>>> html/cgi-bin/wirelessclient.cgi | 4 ++--
>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>> 
>>> diff --git a/html/cgi-bin/wirelessclient.cgi b/html/cgi-bin/wirelessclient.cgi
>>> index e8c3c9628..b1679c128 100644
>>> --- a/html/cgi-bin/wirelessclient.cgi
>>> +++ b/html/cgi-bin/wirelessclient.cgi
>>> @@ -602,11 +602,11 @@ sub showEditBox() {
>>> 					</td>
>>> 					<td width='40%'>
>>> 						<select name='PRIO'>
>>> -							<option value="0" $selected{'PRIO'}{'0'}>0 ($Lang::tr{'most preferred'})</option>
>>> +							<option value="0" $selected{'PRIO'}{'0'}>0 ($Lang::tr{'least preferred'})</option>
>>> 							<option value="1" $selected{'PRIO'}{'1'}>1</option>
>>> 							<option value="2" $selected{'PRIO'}{'2'}>2</option>
>>> 							<option value="3" $selected{'PRIO'}{'3'}>3</option>
>>> -							<option value="4" $selected{'PRIO'}{'4'}>4 ($Lang::tr{'least preferred'})</option>
>>> +							<option value="4" $selected{'PRIO'}{'4'}>4 ($Lang::tr{'most preferred'})</option>
>>> 						</select>
>>> 					</td>
>>> 					<td colspan="2" width='40%'></td>
>>> -- 
>>> 2.30.1
>>>
  

Patch

diff --git a/html/cgi-bin/wirelessclient.cgi b/html/cgi-bin/wirelessclient.cgi
index e8c3c9628..b1679c128 100644
--- a/html/cgi-bin/wirelessclient.cgi
+++ b/html/cgi-bin/wirelessclient.cgi
@@ -602,11 +602,11 @@  sub showEditBox() {
 					</td>
 					<td width='40%'>
 						<select name='PRIO'>
-							<option value="0" $selected{'PRIO'}{'0'}>0 ($Lang::tr{'most preferred'})</option>
+							<option value="0" $selected{'PRIO'}{'0'}>0 ($Lang::tr{'least preferred'})</option>
 							<option value="1" $selected{'PRIO'}{'1'}>1</option>
 							<option value="2" $selected{'PRIO'}{'2'}>2</option>
 							<option value="3" $selected{'PRIO'}{'3'}>3</option>
-							<option value="4" $selected{'PRIO'}{'4'}>4 ($Lang::tr{'least preferred'})</option>
+							<option value="4" $selected{'PRIO'}{'4'}>4 ($Lang::tr{'most preferred'})</option>
 						</select>
 					</td>
 					<td colspan="2" width='40%'></td>