<?php
/***************************************************************************
- * Copyright (C) 2003-2009 Polytechnique.org *
+ * Copyright (C) 2003-2010 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
WHERE pid = {?} AND type = 'home'",
$page->pid());
XDB::execute("DELETE FROM profile_phones
- WHERE uid = {?} AND link_type = 'address'",
+ WHERE pid = {?} AND link_type = 'address'",
$page->pid());
foreach ($value as $addrid => &$address) {
$this->saveAddress($page->pid(), $addrid, $address, 'home');
$res = XDB::iterator("SELECT link_id AS addrid, tel_type AS type, pub, display_tel AS tel, comment
FROM profile_phones
- WHERE uid = {?} AND link_type = 'address'
+ WHERE pid = {?} AND link_type = 'address'
ORDER BY link_id",
$this->pid());
$i = 0;