[mythtv-users] Remote key 'overloading'
Gregorio Gervasio, Jr.
gtgj at pacbell.net
Fri Feb 6 05:12:43 EST 2004
>>>>> Graham W Mitchell writes:
g> I've tried to do this tonight, but every time I change the binding and
g> select save, it doesn't seem to save the update. Is this a know issue
g> with 0.14? Anyone else having the same problem, and is there any way to
g> work round it?
Does your frontend hostname have a '.domain' or any
non-alphanumeric characters (eg. '-')? I noticed these characters get
converted to '_' somewhere along the way so they fail to match the
hostname in the database.
I use the following hack to restore the '.' character but
it's obviously not a general solution. (Any PHP experts know how to
preserve these characters properly?)
Otherwise, you could modify the mythconverg database directly.
Index: settings_keys.php
===================================================================
RCS file: /var/lib/mythcvs/mythweb/settings_keys.php,v
retrieving revision 1.3
diff -u -r1.3 settings_keys.php
--- settings_keys.php 13 Dec 2003 21:46:05 -0000 1.3
+++ settings_keys.php 6 Feb 2004 10:05:04 -0000
@@ -16,6 +16,7 @@
{
list($match, $dest, $host) = $matches;
$dest = str_replace("_", " ", $dest);
+ $host = str_replace("_", ".", $host);
$usehost = $host;
$query = 'UPDATE jumppoints SET keylist='.escape($_POST[$key]).' WHERE destination='.escape($dest).' AND hostname='.escape($host).';';
$result = mysql_query($query)
@@ -24,8 +25,9 @@
else if (preg_match('/^key:([\\w_\/]+):(\\w+):(\\w+)$/', $key, $matches))
{
list($match, $context, $action, $host) = $matches;
- $usehost = $host;
$context = str_replace("_", " ", $context);
+ $host = str_replace("_", ".", $host);
+ $usehost = $host;
$query = 'UPDATE keybindings SET keylist='.escape($_POST[$key]).' WHERE context='.escape($context).' AND action='.escape($action).' AND hostname='.escape($host).';';
$result = mysql_query($query)
or trigger_error('SQL Error: '.mysql_error(), FATAL);
--
Gregorio Gervasio, Jr.
More information about the mythtv-users
mailing list