0017474: El email FROM no respeta la configuración "Email configuration"(adicionar una nueva opcion en el plugin "actions by email")

Conflicts:

	workflow/engine/classes/model/ListInbox.php
This commit is contained in:
dheeyi
2015-09-21 13:02:43 -04:00
parent 3ec47edc0a
commit 4374dbdea7
13 changed files with 153 additions and 47 deletions

View File

@@ -58,13 +58,12 @@ class actionsByEmailCoreClass extends PMPlugin
} }
if ($data->USR_UID == '') { if ($data->USR_UID == '') {
throw new Exception('The parameter $data->USR_UID is empty.'); error_log('The parameter $data->USR_UID is empty, the routed task may be a self-service type, actions by email does not work with self-service task types.', 0);
} }
} catch(Exception $e) { } catch(Exception $e) {
echo $e->getMessage().' Please contact to your system administrator.'; echo $e->getMessage().' Please contact to your system administrator.';
die; die;
} }
G::LoadClass('pmFunctions'); G::LoadClass('pmFunctions');
$emailSetup = getEmailConfiguration(); $emailSetup = getEmailConfiguration();
@@ -86,6 +85,7 @@ class actionsByEmailCoreClass extends PMPlugin
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_EMAIL_FIELD); $criteria->addSelectColumn(AbeConfigurationPeer::ABE_EMAIL_FIELD);
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_ACTION_FIELD); $criteria->addSelectColumn(AbeConfigurationPeer::ABE_ACTION_FIELD);
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_SUBJECT_FIELD); $criteria->addSelectColumn(AbeConfigurationPeer::ABE_SUBJECT_FIELD);
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_MAILSERVER_OR_MAILCURRENT);
$criteria->addSelectColumn(DynaformPeer::DYN_CONTENT); $criteria->addSelectColumn(DynaformPeer::DYN_CONTENT);
$criteria->addJoin( AbeConfigurationPeer::DYN_UID, DynaformPeer::DYN_UID, Criteria::LEFT_JOIN ); $criteria->addJoin( AbeConfigurationPeer::DYN_UID, DynaformPeer::DYN_UID, Criteria::LEFT_JOIN );
$criteria->add(AbeConfigurationPeer::PRO_UID, $caseFields['PRO_UID']); $criteria->add(AbeConfigurationPeer::PRO_UID, $caseFields['PRO_UID']);
@@ -233,8 +233,17 @@ class actionsByEmailCoreClass extends PMPlugin
$user = new Users(); $user = new Users();
$userDetails = $user->loadDetails($data->PREVIOUS_USR_UID); $userDetails = $user->loadDetails($data->PREVIOUS_USR_UID);
$emailFrom = $userDetails["USR_EMAIL"];
if($configuration['ABE_MAILSERVER_OR_MAILCURRENT'] == 1 && $configuration['ABE_TYPE'] !== ''){
$emailFrom = ($userDetails["USR_FULLNAME"] . ' <' . $userDetails["USR_EMAIL"] . '>');
}else{
if(isset($emailSetup["MESS_FROM_NAME"]) && isset($emailSetup["MESS_FROM_MAIL"] )){
$emailFrom = ($emailSetup["MESS_FROM_NAME"] . ' <' . $emailSetup["MESS_FROM_MAIL"] . '>');
}else{
$emailFrom = ((isset($emailSetup["MESS_FROM_NAME"])) ? $emailSetup["MESS_FROM_NAME"] : $emailSetup["MESS_FROM_MAIL"]);
}
}
G::LoadClass('wsBase'); G::LoadClass('wsBase');
$wsBaseInstance = new wsBase(); $wsBaseInstance = new wsBase();

View File

@@ -317,6 +317,11 @@ class PMPluginRegistry
if (method_exists( $detail, "disable" )) { if (method_exists( $detail, "disable" )) {
$detail->disable(); $detail->disable();
} }
//flag Only Plugin actionsByEmail
if($detail->sNamespace == 'actionsByEmail'){
$plugin = new $detail->sClassName( $detail->sNamespace, $detail->sFilename );
$plugin->disable();
}
} }
$sw = true; $sw = true;

View File

