git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

Commit b7a5041e authored by Evan Prodromou's avatar Evan Prodromou

better output for updateurls.php (and it runs)

parent 7ada8c4c
......@@ -104,11 +104,14 @@ function updateAvatarUrls($profile)
function updateGroupUrls()
{
printfnq("Updating group URLs...\n");
$group = new User_group();
if ($group->find()) {
while ($group->fetch()) {
try {
printfv("Updating group {$group->nickname}...");
$orig = User_group::staticGet('id', $group->id);
if (!empty($group->original_logo)) {
$group->original_logo = Avatar::url(basename($group->original_logo));
......@@ -124,9 +127,12 @@ function updateGroupUrls()
array('nickname' => $group->nickname));
}
$group->update($orig);
printfv("DONE.");
} catch (Exception $e) {
printv("Can't update avatars for group " . $group->nickname . ": ". $e->getMessage());
}
}
}
}
main();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment