1. Fix error message labels The event with {0}: {1} not is \"Start Event\"
2. Fix error message labels The event with {0}: {1} does not is registered.
3. Custom domain: FQDN does not include protocol and port, include from server.
This commit is contained in:
davidcallizaya
2017-06-04 12:20:39 -04:00
parent 8cfc00398b
commit 84ea1c0caf
3 changed files with 34 additions and 16 deletions

View File

@@ -17836,14 +17836,14 @@ msgstr "Sending a test mail to: {0}"
# TRANSLATION # TRANSLATION
# LABEL/ID_EVENT_NOT_IS_START_EVENT # LABEL/ID_EVENT_NOT_IS_START_EVENT
#: LABEL/ID_EVENT_NOT_IS_START_EVENT #: LABEL/ID_EVENT_NOT_IS_START_EVENT
msgid "The event with {0}: {1} not is \"Start Event\"." msgid "The event with {0}: {1} is not a \"Start Event\"."
msgstr "The event with {0}: {1} not is \"Start Event\"." msgstr "The event with {0}: {1} is not a \"Start Event\"."
# TRANSLATION # TRANSLATION
# LABEL/ID_WEB_ENTRY_EVENT_DOES_NOT_IS_REGISTERED # LABEL/ID_WEB_ENTRY_EVENT_DOES_NOT_IS_REGISTERED
#: LABEL/ID_WEB_ENTRY_EVENT_DOES_NOT_IS_REGISTERED #: LABEL/ID_WEB_ENTRY_EVENT_DOES_NOT_IS_REGISTERED
msgid "The event with {0}: {1} does not is registered." msgid "The event with {0}: {1} is not registered."
msgstr "The event with {0}: {1} does not is registered." msgstr "The event with {0}: {1} is not registered."
# TRANSLATION # TRANSLATION
# LABEL/ID_WEB_ENTRY_EVENT_TITLE_ALREADY_EXISTS # LABEL/ID_WEB_ENTRY_EVENT_TITLE_ALREADY_EXISTS

View File

@@ -4480,8 +4480,8 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_EMAIL_SERVER_TEST_CONNECTION_SENDING_EMAIL','en','Sending a test mail to: {0}','2014-12-24') ; ( 'LABEL','ID_EMAIL_SERVER_TEST_CONNECTION_SENDING_EMAIL','en','Sending a test mail to: {0}','2014-12-24') ;
INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ) VALUES INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ) VALUES
( 'LABEL','ID_EVENT_NOT_IS_START_EVENT','en','The event with {0}: {1} not is "Start Event".','2015-01-13') , ( 'LABEL','ID_EVENT_NOT_IS_START_EVENT','en','The event with {0}: {1} is not a "Start Event".','2015-01-13') ,
( 'LABEL','ID_WEB_ENTRY_EVENT_DOES_NOT_IS_REGISTERED','en','The event with {0}: {1} does not is registered.','2015-01-16') , ( 'LABEL','ID_WEB_ENTRY_EVENT_DOES_NOT_IS_REGISTERED','en','The event with {0}: {1} is not registered.','2015-01-16') ,
( 'LABEL','ID_WEB_ENTRY_EVENT_TITLE_ALREADY_EXISTS','en','The WebEntry-Event title with {0}: "{1}" already exists.','2015-01-16') , ( 'LABEL','ID_WEB_ENTRY_EVENT_TITLE_ALREADY_EXISTS','en','The WebEntry-Event title with {0}: "{1}" already exists.','2015-01-16') ,
( 'LABEL','ID_CASE_STOPPED_TRIGGER','en','The case has not stopped due to its trigger.','2015-01-29') , ( 'LABEL','ID_CASE_STOPPED_TRIGGER','en','The case has not stopped due to its trigger.','2015-01-29') ,
( 'LABEL','ID_TRANSLATION_NOT_WRITEABLE','en','The translation file is not writable. <br/>Please give write permission to file:','2015-01-31') , ( 'LABEL','ID_TRANSLATION_NOT_WRITEABLE','en','The translation file is not writable. <br/>Please give write permission to file:','2015-01-31') ,

View File

