Adding useful vars to template; is there a better place to add these?? Anyone??
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 3 Jan 2007 09:40:43 +0000 (09:40 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 3 Jan 2007 09:40:43 +0000 (09:40 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12052 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/read_body.php

index e19fe13..44ae694 100644 (file)
@@ -562,6 +562,11 @@ function formatMenubar($aMailbox, $passed_id, $passed_ent_id, $message, $removed
     $oTemplate->assign('button_onclick', $on_click);
     $oTemplate->assign('forward_as_attachment_enabled', $enable_forward_as_attachment==1);
     
+    //FIXME: I am surprised these aren't already given to the template; probably needs to be given at a higher level, so I have NO IDEA if this is the right place to do this...  adding them so template can construct its own API calls... we can build those herein too if preferrable
+    $oTemplate->assign('mailbox', $aMailbox['NAME']);
+    $oTemplate->assign('passed_id', $passed_id);
+    $oTemplate->assign('what', $what);
+
     // If Draft folder - create Resume link
     $resume_draft = $edit_as_new = false;    
     if (($mailbox == $draft_folder) && ($save_as_draft)) {