BUG 8962 "The Events not being executed on 'cron.php'" SOLVED

- Problem in "Resending emails"
- Not being properly authenticating with the mail server
- Solved the problem with authentication with the mail server
- The problem with the file "processmaker/workflow/engine/bin/plugins/ldapadvancedbck.php" could not replicate, because this file does not belong to any plugin of the enterprise-plugin, it is noted that the cron.php runs all the files that are on "processmaker/workflow/engine/bin/plugins" and uses the class "...ClassCron" for each file, executing the corresponding method
This commit is contained in:
Victor Saisa Lopez
2012-05-04 12:01:42 -04:00
parent 87af11f475
commit f9b7c0ecac
2 changed files with 29 additions and 16 deletions

View File

@@ -498,26 +498,35 @@ class spoolRun {
* @return none or exception * @return none or exception
*/ */
function resendEmails() { function resendEmails() {
require_once ("classes/model/Configuration.php");
require_once 'classes/model/Configuration.php';
$oConfiguration = new Configuration(); $oConfiguration = new Configuration();
$aConfiguration = $oConfiguration->load('Emails', '', '', '', '');
$aConfiguration = unserialize($aConfiguration['CFG_VALUE']); $aConfiguration = $oConfiguration->load("Emails", "", "", "", "");
$passwd = $aConfiguration['MESS_PASSWORD'];
$passwdDec = G::decrypt($passwd,'EMAILENCRYPT'); $aConfiguration = unserialize($aConfiguration["CFG_VALUE"]);
if (strpos( $passwdDec, 'hash:' ) !== false) { $passwd = $aConfiguration["MESS_PASSWORD"];
$passwdDec = G::decrypt($passwd,"EMAILENCRYPT");
if (strpos($passwdDec, "hash:") !== false) {
list($hash, $pass) = explode(":", $passwdDec); list($hash, $pass) = explode(":", $passwdDec);
$this->config['MESS_PASSWORD'] = $pass; $aConfiguration["MESS_PASSWORD"] = $pass;
} }
if( $aConfiguration['MESS_ENABLED'] == '1' ) {
$this->setConfig(array ( if ($aConfiguration["MESS_ENABLED"] == "1") {
'MESS_ENGINE' => $aConfiguration['MESS_ENGINE'], $this->setConfig(array(
'MESS_SERVER' => $aConfiguration['MESS_SERVER'], "MESS_ENGINE" => $aConfiguration["MESS_ENGINE"],
'MESS_PORT' => $aConfiguration['MESS_PORT'], "MESS_SERVER" => $aConfiguration["MESS_SERVER"],
'MESS_ACCOUNT' => $aConfiguration['MESS_ACCOUNT'], "MESS_PORT" => $aConfiguration["MESS_PORT"],
'MESS_PASSWORD' => $aConfiguration['MESS_PASSWORD'] "MESS_ACCOUNT" => $aConfiguration["MESS_ACCOUNT"],
"MESS_PASSWORD" => $aConfiguration["MESS_PASSWORD"],
"SMTPAuth" => $aConfiguration["MESS_RAUTH"],
"SMTPSecure" => $aConfiguration["SMTPSecure"]
)); ));
require_once 'classes/model/AppMessage.php';
///////
require_once ("classes/model/AppMessage.php");
$oCriteria = new Criteria('workflow'); $oCriteria = new Criteria('workflow');
$oCriteria->add(AppMessagePeer::APP_MSG_STATUS, 'sent', Criteria::NOT_EQUAL); $oCriteria->add(AppMessagePeer::APP_MSG_STATUS, 'sent', Criteria::NOT_EQUAL);
$oDataset = AppMessagePeer::doSelectRS($oCriteria); $oDataset = AppMessagePeer::doSelectRS($oCriteria);

View File

@@ -485,6 +485,10 @@ class adminProxy extends HttpProxyController
$_POST['SMTPAuth'] = false; $_POST['SMTPAuth'] = false;
} }
if (strtolower($_POST["UseSecureCon"]) != "no") {
$_POST["SMTPSecure"] = $_POST["UseSecureCon"];
}
if ($_POST['UseSecureCon'] == 'ssl') { if ($_POST['UseSecureCon'] == 'ssl') {
$_POST['MESS_SERVER'] = 'ssl://'.$_POST['MESS_SERVER']; $_POST['MESS_SERVER'] = 'ssl://'.$_POST['MESS_SERVER'];
} }