summaryrefslogtreecommitdiff
path: root/roundcubemail/plugins
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-05-31 11:40:07 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-05-31 11:40:07 +0000
commit212d98ed57635ca5529259fa0792ffda27eb6c3f (patch)
tree428aca2f2093ac0f7c06034b147e1f50c6612978 /roundcubemail/plugins
parentf8b17fa02be0abadd2a5bce92fbb35b7faf84f9a (diff)
- don't register body handler on plugin init (#1485888)
git-svn-id: https://svn.roundcube.net/trunk@2583 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/plugins')
-rw-r--r--roundcubemail/plugins/password/password.php7
-rw-r--r--roundcubemail/plugins/sasl_password/sasl_password.php4
2 files changed, 8 insertions, 3 deletions
diff --git a/roundcubemail/plugins/password/password.php b/roundcubemail/plugins/password/password.php
index 0763e91c5..767ddab82 100644
--- a/roundcubemail/plugins/password/password.php
+++ b/roundcubemail/plugins/password/password.php
@@ -90,13 +90,14 @@ class password extends rcube_plugin
$rcmail->output->add_label('password');
$this->register_action('plugin.password', array($this, 'password_init'));
$this->register_action('plugin.password-save', array($this, 'password_save'));
- $this->register_handler('plugin.body', array($this, 'password_form'));
$this->include_script('password.js');
}
function password_init()
{
$this->add_texts('localization/');
+ $this->register_handler('plugin.body', array($this, 'password_form'));
+
$rcmail = rcmail::get_instance();
$rcmail->output->set_pagetitle($this->gettext('changepasswd'));
$rcmail->output->send('plugin');
@@ -107,9 +108,11 @@ class password extends rcube_plugin
$rcmail = rcmail::get_instance();
$this->add_texts('localization/');
- $confirm = $rcmail->config->get('password_confirm_current');
+ $this->register_handler('plugin.body', array($this, 'password_form'));
$rcmail->output->set_pagetitle($this->gettext('changepasswd'));
+ $confirm = $rcmail->config->get('password_confirm_current');
+
if (($confirm && !isset($_POST['_curpasswd'])) || !isset($_POST['_newpasswd']))
$rcmail->output->command('display_message', $this->gettext('nopassword'), 'error');
else {
diff --git a/roundcubemail/plugins/sasl_password/sasl_password.php b/roundcubemail/plugins/sasl_password/sasl_password.php
index ed1624e71..0152ec2ba 100644
--- a/roundcubemail/plugins/sasl_password/sasl_password.php
+++ b/roundcubemail/plugins/sasl_password/sasl_password.php
@@ -26,13 +26,14 @@ class sasl_password extends rcube_plugin
$rcmail->output->add_label('password');
$this->register_action('plugin.saslpassword', array($this, 'password_init'));
$this->register_action('plugin.saslpassword-save', array($this, 'password_save'));
- $this->register_handler('plugin.body', array($this, 'password_form'));
$this->include_script('sasl_password.js');
}
function password_init()
{
$this->add_texts('locale/');
+ $this->register_handler('plugin.body', array($this, 'password_form'));
+
$rcmail = rcmail::get_instance();
$rcmail->output->set_pagetitle($this->gettext('changepasswd'));
$rcmail->output->send('plugin');
@@ -43,6 +44,7 @@ class sasl_password extends rcube_plugin
$rcmail = rcmail::get_instance();
$this->add_texts('locale/');
+ $this->register_handler('plugin.body', array($this, 'password_form'));
if (!isset($_POST['_curpasswd']) || !isset($_POST['_newpasswd'])) {
$rcmail->output->command('display_message', $this->gettext('nopassword'), 'error');