6.0.0-beta1
7/27/25

[#4377] Horde maintenance not listing all applicable tasks for confirmation
Summary Horde maintenance not listing all applicable tasks for confirmation
Queue Horde Framework Packages
Queue Version FRAMEWORK_3
Type Bug
State Resolved
Priority 2. Medium
Owners Horde Developers (at)
Requester david-shafer (at) uiowa (dot) edu
Created 09/03/2006 (6902 days ago)
Due
Updated 11/13/2006 (6831 days ago)
Assigned 09/25/2006 (6880 days ago)
Resolved 11/13/2006 (6831 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
11/13/2006 02:34:43 PM Jan Schneider Comment #3
State ⇒ Resolved
Reply to this comment
Fixed.
09/25/2006 04:54:02 PM Jan Schneider Assigned to Horde DevelopersHorde Developers
State ⇒ Assigned
 
09/03/2006 08:10:36 PM david-shafer (at) uiowa (dot) edu Comment #2 Reply to this comment
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.
I misspoke above. The _needMaintenancePage() call returns 0, not 1.
09/03/2006 08:08:29 PM david-shafer (at) uiowa (dot) edu Comment #1
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ Horde maintenance not listing all applicable tasks for confirmation
Queue ⇒ Horde Framework Packages
Reply to this 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);

   }

}

Saved Queries