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.

Relationships

duplicate of 0014994 closedsuela Add ability to copy an existing message 
has duplicate 0015472 closedsuela Add Duplicate message function 
related to 0018284 closedsuela allow campaign to stay in sent if you edit it or clone it 

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