#523358 by catch: Speed up drupal_function_exists().
parent
48e41d314e
commit
b1938ce091
|
@ -1663,8 +1663,13 @@ function drupal_get_schema($table = NULL, $rebuild = FALSE) {
|
||||||
*/
|
*/
|
||||||
function drupal_function_exists($function) {
|
function drupal_function_exists($function) {
|
||||||
static $checked = array();
|
static $checked = array();
|
||||||
|
static $maintenance;
|
||||||
|
|
||||||
if (defined('MAINTENANCE_MODE')) {
|
if (!isset($maintenance)) {
|
||||||
|
$maintenance = defined('MAINTENANCE_MODE');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($maintenance) {
|
||||||
return function_exists($function);
|
return function_exists($function);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue