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 commentedChanging Title, sorry.
Comment #2
flk commentedreused $alias rather than calling path_load 2nd time.
Comment #3
moshe weitzman commentedof course. RTBC.
Comment #4
dries commentedCommitted. Good catch! :)
Comment #5
(not verified) commented