]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - scripts/updateurls.php
CSS to align the notice footer (thanks fnadde42)
[quix0rs-gnu-social.git] / scripts / updateurls.php
index 737adb3f3f91d46bd00aa189b5415d5fbe479921..35b835e4944ac435ac24cf6dd43d5090efaa4932 100644 (file)
@@ -52,13 +52,8 @@ function updateUserUrls()
 
                 updateProfileUrl($profile);
                 updateAvatarUrls($profile);
-
-                // Broadcast for remote users
-
-                common_broadcast_profile($profile);
-
             } catch (Exception $e) {
-                printv("Error updating URLs: " . $e->getMessage());
+                echo "Error updating URLs: " . $e->getMessage();
             }
             printfv("DONE.");
         }
@@ -104,12 +99,15 @@ function updateAvatarUrls($profile)
 
 function updateGroupUrls()
 {
+    printfnq("Updating group URLs...\n");
+
     $group = new User_group();
 
     if ($group->find()) {
         while ($group->fetch()) {
             try {
-                $orig = User_group::staticGet('id', $group->id);
+                printfv("Updating group {$group->nickname}...");
+                $orig = User_group::getKV('id', $group->id);
                 if (!empty($group->original_logo)) {
                     $group->original_logo = Avatar::url(basename($group->original_logo));
                     $group->homepage_logo = Avatar::url(basename($group->homepage_logo));
@@ -124,9 +122,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());
+                echo "Can't update avatars for group " . $group->nickname . ": ". $e->getMessage();
             }
         }
     }
 }
+
+main();