On the Change Password plugin [ROUNDCUBEDIR/plugins/ispconfig3_pass/ispconfig3_pass.php, on saving the new password, one gets
"Soap Error: autoresponder_end_date_isgreater"
with Roundcube 0.8, ISPconfig 3.0.5Beta1
http://bugs.web-wack.at/issues/37 (i haven't received a confirmation email from registration on the bug tracker)
I created a patch to check if the autoresponder dates aren't 0000's (not set), otherwise, it should all work as normal. I also repositioned the Try/Catch blocks to only include the relevant parts (this could probably be better, i hate repeated code)
Code:
--- ispconfig3_pass.php.old 2012-12-04 22:14:53.000000000 -0600
+++ ispconfig3_pass.php 2012-12-04 22:06:38.000000000 -0600
@@ -63,48 +63,58 @@
{
try
{
- $soap = new SoapClient(null, array('location' => $this->rcmail_inst->config->get('soap_url').'index.php',
+ $soap = new SoapClient(null, array('location' => $this->rcmail_inst->config->get('soap_url').'index.php',
'uri' => $this->rcmail_inst->config->get('soap_url')));
$session_id = $soap->login($this->rcmail_inst->config->get('remote_soap_user'),$this->rcmail_inst->config->get('remote_soap_pass'));
$mail_user = $soap->mail_user_get($session_id, array('login' => $this->rcmail_inst->user->data['username']));
-
- $startdate = $mail_user[0]['autoresponder_start_date'];
- $enddate = $mail_user[0]['autoresponder_end_date'];
-
- if (strtotime($startdate) <= time())
- $startdate = date('Y').'-'.date('m').'-'.date('d').' '.date('H').':'.date('i', time() + 300);
-
- $startdate = array('year' => substr($startdate,0,4),
- 'month' => substr($startdate,5,2),
- 'day' => substr($startdate,8,2),
- 'hour' => substr($startdate,11,2),
- 'minute' => substr($startdate,14,2));
-
- $enddate = array('year' => substr($enddate,0,4),
- 'month' => substr($enddate,5,2),
- 'day' => substr($enddate,8,2),
- 'hour' => substr($enddate,11,2),
- 'minute' => substr($enddate,14,2));
-
- $params = $mail_user[0];
- $params['autoresponder_start_date'] = $startdate;
- $params['autoresponder_end_date'] = $enddate;
- $params['password'] = $newpwd;
+//PATCH 12-04-2012 http://bugs.web-wack.at/issues/37 senseisimple - [Soap Error: autoresponder_end_date_isgreater]
+ }
+ catch (SoapFault $e)
+ {
+ $this->rcmail_inst->output->command('display_message', 'Soap Error: '.$e->getMessage(), 'error');
+ }
+
+ $params = $mail_user[0];
+ $params['password'] = $newpwd;
+ if ( $mail_user[0]['autoresponder_start_date'] != '0000-00-00 00:00:00' ) {
+ $startdate = $mail_user[0]['autoresponder_start_date'];
+ $enddate = $mail_user[0]['autoresponder_end_date'];
+
+ if (strtotime($startdate) <= time())
+ $startdate = date('Y').'-'.date('m').'-'.date('d').' '.date('H').':'.date('i', time() + 300);
+ $startdate = array('year' => substr($startdate,0,4),
+ 'month' => substr($startdate,5,2),
+ 'day' => substr($startdate,8,2),
+ 'hour' => substr($startdate,11,2),
+ 'minute' => substr($startdate,14,2));
+
+ $enddate = array('year' => substr($enddate,0,4),
+ 'month' => substr($enddate,5,2),
+ 'day' => substr($enddate,8,2),
+ 'hour' => substr($enddate,11,2),
+ 'minute' => substr($enddate,14,2));
+ $params['autoresponder_start_date'] = $startdate;
+ $params['autoresponder_end_date'] = $enddate;
+ }
+
+ try
+ {
$uid = $soap->client_get_id($session_id, $mail_user[0]['sys_userid']);
$update = $soap->mail_user_update($session_id, $uid, $mail_user[0]['mailuser_id'], $params);
$soap->logout($session_id);
-
+
$this->rcmail_inst->output->command('display_message', $this->gettext('successfullysaved'), 'confirmation');
-
+
$_SESSION['password'] = $this->rcmail_inst->encrypt($newpwd);
-
+
$this->rcmail_inst->user->data['password'] = $_SESSION['password'];
}
catch (SoapFault $e)
{
$this->rcmail_inst->output->command('display_message', 'Soap Error: '.$e->getMessage(), 'error');
}
+//END PATCH 12-4-2012
}
}
$this->init_html();
@@ -154,4 +164,4 @@
return $out;
}
}
-?>
\ No newline at end of file
+?>