Add some validations when Email configuration is empty

This commit is contained in:
Julio Cesar Laura
2013-11-26 11:54:49 -04:00
parent e97a04943f
commit 1f3f36f93c

View File

@@ -278,7 +278,7 @@ class spoolRun
$this->fileData['from_name'] = ''; $this->fileData['from_name'] = '';
$this->fileData['from_email'] = $matches[0]; $this->fileData['from_email'] = $matches[0];
} }
// Set reply to // Set reply to
preg_match( $this->longMailEreg, $this->fileData['from_name'], $matches ); preg_match( $this->longMailEreg, $this->fileData['from_name'], $matches );
if (isset($matches[3])) { if (isset($matches[3])) {
@@ -566,7 +566,10 @@ class spoolRun
$aConfiguration = $oConfiguration->load( "Emails", "", "", "", "" ); $aConfiguration = $oConfiguration->load( "Emails", "", "", "", "" );
$aConfiguration = unserialize( $aConfiguration["CFG_VALUE"] ); $aConfiguration = unserialize( $aConfiguration["CFG_VALUE"] );
$passwd = $aConfiguration["MESS_PASSWORD"]; if (!isset($aConfiguration["MESS_ENABLED"])) {
$aConfiguration["MESS_ENABLED"] = 0;
}
$passwd = isset($aConfiguration["MESS_PASSWORD"]) ? $aConfiguration["MESS_PASSWORD"] : '';
$passwdDec = G::decrypt( $passwd, "EMAILENCRYPT" ); $passwdDec = G::decrypt( $passwd, "EMAILENCRYPT" );
$auxPass = explode( "hash:", $passwdDec ); $auxPass = explode( "hash:", $passwdDec );