Commit a26f6311 authored by Aaron Wells's avatar Aaron Wells Committed by Robert Lyon

Be honest about the forum post delay's current value

Bug 996337: We always treat it as an integer, so it makes the most sense
to just show the user this config's integer value.

Change-Id: Ia4b198b0f642b94e36995f91a5826125bd64434e
parent 2fe347c0
......@@ -523,10 +523,7 @@ EOF;
}
public static function get_config_options() {
$postdelay = get_config_plugin('interaction', 'forum', 'postdelay');
if (!is_numeric($postdelay)) {
$postdelay = 30;
}
$postdelay = (int) get_config_plugin('interaction', 'forum', 'postdelay');
return array(
'elements' => array(
......@@ -535,7 +532,7 @@ EOF;
'description' => get_string('postdelaydescription', 'interaction.forum'),
'type' => 'text',
'rules' => array('integer' => true, 'minvalue' => 0, 'maxvalue' => 10000000),
'defaultvalue' => (int) $postdelay,
'defaultvalue' => $postdelay,
),
),
'renderer' => 'table'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment