diff --git a/htdocs/interaction/forum/lib.php b/htdocs/interaction/forum/lib.php index 6f5af428e02a2255db626adc53bd6a595bf0ae5b..09fcf6f00c1f3906b67a8e53370876e401e999d0 100644 --- a/htdocs/interaction/forum/lib.php +++ b/htdocs/interaction/forum/lib.php @@ -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'