summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Vollick <psycotica0@gmail.com>2010-02-18 12:14:34 -0500
committerChristopher Vollick <psycotica0@gmail.com>2010-02-18 12:14:34 -0500
commitddef800ec94dc9d9c7cdc3a81bb1c1fadaad0db2 (patch)
tree44a39b103e569cd47c8146e58dc1ca3b3af1a29f
parentc74aea589d5a79d7048470d44e457dffc8919ad3 (diff)
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.
-rw-r--r--scripts/updateavatarurl.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/updateavatarurl.php b/scripts/updateavatarurl.php
index 617c2e24c..3b6681bae 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 . " ".