summaryrefslogtreecommitdiff
path: root/includes/form.inc
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2008-10-10 07:49:49 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2008-10-10 07:49:49 +0000
commit6828096e7e647c539f0a1ee644aa2d361f9dbf80 (patch)
tree91d9fb7e4f9973b24ab4195b09226e55a98a8ba8 /includes/form.inc
parent8375d77ae25dd19c5b0c3623ce97d4c541c8c518 (diff)
downloadbrdo-6828096e7e647c539f0a1ee644aa2d361f9dbf80.tar.gz
brdo-6828096e7e647c539f0a1ee644aa2d361f9dbf80.tar.bz2
#284887 by Dave Reid and dww: Disable autocomplete if user does not have access to the callback.
Diffstat (limited to 'includes/form.inc')
-rw-r--r--includes/form.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/form.inc b/includes/form.inc
index a9472cba6..51d8916ad 100644
--- a/includes/form.inc
+++ b/includes/form.inc
@@ -2085,7 +2085,7 @@ function theme_textfield($element) {
$extra = '';
$output = '';
- if ($element['#autocomplete_path']) {
+ if ($element['#autocomplete_path'] && menu_valid_path(array('link_path' => $element['#autocomplete_path']))) {
drupal_add_js('misc/autocomplete.js');
$class[] = 'form-autocomplete';
$extra = '<input class="autocomplete" type="hidden" id="' . $element['#id'] . '-autocomplete" value="' . check_url(url($element['#autocomplete_path'], array('absolute' => TRUE))) . '" disabled="disabled" />';