Index: trunk/kernel/include/emailmessage.php =================================================================== diff -u -r271 -r294 --- trunk/kernel/include/emailmessage.php (.../emailmessage.php) (revision 271) +++ trunk/kernel/include/emailmessage.php (.../emailmessage.php) (revision 294) @@ -656,14 +656,15 @@ function DeliverMail($To,$From,$Subject,$Msg,$headers, $ForceSend=0) { global $MessagesSent,$objConfig; - + if(($this->MessagesSent >$this->MessagesAtOnce) && !$ForceSend) { $this->EnqueueMail($To,$From,$Subject,$Msg,$headers); return TRUE; } else { + $this->MessagesSent++; /* ensure headers are using \r\n instead of \n */ //$headers = str_replace("\r\n","\n",$headers); @@ -685,7 +686,7 @@ } $headers = "Subject: ".trim($Subject)."\r\n".$headers; - + $send_params['recipients'] = array($To); // The recipients (can be multiple) $send_params['headers'] = explode("\r\n",$headers); $send_params['from'] = $From; // This is used as in the MAIL FROM: cmd @@ -717,13 +718,16 @@ else $SmtpServer->debug = 0; $connected = $SmtpServer->connect(); + + + if($connected) { if($this->LogLevel>1) { $this->WriteToMailLog("Connected to ".$params['host']); } - $res = $SmtpServer->send($send_params); + $res = $SmtpServer->send($send_params); } $SmtpServer->disconnect(); if($this->LogLevel>1) Index: trunk/admin/include/elements.php =================================================================== diff -u -r288 -r294 --- trunk/admin/include/elements.php (.../elements.php) (revision 288) +++ trunk/admin/include/elements.php (.../elements.php) (revision 294) @@ -47,7 +47,7 @@ $envar = "env=" . BuildEnv(); /* this function loads the javascript for each module's toolbar */ -function load_module_javascript($sectionname) +function load_module_javascript($sectionname, $skip_modules = Array() ) { global $adminURL, $pathtoroot; @@ -61,8 +61,7 @@ foreach($m as $key=>$value) { $path = $pathtoroot. $value."admin/include/toolbar/".$sectionname.".php"; - - if(file_exists($path)) + if( !in_array($value, $skip_modules) && file_exists($path) ) { echo "\n\n"; include_once($path); @@ -92,7 +91,7 @@ //*********************************** //Page Header -function int_header($toolbar=NULL,$NavBarText=NULL,$ExtraTitle=NULL,$onLoad=NULL, $ExtraHead=NULL) +function int_header($toolbar=NULL,$NavBarText=NULL,$ExtraTitle=NULL,$onLoad=NULL, $ExtraHead=NULL,$skip_modules=Array()) { global $pathtoroot; global $pathtolocal; @@ -104,7 +103,7 @@ global $envar; global $admin; global $metatag; - + $style_sheet_global = $adminURL."/include/style.css"; $style_sheet_local = $localURL."admin/include/style.css"; @@ -133,7 +132,8 @@ print $ExtraHead; $sectionname = explode(":", $section); $sectionname = $sectionname[sizeof($sectionname)-1]; - load_module_javascript($sectionname); + + load_module_javascript($sectionname, $skip_modules); if(is_object($toolbar)) print $toolbar->GetInitScript(); print "