Closed (fixed)
Project:
Addresses
Version:
6.x-1.0-alpha2
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Sep 2008 at 21:39 UTC
Updated:
6 Oct 2008 at 07:03 UTC
Massa,
In the code below, you use a variable named $type. It is a local variable that is never set. I suggest you either remove it or fix the code... I'm not too sure what you had in mind, so I cannot just remove it.
Thank you.
Alexis Wilke
function _addresses_user_address_get($id) {
static $addresses;
if (empty($addresses[$type][$id])) {
$adr = db_query("SELECT * FROM {addresses_user}
WHERE eid = %d
ORDER BY is_primary DESC", $id);
// Transform all SQL findings into arrays
$addresses[$type][$id] = array();
while ($address = db_fetch_array($adr)) {
$addresses[$type][$id][] = $address;
}
}
return $addresses[$type][$id];
}
Comments
Comment #1
brmassa commentedAlexis,
originally, i was thinking about to record both CCK/node and user addresses using the same table. thats the reason about $type ('user', 'node'). But when i found a solution for CCK storage (its a tricky problem), the table was moved to user module because it was the only one to use it.
removed.
regards,
massa
Comment #2
AlexisWilke commentedDefaults would be cool. Especially for my customers who primarily work with local people and could set the default city & state!
Alexis
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.