diff options
author | David Rothstein <drothstein@gmail.com> | 2016-02-01 00:02:45 -0500 |
---|---|---|
committer | David Rothstein <drothstein@gmail.com> | 2016-02-01 00:02:45 -0500 |
commit | 25512367f8b371c311454707f85e04776a528236 (patch) | |
tree | 82df82f2b093deb2e531ae4b034a6e8c505b4177 /includes | |
parent | e58060723aaade42413eab197eb43d00a9b7ec15 (diff) | |
download | brdo-25512367f8b371c311454707f85e04776a528236.tar.gz brdo-25512367f8b371c311454707f85e04776a528236.tar.bz2 |
Issue #2599326 by Blanca.Esqueda, David_Rothstein: Fix autocomplete functionality on servers that are not configured to automatically recognize index.php
Diffstat (limited to 'includes')
-rw-r--r-- | includes/form.inc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/includes/form.inc b/includes/form.inc index ca9b88fb3..baadcef28 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -3982,7 +3982,12 @@ function form_process_autocomplete($element) { // browser interpreting the path plus search string as an actual file. $current_clean_url = isset($GLOBALS['conf']['clean_url']) ? $GLOBALS['conf']['clean_url'] : NULL; $GLOBALS['conf']['clean_url'] = 0; - $element['#autocomplete_input']['#url_value'] = url($element['#autocomplete_path'], array('absolute' => TRUE)); + // Force the script path to 'index.php', in case the server is not + // configured to find it automatically. Normally it is the responsibility + // of the site to do this themselves using hook_url_outbound_alter() (see + // url()) but since this code is forcing non-clean URLs on sites that don't + // normally use them, it is done here instead. + $element['#autocomplete_input']['#url_value'] = url($element['#autocomplete_path'], array('absolute' => TRUE, 'script' => 'index.php')); $GLOBALS['conf']['clean_url'] = $current_clean_url; } return $element; |