Merge pull request #1104 from fabrixxm/uimport_fix_avatar_urls
fix avatars urls on profile import
This commit is contained in:
commit
d839becb28
1 changed files with 6 additions and 6 deletions
|
@ -162,7 +162,7 @@ function import_account(&$a, $file) {
|
||||||
foreach ($profile as $k => &$v) {
|
foreach ($profile as $k => &$v) {
|
||||||
$v = str_replace($oldbaseurl, $newbaseurl, $v);
|
$v = str_replace($oldbaseurl, $newbaseurl, $v);
|
||||||
foreach (array("profile", "avatar") as $k)
|
foreach (array("profile", "avatar") as $k)
|
||||||
$v = str_replace($newbaseurl . "/photo/" . $k . "/" . $olduid . ".jpg", $newbaseurl . "/photo/" . $k . "/" . $newuid . ".jpg", $v);
|
$v = str_replace($oldbaseurl . "/photo/" . $k . "/" . $olduid . ".jpg", $newbaseurl . "/photo/" . $k . "/" . $newuid . ".jpg", $v);
|
||||||
}
|
}
|
||||||
$profile['uid'] = $newuid;
|
$profile['uid'] = $newuid;
|
||||||
$r = db_import_assoc('profile', $profile);
|
$r = db_import_assoc('profile', $profile);
|
||||||
|
@ -180,7 +180,7 @@ function import_account(&$a, $file) {
|
||||||
foreach ($contact as $k => &$v) {
|
foreach ($contact as $k => &$v) {
|
||||||
$v = str_replace($oldbaseurl, $newbaseurl, $v);
|
$v = str_replace($oldbaseurl, $newbaseurl, $v);
|
||||||
foreach (array("profile", "avatar", "micro") as $k)
|
foreach (array("profile", "avatar", "micro") as $k)
|
||||||
$v = str_replace($newbaseurl . "/photo/" . $k . "/" . $olduid . ".jpg", $newbaseurl . "/photo/" . $k . "/" . $newuid . ".jpg", $v);
|
$v = str_replace($oldbaseurl . "/photo/" . $k . "/" . $olduid . ".jpg", $newbaseurl . "/photo/" . $k . "/" . $newuid . ".jpg", $v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($contact['uid'] == $olduid && $contact['self'] == '0') {
|
if ($contact['uid'] == $olduid && $contact['self'] == '0') {
|
||||||
|
|
Loading…
Reference in a new issue