[mythtv-commits] Ticket #6371: User Job button not checked as default in MythWeb
MythTV
mythtv at cvs.mythtv.org
Wed Mar 18 16:45:32 UTC 2009
#6371: User Job button not checked as default in MythWeb
--------------------------------+-------------------------------------------
Reporter: williams at dmu.ac.uk | Owner: ijr
Type: defect | Status: new
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: unknown
Severity: medium | Mlocked: 0
--------------------------------+-------------------------------------------
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.
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/6371>
MythTV <http://www.mythtv.org/>
MythTV
More information about the mythtv-commits
mailing list