summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-07-19 05:26:11 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-07-19 05:26:11 +0000
commitb1938ce0913f05b3899b10287fba09acc710c598 (patch)
treedf3f008a6e3070e9315ab3b1dfc2d0e31dadd63c
parent48e41d314e7ed278f131e705fbfd0dd6b766a83d (diff)
downloadbrdo-b1938ce0913f05b3899b10287fba09acc710c598.tar.gz
brdo-b1938ce0913f05b3899b10287fba09acc710c598.tar.bz2
#523358 by catch: Speed up drupal_function_exists().
-rw-r--r--includes/bootstrap.inc7
1 files changed, 6 insertions, 1 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index 3693719f1..ba88daf7b 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -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);
}