projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix many uid fields in profile tables created by newdirectory.
[platal.git]
/
modules
/
profile
/
addresses.inc.php
diff --git
a/modules/profile/addresses.inc.php
b/modules/profile/addresses.inc.php
index
2744aa8
..
2bc00b2
100644
(file)
--- a/
modules/profile/addresses.inc.php
+++ b/
modules/profile/addresses.inc.php
@@
-1,6
+1,6
@@
<?php
/***************************************************************************
<?php
/***************************************************************************
- * Copyright (C) 2003-20
09
Polytechnique.org *
+ * Copyright (C) 2003-20
10
Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-119,7
+119,7
@@
class ProfileAddress extends ProfileGeocoding
WHERE pid = {?} AND type = 'home'",
$page->pid());
XDB::execute("DELETE FROM profile_phones
WHERE pid = {?} AND type = 'home'",
$page->pid());
XDB::execute("DELETE FROM profile_phones
- WHERE
u
id = {?} AND link_type = 'address'",
+ WHERE
p
id = {?} AND link_type = 'address'",
$page->pid());
foreach ($value as $addrid => &$address) {
$this->saveAddress($page->pid(), $addrid, $address, 'home');
$page->pid());
foreach ($value as $addrid => &$address) {
$this->saveAddress($page->pid(), $addrid, $address, 'home');
@@
-144,7
+144,7
@@
class ProfileAddresses extends ProfilePage
{
$res = XDB::query("SELECT id, accuracy, text, postalText,
postalCode, localityId, subAdministrativeAreaId, administrativeAreaId,
{
$res = XDB::query("SELECT id, accuracy, text, postalText,
postalCode, localityId, subAdministrativeAreaId, administrativeAreaId,
- countryId, latitude, longitude, pub, comment, updateTime,
+ countryId, latitude, longitude, pub, comment,
UNIX_TIMESTAMP(updateTime) AS
updateTime,
north, south, east, west,
FIND_IN_SET('current', flags) AS current,
FIND_IN_SET('temporary', flags) AS temporary,
north, south, east, west,
FIND_IN_SET('current', flags) AS current,
FIND_IN_SET('temporary', flags) AS temporary,
@@
-163,7
+163,7
@@
class ProfileAddresses extends ProfilePage
$res = XDB::iterator("SELECT link_id AS addrid, tel_type AS type, pub, display_tel AS tel, comment
FROM profile_phones
$res = XDB::iterator("SELECT link_id AS addrid, tel_type AS type, pub, display_tel AS tel, comment
FROM profile_phones
- WHERE
u
id = {?} AND link_type = 'address'
+ WHERE
p
id = {?} AND link_type = 'address'
ORDER BY link_id",
$this->pid());
$i = 0;
ORDER BY link_id",
$this->pid());
$i = 0;
@@
-187,9
+187,18
@@
class ProfileAddresses extends ProfilePage
}
foreach ($this->values['addresses'] as $id => &$address) {
if (!isset($address['tel'])) {
}
foreach ($this->values['addresses'] as $id => &$address) {
if (!isset($address['tel'])) {
- $address['tel'] = array();
+ $address['tel'] = array(
+ 0 => array(
+ 'type' => 'fixed',
+ 'tel' => '',
+ 'pub' => 'private',
+ 'comment' => '',
+ )
+ );
}
unset($address['id']);
}
unset($address['id']);
+ $address['changed'] = 0;
+ $address['removed'] = 0;
}
}
}
}
}
}