Opened 15 years ago
Closed 14 years ago
#6371 closed defect (invalid)
User Job button not checked as default in MythWeb
Reported by: | Owned by: | xris | |
---|---|---|---|
Priority: | minor | Milestone: | 0.22 |
Component: | Plugin - MythWeb | Version: | head |
Severity: | medium | Keywords: | MythWeb, Database, NULL |
Cc: | Ticket locked: | no |
Description
I have User Job 1 selected in the mythtv. This works in the frontend's scheduler but is not defaulted in the Advanced part of detail.php in MythWeb.
The settings in the database have:
AutoRunUserJob1 1 NULL
SQL generated does not produced required result when getting a setting from the database. The SQL generated is:
SELECT data FROM settings WHERE value=? AND hostname LIKE ?
with args 'AutoRunUserJob1' and '%'. No rows are returned because LIKE '%' does not match NULL.
Changing the NULL to say 'all' gets around the problem in MythWeb but breaks the frontend defaults.
get_backend_setting() in ./includes/utils.php provides '%' if the hostname argument is null. If you have several backend servers then you would get several results returned. I think the expected result is one row (at least for AutoRunUserJobX) which is why the hostname is NULL in the settings table.
Very strangely on my setup too:
CentOS 5.2 php-5.1.6-20.el5_2.1 mysql-server-5.0.45-7.el5
$schedule->autouserjob1 = get_backend_setting('AutoRunUserJob1');
behaves differently to:
<dt><?php echo get_backend_setting('UserJobDesc1') ?>:</dt>
in that the second example 'misses' the
if (is_null($host))
in "function get_backend_setting($setting, $host = null)" ending in sql with "IS NULL" rather than "LIKE '%'".
This is in MythWeb from SVN 20063.
Change History (4)
comment:1 Changed 15 years ago by
comment:2 Changed 15 years ago by
Component: | MythTV - General → Plugin - MythWeb |
---|---|
Milestone: | unknown → 0.22 |
Owner: | changed from Isaac Richards to xris |
Version: | unknown → head |
comment:4 Changed 14 years ago by
Resolution: | → invalid |
---|---|
Status: | infoneeded_new → closed |
No response in four weeks, closing. If still an issue with .22, open a new ticket.
The 'very strangely' bit is explained by _advanced_options.php calling:
<?php echo setting('UserJobDesc1')
and not using get_backend_setting at all.