Get rid of the table "unique_contacts"
This commit is contained in:
parent
2bad2cdd91
commit
5ab2786c00
10 changed files with 38 additions and 163 deletions
|
@ -341,7 +341,7 @@ function admin_page_site_post(&$a){
|
|||
update_table("profile", array('photo', 'thumb'), $old_url, $new_url);
|
||||
update_table("term", array('url'), $old_url, $new_url);
|
||||
update_table("contact", array('photo','thumb','micro','url','nurl','request','notify','poll','confirm','poco'), $old_url, $new_url);
|
||||
update_table("unique_contacts", array('url'), $old_url, $new_url);
|
||||
update_table("gcontact", array('photo','url','nurl','server_url'), $old_url, $new_url);
|
||||
update_table("item", array('owner-link','owner-avatar','author-name','author-link','author-avatar','body','plink','tag'), $old_url, $new_url);
|
||||
|
||||
// update config
|
||||
|
|
|
@ -179,8 +179,8 @@ function display_fetchauthor($a, $item) {
|
|||
$profiledata["nickname"] = $r[0]["nick"];
|
||||
}
|
||||
|
||||
// Fetching profile data from unique contacts
|
||||
$r = q("SELECT `avatar`, `nick`, `location`, `about` FROM `unique_contacts` WHERE `url` = '%s'", dbesc(normalise_link($profiledata["url"])));
|
||||
// Fetching profile data from global contacts
|
||||
$r = q("SELECT `photo`, `nick`, `addr`, `location`, `about`, `gender` FROM `gcontact` WHERE `nurl` = '%s'", dbesc(normalise_link($profiledata["url"])));
|
||||
if (count($r)) {
|
||||
if ($profiledata["photo"] == "")
|
||||
$profiledata["photo"] = $r[0]["avatar"];
|
||||
|
@ -190,6 +190,10 @@ function display_fetchauthor($a, $item) {
|
|||
$profiledata["about"] = $r[0]["about"];
|
||||
if (($profiledata["nickname"] == "") AND ($r[0]["nick"] != ""))
|
||||
$profiledata["nickname"] = $r[0]["nick"];
|
||||
if ($profiledata["gender"] == "")
|
||||
$profiledata["gender"] = $r[0]["gender"];
|
||||
if ($profiledata["addr"] == "")
|
||||
$profiledata["addr"] = $r[0]["addr"];
|
||||
}
|
||||
|
||||
if (local_user()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue