#523358 by catch: Speed up drupal_function_exists().

merge-requests/26/head
Angie Byron 2009-07-19 05:26:11 +00:00
parent 48e41d314e
commit b1938ce091
1 changed files with 6 additions and 1 deletions

View File

@ -1663,8 +1663,13 @@ function drupal_get_schema($table = NULL, $rebuild = FALSE) {
*/
function drupal_function_exists($function) {
static $checked = array();
static $maintenance;
if (defined('MAINTENANCE_MODE')) {
if (!isset($maintenance)) {
$maintenance = defined('MAINTENANCE_MODE');
}
if ($maintenance) {
return function_exists($function);
}