[20883] Fix delete email from folder

Sigurd Nes <[email protected]>
Newsgroups gmane.comp.web.phpgroupware.cvs
Message-ID <[email protected]>
Revision: 20883
          http://svn.sv.gnu.org/viewvc/?view=rev&root=phpgroupware&revision=20883
Author:   sigurdne
Date:     2009-11-22 20:31:24 +0000 (Sun, 22 Nov 2009)
Log Message:
-----------
Fix delete email from folder

Modified Paths:
--------------
    modules/email/trunk/inc/class.boaction.inc.php

Modified: modules/email/trunk/inc/class.boaction.inc.php
===================================================================
--- modules/email/trunk/inc/class.boaction.inc.php	2009-11-22 19:45:50 UTC (rev 20882)
+++ modules/email/trunk/inc/class.boaction.inc.php	2009-11-22 20:31:24 UTC (rev 20883)
@@ -61,9 +61,13 @@
 		
 		var $next_obj;
 		
-		function boaction()
+		public function __construct()
 		{
-			//return;
+			if ( !isset($GLOBALS['phpgw']->msg) || !is_object($GLOBALS['phpgw']->msg) )
+			{
+				$GLOBALS['phpgw']->msg = CreateObject("email.mail_msg");
+				$GLOBALS['phpgw']->msg->initialize_mail_msg();
+			}
 		}
 		
 		/*!
@@ -615,7 +619,7 @@
 				$this->next_obj->index();
 			}
 			// (e) cleanup
-			if (is_object($GLOBALS['phpgw']->msg))
+			if (isset($GLOBALS['phpgw']->msg) && is_object($GLOBALS['phpgw']->msg))
 			{
 				if ($this->debug > 0) { $GLOBALS['phpgw']->msg->dbug->out('email.boaction.delmov ('.__LINE__.'): oops, not LEFT yet, cleanup and unset ->msg object<br />'); }
 				// close down ALL mailserver streams
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.