Summary | Login Tasks |
Queue | Horde Base |
Queue Version | Git master |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | slusarz (at) horde (dot) org |
Requester | laurent.foucher (at) iut-tlse3 (dot) fr |
Created | 10/14/2012 (4644 days ago) |
Due | |
Updated | 04/16/2013 (4460 days ago) |
Assigned | 04/16/2013 (4460 days ago) |
Resolved | 04/16/2013 (4460 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
State ⇒ Resolved
was broken and would have caused the behavior described here.
commit aba06060e577b72b2df863bcb4044c546a57b494
Author: Michael M Slusarz <slusarz@horde.org>
Date: Mon Apr 15 22:34:20 2013 -0600
Bug #11518: Fix confirmation of login tasksConflicts:
horde/templates/logintasks/logintasks.html.php
horde/templates/logintasks/smartmobile.html.php
horde/services/logintasks.php | 7 ++++---
horde/templates/logintasks/logintasks.html | 4 ++--
horde/templates/logintasks/smartmobile.html | 4 ++--
3 files changed, 8 insertions(+), 7 deletions(-)
http://git.horde.org/horde-git/-/commit/aba06060e577b72b2df863bcb4044c546a57b494
Queue ⇒ Horde Base
State ⇒ Feedback
commit 4dbbc7a9745aadc6d97dd5d0b0a973d99579d841
Author: Michael M Slusarz <slusarz@horde.org>
Date: Mon Apr 15 22:34:20 2013 -0600
Bug #11518: Fix confirmation of login taskshorde/services/logintasks.php | 7 ++++---
horde/templates/logintasks/logintasks.html.php | 4 ++--
horde/templates/logintasks/smartmobile.html.php | 4 ++--
3 files changed, 8 insertions(+), 7 deletions(-)
http://git.horde.org/horde-git/-/commit/4dbbc7a9745aadc6d97dd5d0b0a973d99579d841
user that has both DeleteSentmailMonthly and RenameSentmailMonthly set
active. It appears that the RenameSentMailMonthly is never called if
both are active.
Horde does ask the user permission for both logintasks, but only
DeleteSentmailMonthly is called. I've debugged this further in
LoginTasks.php. The problem is in the runTasks-function and the way it
handles user confirmation.
Logintasks are executed only if one of the following is true:
if (($val instanceof Horde_LoginTasks_SystemTask) ||
in_array($val->display, array(self::DISPLAY_AGREE,
self::DISPLAY_NOTICE, self::DISPLAY_NONE)) ||
in_array($key, $opts['confirmed']))
First two aren't but the third one should be because the user has
confirmed the tasks. I've debugged $key and $opts['confirmed'] and
they contain the following if both tasks are active:
$key:
2013-04-09T13:02:22+00:00 DEBUG: Variable information:
int(0)
2013-04-09T13:02:19+00:00 DEBUG: Variable information:
int(1)
$opts['confirmed']:
2013-04-09T13:02:22+00:00 DEBUG: Variable information:
array(2) {
[0]=>
string(20) "logintasks_confirm_0"
[1]=>
string(20) "logintasks_confirm_1"
}
The non-strict checking with in_array(0, "logintasks_confirm_X") will
always evaluate to true because of this:
https://bugs.php.net/bug.php?id=14343&edit=1
In other hand all the other tasks won't be executed because every
non-zero check with in_array will evaluate to false.
The comparison between int and string seems to result in strange behaviour.
You've cleared out all the user's preferences before trying this
out, correct?
Unless you can debug this yourself, this ticket will be closed as
this behavior is not reproducible.
in my configuration.
Priority ⇒ 1. Low
appear on the same confirmation page.
You've cleared out all the user's preferences before trying this out, correct?
Unless you can debug this yourself, this ticket will be closed as this
behavior is not reproducible.
commit 590f8d984fa60424dc8be2d50fb0c02eee2d162c
Author: Michael M Slusarz <slusarz@horde.org>
Date: Sun Oct 14 20:14:51 2012 -0600
Bug #11518: Fix display mailbox listimp/lib/LoginTasks/Task/PurgeSentmail.php | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
http://git.horde.org/horde-git/-/commit/590f8d984fa60424dc8be2d50fb0c02eee2d162c
both the rename sentmail monthly and the delete sentmail monthly
tasks are working correctly.
You will have to debug further to explain what is not working
correctly on your system, or else you should take your questions to
the mailing list.
public function runTasks(array $opts = arraimp/lib/LoginTasks/Task/y())
{
Horde::logMessage('==== ENTRY IN RUN TASK =====', 'WARNING');
.....
/* Perform ready tasks now. */
foreach ($this->_tasklist->ready(!$this->_tasklist->processed
|| $opts['user_confirmed']) as $key => $val) {
if (($val instanceof Horde_LoginTasks_SystemTask) ||
in_array($val->display, array(self::DISPLAY_AGREE,
self::DISPLAY_NOTICE, self::DISPLAY_NONE)) ||
in_array($key, $opts['confirmed'])) {
Horde::logMessage('RUN TASK : '.get_class($val), 'WARNING');
$val->execute();
}
}
In imp/lib/LoginTasks/Task/DeleteSentmailMonthly.php
public function execute()
{
Horde::logMessage('DELETE_SENT_MONTHLY EXECUTE', 'WARNING');
and imp/lib/LoginTasks/Task/RenameSentmailMonthly.php
public function execute()
{
Horde::logMessage('RENAMESENTMAILMONTHLY EXECUTE', 'WARNING');
TEST1
---------
rename_sentmail_monthly is set to on and delete_sentmail_monthly_keep
is different from 0. Perform tasks are well displayed on screen. Here
the log :
HORDE: [imp] ==== ENTRY IN RUN TASK ===== [pid 26221 on line 192 of
"/usr/share/php/Horde/LoginTasks.php"]
HORDE: [imp] RUN TASK : IMP_LoginTasks_Task_DeleteSentmailMonthly [pid
26221 on line 216 of "/usr/share/php/Horde/LoginTasks.php"]
HORDE: [imp] DELETE_SENT_MONTHLY EXECUTE [pid 26221 on line 35 of
"/var/www/horde4/imp/lib/LoginTasks/Task/DeleteSentmailMonthly.php"]
HORDE: [imp] ==== ENTRY IN RUN TASK ===== [pid 26221 on line 192 of
"/usr/share/php/Horde/LoginTasks.php"]
HORDE: [imp] ==== ENTRY IN RUN TASK ===== [pid 26221 on line 192 of
"/usr/share/php/Horde/LoginTasks.php"]
HORDE: [imp] ==== ENTRY IN RUN TASK ===== [pid 26213 on line 192 of
"/usr/share/php/Horde/LoginTasks.php"]
I don't understand why RenameSentmailMonthly.php is not called after
DeleteSentmailMonthly.php
TEST2
---------
rename_sentmail_monthly is set to on and delete_sentmail_monthly_keep
is set to zero. Here the log :
HORDE: [imp] ==== ENTRY IN RUN TASK ===== [pid 26257 on line 192 of
"/usr/share/php/Horde/LoginTasks.php"]
HORDE: [imp] RUN TASK : IMP_LoginTasks_Task_RenameSentmailMonthly [pid
26257 on line 216 of "/usr/share/php/Horde/LoginTasks.php"]
HORDE: [imp] RENAMESENTMAILMONTHLY EXECUTE [pid 26257 on line 46 of
"/var/www/horde4/imp/lib/LoginTasks/Task/RenameSentmailMonthly.php"]
HORDE [imp] ==== ENTRY IN RUN TASK ===== [pid 26257 on line 192 of
"/usr/share/php/Horde/LoginTasks.php"]
HORDE: [imp] ==== ENTRY IN RUN TASK ===== [pid 26257 on line 192 of
"/usr/share/php/Horde/LoginTasks.php"]
HORDE: [imp] ==== ENTRY IN RUN TASK ===== [pid 26146 on line 192 of
"/usr/share/php/Horde/LoginTasks.php"]
Now, folders are well created.
Thanks.
and put the old sent-mail messages in a new created folder
sent-mail-yy-mm-dd. Thanks.
both the rename sentmail monthly and the delete sentmail monthly tasks
are working correctly.
You will have to debug further to explain what is not working
correctly on your system, or else you should take your questions to
the mailing list.
DeleteSentmailMonthly.php and RenameSentmailMonthly.php. In this test,
i had disabled PurgeSentmail.php. In fact, i would like to delete the
old renamed sent-mail folders and put the old sent-mail messages in a
new created folder sent-mail-yy-mm-dd. Thanks.
State ⇒ Feedback
Assigned to Michael Slusarz
zero and rename_sentmail_monthly is active, the task
RenameSentmailMonthly is never called and then the folders are never
renamed.
messages older than a month, there may very well be no messages left
to move to an older month sentmail maiilbox (we don't "rename" the
sentmail mailbox; we move messages sent in a previous month to a
separate mailbox).
If you don't want this behavior, you should disable the purge task.
commit 590f8d984fa60424dc8be2d50fb0c02eee2d162c
Author: Michael M Slusarz <slusarz@horde.org>
Date: Sun Oct 14 20:14:51 2012 -0600
Bug #11518: Fix display mailbox listimp/lib/LoginTasks/Task/PurgeSentmail.php | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
http://git.horde.org/horde-git/-/commit/590f8d984fa60424dc8be2d50fb0c02eee2d162c
Priority ⇒ 2. Medium
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Summary ⇒ Login Tasks
Type ⇒ Bug
Queue ⇒ IMP
and RenameSentmailMonthly.
When the preference delete_sentmail_monthly_keep is different from
zero and rename_sentmail_monthly is active, the task
RenameSentmailMonthly is never called and then the folders are never
renamed.
Moreover, not sure but in PurgeSentmail.php Line 84.
$mbox_list = $val->display_html; shouldn't be
$mbox_list[] = $val->display_html;
Thanks.