diff --git a/admin/tool/messageinbound/classes/edit_handler_form.php b/admin/tool/messageinbound/classes/edit_handler_form.php index bcb6af599ca..a3c36ac2702 100644 --- a/admin/tool/messageinbound/classes/edit_handler_form.php +++ b/admin/tool/messageinbound/classes/edit_handler_form.php @@ -67,7 +67,7 @@ class tool_messageinbound_edit_handler_form extends moodleform { DAYSECS => get_string('oneday', 'tool_messageinbound'), WEEKSECS => get_string('oneweek', 'tool_messageinbound'), YEARSECS => get_string('oneyear', 'tool_messageinbound'), - '' => get_string('noexpiry', 'tool_messageinbound'), + 0 => get_string('noexpiry', 'tool_messageinbound'), ); $mform->addElement('select', 'defaultexpiration', get_string('defaultexpiration', 'tool_messageinbound'), $options); $mform->addHelpButton('defaultexpiration', 'defaultexpiration', 'tool_messageinbound'); diff --git a/lib/classes/message/inbound/handler.php b/lib/classes/message/inbound/handler.php index ab92ee1c624..d1d4d9469e5 100644 --- a/lib/classes/message/inbound/handler.php +++ b/lib/classes/message/inbound/handler.php @@ -53,7 +53,7 @@ abstract class handler { /** * @var int $defaultexpiration The default expiration time to use when created a new key. */ - private $defaultexpiration = 86400; + private $defaultexpiration = WEEKSECS; /** * @var bool $validateaddress Whether to validate the sender address when processing this handler.