Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In path.module lines 87 to 89 are
$alias = path_load($pid);
drupal_set_title($alias['dst']);
$output = path_form(path_load($pid));
so path_load is called the second time although the content is already in $alias.
path_load simply does
return db_fetch_array(db_query('SELECT * FROM {url_alias} WHERE pid = %d', $pid));
So this is basically an unnecessary duplicate db_query. This is absolutely minor, because it only gets called on edit.
Comment | File | Size | Author |
---|---|---|---|
#2 | unnecessary_query.patch | 562 bytes | flk |
Comments
Comment #1
scroogie CreditAttribution: scroogie commentedChanging Title, sorry.
Comment #2
flk CreditAttribution: flk commentedreused $alias rather than calling path_load 2nd time.
Comment #3
moshe weitzman CreditAttribution: moshe weitzman commentedof course. RTBC.
Comment #4
Dries CreditAttribution: Dries commentedCommitted. Good catch! :)
Comment #5
(not verified) CreditAttribution: commented