View Issue Details

IDProjectCategoryView StatusLast Update
0014994phpList 3 applicationMessage Managementpublic16-11-18 12:18
Reporterjvarrone 
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionduplicate 
Product VersionFuture developments 
Target VersionFixed in Version 
Summary0014994: Add ability to copy an existing message
DescriptionRE: thread on forums http://forums.phplist.com/viewtopic.php?t=13126&highlight=duplicate+draft

This tweak works great. However, I suggest changing link name from "Duplicate" to "Copy" or "Copy to Draft" which is more representative of the functionality. I used the attached patch file and it works perfectly.
TagsNo tags attached.

Relationships

has duplicate 0015472 closedsuela Add Duplicate message function 
has duplicate 0019263 resolvedsamtuke Copy previously sent message into draft 

Activities

09-06-08 16:28

 

messages.php.patch (1,931 bytes)
--- ../phplist-2.10.4/lists/admin/messages.php Mon Nov 19 18:22:26 2007
+++ lists/admin/messages.php Mon Nov 19 18:38:40 2007
@@ -77,6 +77,11 @@
   print "<hr /><br />\n";
 }
 
+if (isset($_GET['duplicate'])) {
+  $result = Sql_query("insert into phplist_message (id,subject,fromfield,tofield,replyto,message,textmessage,footer,entered,modified,embargo,repeatuntil,status,htmlformatted,sendformat,template,owner) select NULL,subject,fromfield,tofield,replyto,message,textmessage,footer,now(),now(),now(),now(),'draft',htmlformatted,sendformat,template,owner from phplist_message where id=".intval($_GET['duplicate']));
+}
+
+
 if (isset($_GET['resend'])) {
   $resend = sprintf('%d',$_GET['resend']);
   # requeue the message in $resend
@@ -93,6 +98,8 @@
   print"<br /><hr /><br /><p>\n";
 }
 
+
+
 if (isset($_GET['suspend'])) {
   $suspend = sprintf('%d',$_GET['suspend']);
   print $GLOBALS['I18N']->get('Suspending')." $suspend ..";
@@ -269,7 +276,8 @@
       %s<br />
       %s<br />
       %s
-      <a href="javascript:deleteRec(\'%s\');">'.$GLOBALS['I18N']->get("delete").'</a>
+      <a href="javascript:deleteRec(\'%s\');">'.$GLOBALS['I18N']->get("delete").'</a><br>
+      %s
       </td>
       </tr>',
       $status.
@@ -278,7 +286,9 @@
       $msg['status'] != 'inprocess' ? PageLink2("messages",$GLOBALS['I18N']->get("Requeue"),"resend=".$msg["id"]) : $totalsent." ".$GLOBALS['I18N']->get("sent"),
       $msg["status"] != 'prepared' ? PageLink2("send",$GLOBALS['I18N']->get("Edit"),"id=".$msg["id"]) : PageLink2("preparesend",$GLOBALS['I18N']->get("Edit"),"id=".$msg["id"]),
       $clicks[0] && CLICKTRACK ? PageLink2("mclicks",$GLOBALS['I18N']->get("click stats"),"id=".$msg["id"]).'<br/>':'',
-      PageURL2("messages$url_keep","","delete=".$msg["id"])
+      PageURL2("messages$url_keep","","delete=".$msg["id"]),
+      PageLink2("messages",'Duplicate','type=draft&duplicate='.$msg["id"])
+
     );
   }
 }
messages.php.patch (1,931 bytes)