X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=install-utils.inc;h=6a99ec5535a413ed02ebfff42344201c69521357;hb=10c679488c9f7184c6165f2a16fb31e778f7efe1;hp=9723e8dc264077d4645c56a6e694905be0c8dbb3;hpb=13b739ec461d845cd8eb719fca97df6cfd13a64a;p=lhc%2Fweb%2Fwiklou.git diff --git a/install-utils.inc b/install-utils.inc index 9723e8dc26..6a99ec5535 100644 --- a/install-utils.inc +++ b/install-utils.inc @@ -112,7 +112,7 @@ function dbsource( $fname, $db = false ) { /** * Get the value of session.save_path * - * Per http://uk.php.net/manual/en/ref.session.php#ini.session.save-path, + * Per http://www.php.net/manual/en/ref.session.php#ini.session.save-path, * this might have some additional preceding parts which need to be * ditched * @@ -124,4 +124,17 @@ function mw_get_session_save_path() { return $path; } -?> +/** + * Is dl() available to us? + * + * According to http://www.php.net/manual/en/function.dl.php, dl() + * is *not* available when `enable_dl` is off, or under `safe_mode` + * + * @return bool + */ +function mw_have_dl() { + return function_exists( 'dl' ) + && is_callable( 'dl' ) + && wfIniGetBool( 'enable_dl' ) + && !wfIniGetBool( 'safe_mode' ); +} \ No newline at end of file