6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
10/23/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#4377] Horde maintenance not listing all applicable tasks for confirmation
*
Your Email Address
*
Spam protection
Enter the letters below:
. ..__ . ..__ __ \ /| \| || \/ ` \/ |__/|__||__/\__.
Comment
> The Horde maintenance task confirmation page isn't displaying all of > the applicable monthly tasks initially. In this case, IMP should be > prompting the user to confirm the rename_sentmail_monthly, > delete_sentmail_monthly, delete_attachments_monthly, and purge_trash > tasks. Instead, it prompts only for the first task, > rename_sentmail_monthly. If I load the base URL for the site again, I > get redirected once again to the confirmation page, and then it > correctly prompts me for all four tasks. > > > > I'm using Horde 3.1.2, but the relevant code doesn't look like it's > changed much recently. The problem seems to be in Maintenance.php. > In runMaintenancePage(), $task_no is set to > $this->_needMaintenancePage(), which in this case returns 1, since > 'newpage' for the first task (rename_sentmail_monthly) is true. Then > 'newpage' for the first task is set to false. Later in > runMaintenancePage(), $tasks is truncated with array_slice() based on > $task_no, so all but the first task are removed from the list. > > > > When the page ends, the task list is saved to the session, now with > 'newpage' for the first task set to false. So on subsequent > maintenance page loads, $task_no doesn't get set, and the task list > isn't truncated. > > > > I think the fix would at least involve moving this line in Maintenance.php: > > > > $task_no = $this->_needMaintenancePage(); > > > > below this block: > > > > /* Remove 'newflag' from first task. */ > > if (!$this->_tasklist->processed(true)) { > > if (count($tasks)) { > > reset($tasks); > > $this->_tasklist->setNewPage(key($tasks), false); > > } > > }
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers