From 595c1f06a117a81ea09259940a60cb79564b2bef Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Mon, 9 Aug 2010 15:07:23 +0200 Subject: [PATCH] Once again fix parameter names for remote calendars. --- kronolith/js/kronolith.js | 2 +- kronolith/lib/Ajax/Application.php | 2 +- kronolith/lib/Kronolith.php | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/kronolith/js/kronolith.js b/kronolith/js/kronolith.js index fd2a9f4db..e296e816f 100644 --- a/kronolith/js/kronolith.js +++ b/kronolith/js/kronolith.js @@ -4482,7 +4482,7 @@ KronolithCore = { } if (i == 2) { if ($F('kronolithCalendarremoteUsername')) { - params.username = $F('kronolithCalendarremoteUsername'); + params.user = $F('kronolithCalendarremoteUsername'); params.password = $F('kronolithCalendarremotePassword'); } this.doAction('getRemoteInfo', diff --git a/kronolith/lib/Ajax/Application.php b/kronolith/lib/Ajax/Application.php index 68885da94..6956c6964 100644 --- a/kronolith/lib/Ajax/Application.php +++ b/kronolith/lib/Ajax/Application.php @@ -812,7 +812,7 @@ class Kronolith_Ajax_Application extends Horde_Core_Ajax_Application public function getRemoteInfo() { $params = array('timeout' => 15); - if ($user = $this->_vars->username) { + if ($user = $this->_vars->user) { $params['user'] = $user; $params['password'] = $this->_vars->password; } diff --git a/kronolith/lib/Kronolith.php b/kronolith/lib/Kronolith.php index e4218ea1a..4505792c7 100644 --- a/kronolith/lib/Kronolith.php +++ b/kronolith/lib/Kronolith.php @@ -1946,11 +1946,11 @@ class Kronolith throw new Kronolith_Exception(_("You must specify a name and a URL.")); } - if (!empty($info['username']) || !empty($info['password'])) { + if (!empty($info['user']) || !empty($info['password'])) { $key = $GLOBALS['registry']->getAuthCredential('password'); if ($key) { $secret = $GLOBALS['injector']->getInstance('Horde_Secret'); - $info['username'] = base64_encode($secret->write($key, $info['username'])); + $info['user'] = base64_encode($secret->write($key, $info['user'])); $info['password'] = base64_encode($secret->write($key, $info['password'])); } } @@ -2722,6 +2722,7 @@ class Kronolith $key = $GLOBALS['registry']->getAuthCredential('password'); if ($key && $password) { $secret = $GLOBALS['injector']->getInstance('Horde_Secret'); + $user = $secret->read($key, base64_decode($user)); $password = $secret->read($key, base64_decode($password)); } if (!empty($user)) { -- 2.11.0