You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: public_html/lists/admin/upgrade.php
+15-4Lines changed: 15 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -586,14 +586,25 @@ function output($message)
586
586
// add uuids to those that do not have it
587
587
$req = Sql_Query(sprintf('select id from %s where uuid = ""', $GLOBALS['tables']['user']));
588
588
$numS = Sql_Affected_Rows();
589
-
if ($numS > 10000) {
589
+
if ($numS > 500) {
590
+
591
+
// with a lot of subscrirbers this can take a very long time, causing a blank page for a long time (I had one system where it took almost an hour)
592
+
//.This really needs to be loaded in Async mode, therefore I'm removing this for now
593
+
// it is not strictly necessary to do this here, because processqueue does it as well.
594
+
// that does mean that the first process queue may take a while.
595
+
596
+
// output(s('Giving a UUID to your subscribers and campaigns. If you have a lot of them, this may take a while.'));
597
+
// output(s('If the page times out, you can reload. Or otherwise try to run the upgrade from commandline instead.').' '.resourceLink('https://resources.phplist.com/system/commandline', s('Documentation how to set up phpList commandline')));
598
+
} else {
590
599
output(s('Giving a UUID to your subscribers and campaigns. If you have a lot of them, this may take a while.'));
591
600
output(s('If the page times out, you can reload. Or otherwise try to run the upgrade from commandline instead.').''.resourceLink('https://resources.phplist.com/system/commandline', s('Documentation how to set up phpList commandline')));
601
+
while ($row = Sql_Fetch_Row($req)) {
602
+
Sql_Query(sprintf('update %s set uuid = "%s" where id = %d', $GLOBALS['tables']['user'], (string)uuid::generate(4), $row[0]));
603
+
}
592
604
}
593
605
594
-
while ($row = Sql_Fetch_Row($req)) {
595
-
Sql_Query(sprintf('update %s set uuid = "%s" where id = %d', $GLOBALS['tables']['user'], (string) uuid::generate(4), $row[0]));
596
-
}
606
+
// let's hope there aren't too many campaigns or links, otherwise the same timeout would apply.
607
+
597
608
$req = Sql_Query(sprintf('select id from %s where uuid = ""', $GLOBALS['tables']['message']));
598
609
while ($row = Sql_Fetch_Row($req)) {
599
610
Sql_Query(sprintf('update %s set uuid = "%s" where id = %d', $GLOBALS['tables']['message'], (string) uuid::generate(4), $row[0]));
0 commit comments