Relationship Graph View Issue Dependency Graph
related to child of duplicate of

View Issue Details

IDProjectCategoryView StatusLast Update
0019263phpList 3 applicationMessage Managementpublic16-11-18 12:17
Reporterrolan 
PrioritynormalSeverityfeatureReproducibilityN/A
Status resolvedResolutionfixed 
Product Version3.3.1 
Target Version3.3.4Fixed in Version3.3.4 
Summary0019263: Copy previously sent message into draft
DescriptionThe request comes up every now and then for the ability to copy a previously sent message into draft.
This adds a button in the "Sent" campaign list to do so.

https://forums.phplist.com/viewtopic.php?p=39364

Updated the patch to work with the latest version.

Would be nice if this could be coded as a plugin, but there isn't a hook for it yet.
Additional Informationwill make a pull request on github
TagsNo tags attached.

Activities

rolan

31-05-18 16:20

reporter  

messages.php (22,694 bytes)
messages.patch (1,113 bytes)
158a159,171
> if (isset($_GET['duplicate'])) {
> 	verifyCsrfGetToken();
> 	
> 	Sql_Query(sprintf('insert into %s (subject, fromfield, tofield, replyto, message, textmessage, footer, entered, 
> 		modified, embargo, repeatinterval, repeatuntil, requeueuntil, requeueinterval, status,  htmlformatted, 
> 		sendformat, template, processed, astext, ashtml, astextandhtml,aspdf, astextandpdf, rsstemplate, owner)
> 		select subject, fromfield, tofield, replyto, message, textmessage, footer, now(), 
> 		now(), now(), repeatinterval, repeatuntil, requeueuntil, requeueinterval, "draft",  htmlformatted, 
> 		sendformat, template, processed, astext, ashtml, astextandhtml,aspdf, astextandpdf, rsstemplate, "%d" from %s
> 		where id = %d',
> 		$GLOBALS['tables']['message'],$_SESSION['logindetails']['id'],$GLOBALS['tables']['message'],intval($_GET['duplicate'])));
> }
> 
512a526,530
> 
>         if ($msg['status'] == 'sent') {
> 			$actionbuttons .= '<span class="edit">'.PageLinkButton('messages', s('Copy to Draft'),
>                     'tab=draft&duplicate='.$msg['id'], '', s('Copy to Draft')).'</span>';
> 		}
messages.patch (1,113 bytes)

samtuke

02-07-18 06:51

administrator   ~0060818

PR: https://github.com/phpList/phplist3/pull/340