@@ -11,9 +11,12 @@ class WebEntryEvent
"DYN_UID" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "dynaFormUid"), "DYN_UID" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "dynaFormUid"),
"USR_UID" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "userUid"), "USR_UID" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "userUid"),
"WEE_TITLE" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "webEntryEventTitle"), "WEE_TITLE" => array("type" => "string", "required" => false, "empty" => false, "defaultValues" => array(), "fieldNameAux" => "webEntryEventTitle"),
"WEE_DESCRIPTION" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "webEntryEventDescription"), "WEE_DESCRIPTION" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "webEntryEventDescription"),
"WEE_STATUS" => array("type" => "string", "required" => false, "empty" => false, "defaultValues" => array("ENABLED", "DISABLED"), "fieldNameAux" => "webEntryEventStatus") "WEE_STATUS" => array("type" => "string", "required" => false, "empty" => false, "defaultValues" => array("ENABLED", "DISABLED"), "fieldNameAux" => "webEntryEventStatus"),
"WE_LINK_SKIN" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "webEntryEventSkin"),
"WE_LINK_LANGUAGE" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "webEntryEventLanguage"),
"WE_LINK_DOMAIN" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "webEntryEventDomain"),
); );
private $formatFieldNameInUppercase = true; private $formatFieldNameInUppercase = true;
@@ -269,6 +272,15 @@ class WebEntryEvent
== 'SINGLE') { == 'SINGLE') {
$this->arrayFieldDefinition['DYN_UID']['required'] = true; $this->arrayFieldDefinition['DYN_UID']['required'] = true;
} }
if (isset($arrayData['WE_LINK_GENERATION']) && $arrayData['WE_LINK_GENERATION']
== 'ADVANCED') {
$this->arrayFieldDefinition['WE_LINK_SKIN']['required'] = true;
$this->arrayFieldDefinition['WE_LINK_LANGUAGE']['required'] = true;
$this->arrayFieldDefinition['WE_LINK_DOMAIN']['required'] = true;
$this->arrayFieldDefinition['WE_LINK_SKIN']['empty'] = false;
$this->arrayFieldDefinition['WE_LINK_LANGUAGE']['empty'] = false;
$this->arrayFieldDefinition['WE_LINK_DOMAIN']['empty'] = false;
}
$process->throwExceptionIfDataNotMetFieldDefinition($arrayData, $this->arrayFieldDefinition, $this->arrayFieldNameForException, $flagInsert); $process->throwExceptionIfDataNotMetFieldDefinition($arrayData, $this->arrayFieldDefinition, $this->arrayFieldNameForException, $flagInsert);
@@ -1099,14 +1111,20 @@ class WebEntryEvent
) )
); );
} }
$http = (\G::is_https()) ? "https://" : "http://";
$port = $_SERVER['SERVER_PORT'] == '80' ? '' : ':'.$_SERVER['SERVER_PORT'];
if ($webEntry->getWeLinkGeneration() === 'ADVANCED') { if ($webEntry->getWeLinkGeneration() === 'ADVANCED') {
$domain = $webEntry->getWeLinkDomain(); $domain = $webEntry->getWeLinkDomain();
$url = $domain . "/sys".SYS_SYS."/". $hasProtocol = strpos($domain, 'http://') === 0 ||
strpos($domain, 'https://') === 0;
$hasPort = preg_match('/\:\d+$/', $domain);
$url = ($hasProtocol ? '' : $http).
$domain.($hasPort ? '' : $port).
"/sys".SYS_SYS."/".
$webEntry->getWeLinkLanguage()."/". $webEntry->getWeLinkLanguage()."/".
$webEntry->getWeLinkSkin()."/".$prj_uid; $webEntry->getWeLinkSkin()."/".$prj_uid;
return $url."/".$webEntry->getWeUid().'.php'; return $url."/".$webEntry->getWeUid().'.php';
} else { } else {
$http = (\G::is_https()) ? "https://" : "http://";
$url = $http.$_SERVER["HTTP_HOST"]."/sys".SYS_SYS."/".SYS_LANG."/".SYS_SKIN."/".$prj_uid; $url = $http.$_SERVER["HTTP_HOST"]."/sys".SYS_SYS."/".SYS_LANG."/".SYS_SKIN."/".$prj_uid;
return $url."/".$webEntry->getWeData(); return $url."/".$webEntry->getWeData();
} }