[development] My first post: path_set_alias() and multiple aliases
Nir Aides
nir at winpdb.org
Wed Feb 18 22:19:25 UTC 2009
Hi,
path_set_alias($path, $alias) inserts a new alias in case there is already
an alias for $path. However drupal_lookup_path() keeps picking up the old
alias.
It makes sense to keep the old alias so links don't break in a website, but
why look up the old alias when generating a URL?
Is this a bug?
Shouldn't the query "SELECT dst FROM {url_alias} WHERE src = '%s' AND
language IN('%s', '') ORDER BY language DESC" in drupal_lookup_path() be
rewritten as "SELECT dst FROM {url_alias} WHERE src = '%s' AND language
IN('%s', '') ORDER BY language DESC, pid DESC"
Also, shouldn't this be db_result(db_query_range()) instead of just
db_result(db_query())?
Nir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20090219/35535c3d/attachment.htm
More information about the development
mailing list