Merged in release/3.3 (pull request #6606)

HOR-4843

Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
Paula Quispe
2018-08-28 13:41:35 +00:00
committed by Julio Cesar Laura Avendaño
6 changed files with 90 additions and 75 deletions

View File

@@ -336,8 +336,13 @@ class CaseScheduler extends BaseCaseScheduler
$testConnection = true;
try {
@$client = new SoapClient("http://" . $url);
$client = new SoapClient("http://" . $url);
} catch (SoapFault $fault) {
/* Laravel register a exception handler that catch the exception throwed by the class SoapClient,
* by this reason now the "Error Control Operator @" doesn't works when a exception is throwed,
* so, we need to clear the last error catched.
*/
error_clear_last();
$testConnection = false;
}

View File

@@ -1,28 +1,46 @@
<?php
class EmailServer extends BaseEmailServer
{
/**
* Get the evn_description column value.
*
* @return string
*/
public function loadDefaultAccount ()
{
$c = new Criteria( 'workflow' );
$del = DBAdapter::getStringDelimiter();
/**
* Load the default account
*
* @return array
*/
public function loadDefaultAccount()
{
$c = new Criteria('workflow');
$c->clearSelectColumns();
$c->addSelectColumn(EmailServerPeer::MESS_ACCOUNT);
$c->add(EmailServerPeer::MESS_DEFAULT, 1);
$rs = EmailServerPeer::doSelectRS($c, Propel::getDBConnection('workflow_ro'));
$rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$rs->next();
$response = $rs->getRow();
$c->clearSelectColumns();
$c->addSelectColumn( EmailServerPeer::MESS_ACCOUNT );
return $response;
}
$c->add( EmailServerPeer::MESS_DEFAULT, 1 );
/**
* Check if the MESS_UID exist
*
* @param string $emailServerUid
*
* @return boolean
* @throws Exception
*/
public static function exists($emailServerUid)
{
try {
$criteria = new Criteria('workflow');
$criteria->add(EmailServerPeer::MESS_UID, $emailServerUid, Criteria::EQUAL);
$dataset = EmailServerPeer::doSelectOne($criteria);
$rs = EmailServerPeer::doSelectRS( $c, Propel::getDBConnection('workflow_ro') );
$rs->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$rs->next();
$row = $rs->getRow();
$response=$row;
return !is_null($dataset);
return $response;
}
} catch (Exception $e) {
throw $e;
}
}
}