summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/field/field.test2
-rw-r--r--modules/poll/poll.test2
-rw-r--r--modules/profile/profile.admin.inc2
-rw-r--r--modules/profile/profile.pages.inc2
-rw-r--r--modules/simpletest/tests/database_test.module10
-rw-r--r--modules/system/system.admin.inc2
-rw-r--r--modules/system/system.module6
-rw-r--r--modules/taxonomy/taxonomy.pages.inc4
-rw-r--r--modules/upload/upload.module2
-rw-r--r--modules/user/user.pages.inc2
10 files changed, 17 insertions, 17 deletions
diff --git a/modules/field/field.test b/modules/field/field.test
index 34a561392..9d770076f 100644
--- a/modules/field/field.test
+++ b/modules/field/field.test
@@ -1405,7 +1405,7 @@ class FieldFormTestCase extends FieldTestCase {
$this->drupalPost(NULL, $edit, $submit);
unset($this->additionalCurlOptions[CURLOPT_URL]);
- // The response is drupal_json, so we need to undo some escaping.
+ // The response is drupal_json_output, so we need to undo some escaping.
$commands = json_decode(str_replace(array('\x3c', '\x3e', '\x26'), array("<", ">", "&"), $this->drupalGetContent()));
// The JSON response will be two AJAX commands. The first is a settings
diff --git a/modules/poll/poll.test b/modules/poll/poll.test
index a5f668efa..c7f8e5c17 100644
--- a/modules/poll/poll.test
+++ b/modules/poll/poll.test
@@ -344,7 +344,7 @@ class PollJSAddChoice extends DrupalWebTestCase {
$this->drupalPost(NULL, $edit, t('More choices'));
unset($this->additionalCurlOptions[CURLOPT_URL]);
- // The response is drupal_json, so we need to undo some escaping.
+ // The response is drupal_json_output, so we need to undo some escaping.
$commands = json_decode(str_replace(array('\x3c', '\x3e', '\x26'), array("<", ">", "&"), $this->drupalGetContent()));
// The JSON response will be two AJAX commands. The first is a settings
diff --git a/modules/profile/profile.admin.inc b/modules/profile/profile.admin.inc
index b01d7a0be..a9303e6e7 100644
--- a/modules/profile/profile.admin.inc
+++ b/modules/profile/profile.admin.inc
@@ -423,5 +423,5 @@ function profile_admin_settings_autocomplete($string) {
foreach ($result as $data) {
$matches[$data->category] = check_plain($data->category);
}
- drupal_json($matches);
+ drupal_json_output($matches);
}
diff --git a/modules/profile/profile.pages.inc b/modules/profile/profile.pages.inc
index b338e8604..300e57cae 100644
--- a/modules/profile/profile.pages.inc
+++ b/modules/profile/profile.pages.inc
@@ -134,5 +134,5 @@ function profile_autocomplete($field, $string) {
}
}
- drupal_json($matches);
+ drupal_json_output($matches);
}
diff --git a/modules/simpletest/tests/database_test.module b/modules/simpletest/tests/database_test.module
index df446deb8..422f097fc 100644
--- a/modules/simpletest/tests/database_test.module
+++ b/modules/simpletest/tests/database_test.module
@@ -77,7 +77,7 @@ function database_test_menu() {
*/
function database_test_db_query_temporary() {
$table_name = db_query_temporary('SELECT status FROM {system}', array());
- drupal_json(array(
+ drupal_json_output(array(
'table_name' => $table_name,
'row_count' => db_select($table_name)->countQuery()->execute()->fetchField(),
));
@@ -102,7 +102,7 @@ function database_test_even_pager_query($limit) {
$names = $query->execute()->fetchCol();
- drupal_json(array(
+ drupal_json_output(array(
'names' => $names,
));
exit;
@@ -126,7 +126,7 @@ function database_test_odd_pager_query($limit) {
$names = $query->execute()->fetchCol();
- drupal_json(array(
+ drupal_json_output(array(
'names' => $names,
));
exit;
@@ -155,7 +155,7 @@ function database_test_tablesort() {
// We need all the results at once to check the sort.
$tasks = $query->execute()->fetchAll();
- drupal_json(array(
+ drupal_json_output(array(
'tasks' => $tasks,
));
exit;
@@ -184,7 +184,7 @@ function database_test_tablesort_first() {
// We need all the results at once to check the sort.
$tasks = $query->execute()->fetchAll();
- drupal_json(array(
+ drupal_json_output(array(
'tasks' => $tasks,
));
exit;
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc
index 2d8c81713..74dbd47a8 100644
--- a/modules/system/system.admin.inc
+++ b/modules/system/system.admin.inc
@@ -1790,7 +1790,7 @@ function system_regional_settings_submit($form, &$form_state) {
*/
function system_date_time_lookup() {
$result = format_date(REQUEST_TIME, 'custom', $_GET['format']);
- drupal_json($result);
+ drupal_json_output($result);
}
/**
diff --git a/modules/system/system.module b/modules/system/system.module
index ab3c966b5..7ed7a6818 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -816,7 +816,7 @@ function system_menu() {
);
$items['admin/config/search/clean-urls/check'] = array(
'title' => 'Clean URL check',
- 'page callback' => 'drupal_json',
+ 'page callback' => 'drupal_json_output',
'page arguments' => array(array('status' => TRUE)),
'access callback' => TRUE,
'type' => MENU_CALLBACK,
@@ -2656,7 +2656,7 @@ function system_timezone($abbreviation = '', $offset = -1, $is_daylight_saving_t
// interpreted as the empty string.
$abbreviation = $abbreviation ? $abbreviation : '';
$timezone = timezone_name_from_abbr($abbreviation, intval($offset), $is_daylight_saving_time);
- drupal_json($timezone);
+ drupal_json_output($timezone);
}
/**
@@ -2768,7 +2768,7 @@ function system_page_build(&$page) {
// Trigger cron run via AJAX.
'#attached' => array(
'js' => array(
- '(function($){ $.get(' . drupal_to_js(url('system/run-cron-image')) . '); })(jQuery);' => array('type' => 'inline', 'scope' => 'header'),
+ '(function($){ $.get(' . drupal_json_encode(url('system/run-cron-image')) . '); })(jQuery);' => array('type' => 'inline', 'scope' => 'header'),
),
),
// Trigger cron run for clients not supporting JavaScript (fall-back).
diff --git a/modules/taxonomy/taxonomy.pages.inc b/modules/taxonomy/taxonomy.pages.inc
index 488db5762..e6d68d2cc 100644
--- a/modules/taxonomy/taxonomy.pages.inc
+++ b/modules/taxonomy/taxonomy.pages.inc
@@ -135,7 +135,7 @@ function taxonomy_autocomplete_legacy($vid = 0, $tags_typed = '') {
}
}
- drupal_json(array_merge($term_matches, $synonym_matches));
+ drupal_json_output(array_merge($term_matches, $synonym_matches));
}
/**
@@ -191,5 +191,5 @@ function taxonomy_autocomplete($field_name, $bundle, $tags_typed = '') {
}
}
- drupal_json($term_matches);
+ drupal_json_output($term_matches);
}
diff --git a/modules/upload/upload.module b/modules/upload/upload.module
index 055e0cd91..e4451c3aa 100644
--- a/modules/upload/upload.module
+++ b/modules/upload/upload.module
@@ -644,7 +644,7 @@ function upload_js() {
if (!($cached_form = form_get_cache($_POST['form_build_id'], $cached_form_state)) || !isset($cached_form['#node']) || !isset($cached_form['attachments'])) {
form_set_error('form_token', t('Validation error, please try again. If this error persists, please contact the site administrator.'));
$output = theme('status_messages');
- print drupal_to_js(array('status' => TRUE, 'data' => $output));
+ print drupal_json_encode(array('status' => TRUE, 'data' => $output));
exit();
}
diff --git a/modules/user/user.pages.inc b/modules/user/user.pages.inc
index 80e00ae49..cfe701530 100644
--- a/modules/user/user.pages.inc
+++ b/modules/user/user.pages.inc
@@ -18,7 +18,7 @@ function user_autocomplete($string = '') {
}
}
- drupal_json($matches);
+ drupal_json_output($matches);
}
/**