Merge remote-tracking branch 'origin/master' into develop

This commit is contained in:
Pierre Goiffon
2019-07-01 17:30:21 +02:00
35 changed files with 81 additions and 49 deletions

View File

@@ -6526,11 +6526,13 @@ class AttributeExternalField extends AttributeDefinition
}
/**
* @see N°2174
*
* @param string $sDefault
*
* @return string dict entry if defined, otherwise the class hierarchy -> field name<br>
* @return string dict entry if defined, otherwise :
* <ul>
* <li>if field is a friendlyname then display the label of the ExternalKey
* <li>the class hierarchy -> field name
*
* <p>For example, having this :
*
* <pre>
@@ -6543,7 +6545,8 @@ class AttributeExternalField extends AttributeDefinition
*
* <p>The ExternalField foo points to a magical field that is brought by c_id ExternalKey in class B.
*
* <p>The foo label will be : B -> C -> friendlyname<br>
* <p>In the normal case the foo label would be : B -> C -> friendlyname<br>
* But as foo is a friendlyname its label will be the same as the one on A.b_id field
* This can be overrided with dict key Class:ClassA/Attribute:foo
*
* @throws \CoreException
@@ -6558,6 +6561,19 @@ class AttributeExternalField extends AttributeDefinition
return $sLabel;
}
if ($this->IsFriendlyName())
{
// This will be used even if we are pointing to a friendlyname in a distance > 1
// For example we can link to a magic friendlyname (like org_id_friendlyname)
// If a specific label is needed, use a Dict key !
// See N°2174
$sKeyAttCode = $this->Get("extkey_attcode");
$oExtKeyAttDef = MetaModel::GetAttributeDef($this->GetHostClass(), $sKeyAttCode);
$sLabel = $oExtKeyAttDef->GetLabel($this->m_sCode);
return $sLabel;
}
$oRemoteAtt = $this->GetExtAttDef();
$sLabel = $oRemoteAtt->GetLabel($this->m_sCode);
$oKeyAtt = $this->GetKeyAttDef();

View File

@@ -88,7 +88,8 @@ class SimpleCrypt
}
break;
case 'OpenSSL':
if(!function_exists('openssl_decrypt')){
case 'OpenSSLMcryptCompatibility':
if(!function_exists('openssl_decrypt')){
$sEngineName = 'Simple';
}
break;

View File

@@ -27,7 +27,7 @@
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'authent-external/'.ITOP_VERSION,
'authent-external/2.6.2',
array(
// Identification
//

View File

@@ -9,7 +9,7 @@ if (function_exists('ldap_connect'))
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'authent-ldap/'.ITOP_VERSION,
'authent-ldap/2.6.2',
array(
// Identification
//

View File

@@ -3,7 +3,7 @@
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'authent-local/'.ITOP_VERSION,
'authent-local/2.6.2',
array(
// Identification
//

View File

@@ -19,7 +19,7 @@
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'itop-attachments/'.ITOP_VERSION,
'itop-attachments/2.6.2',
array(
// Identification
//

View File

@@ -3,7 +3,7 @@
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'itop-backup/'.ITOP_VERSION,
'itop-backup/2.6.2',
array(
// Identification
//

View File

@@ -3,7 +3,7 @@
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'itop-bridge-virtualization-storage/'.ITOP_VERSION,
'itop-bridge-virtualization-storage/2.6.2',
array(
// Identification
//

View File

@@ -3,7 +3,7 @@
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'itop-change-mgmt-itil/'.ITOP_VERSION,
'itop-change-mgmt-itil/2.6.2',
array(
// Identification
//

View File

@@ -3,7 +3,7 @@
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'itop-change-mgmt/'.ITOP_VERSION,
'itop-change-mgmt/2.6.2',
array(
// Identification
//

View File

@@ -3,7 +3,7 @@
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'itop-config-mgmt/'.ITOP_VERSION,
'itop-config-mgmt/2.6.2',
array(
// Identification
//

View File

@@ -3,7 +3,7 @@
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'itop-config/'.ITOP_VERSION,
'itop-config/2.6.2',
array(
// Identification
//

View File

@@ -18,7 +18,7 @@
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'itop-datacenter-mgmt/'.ITOP_VERSION,
'itop-datacenter-mgmt/2.6.2',
array(
// Identification
//

View File

@@ -25,7 +25,7 @@
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'itop-endusers-devices/'.ITOP_VERSION,
'itop-endusers-devices/2.6.2',
array(
// Identification
//

View File

@@ -6,7 +6,7 @@
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'itop-full-itil/'.ITOP_VERSION,
'itop-full-itil/2.6.2',
array(
// Identification
//

View File

@@ -5,7 +5,7 @@
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'itop-hub-connector/'.ITOP_VERSION,
'itop-hub-connector/2.6.2',
array(
// Identification
//

View File

@@ -3,7 +3,7 @@
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'itop-incident-mgmt-itil/'.ITOP_VERSION,
'itop-incident-mgmt-itil/2.6.2',
array(
// Identification
//

View File

@@ -3,7 +3,7 @@
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'itop-knownerror-mgmt/'.ITOP_VERSION,
'itop-knownerror-mgmt/2.6.2',
array(
// Identification
//

View File

@@ -2,7 +2,7 @@
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'itop-portal-base/'.ITOP_VERSION,
'itop-portal-base/2.6.2',
array(
// Identification
'label' => 'Portal Development Library',

View File

@@ -815,7 +815,7 @@ class ObjectFormManager extends FormManager
}
}
// - BlobField
if (in_array(get_class($oField), array('Combodo\\iTop\\Form\\Field\\BlobField')))
if (in_array(get_class($oField), array('Combodo\\iTop\\Form\\Field\\BlobField', 'Combodo\\iTop\\Form\\Field\\ImageField')))
{
// - Overriding attributes to display
if ($this->oApp !== null)

View File

@@ -2,18 +2,20 @@
* Patches for bootstrap 3 as it is no longer maintained by its editor
*/
//N°2166: Fix a boostrap/CKeditor incompatibility with their respective modals (source: https://stackoverflow.com/a/23667151)
$.fn.modal.Constructor.prototype.enforceFocus = function () {
var $modalElement = this.$element;
$(document).on('focusin.modal', function (e) {
var $parent = $(e.target.parentNode);
if ($modalElement[0] !== e.target && !$modalElement.has(e.target).length
// add whatever conditions you need here:
&&
!$parent.hasClass('cke_dialog_ui_input_select') && !$parent.hasClass('cke_dialog_ui_input_text')) {
$modalElement.focus()
}
})
//N°2166: Fix a boostrap/CKeditor incompatibility with their respective modals (source: https://stackoverflow.com/a/31679096)
$.fn.modal.Constructor.prototype.enforceFocus = function() {
$( document )
.off( 'focusin.bs.modal' ) // guard against infinite focus loop
.on( 'focusin.bs.modal', $.proxy( function( e ) {
if (
this.$element[ 0 ] !== e.target && !this.$element.has( e.target ).length
// CKEditor compatibility fix start.
&& !$( e.target ).closest( '.cke_dialog, .cke' ).length
// CKEditor compatibility fix end.
) {
this.$element.trigger( 'focus' );
}
}, this ) );
};
// Hack to enable multiple modals by making sure the .modal-open class is set to the <body> when there is at least one modal open left

View File

@@ -2,7 +2,7 @@
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'itop-portal/'.ITOP_VERSION,
'itop-portal/2.6.2',
array(
// Identification
'label' => 'Enhanced Customer Portal',

View File

@@ -3,7 +3,7 @@
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'itop-problem-mgmt/'.ITOP_VERSION,
'itop-problem-mgmt/2.6.2',
array(
// Identification
//

View File

@@ -19,7 +19,7 @@
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'itop-profiles-itil/'.ITOP_VERSION,
'itop-profiles-itil/2.6.2',
array(
// Identification
//

View File

@@ -3,7 +3,7 @@
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'itop-request-mgmt-itil/'.ITOP_VERSION,
'itop-request-mgmt-itil/2.6.2',
array(
// Identification
//

View File

@@ -3,7 +3,7 @@
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'itop-request-mgmt/'.ITOP_VERSION,
'itop-request-mgmt/2.6.2',
array(
// Identification
//

View File

@@ -3,7 +3,7 @@
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'itop-service-mgmt-provider/'.ITOP_VERSION,
'itop-service-mgmt-provider/2.6.2',
array(
// Identification
//

View File

@@ -3,7 +3,7 @@
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'itop-service-mgmt/'.ITOP_VERSION,
'itop-service-mgmt/2.6.2',
array(
// Identification
//

View File

@@ -18,7 +18,7 @@
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'itop-sla-computation/'.ITOP_VERSION,
'itop-sla-computation/2.6.2',
array(
// Identification
//

View File

@@ -25,7 +25,7 @@
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'itop-storage-mgmt/'.ITOP_VERSION,
'itop-storage-mgmt/2.6.2',
array(
// Identification
//

View File

@@ -3,7 +3,7 @@
SetupWebPage::AddModule(
__FILE__,
'itop-tickets/'.ITOP_VERSION,
'itop-tickets/2.6.2',
array(
// Identification
//

View File

@@ -16,7 +16,7 @@
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'itop-virtualization-mgmt/'.ITOP_VERSION,
'itop-virtualization-mgmt/2.6.2',
array(
// Identification
//

View File

@@ -3,7 +3,7 @@
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'itop-welcome-itil/'.ITOP_VERSION,
'itop-welcome-itil/2.6.2',
array(
// Identification
//

View File

@@ -59,6 +59,9 @@ try
case 'export_build':
case 'export_cancel':
case 'export_download':
case 'cke_img_upload':
case 'cke_upload_and_browse':
case 'cke_browse':
$sRequestedPortalId = null;
break;

View File

@@ -649,10 +649,20 @@ EOF;
{
return '';
}
$sTlsOptions = '';
$sTlsOptions .= ' --ssl';
$sDBVendor= CMDBSource::GetDBVendor();
$sDBVersion = CMDBSource::GetDBVersion();
$sMysqlSSLModeVersion = '5.7.0'; //Mysql 5.7.0 and upper deprecated --ssl and uses --ssl-mode instead
if ($sDBVendor === CMDBSource::ENUM_DB_VENDOR_MYSQL && version_compare($sDBVersion, $sMysqlSSLModeVersion, '>='))
{
$sTlsOptions .= ' --ssl-mode=VERIFY_CA';
}
else
{
$sTlsOptions .= ' --ssl';
}
// ssl-key parameter : not implemented
// ssl-cert parameter : not implemented