Permalink
Browse files

Generate a new UUID when repeating a message. (#146)

  • Loading branch information...
1 parent 9dc2042 commit 980d7c8e35109bf96ca3828db0b89300b77d070d @bramley bramley committed with michield Feb 6, 2017
Showing with 8 additions and 3 deletions.
  1. +8 −3 public_html/lists/admin/connect.php
@@ -1864,16 +1864,21 @@ function repeatMessage($msgid)
array_keys($DBstruct['message']),
array(
'id', 'entered', 'modified', 'embargo', 'status', 'sent', 'processed', 'astext', 'ashtml',
- 'astextandhtml', 'aspdf', 'astextandpdf', 'viewed', 'bouncecount', 'sendstart',
+ 'astextandhtml', 'aspdf', 'astextandpdf', 'viewed', 'bouncecount', 'sendstart', 'uuid',
)
);
foreach ($columnsToCopy as $column) {
Sql_Query(sprintf('update %s set %s = "%s" where id = %d',
$GLOBALS['tables']['message'], $column, addslashes($msgdata[$column]), $newid));
}
- Sql_Query(sprintf('update %s set embargo = "%s",status = "submitted" where id = %d',
- $GLOBALS['tables']['message'], $msgdata['newembargo'], $newid));
+ Sql_Query(sprintf(
+ 'update %s set embargo = "%s",status = "submitted", uuid="%s" where id = %d',
+ $GLOBALS['tables']['message'],
+ $msgdata['newembargo'],
+ UUID::generate(4),
+ $newid
+ ));
// copy rows in messagedata
$req = Sql_Query(sprintf(

0 comments on commit 980d7c8

Please sign in to comment.