- Patch #770664 by Damien Tournoud: path whitelist uses an unsupported GROUP BY alias.

merge-requests/26/head
Dries Buytaert 2010-07-19 22:12:14 +00:00
parent 84916ad9c7
commit 35bad3b13b
1 changed files with 1 additions and 1 deletions

View File

@ -335,7 +335,7 @@ function drupal_path_alias_whitelist_rebuild($source = NULL) {
// path it corresponds to. This is the portion of the path before the first
// '/', if present, otherwise the whole path itself.
$whitelist = array();
$result = db_query("SELECT SUBSTRING_INDEX(source, '/', 1) AS path FROM {url_alias} GROUP BY path");
$result = db_query("SELECT DISTINCT SUBSTRING_INDEX(source, '/', 1) AS path FROM {url_alias}");
foreach ($result as $row) {
$whitelist[$row->path] = TRUE;
}