@@ -449,16 +449,15 @@ class spoolRun
$oPHPMailer->SMTPSecure = $this->config['SMTPSecure']; $oPHPMailer->SMTPSecure = $this->config['SMTPSecure'];
} }
break; break;
} }
$oPHPMailer->CharSet = "UTF-8"; $oPHPMailer->CharSet = "UTF-8";
$oPHPMailer->Encoding = "8bit"; $oPHPMailer->Encoding = "8bit";
$oPHPMailer->Host = $this->config['MESS_SERVER']; $oPHPMailer->Host = $this->config['MESS_SERVER'];
$oPHPMailer->Port = $this->config['MESS_PORT']; $oPHPMailer->Port = $this->config['MESS_PORT'];
$oPHPMailer->Username = $this->config['MESS_ACCOUNT']; $oPHPMailer->Username = $this->config['MESS_ACCOUNT'];
$oPHPMailer->Password = $this->config['MESS_PASSWORD']; $oPHPMailer->Password = $this->config['MESS_PASSWORD'];
$oPHPMailer->From = $this->fileData['from_email']; $oPHPMailer->SetFrom($this->fileData['from_email'], utf8_decode($this->fileData['from_name']));
$oPHPMailer->FromName = utf8_decode( $this->fileData['from_name'] );
if (isset($this->fileData['reply_to'])) { if (isset($this->fileData['reply_to'])) {
if ($this->fileData['reply_to'] != '') { if ($this->fileData['reply_to'] != '') {
$oPHPMailer->AddReplyTo($this->fileData['reply_to'], $this->fileData['reply_to_name']); $oPHPMailer->AddReplyTo($this->fileData['reply_to'], $this->fileData['reply_to_name']);

View File

@@ -18,7 +18,7 @@ class AbeConfiguration extends BaseAbeConfiguration
private $filterThisFields = array('ABE_UID', 'PRO_UID', 'TAS_UID', 'ABE_TYPE', private $filterThisFields = array('ABE_UID', 'PRO_UID', 'TAS_UID', 'ABE_TYPE',
'ABE_TEMPLATE', 'ABE_DYN_TYPE', 'DYN_UID','ABE_EMAIL_FIELD', 'ABE_TEMPLATE', 'ABE_DYN_TYPE', 'DYN_UID','ABE_EMAIL_FIELD',
'ABE_ACTION_FIELD', 'ABE_CASE_NOTE_IN_RESPONSE', 'ABE_CREATE_DATE','ABE_UPDATE_DATE', 'ABE_SUBJECT_FIELD'); 'ABE_ACTION_FIELD', 'ABE_CASE_NOTE_IN_RESPONSE', 'ABE_CREATE_DATE','ABE_UPDATE_DATE','ABE_MAILSERVER_OR_MAILCURRENT','ABE_SUBJECT_FIELD');
public function load($abeUid) public function load($abeUid)
{ {

View File

@@ -172,37 +172,48 @@ class AppDelegation extends BaseAppDelegation
// Hook for the trigger PM_CREATE_NEW_DELEGATION // Hook for the trigger PM_CREATE_NEW_DELEGATION
if (defined( 'PM_CREATE_NEW_DELEGATION' )) { if (defined( 'PM_CREATE_NEW_DELEGATION' )) {
$bpmn = new \ProcessMaker\Project\Bpmn();
$flagActionsByEmail = true;
$data = new stdclass(); $data = new stdclass();
$data->TAS_UID = $sTasUid; $data->TAS_UID = $sTasUid;
$data->APP_UID = $sAppUid; $data->APP_UID = $sAppUid;
$data->DEL_INDEX = $delIndex; $data->DEL_INDEX = $delIndex;
$data->USR_UID = $sUsrUid; $data->USR_UID = $sUsrUid;
$data->PREVIOUS_USR_UID = $delPreviusUsrUid; $data->PREVIOUS_USR_UID = $delPreviusUsrUid;
$oPluginRegistry = &PMPluginRegistry::getSingleton();
$oPluginRegistry->executeTriggers(PM_CREATE_NEW_DELEGATION, $data);
/*----------------------------------********---------------------------------*/ if ($bpmn->exists($sProUid)) {
// this section evaluates the actions by email trigger execution please /*----------------------------------********---------------------------------*/
// modify this section carefully, the if evaluation checks if the license has been // this section evaluates the actions by email trigger execution please
// activated in order to send the mail according to the configuration table // modify this section carefully, the if evaluation checks if the license has been
if (PMLicensedFeatures // activated in order to send the mail according to the configuration table
::getSingleton() if (PMLicensedFeatures
->verifyfeature('zLhSk5TeEQrNFI2RXFEVktyUGpnczV1WEJNWVp6cjYxbTU3R29mVXVZNWhZQT0=')) { ::getSingleton()
$criteriaAbe = new Criteria(); ->verifyfeature('zLhSk5TeEQrNFI2RXFEVktyUGpnczV1WEJNWVp6cjYxbTU3R29mVXVZNWhZQT0=')) {
$criteriaAbe->add(AbeConfigurationPeer::PRO_UID, $sProUid); $criteriaAbe = new Criteria();
$criteriaAbe->add(AbeConfigurationPeer::TAS_UID, $sTasUid); $criteriaAbe->add(AbeConfigurationPeer::PRO_UID, $sProUid);
$resultAbe = AbeConfigurationPeer::doSelectRS($criteriaAbe); $criteriaAbe->add(AbeConfigurationPeer::TAS_UID, $sTasUid);
$resultAbe->setFetchmode(ResultSet::FETCHMODE_ASSOC); $resultAbe = AbeConfigurationPeer::doSelectRS($criteriaAbe);
if ($resultAbe->next()) { $resultAbe->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$dataAbe = $resultAbe->getRow(); if ($resultAbe->next()) {
if($dataAbe['ABE_TYPE']!=''){ $dataAbe = $resultAbe->getRow();
G::LoadClass('actionsByEmailCore'); if($dataAbe['ABE_TYPE']!=''){
$actionsByEmail = new actionsByEmailCoreClass(); $flagActionsByEmail = false;
$actionsByEmail->sendActionsByEmail($data); G::LoadClass('actionsByEmailCore');
$actionsByEmail = new actionsByEmailCoreClass();
$actionsByEmail->sendActionsByEmail($data);
}
} }
} }
/*----------------------------------********---------------------------------*/
} }
/*----------------------------------********---------------------------------*/
if ($flagActionsByEmail) {
$oPluginRegistry = &PMPluginRegistry::getSingleton();
$oPluginRegistry->executeTriggers(PM_CREATE_NEW_DELEGATION, $data);
}
} }
return $delIndex; return $delIndex;

View File

@@ -120,7 +120,7 @@ class ListInbox extends BaseListInbox
$users = new Users(); $users = new Users();
$users->refreshTotal($data['USR_UID'], 'add', 'participated'); $users->refreshTotal($data['USR_UID'], 'add', 'participated');
} }
if((array_key_exists('TAS_UID', $data) && isset($data['TAS_UID'])) && (array_key_exists('TAS_UID', $data) && isset($data['PRO_UID'])) && isset($data['APP_UID'])) { if((array_key_exists('TAS_UID', $data) && isset($data['TAS_UID'])) && (array_key_exists('TAS_UID', $data) && isset($data['PRO_UID'])) && isset($data['APP_UID'])) {
$data['DEL_PRIORITY'] = $this->getTaskPriority($data['TAS_UID'], $data['PRO_UID'], $data["APP_UID"]); $data['DEL_PRIORITY'] = $this->getTaskPriority($data['TAS_UID'], $data['PRO_UID'], $data["APP_UID"]);
} }

View File

@@ -89,7 +89,10 @@ class AbeConfigurationMapBuilder
$tMap->addColumn('ABE_UPDATE_DATE', 'AbeUpdateDate', 'int', CreoleTypes::TIMESTAMP, false, null); $tMap->addColumn('ABE_UPDATE_DATE', 'AbeUpdateDate', 'int', CreoleTypes::TIMESTAMP, false, null);
$tMap->addColumn('ABE_SUBJECT_FIELD', 'AbeSubjectField', 'string', CreoleTypes::VARCHAR, true, 100); $tMap->addColumn('ABE_SUBJECT_FIELD', 'AbeSubjectField', 'string', CreoleTypes::VARCHAR, false, 100);
$tMap->addColumn('ABE_MAILSERVER_OR_MAILCURRENT', 'AbeMailserverOrMailcurrent', 'int', CreoleTypes::INTEGER, false, null);
} // doBuild() } // doBuild()
} // AbeConfigurationMapBuilder } // AbeConfigurationMapBuilder

View File

@@ -103,7 +103,13 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
* The value for the abe_subject_field field. * The value for the abe_subject_field field.
* @var string * @var string
*/ */
protected $abe_subject_field; protected $abe_subject_field = '';
/**
* The value for the abe_mailserver_or_mailcurrent field.
* @var int
*/
protected $abe_mailserver_or_mailcurrent = 0;
/** /**
* Flag to prevent endless save loop, if this object is referenced * Flag to prevent endless save loop, if this object is referenced
@@ -295,7 +301,7 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
/** /**
* Get the [abe_subject_field] column value. * Get the [abe_subject_field] column value.
* *
* @return string * @return string
*/ */
public function getAbeSubjectField() public function getAbeSubjectField()
@@ -304,6 +310,17 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
return $this->abe_subject_field; return $this->abe_subject_field;
} }
/**
* Get the [abe_mailserver_or_mailcurrent] column value.
*
* @return int
*/
public function getAbeMailserverOrMailcurrent()
{
return $this->abe_mailserver_or_mailcurrent;
}
/** /**
* Set the value of [abe_uid] column. * Set the value of [abe_uid] column.
* *
@@ -584,7 +601,7 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
/** /**
* Set the value of [abe_subject_field] column. * Set the value of [abe_subject_field] column.
* *
* @param string $v new value * @param string $v new value
* @return void * @return void
*/ */
@@ -604,6 +621,28 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
} // setAbeSubjectField() } // setAbeSubjectField()
/**
* Set the value of [abe_mailserver_or_mailcurrent] column.
*
* @param int $v new value
* @return void
*/
public function setAbeMailserverOrMailcurrent($v)
{
// Since the native PHP type for this column is integer,
// we will cast the input value to an int (if it is not).
if ($v !== null && !is_int($v) && is_numeric($v)) {
$v = (int) $v;
}
if ($this->abe_mailserver_or_mailcurrent !== $v || $v === 0) {
$this->abe_mailserver_or_mailcurrent = $v;
$this->modifiedColumns[] = AbeConfigurationPeer::ABE_MAILSERVER_OR_MAILCURRENT;
}
} // setAbeMailserverOrMailcurrent()
/** /**
* Hydrates (populates) the object variables with values from the database resultset. * Hydrates (populates) the object variables with values from the database resultset.
* *
@@ -645,14 +684,16 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
$this->abe_update_date = $rs->getTimestamp($startcol + 11, null); $this->abe_update_date = $rs->getTimestamp($startcol + 11, null);
$this->abe_subject_field = $rs->getString($startcol + 12, null); $this->abe_subject_field = $rs->getString($startcol + 12);
$this->abe_mailserver_or_mailcurrent = $rs->getInt($startcol + 13);
$this->resetModified(); $this->resetModified();
$this->setNew(false); $this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer. // FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 13; // 13 = AbeConfigurationPeer::NUM_COLUMNS - AbeConfigurationPeer::NUM_LAZY_LOAD_COLUMNS). return $startcol + 14; // 14 = AbeConfigurationPeer::NUM_COLUMNS - AbeConfigurationPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) { } catch (Exception $e) {
throw new PropelException("Error populating AbeConfiguration object", $e); throw new PropelException("Error populating AbeConfiguration object", $e);
@@ -895,6 +936,9 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
case 12: case 12:
return $this->getAbeSubjectField(); return $this->getAbeSubjectField();
break; break;
case 13:
return $this->getAbeMailserverOrMailcurrent();
break;
default: default:
return null; return null;
break; break;
@@ -928,6 +972,7 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
$keys[10] => $this->getAbeCreateDate(), $keys[10] => $this->getAbeCreateDate(),
$keys[11] => $this->getAbeUpdateDate(), $keys[11] => $this->getAbeUpdateDate(),
$keys[12] => $this->getAbeSubjectField(), $keys[12] => $this->getAbeSubjectField(),
$keys[13] => $this->getAbeMailserverOrMailcurrent(),
); );
return $result; return $result;
} }
@@ -998,6 +1043,9 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
case 12: case 12:
$this->setAbeSubjectField($value); $this->setAbeSubjectField($value);
break; break;
case 13:
$this->setAbeMailserverOrMailcurrent($value);
break;
} // switch() } // switch()
} }
@@ -1072,6 +1120,11 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
if (array_key_exists($keys[12], $arr)) { if (array_key_exists($keys[12], $arr)) {
$this->setAbeSubjectField($arr[$keys[12]]); $this->setAbeSubjectField($arr[$keys[12]]);
} }
if (array_key_exists($keys[13], $arr)) {
$this->setAbeMailserverOrMailcurrent($arr[$keys[13]]);
}
} }
/** /**
@@ -1135,6 +1188,11 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
$criteria->add(AbeConfigurationPeer::ABE_SUBJECT_FIELD, $this->abe_subject_field); $criteria->add(AbeConfigurationPeer::ABE_SUBJECT_FIELD, $this->abe_subject_field);
} }
if ($this->isColumnModified(AbeConfigurationPeer::ABE_MAILSERVER_OR_MAILCURRENT)) {
$criteria->add(AbeConfigurationPeer::ABE_MAILSERVER_OR_MAILCURRENT, $this->abe_mailserver_or_mailcurrent);
}
return $criteria; return $criteria;
} }
@@ -1212,6 +1270,9 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
$copyObj->setAbeSubjectField($this->abe_subject_field); $copyObj->setAbeSubjectField($this->abe_subject_field);
$copyObj->setAbeMailserverOrMailcurrent($this->abe_mailserver_or_mailcurrent);
$copyObj->setNew(true); $copyObj->setNew(true);
$copyObj->setAbeUid(''); // this is a pkey column, so set to default value $copyObj->setAbeUid(''); // this is a pkey column, so set to default value

View File

@@ -25,7 +25,7 @@ abstract class BaseAbeConfigurationPeer
const CLASS_DEFAULT = 'classes.model.AbeConfiguration'; const CLASS_DEFAULT = 'classes.model.AbeConfiguration';
/** The total number of columns. */ /** The total number of columns. */
const NUM_COLUMNS = 13; const NUM_COLUMNS = 14;
/** The number of lazy-loaded columns. */ /** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0; const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -70,6 +70,9 @@ abstract class BaseAbeConfigurationPeer
/** the column name for the ABE_SUBJECT_FIELD field */ /** the column name for the ABE_SUBJECT_FIELD field */
const ABE_SUBJECT_FIELD = 'ABE_CONFIGURATION.ABE_SUBJECT_FIELD'; const ABE_SUBJECT_FIELD = 'ABE_CONFIGURATION.ABE_SUBJECT_FIELD';
/** the column name for the ABE_MAILSERVER_OR_MAILCURRENT field */
const ABE_MAILSERVER_OR_MAILCURRENT = 'ABE_CONFIGURATION.ABE_MAILSERVER_OR_MAILCURRENT';
/** The PHP to DB Name Mapping */ /** The PHP to DB Name Mapping */
private static $phpNameMap = null; private static $phpNameMap = null;
@@ -81,10 +84,10 @@ abstract class BaseAbeConfigurationPeer
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id' * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/ */
private static $fieldNames = array ( private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('AbeUid', 'ProUid', 'TasUid', 'AbeType', 'AbeTemplate', 'AbeDynType', 'DynUid', 'AbeEmailField', 'AbeActionField', 'AbeCaseNoteInResponse', 'AbeCreateDate', 'AbeUpdateDate', 'AbeSubjectField', ), BasePeer::TYPE_PHPNAME => array ('AbeUid', 'ProUid', 'TasUid', 'AbeType', 'AbeTemplate', 'AbeDynType', 'DynUid', 'AbeEmailField', 'AbeActionField', 'AbeCaseNoteInResponse', 'AbeCreateDate', 'AbeUpdateDate', 'AbeSubjectField', 'AbeMailserverOrMailcurrent', ),
BasePeer::TYPE_COLNAME => array (AbeConfigurationPeer::ABE_UID, AbeConfigurationPeer::PRO_UID, AbeConfigurationPeer::TAS_UID, AbeConfigurationPeer::ABE_TYPE, AbeConfigurationPeer::ABE_TEMPLATE, AbeConfigurationPeer::ABE_DYN_TYPE, AbeConfigurationPeer::DYN_UID, AbeConfigurationPeer::ABE_EMAIL_FIELD, AbeConfigurationPeer::ABE_ACTION_FIELD, AbeConfigurationPeer::ABE_CASE_NOTE_IN_RESPONSE, AbeConfigurationPeer::ABE_CREATE_DATE, AbeConfigurationPeer::ABE_UPDATE_DATE, AbeConfigurationPeer::ABE_SUBJECT_FIELD, ), BasePeer::TYPE_COLNAME => array (AbeConfigurationPeer::ABE_UID, AbeConfigurationPeer::PRO_UID, AbeConfigurationPeer::TAS_UID, AbeConfigurationPeer::ABE_TYPE, AbeConfigurationPeer::ABE_TEMPLATE, AbeConfigurationPeer::ABE_DYN_TYPE, AbeConfigurationPeer::DYN_UID, AbeConfigurationPeer::ABE_EMAIL_FIELD, AbeConfigurationPeer::ABE_ACTION_FIELD, AbeConfigurationPeer::ABE_CASE_NOTE_IN_RESPONSE, AbeConfigurationPeer::ABE_CREATE_DATE, AbeConfigurationPeer::ABE_UPDATE_DATE, AbeConfigurationPeer::ABE_SUBJECT_FIELD, AbeConfigurationPeer::ABE_MAILSERVER_OR_MAILCURRENT, ),
BasePeer::TYPE_FIELDNAME => array ('ABE_UID', 'PRO_UID', 'TAS_UID', 'ABE_TYPE', 'ABE_TEMPLATE', 'ABE_DYN_TYPE', 'DYN_UID', 'ABE_EMAIL_FIELD', 'ABE_ACTION_FIELD', 'ABE_CASE_NOTE_IN_RESPONSE', 'ABE_CREATE_DATE', 'ABE_UPDATE_DATE', 'ABE_SUBJECT_FIELD', ), BasePeer::TYPE_FIELDNAME => array ('ABE_UID', 'PRO_UID', 'TAS_UID', 'ABE_TYPE', 'ABE_TEMPLATE', 'ABE_DYN_TYPE', 'DYN_UID', 'ABE_EMAIL_FIELD', 'ABE_ACTION_FIELD', 'ABE_CASE_NOTE_IN_RESPONSE', 'ABE_CREATE_DATE', 'ABE_UPDATE_DATE', 'ABE_SUBJECT_FIELD', 'ABE_MAILSERVER_OR_MAILCURRENT', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, ) BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, )
); );
/** /**
@@ -94,10 +97,10 @@ abstract class BaseAbeConfigurationPeer
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/ */
private static $fieldKeys = array ( private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('AbeUid' => 0, 'ProUid' => 1, 'TasUid' => 2, 'AbeType' => 3, 'AbeTemplate' => 4, 'AbeDynType' => 5, 'DynUid' => 6, 'AbeEmailField' => 7, 'AbeActionField' => 8, 'AbeCaseNoteInResponse' => 9, 'AbeCreateDate' => 10, 'AbeUpdateDate' => 11, 'AbeSubjectField' => 12, ), BasePeer::TYPE_PHPNAME => array ('AbeUid' => 0, 'ProUid' => 1, 'TasUid' => 2, 'AbeType' => 3, 'AbeTemplate' => 4, 'AbeDynType' => 5, 'DynUid' => 6, 'AbeEmailField' => 7, 'AbeActionField' => 8, 'AbeCaseNoteInResponse' => 9, 'AbeCreateDate' => 10, 'AbeUpdateDate' => 11, 'AbeSubjectField' => 12, 'AbeMailserverOrMailcurrent' => 13, ),
BasePeer::TYPE_COLNAME => array (AbeConfigurationPeer::ABE_UID => 0, AbeConfigurationPeer::PRO_UID => 1, AbeConfigurationPeer::TAS_UID => 2, AbeConfigurationPeer::ABE_TYPE => 3, AbeConfigurationPeer::ABE_TEMPLATE => 4, AbeConfigurationPeer::ABE_DYN_TYPE => 5, AbeConfigurationPeer::DYN_UID => 6, AbeConfigurationPeer::ABE_EMAIL_FIELD => 7, AbeConfigurationPeer::ABE_ACTION_FIELD => 8, AbeConfigurationPeer::ABE_CASE_NOTE_IN_RESPONSE => 9, AbeConfigurationPeer::ABE_CREATE_DATE => 10, AbeConfigurationPeer::ABE_UPDATE_DATE => 11, AbeConfigurationPeer::ABE_SUBJECT_FIELD => 12, ), BasePeer::TYPE_COLNAME => array (AbeConfigurationPeer::ABE_UID => 0, AbeConfigurationPeer::PRO_UID => 1, AbeConfigurationPeer::TAS_UID => 2, AbeConfigurationPeer::ABE_TYPE => 3, AbeConfigurationPeer::ABE_TEMPLATE => 4, AbeConfigurationPeer::ABE_DYN_TYPE => 5, AbeConfigurationPeer::DYN_UID => 6, AbeConfigurationPeer::ABE_EMAIL_FIELD => 7, AbeConfigurationPeer::ABE_ACTION_FIELD => 8, AbeConfigurationPeer::ABE_CASE_NOTE_IN_RESPONSE => 9, AbeConfigurationPeer::ABE_CREATE_DATE => 10, AbeConfigurationPeer::ABE_UPDATE_DATE => 11, AbeConfigurationPeer::ABE_SUBJECT_FIELD => 12, AbeConfigurationPeer::ABE_MAILSERVER_OR_MAILCURRENT => 13, ),
BasePeer::TYPE_FIELDNAME => array ('ABE_UID' => 0, 'PRO_UID' => 1, 'TAS_UID' => 2, 'ABE_TYPE' => 3, 'ABE_TEMPLATE' => 4, 'ABE_DYN_TYPE' => 5, 'DYN_UID' => 6, 'ABE_EMAIL_FIELD' => 7, 'ABE_ACTION_FIELD' => 8, 'ABE_CASE_NOTE_IN_RESPONSE' => 9, 'ABE_CREATE_DATE' => 10, 'ABE_UPDATE_DATE' => 11, 'ABE_SUBJECT_FIELD' => 12, ), BasePeer::TYPE_FIELDNAME => array ('ABE_UID' => 0, 'PRO_UID' => 1, 'TAS_UID' => 2, 'ABE_TYPE' => 3, 'ABE_TEMPLATE' => 4, 'ABE_DYN_TYPE' => 5, 'DYN_UID' => 6, 'ABE_EMAIL_FIELD' => 7, 'ABE_ACTION_FIELD' => 8, 'ABE_CASE_NOTE_IN_RESPONSE' => 9, 'ABE_CREATE_DATE' => 10, 'ABE_UPDATE_DATE' => 11, 'ABE_SUBJECT_FIELD' => 12, 'ABE_MAILSERVER_OR_MAILCURRENT' => 13, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, ) BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, )
); );
/** /**
@@ -224,6 +227,8 @@ abstract class BaseAbeConfigurationPeer
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_SUBJECT_FIELD); $criteria->addSelectColumn(AbeConfigurationPeer::ABE_SUBJECT_FIELD);
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_MAILSERVER_OR_MAILCURRENT);
} }
const COUNT = 'COUNT(ABE_CONFIGURATION.ABE_UID)'; const COUNT = 'COUNT(ABE_CONFIGURATION.ABE_UID)';

View File

@@ -4664,6 +4664,16 @@
<parameter name="Extra" value=""/> <parameter name="Extra" value=""/>
</vendor> </vendor>
</column> </column>
<column name="ABE_MAILSERVER_OR_MAILCURRENT" type="INTEGER" required="false" default="0">
<vendor type="mysql">
<parameter name="Field" value="ABE_MAILSERVER_OR_MAILCURRENT"/>
<parameter name="Type" value="int(1)"/>
<parameter name="Null" value="YES"/>
<parameter name="Key" value=""/>
<parameter name="Default" value="0"/>
<parameter name="Extra" value=""/>
</vendor>
</column>
</table> </table>
<table name="ABE_REQUESTS"> <table name="ABE_REQUESTS">

View File

@@ -2651,6 +2651,7 @@ CREATE TABLE `ABE_CONFIGURATION`
`ABE_CREATE_DATE` DATETIME NOT NULL, `ABE_CREATE_DATE` DATETIME NOT NULL,
`ABE_UPDATE_DATE` DATETIME, `ABE_UPDATE_DATE` DATETIME,
`ABE_SUBJECT_FIELD` VARCHAR(100) default '' NOT NULL, `ABE_SUBJECT_FIELD` VARCHAR(100) default '' NOT NULL,
`ABE_MAILSERVER_OR_MAILCURRENT` INTEGER default 0 NOT NULL,
PRIMARY KEY (`ABE_UID`) PRIMARY KEY (`ABE_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='The plugin table for actionsByEmail'; )ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='The plugin table for actionsByEmail';
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------

View File

@@ -39,7 +39,7 @@ if (PMLicensedFeatures
$result->setFetchmode(ResultSet::FETCHMODE_ASSOC); $result->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$result->next(); $result->next();
$configuration = $result->getRow(); $configuration = $result->getRow();
$a = new pmDynaform(G::decrypt($_REQUEST['DYN_UID'], URL_KEY));
$action = 'ActionsByEmailDataFormPost.php?APP_UID=' . $_REQUEST['APP_UID'] . '&DEL_INDEX=' . $_REQUEST['DEL_INDEX'] . '&ABER=' . $_REQUEST['ABER']; $action = 'ActionsByEmailDataFormPost.php?APP_UID=' . $_REQUEST['APP_UID'] . '&DEL_INDEX=' . $_REQUEST['DEL_INDEX'] . '&ABER=' . $_REQUEST['ABER'];
$record['DYN_CONTENT'] = $configuration['DYN_CONTENT']; $record['DYN_CONTENT'] = $configuration['DYN_CONTENT'];
$record['PRO_UID'] = $configuration['PRO_UID']; $record['PRO_UID'] = $configuration['PRO_UID'];
@@ -48,6 +48,7 @@ if (PMLicensedFeatures
$record['DEL_INDEX'] = $_REQUEST['DEL_INDEX']; $record['DEL_INDEX'] = $_REQUEST['DEL_INDEX'];
$record['ABER'] = $_REQUEST['ABER']; $record['ABER'] = $_REQUEST['ABER'];
if (is_null($caseFields['DEL_FINISH_DATE'])) { if (is_null($caseFields['DEL_FINISH_DATE'])) {
$a = new pmDynaform($record);
$a->printABE($action,$record); $a->printABE($action,$record);
} else { } else {
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showInfo', '', array('MESSAGE' => '<strong>The form has already been filled and sent.</strong>')); $G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showInfo', '', array('MESSAGE' => '<strong>The form has already been filled and sent.</strong>'));

View File

@@ -59,6 +59,7 @@ class ActionsByEmail
$configuration['ABE_SUBJECT_FIELD'] = $configuration['ABE_SUBJECT_FIELD']; $configuration['ABE_SUBJECT_FIELD'] = $configuration['ABE_SUBJECT_FIELD'];
$configuration['ABE_EMAIL_FIELD'] = $configuration['ABE_EMAIL_FIELD']; $configuration['ABE_EMAIL_FIELD'] = $configuration['ABE_EMAIL_FIELD'];
$configuration['ABE_ACTION_FIELD'] = $configuration['ABE_ACTION_FIELD']; $configuration['ABE_ACTION_FIELD'] = $configuration['ABE_ACTION_FIELD'];
$configuration['ABE_MAILSERVER_OR_MAILCURRENT'] = $configuration['ABE_MAILSERVER_OR_MAILCURRENT'];
$configuration['ABE_CASE_NOTE_IN_RESPONSE'] = $configuration['ABE_CASE_NOTE_IN_RESPONSE'] ? '["1"]' : '[]'; $configuration['ABE_CASE_NOTE_IN_RESPONSE'] = $configuration['ABE_CASE_NOTE_IN_RESPONSE'] ? '["1"]' : '[]';
} }
$configuration['feature'] = 'ActionsByEmail'; $configuration['feature'] = 'ActionsByEmail';