diff --git a/includes/common.inc b/includes/common.inc index c97704c..690d4fb 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -4271,6 +4271,7 @@ function drupal_add_js($data = NULL, $options = NULL) { 'data' => array( array('basePath' => base_path()), array('pathPrefix' => empty($prefix) ? '' : $prefix), + array('alertDisplay' => (int) variable_get('js_error_level', JS_ERROR_REPORTING_ALERT)), ), 'type' => 'setting', 'scope' => 'header', diff --git a/misc/drupal.js b/misc/drupal.js index 8f667f7..db3ee8c 100644 --- a/misc/drupal.js +++ b/misc/drupal.js @@ -417,7 +417,7 @@ Drupal.getSelection = function (element) { * Shows an error on an alert window or the console */ Drupal.alert = function (message) { - if (Drupal.settings.errorDisplay) { + if (Drupal.settings.alertDisplay) { alert(message); } else { diff --git a/modules/system/system.module b/modules/system/system.module index 343a0cf..8a080fa 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -1099,10 +1099,6 @@ function system_library() { 'version' => VERSION, 'js' => array( 'misc/ajax.js' => array('group' => JS_LIBRARY, 'weight' => 2), - array( - 'type' => 'setting', - 'data' => array('errorDisplay' => (int) variable_get('js_error_level', JS_ERROR_REPORTING_ALERT)), - ), ), 'dependencies' => array( array('system', 'drupal.progress'), @@ -1176,10 +1172,6 @@ function system_library() { 'version' => VERSION, 'js' => array( 'misc/autocomplete.js' => array('group' => JS_DEFAULT), - array( - 'type' => 'setting', - 'data' => array('errorDisplay' => (int) variable_get('js_error_level', JS_ERROR_REPORTING_ALERT)), - ), ), );