From: Christopher Vollick Date: Thu, 18 Feb 2010 17:14:34 +0000 (-0500) Subject: Update Avatar URL Did Weird Stuff. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ddef800ec94dc9d9c7cdc3a81bb1c1fadaad0db2;p=quix0rs-gnu-social.git Update Avatar URL Did Weird Stuff. It was only finding the first two avatars and then thinking it was done. I'm not entirely sure why it was doing that. I think maybe all the cloning made it forget where it was or something. Either way, it seems to work now, and really uses less memory. --- diff --git a/scripts/updateavatarurl.php b/scripts/updateavatarurl.php index 617c2e24c7..3b6681bae9 100644 --- a/scripts/updateavatarurl.php +++ b/scripts/updateavatarurl.php @@ -94,11 +94,11 @@ function updateAvatars($user) } } - $orig = clone($avatar); + $orig_url = $avatar->url; $avatar->url = Avatar::url($avatar->filename); - if ($avatar->url != $orig->url) { + if ($avatar->url != $orig_url) { $sql = "UPDATE avatar SET url = '" . $avatar->url . "' ". "WHERE profile_id = " . $avatar->profile_id . " ".