From: Ben Klang Date: Thu, 21 Jan 2010 04:01:15 +0000 (-0500) Subject: Shout: Make sure we set the host and context fields X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=c1eb416640f7b07c9f1c7d1bffe2ccb758380fda;p=horde.git Shout: Make sure we set the host and context fields --- diff --git a/shout/lib/Driver/Sql.php b/shout/lib/Driver/Sql.php index d34f4355d..e10d5bcb3 100644 --- a/shout/lib/Driver/Sql.php +++ b/shout/lib/Driver/Sql.php @@ -161,6 +161,7 @@ class Shout_Driver_Sql extends Shout_Driver $details['callerid'], $details['mailbox'], $details['password'], + $context, $details['alias'], ); if (!empty($devid)) { @@ -168,13 +169,15 @@ class Shout_Driver_Sql extends Shout_Driver $details['name'] = $details['devid']; $sql = 'UPDATE %s SET name = ?, accountcode = ?, callerid = ?, ' . 'mailbox = ?, secret = ?, alias = ?, canreinvite = "no", ' . - 'nat = "yes", type = "peer" WHERE name = ?'; + 'nat = "yes", type = "peer", host = "dynamic", ' . + 'context = ? WHERE name = ?'; $args[] = $devid; } else { // This is an add. Generate a new unique ID and secret $sql = 'INSERT INTO %s (name, accountcode, callerid, mailbox, ' . - 'secret, alias, canreinvite, nat, type) ' . - 'VALUES (?, ?, ?, ?, ?, ?, "no", "yes", "peer")'; + 'secret, context, alias, canreinvite, nat, type, host) ' . + 'VALUES (?, ?, ?, ?, ?, ?, ?, "no", "yes", "peer", ' . + '"dynamic")'; } $sql = sprintf($sql, $this->_params['table']);