Opened 16 years ago

Closed 16 years ago

#4449 closed patch (fixed)

Fix recgroup_select() for Advanced Options

Reported by: sphery <mtdean@…> Owned by: xris
Priority: minor Milestone: unknown
Component: mythweb Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

The attached patch, mythweb-recgroup_select-this_group.patch , fixes two issues in recgroup_select().

Without the patch, I get the following output when trying to create a new schedule (where $this_group is passed in as the empty string):

<dd><select name="recgroup"><option value="Default">Default</option><option value="Science">Science</option><option value="Half-hour Shows">Half-hour Shows</option><option value="Movies">Movies</option><option value="" SELECTED>Movies</option></select></dd>

In my record table I have recgroups Default, Science, and Half-hour Shows. In recorded, I have the same three plus Movies. Since the "catch-all" (!$groups[$this_group]) conditional uses $group for display instead of $this_group, Movies appears twice in the display values of the select box, and the second (and selected) one has the empty string as a value.

However, since it makes more sense for the recording group to default to Default (if it's set to the empty string, the backend resets it to 'Default', anyway), I added an empty check and set $this_group to 'Default' at the beginning of the function. I did not translate the display value for 'Default', though it probably should be (I think it's supposed to be 'Default' in the DB and translated for display).

Now to fix the recgroup of all the movies I've recorded recently... :)

Attachments (1)

mythweb-recgroup_select-this_group.patch (871 bytes) - added by sphery <mtdean@…> 16 years ago.

Download all attachments as: .zip

Change History (2)

Changed 16 years ago by sphery <mtdean@…>

comment:1 Changed 16 years ago by xris

Resolution: fixed
Status: newclosed

(In [15493]) Make the selector for recgroup a little smarter when it comes to blank strings. This was actually caused by a typo (thus a legit bug, not a new feature like sphery implies in the ticket). Apply patch along with some translation enhancement to close #4449.

Note: See TracTickets for help on using tickets.