Commit 22e06931 authored by Chris Graham's avatar Chris Graham

Tweaks to get_default_option, inspired by automated error mail

parent c26c326f
......@@ -90,11 +90,12 @@ function _multi_lang()
* Get the default value of a config option.
*
* @param ID_TEXT $name The name of the option
* @return ?SHORT_TEXT The value (null: disabled)
* @return ?SHORT_TEXT The value (null: disabled / no such option)
*/
function get_default_option($name)
{
$path = 'hooks/systems/config/' . filter_naughty($name);
clearstatcache();
if (!is_file(get_file_base() . '/sources/' . $path . '.php') && !is_file(get_file_base() . '/sources_custom/' . $path . '.php')) {
return null;
}
......
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