summaryrefslogtreecommitdiff
path: root/plugins/password
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/password')
-rw-r--r--plugins/password/drivers/dbmail.php2
-rw-r--r--plugins/password/drivers/domainfactory.php2
-rw-r--r--plugins/password/helpers/chgdbmailusers.c3
-rw-r--r--plugins/password/password.php7
4 files changed, 9 insertions, 5 deletions
diff --git a/plugins/password/drivers/dbmail.php b/plugins/password/drivers/dbmail.php
index 529027b8d..5cfe92cd7 100644
--- a/plugins/password/drivers/dbmail.php
+++ b/plugins/password/drivers/dbmail.php
@@ -17,7 +17,7 @@
class rcube_dbmail_password
{
- function password_save($currpass, $newpass)
+ function save($currpass, $newpass)
{
$curdir = RCUBE_PLUGINS_DIR . 'password/helpers';
$username = escapeshellcmd($_SESSION['username']);
diff --git a/plugins/password/drivers/domainfactory.php b/plugins/password/drivers/domainfactory.php
index 4dbf4b799..62d9bfce2 100644
--- a/plugins/password/drivers/domainfactory.php
+++ b/plugins/password/drivers/domainfactory.php
@@ -51,7 +51,7 @@ class rcube_domainfactory_password
// change password
$ch = curl_copy_handle($ch);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
+ curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
if ($result = curl_exec($ch)) {
// has the password been changed?
diff --git a/plugins/password/helpers/chgdbmailusers.c b/plugins/password/helpers/chgdbmailusers.c
index 28f79c100..22793857d 100644
--- a/plugins/password/helpers/chgdbmailusers.c
+++ b/plugins/password/helpers/chgdbmailusers.c
@@ -5,7 +5,6 @@
// set the UID this script will run as (root user)
#define UID 0
#define CMD "/usr/sbin/dbmail-users"
-#define RCOK 0x100
/* INSTALLING:
gcc -o chgdbmailusers chgdbmailusers.c
@@ -38,7 +37,7 @@ main(int argc, char *argv[])
cc = setuid(UID);
rc = system(cmnd);
- if ((rc != RCOK) || (cc != 0))
+ if ((rc != 0) || (cc != 0))
{
fprintf(stderr, "__ %s: failed %d %d\n", argv[0], rc, cc);
return 1;
diff --git a/plugins/password/password.php b/plugins/password/password.php
index e31613ab1..83f951b98 100644
--- a/plugins/password/password.php
+++ b/plugins/password/password.php
@@ -70,9 +70,14 @@ class password extends rcube_plugin
}
$this->add_hook('settings_actions', array($this, 'settings_actions'));
+
$this->register_action('plugin.password', array($this, 'password_init'));
$this->register_action('plugin.password-save', array($this, 'password_save'));
- $this->include_script('password.js');
+
+
+ if (strpos($rcmail->action, 'plugin.password') === 0) {
+ $this->include_script('password.js');
+ }
}
function settings_actions($args)