1: <?php
2: /**
3: * Login task that checks for drafts to be recovered.
4: *
5: * Copyright 2011-2012 Horde LLC (http://www.horde.org/)
6: *
7: * See the enclosed file COPYING for license information (GPL). If you
8: * did not receive this file, see http://www.horde.org/licenses/gpl.
9: *
10: * @author Michael Slusarz <slusarz@horde.org>
11: * @category Horde
12: * @license http://www.horde.org/licenses/gpl GPL
13: * @package IMP
14: */
15: class IMP_LoginTasks_Task_RecoverDraft extends Horde_LoginTasks_Task
16: {
17: /**
18: * The interval at which to run the task.
19: *
20: * @var integer
21: */
22: public $interval = Horde_LoginTasks::EVERY;
23:
24: /**
25: * Display type.
26: *
27: * @var integer
28: */
29: public $display = Horde_LoginTasks::DISPLAY_NONE;
30:
31: /**
32: * Recovers saved drafts.
33: */
34: public function execute()
35: {
36: /* Check for drafts due to session timeouts. */
37: $GLOBALS['injector']->getInstance('IMP_Factory_Compose')->create()->recoverSessionExpireDraft();
38: }
39:
40: }
41: