mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
N°8796 - Add PHP code style validation in iTop and extensions - format whole code base
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
//
|
||||
// iTop module definition file
|
||||
//
|
||||
@@ -6,7 +7,7 @@
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'authent-cas/3.3.0',
|
||||
array(
|
||||
[
|
||||
// Identification
|
||||
//
|
||||
'label' => 'CAS SSO',
|
||||
@@ -14,36 +15,36 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Setup
|
||||
//
|
||||
'dependencies' => array(
|
||||
|
||||
),
|
||||
'dependencies' => [
|
||||
|
||||
],
|
||||
'mandatory' => true,
|
||||
'visible' => true,
|
||||
|
||||
// Components
|
||||
//
|
||||
'datamodel' => array(
|
||||
'datamodel' => [
|
||||
'vendor/autoload.php',
|
||||
'src/CASLoginExtension.php',
|
||||
),
|
||||
'webservice' => array(
|
||||
|
||||
),
|
||||
'data.struct' => array(
|
||||
],
|
||||
'webservice' => [
|
||||
|
||||
],
|
||||
'data.struct' => [
|
||||
// add your 'structure' definition XML files here,
|
||||
),
|
||||
'data.sample' => array(
|
||||
],
|
||||
'data.sample' => [
|
||||
// add your sample data XML files here,
|
||||
),
|
||||
|
||||
],
|
||||
|
||||
// Documentation
|
||||
//
|
||||
'doc.manual_setup' => '', // hyperlink to manual setup documentation, if any
|
||||
'doc.more_information' => '', // hyperlink to more information, if any
|
||||
'doc.more_information' => '', // hyperlink to more information, if any
|
||||
|
||||
// Default settings
|
||||
//
|
||||
'settings' => array(
|
||||
'settings' => [
|
||||
// Authentication
|
||||
'cas_debug' => false,
|
||||
'cas_host' => '',
|
||||
@@ -51,6 +52,6 @@ SetupWebPage::AddModule(
|
||||
'cas_context' => '',
|
||||
'cas_version' => '',
|
||||
'service_base_url' => '',
|
||||
),
|
||||
)
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<?php
|
||||
|
||||
// Copyright (C) 2010-2024 Combodo SAS
|
||||
//
|
||||
// This file is part of iTop.
|
||||
//
|
||||
// iTop is free software; you can redistribute it and/or modify
|
||||
// iTop is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
@@ -16,7 +17,6 @@
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with iTop. If not, see <http://www.gnu.org/licenses/>
|
||||
|
||||
|
||||
/**
|
||||
* Authent External
|
||||
* Module definition file for the "External Authentication" module
|
||||
@@ -28,7 +28,7 @@
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'authent-external/3.3.0',
|
||||
array(
|
||||
[
|
||||
// Identification
|
||||
//
|
||||
'label' => 'External user authentication',
|
||||
@@ -36,23 +36,23 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Setup
|
||||
//
|
||||
'dependencies' => array(
|
||||
),
|
||||
'dependencies' => [
|
||||
],
|
||||
'mandatory' => false,
|
||||
'visible' => true,
|
||||
|
||||
// Components
|
||||
//
|
||||
'datamodel' => array(
|
||||
'datamodel' => [
|
||||
'model.authent-external.php',
|
||||
),
|
||||
'data.struct' => array(
|
||||
],
|
||||
'data.struct' => [
|
||||
//'data.struct.authent-ldap.xml',
|
||||
),
|
||||
'data.sample' => array(
|
||||
],
|
||||
'data.sample' => [
|
||||
//'data.sample.authent-ldap.xml',
|
||||
),
|
||||
|
||||
],
|
||||
|
||||
// Documentation
|
||||
//
|
||||
'doc.manual_setup' => '',
|
||||
@@ -60,6 +60,6 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Default settings
|
||||
//
|
||||
'settings' => array(),
|
||||
)
|
||||
'settings' => [],
|
||||
]
|
||||
);
|
||||
|
||||
@@ -1,100 +1,98 @@
|
||||
<?php
|
||||
|
||||
|
||||
// Until we develop a mean to adress this within the setup, let's check that this instance
|
||||
// of PHP has the php_ldap extension
|
||||
//
|
||||
if (function_exists('ldap_connect'))
|
||||
{
|
||||
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/3.3.0',
|
||||
array(
|
||||
// Identification
|
||||
//
|
||||
'label' => 'User authentication based on LDAP',
|
||||
'category' => 'authentication',
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'authent-ldap/3.3.0',
|
||||
[
|
||||
// Identification
|
||||
//
|
||||
'label' => 'User authentication based on LDAP',
|
||||
'category' => 'authentication',
|
||||
|
||||
// Setup
|
||||
//
|
||||
'dependencies' => array(
|
||||
),
|
||||
'mandatory' => false,
|
||||
'visible' => true,
|
||||
'installer' => 'AuthentLDAPInstaller',
|
||||
// Setup
|
||||
//
|
||||
'dependencies' => [
|
||||
],
|
||||
'mandatory' => false,
|
||||
'visible' => true,
|
||||
'installer' => 'AuthentLDAPInstaller',
|
||||
|
||||
// Components
|
||||
//
|
||||
'datamodel' => array(
|
||||
),
|
||||
'data.struct' => array(
|
||||
//'data.struct.authent-ldap.xml',
|
||||
),
|
||||
'data.sample' => array(
|
||||
//'data.sample.authent-ldap.xml',
|
||||
),
|
||||
|
||||
// Documentation
|
||||
//
|
||||
'doc.manual_setup' => '',
|
||||
'doc.more_information' => '',
|
||||
// Components
|
||||
//
|
||||
'datamodel' => [
|
||||
],
|
||||
'data.struct' => [
|
||||
//'data.struct.authent-ldap.xml',
|
||||
],
|
||||
'data.sample' => [
|
||||
//'data.sample.authent-ldap.xml',
|
||||
],
|
||||
|
||||
// Default settings
|
||||
//
|
||||
'settings' => array(
|
||||
'uri' => 'ldap://localhost', // URI with host or IP address of your LDAP server
|
||||
'default_user' => '', // User and password used for initial "Anonymous" bind to LDAP
|
||||
'default_pwd' => '', // Leave both blank, if anonymous (read-only) bind is allowed
|
||||
'base_dn' => 'dc=yourcompany,dc=com', // Base DN for User queries, adjust it to your LDAP schema
|
||||
'user_query' => '(&(uid=%1$s)(inetuserstatus=ACTIVE))', // Query used to retrieve each user %1$s => iTop login
|
||||
// For Windows AD use (samaccountname=%1$s) or (userprincipalname=%1$s)
|
||||
|
||||
// Some extra LDAP options, refer to: http://www.php.net/manual/en/function.ldap-set-option.php for more info
|
||||
'options' => array(
|
||||
LDAP_OPT_PROTOCOL_VERSION => 3,
|
||||
LDAP_OPT_REFERRALS => 0,
|
||||
),
|
||||
'start_tls' => false,
|
||||
'debug' => false,
|
||||
'servers' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
// Documentation
|
||||
//
|
||||
'doc.manual_setup' => '',
|
||||
'doc.more_information' => '',
|
||||
|
||||
// Module installation handler
|
||||
//
|
||||
class AuthentLDAPInstaller extends ModuleInstallerAPI
|
||||
{
|
||||
public static function AfterDataLoad(Config $oConfiguration, $sPreviousVersion, $sCurrentVersion)
|
||||
// Default settings
|
||||
//
|
||||
'settings' => [
|
||||
'uri' => 'ldap://localhost', // URI with host or IP address of your LDAP server
|
||||
'default_user' => '', // User and password used for initial "Anonymous" bind to LDAP
|
||||
'default_pwd' => '', // Leave both blank, if anonymous (read-only) bind is allowed
|
||||
'base_dn' => 'dc=yourcompany,dc=com', // Base DN for User queries, adjust it to your LDAP schema
|
||||
'user_query' => '(&(uid=%1$s)(inetuserstatus=ACTIVE))', // Query used to retrieve each user %1$s => iTop login
|
||||
// For Windows AD use (samaccountname=%1$s) or (userprincipalname=%1$s)
|
||||
|
||||
// Some extra LDAP options, refer to: http://www.php.net/manual/en/function.ldap-set-option.php for more info
|
||||
'options' => [
|
||||
LDAP_OPT_PROTOCOL_VERSION => 3,
|
||||
LDAP_OPT_REFERRALS => 0,
|
||||
],
|
||||
'start_tls' => false,
|
||||
'debug' => false,
|
||||
'servers' => [],
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
// Module installation handler
|
||||
//
|
||||
class AuthentLDAPInstaller extends ModuleInstallerAPI
|
||||
{
|
||||
// Create missing table entries
|
||||
$sUserLDAPTable = MetaModel::DBGetTable('UserLDAP');
|
||||
$sUserTable = MetaModel::DBGetTable('User');
|
||||
$sSQL = "insert into $sUserLDAPTable (id) select U.id from $sUserTable as U left join $sUserLDAPTable as L on U.id = L.id where U.finalclass='UserLDAP' and isnull(L.id);";
|
||||
CMDBSource::Query($sSQL);
|
||||
}
|
||||
|
||||
public static function BeforeWritingConfig(Config $oConfiguration)
|
||||
{
|
||||
$sURI = $oConfiguration->GetModuleSetting('authent-ldap', 'uri');
|
||||
if (empty($sURI)) {
|
||||
$sLDAPHost = MetaModel::GetModuleSetting('authent-ldap', 'host', 'localhost');
|
||||
$iLDAPPort = MetaModel::GetModuleSetting('authent-ldap', 'port', 389);
|
||||
$sURI = preg_match('#^ldaps?://#i', $sLDAPHost) ? $sLDAPHost : 'ldap://'.$sLDAPHost.':'.$iLDAPPort;
|
||||
$oConfiguration->SetModuleSetting('authent-ldap', 'uri', $sURI);
|
||||
public static function AfterDataLoad(Config $oConfiguration, $sPreviousVersion, $sCurrentVersion)
|
||||
{
|
||||
// Create missing table entries
|
||||
$sUserLDAPTable = MetaModel::DBGetTable('UserLDAP');
|
||||
$sUserTable = MetaModel::DBGetTable('User');
|
||||
$sSQL = "insert into $sUserLDAPTable (id) select U.id from $sUserTable as U left join $sUserLDAPTable as L on U.id = L.id where U.finalclass='UserLDAP' and isnull(L.id);";
|
||||
CMDBSource::Query($sSQL);
|
||||
}
|
||||
|
||||
$aServers = $oConfiguration->GetModuleSetting('authent-ldap', 'servers', []);
|
||||
foreach ($aServers as &$aServer) {
|
||||
if (!array_key_exists($aServer, 'uri')) {
|
||||
$sLDAPHost = $aServerParams['host'] ?? 'localhost';
|
||||
$iLDAPPort = $aServerParams['port'] ?? 389;
|
||||
$aServer['uri'] = preg_match('#^ldaps?://#i', $sLDAPHost) ? $sLDAPHost : 'ldap://'.$sLDAPHost.':'.$iLDAPPort;
|
||||
public static function BeforeWritingConfig(Config $oConfiguration)
|
||||
{
|
||||
$sURI = $oConfiguration->GetModuleSetting('authent-ldap', 'uri');
|
||||
if (empty($sURI)) {
|
||||
$sLDAPHost = MetaModel::GetModuleSetting('authent-ldap', 'host', 'localhost');
|
||||
$iLDAPPort = MetaModel::GetModuleSetting('authent-ldap', 'port', 389);
|
||||
$sURI = preg_match('#^ldaps?://#i', $sLDAPHost) ? $sLDAPHost : 'ldap://'.$sLDAPHost.':'.$iLDAPPort;
|
||||
$oConfiguration->SetModuleSetting('authent-ldap', 'uri', $sURI);
|
||||
}
|
||||
|
||||
$aServers = $oConfiguration->GetModuleSetting('authent-ldap', 'servers', []);
|
||||
foreach ($aServers as &$aServer) {
|
||||
if (!array_key_exists($aServer, 'uri')) {
|
||||
$sLDAPHost = $aServerParams['host'] ?? 'localhost';
|
||||
$iLDAPPort = $aServerParams['port'] ?? 389;
|
||||
$aServer['uri'] = preg_match('#^ldaps?://#i', $sLDAPHost) ? $sLDAPHost : 'ldap://'.$sLDAPHost.':'.$iLDAPPort;
|
||||
}
|
||||
}
|
||||
$oConfiguration->SetModuleSetting('authent-ldap', 'servers', $aServers);
|
||||
}
|
||||
$oConfiguration->SetModuleSetting('authent-ldap', 'servers', $aServers);
|
||||
}
|
||||
}
|
||||
|
||||
} // if (function_exists('ldap_connect'))
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<?php
|
||||
|
||||
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'authent-local/3.3.0',
|
||||
array(
|
||||
[
|
||||
// Identification
|
||||
//
|
||||
'label' => 'User authentication based on the local DB',
|
||||
@@ -12,23 +11,23 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Setup
|
||||
//
|
||||
'dependencies' => array(
|
||||
),
|
||||
'dependencies' => [
|
||||
],
|
||||
'mandatory' => true,
|
||||
'visible' => true,
|
||||
|
||||
// Components
|
||||
//
|
||||
'datamodel' => array(
|
||||
'datamodel' => [
|
||||
'model.authent-local.php',
|
||||
),
|
||||
'data.struct' => array(
|
||||
],
|
||||
'data.struct' => [
|
||||
//'data.struct.authent-local.xml',
|
||||
),
|
||||
'data.sample' => array(
|
||||
],
|
||||
'data.sample' => [
|
||||
//'data.sample.authent-local.xml',
|
||||
),
|
||||
|
||||
],
|
||||
|
||||
// Documentation
|
||||
//
|
||||
'doc.manual_setup' => '',
|
||||
@@ -37,8 +36,8 @@ SetupWebPage::AddModule(
|
||||
// Default settings
|
||||
//
|
||||
|
||||
'settings' => array(
|
||||
'settings' => [
|
||||
// see the './datamodel.authent-local.xml' for the default settings!
|
||||
),
|
||||
)
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
//
|
||||
// iTop module definition file
|
||||
//
|
||||
@@ -6,7 +7,7 @@
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'combodo-backoffice-darkmoon-theme/3.3.0',
|
||||
array(
|
||||
[
|
||||
// Identification
|
||||
//
|
||||
'label' => 'Backoffice: Darkmoon theme',
|
||||
@@ -14,38 +15,35 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Setup
|
||||
//
|
||||
'dependencies' => array(
|
||||
|
||||
),
|
||||
'dependencies' => [
|
||||
|
||||
],
|
||||
'mandatory' => true,
|
||||
'visible' => false,
|
||||
|
||||
// Components
|
||||
//
|
||||
'datamodel' => array(
|
||||
),
|
||||
'webservice' => array(
|
||||
|
||||
),
|
||||
'data.struct' => array(
|
||||
'datamodel' => [
|
||||
],
|
||||
'webservice' => [
|
||||
|
||||
],
|
||||
'data.struct' => [
|
||||
// add your 'structure' definition XML files here,
|
||||
),
|
||||
'data.sample' => array(
|
||||
],
|
||||
'data.sample' => [
|
||||
// add your sample data XML files here,
|
||||
),
|
||||
|
||||
],
|
||||
|
||||
// Documentation
|
||||
//
|
||||
'doc.manual_setup' => '', // hyperlink to manual setup documentation, if any
|
||||
'doc.more_information' => '', // hyperlink to more information, if any
|
||||
'doc.more_information' => '', // hyperlink to more information, if any
|
||||
|
||||
// Default settings
|
||||
//
|
||||
'settings' => array(
|
||||
'settings' => [
|
||||
// Module specific settings go here, if any
|
||||
),
|
||||
)
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
//
|
||||
// iTop module definition file
|
||||
//
|
||||
@@ -6,7 +7,7 @@
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'combodo-backoffice-fullmoon-high-contrast-theme/3.3.0',
|
||||
array(
|
||||
[
|
||||
// Identification
|
||||
//
|
||||
'label' => 'Backoffice: Fullmoon with high contrast accessibility theme',
|
||||
@@ -14,38 +15,35 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Setup
|
||||
//
|
||||
'dependencies' => array(
|
||||
|
||||
),
|
||||
'dependencies' => [
|
||||
|
||||
],
|
||||
'mandatory' => true,
|
||||
'visible' => false,
|
||||
|
||||
// Components
|
||||
//
|
||||
'datamodel' => array(
|
||||
),
|
||||
'webservice' => array(
|
||||
|
||||
),
|
||||
'data.struct' => array(
|
||||
'datamodel' => [
|
||||
],
|
||||
'webservice' => [
|
||||
|
||||
],
|
||||
'data.struct' => [
|
||||
// add your 'structure' definition XML files here,
|
||||
),
|
||||
'data.sample' => array(
|
||||
],
|
||||
'data.sample' => [
|
||||
// add your sample data XML files here,
|
||||
),
|
||||
|
||||
],
|
||||
|
||||
// Documentation
|
||||
//
|
||||
'doc.manual_setup' => '', // hyperlink to manual setup documentation, if any
|
||||
'doc.more_information' => '', // hyperlink to more information, if any
|
||||
'doc.more_information' => '', // hyperlink to more information, if any
|
||||
|
||||
// Default settings
|
||||
//
|
||||
'settings' => array(
|
||||
'settings' => [
|
||||
// Module specific settings go here, if any
|
||||
),
|
||||
)
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
//
|
||||
// iTop module definition file
|
||||
//
|
||||
@@ -6,7 +7,7 @@
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'combodo-backoffice-fullmoon-protanopia-deuteranopia-theme/3.3.0',
|
||||
array(
|
||||
[
|
||||
// Identification
|
||||
//
|
||||
'label' => 'Backoffice: Fullmoon with protonopia & deuteranopia accessibility theme',
|
||||
@@ -14,38 +15,35 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Setup
|
||||
//
|
||||
'dependencies' => array(
|
||||
|
||||
),
|
||||
'dependencies' => [
|
||||
|
||||
],
|
||||
'mandatory' => true,
|
||||
'visible' => false,
|
||||
|
||||
// Components
|
||||
//
|
||||
'datamodel' => array(
|
||||
),
|
||||
'webservice' => array(
|
||||
|
||||
),
|
||||
'data.struct' => array(
|
||||
'datamodel' => [
|
||||
],
|
||||
'webservice' => [
|
||||
|
||||
],
|
||||
'data.struct' => [
|
||||
// add your 'structure' definition XML files here,
|
||||
),
|
||||
'data.sample' => array(
|
||||
],
|
||||
'data.sample' => [
|
||||
// add your sample data XML files here,
|
||||
),
|
||||
|
||||
],
|
||||
|
||||
// Documentation
|
||||
//
|
||||
'doc.manual_setup' => '', // hyperlink to manual setup documentation, if any
|
||||
'doc.more_information' => '', // hyperlink to more information, if any
|
||||
'doc.more_information' => '', // hyperlink to more information, if any
|
||||
|
||||
// Default settings
|
||||
//
|
||||
'settings' => array(
|
||||
'settings' => [
|
||||
// Module specific settings go here, if any
|
||||
),
|
||||
)
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
//
|
||||
// iTop module definition file
|
||||
//
|
||||
@@ -6,7 +7,7 @@
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'combodo-backoffice-fullmoon-tritanopia-theme/3.3.0',
|
||||
array(
|
||||
[
|
||||
// Identification
|
||||
//
|
||||
'label' => 'Backoffice: Fullmoon with tritanopia accessibility theme',
|
||||
@@ -14,38 +15,35 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Setup
|
||||
//
|
||||
'dependencies' => array(
|
||||
|
||||
),
|
||||
'dependencies' => [
|
||||
|
||||
],
|
||||
'mandatory' => true,
|
||||
'visible' => false,
|
||||
|
||||
// Components
|
||||
//
|
||||
'datamodel' => array(
|
||||
),
|
||||
'webservice' => array(
|
||||
|
||||
),
|
||||
'data.struct' => array(
|
||||
'datamodel' => [
|
||||
],
|
||||
'webservice' => [
|
||||
|
||||
],
|
||||
'data.struct' => [
|
||||
// add your 'structure' definition XML files here,
|
||||
),
|
||||
'data.sample' => array(
|
||||
],
|
||||
'data.sample' => [
|
||||
// add your sample data XML files here,
|
||||
),
|
||||
|
||||
],
|
||||
|
||||
// Documentation
|
||||
//
|
||||
'doc.manual_setup' => '', // hyperlink to manual setup documentation, if any
|
||||
'doc.more_information' => '', // hyperlink to more information, if any
|
||||
'doc.more_information' => '', // hyperlink to more information, if any
|
||||
|
||||
// Default settings
|
||||
//
|
||||
'settings' => array(
|
||||
'settings' => [
|
||||
// Module specific settings go here, if any
|
||||
),
|
||||
)
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Copyright (C) 2013-2024 Combodo SAS
|
||||
*
|
||||
@@ -25,7 +26,7 @@
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'combodo-db-tools/3.3.0',
|
||||
array(
|
||||
[
|
||||
// Identification
|
||||
//
|
||||
'label' => 'Database maintenance tools',
|
||||
@@ -33,21 +34,21 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Setup
|
||||
//
|
||||
'dependencies' => array(
|
||||
'dependencies' => [
|
||||
'itop-structure/3.0.0',
|
||||
),
|
||||
],
|
||||
'mandatory' => false,
|
||||
'visible' => true,
|
||||
|
||||
// Components
|
||||
//
|
||||
'datamodel' => array(
|
||||
'datamodel' => [
|
||||
'src/Service/DBToolsUtils.php',
|
||||
'src/Service/DBAnalyzerUtils.php',
|
||||
),
|
||||
'webservice' => array(),
|
||||
'data.struct' => array(),
|
||||
'data.sample' => array(),
|
||||
'src/Service/DBAnalyzerUtils.php',
|
||||
],
|
||||
'webservice' => [],
|
||||
'data.struct' => [],
|
||||
'data.sample' => [],
|
||||
|
||||
// Documentation
|
||||
//
|
||||
@@ -56,6 +57,6 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Default settings
|
||||
//
|
||||
'settings' => array(),
|
||||
)
|
||||
'settings' => [],
|
||||
]
|
||||
);
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* @author Lukáš Dvořák <lukas.dvorak@itopportal.cz>
|
||||
* @author Daniel Rokos <daniel.rokos@itopportal.cz>
|
||||
*
|
||||
*/
|
||||
Dict::Add('CS CZ', 'Czech', 'Čeština', array(
|
||||
Dict::Add('CS CZ', 'Czech', 'Čeština', [
|
||||
'Attachments:TabTitle_Count' => 'Přílohy (%1$d)',
|
||||
'Attachments:EmptyTabTitle' => 'Přílohy',
|
||||
'Attachments:FieldsetTitle' => 'Přílohy',
|
||||
@@ -32,13 +33,13 @@ nebe se zeptejte'.ITOP_APPLICATION_SHORT.' správce '.ITOP_APPLICATION_SHORT.' z
|
||||
'Attachments:Render:Icons' => 'Zobrazit jako ikony',
|
||||
'Attachments:Render:Table' => 'Zobrazit jako seznam',
|
||||
'UI:Attachments:DropYourFileHint' => 'Drop files anywhere in this area~~',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: Attachment
|
||||
//
|
||||
|
||||
Dict::Add('CS CZ', 'Czech', 'Čeština', array(
|
||||
Dict::Add('CS CZ', 'Czech', 'Čeština', [
|
||||
'Class:Attachment' => 'Příloha',
|
||||
'Class:Attachment+' => '~~',
|
||||
'Class:Attachment/Attribute:expire' => 'Exspirace',
|
||||
@@ -53,10 +54,9 @@ Dict::Add('CS CZ', 'Czech', 'Čeština', array(
|
||||
'Class:Attachment/Attribute:item_org_id+' => '~~',
|
||||
'Class:Attachment/Attribute:contents' => 'Obsah',
|
||||
'Class:Attachment/Attribute:contents+' => '~~',
|
||||
));
|
||||
]);
|
||||
|
||||
|
||||
Dict::Add('CS CZ', 'Czech', 'Čeština', array(
|
||||
Dict::Add('CS CZ', 'Czech', 'Čeština', [
|
||||
'Attachments:File:Thumbnail' => 'Ikona',
|
||||
'Attachments:File:Name' => 'Jméno souboru',
|
||||
'Attachments:File:Date' => 'Datum nahrání',
|
||||
@@ -64,25 +64,25 @@ Dict::Add('CS CZ', 'Czech', 'Čeština', array(
|
||||
'Attachments:File:Size' => 'Velikost',
|
||||
'Attachments:File:MimeType' => 'Typ',
|
||||
'Attachments:File:DownloadsCount' => 'Staženo',
|
||||
));
|
||||
]);
|
||||
//
|
||||
// Class: Attachment
|
||||
//
|
||||
|
||||
Dict::Add('CS CZ', 'Czech', 'Čeština', array(
|
||||
Dict::Add('CS CZ', 'Czech', 'Čeština', [
|
||||
'Class:Attachment/Attribute:creation_date' => 'Datum vytvoření',
|
||||
'Class:Attachment/Attribute:creation_date+' => '~~',
|
||||
'Class:Attachment/Attribute:user_id' => 'Jméno uživatele',
|
||||
'Class:Attachment/Attribute:user_id+' => '~~',
|
||||
'Class:Attachment/Attribute:contact_id' => 'Kontakt',
|
||||
'Class:Attachment/Attribute:contact_id+' => '~~',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: TriggerOnAttachmentDownload
|
||||
//
|
||||
|
||||
Dict::Add('CS CZ', 'Czech', 'Čeština', array(
|
||||
Dict::Add('CS CZ', 'Czech', 'Čeština', [
|
||||
'Class:TriggerOnAttachmentDownload' => 'Trigger (on object\'s attachment download)~~',
|
||||
'Class:TriggerOnAttachmentDownload+' => 'Trigger on object\'s attachment download of [a child class of] the given class~~',
|
||||
'Class:TriggerOnAttachmentCreate' => 'Trigger (on object\'s attachment create)~~',
|
||||
@@ -91,5 +91,5 @@ Dict::Add('CS CZ', 'Czech', 'Čeština', array(
|
||||
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email+' => 'If checked, the file will be automatically attached to the email when an email action is triggered~~',
|
||||
'Class:TriggerOnAttachmentDelete' => 'Trigger (on object\'s attachment delete)~~',
|
||||
'Class:TriggerOnAttachmentDelete+' => 'Trigger on object\'s attachment delete~~',
|
||||
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
|
||||
));
|
||||
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
|
||||
]);
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* @author Erik Bøg <erik@boegmoeller.dk>
|
||||
*
|
||||
*/
|
||||
Dict::Add('DA DA', 'Danish', 'Dansk', array(
|
||||
Dict::Add('DA DA', 'Danish', 'Dansk', [
|
||||
'Attachments:TabTitle_Count' => 'Vedhæftninger (%1$d)',
|
||||
'Attachments:EmptyTabTitle' => 'Vedhæftninger',
|
||||
'Attachments:FieldsetTitle' => 'Vedhæftninger',
|
||||
@@ -31,13 +32,13 @@ or ask your '.ITOP_APPLICATION_SHORT.' administrator if the '.ITOP_APPLICATION_S
|
||||
'Attachments:Render:Icons' => 'Display as icons~~',
|
||||
'Attachments:Render:Table' => 'Display as list~~',
|
||||
'UI:Attachments:DropYourFileHint' => 'Drop files anywhere in this area~~',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: Attachment
|
||||
//
|
||||
|
||||
Dict::Add('DA DA', 'Danish', 'Dansk', array(
|
||||
Dict::Add('DA DA', 'Danish', 'Dansk', [
|
||||
'Class:Attachment' => 'Attachment~~',
|
||||
'Class:Attachment+' => '~~',
|
||||
'Class:Attachment/Attribute:expire' => 'Expire~~',
|
||||
@@ -52,10 +53,9 @@ Dict::Add('DA DA', 'Danish', 'Dansk', array(
|
||||
'Class:Attachment/Attribute:item_org_id+' => '~~',
|
||||
'Class:Attachment/Attribute:contents' => 'Contents~~',
|
||||
'Class:Attachment/Attribute:contents+' => '~~',
|
||||
));
|
||||
]);
|
||||
|
||||
|
||||
Dict::Add('DA DA', 'Danish', 'Dansk', array(
|
||||
Dict::Add('DA DA', 'Danish', 'Dansk', [
|
||||
'Attachments:File:Thumbnail' => 'Icon~~',
|
||||
'Attachments:File:Name' => 'File name~~',
|
||||
'Attachments:File:Date' => 'Upload date~~',
|
||||
@@ -63,25 +63,25 @@ Dict::Add('DA DA', 'Danish', 'Dansk', array(
|
||||
'Attachments:File:Size' => 'Size~~',
|
||||
'Attachments:File:MimeType' => 'Type~~',
|
||||
'Attachments:File:DownloadsCount' => 'Downloads~~',
|
||||
));
|
||||
]);
|
||||
//
|
||||
// Class: Attachment
|
||||
//
|
||||
|
||||
Dict::Add('DA DA', 'Danish', 'Dansk', array(
|
||||
Dict::Add('DA DA', 'Danish', 'Dansk', [
|
||||
'Class:Attachment/Attribute:creation_date' => 'Creation date~~',
|
||||
'Class:Attachment/Attribute:creation_date+' => '~~',
|
||||
'Class:Attachment/Attribute:user_id' => 'User id~~',
|
||||
'Class:Attachment/Attribute:user_id+' => '~~',
|
||||
'Class:Attachment/Attribute:contact_id' => 'Contact id~~',
|
||||
'Class:Attachment/Attribute:contact_id+' => '~~',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: TriggerOnAttachmentDownload
|
||||
//
|
||||
|
||||
Dict::Add('DA DA', 'Danish', 'Dansk', array(
|
||||
Dict::Add('DA DA', 'Danish', 'Dansk', [
|
||||
'Class:TriggerOnAttachmentDownload' => 'Trigger (on object\'s attachment download)~~',
|
||||
'Class:TriggerOnAttachmentDownload+' => 'Trigger on object\'s attachment download of [a child class of] the given class~~',
|
||||
'Class:TriggerOnAttachmentCreate' => 'Trigger (on object\'s attachment create)~~',
|
||||
@@ -90,5 +90,5 @@ Dict::Add('DA DA', 'Danish', 'Dansk', array(
|
||||
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email+' => 'If checked, the file will be automatically attached to the email when an email action is triggered~~',
|
||||
'Class:TriggerOnAttachmentDelete' => 'Trigger (on object\'s attachment delete)~~',
|
||||
'Class:TriggerOnAttachmentDelete+' => 'Trigger on object\'s attachment delete~~',
|
||||
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
|
||||
));
|
||||
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
|
||||
]);
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* @author ITOMIG GmbH <martin.raenker@itomig.de>
|
||||
*
|
||||
*/
|
||||
Dict::Add('DE DE', 'German', 'Deutsch', array(
|
||||
Dict::Add('DE DE', 'German', 'Deutsch', [
|
||||
'Attachments:TabTitle_Count' => 'Attachments (%1$d)',
|
||||
'Attachments:EmptyTabTitle' => 'Attachments',
|
||||
'Attachments:FieldsetTitle' => 'Attachments',
|
||||
@@ -31,13 +32,13 @@ oder melden Sie dem '.ITOP_APPLICATION_SHORT.' Administrator diesen Fehler, weil
|
||||
'Attachments:Render:Icons' => 'Als Icons anzeigen',
|
||||
'Attachments:Render:Table' => 'Als Liste anzeigen',
|
||||
'UI:Attachments:DropYourFileHint' => 'Dateien in diesem Bereich ablegen...',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: Attachment
|
||||
//
|
||||
|
||||
Dict::Add('DE DE', 'German', 'Deutsch', array(
|
||||
Dict::Add('DE DE', 'German', 'Deutsch', [
|
||||
'Class:Attachment' => 'Attachment',
|
||||
'Class:Attachment+' => '',
|
||||
'Class:Attachment/Attribute:expire' => 'Läuft ab',
|
||||
@@ -52,10 +53,9 @@ Dict::Add('DE DE', 'German', 'Deutsch', array(
|
||||
'Class:Attachment/Attribute:item_org_id+' => '',
|
||||
'Class:Attachment/Attribute:contents' => 'Inhalt',
|
||||
'Class:Attachment/Attribute:contents+' => '',
|
||||
));
|
||||
]);
|
||||
|
||||
|
||||
Dict::Add('DE DE', 'German', 'Deutsch', array(
|
||||
Dict::Add('DE DE', 'German', 'Deutsch', [
|
||||
'Attachments:File:Thumbnail' => 'Icon',
|
||||
'Attachments:File:Name' => 'Dateiname',
|
||||
'Attachments:File:Date' => 'Upload-Datum',
|
||||
@@ -63,25 +63,25 @@ Dict::Add('DE DE', 'German', 'Deutsch', array(
|
||||
'Attachments:File:Size' => 'Größe',
|
||||
'Attachments:File:MimeType' => 'Typ',
|
||||
'Attachments:File:DownloadsCount' => 'Downloads',
|
||||
));
|
||||
]);
|
||||
//
|
||||
// Class: Attachment
|
||||
//
|
||||
|
||||
Dict::Add('DE DE', 'German', 'Deutsch', array(
|
||||
Dict::Add('DE DE', 'German', 'Deutsch', [
|
||||
'Class:Attachment/Attribute:creation_date' => 'Erstellungsdatum',
|
||||
'Class:Attachment/Attribute:creation_date+' => '',
|
||||
'Class:Attachment/Attribute:user_id' => 'Benutzer ID',
|
||||
'Class:Attachment/Attribute:user_id+' => '',
|
||||
'Class:Attachment/Attribute:contact_id' => 'Kontakt ID',
|
||||
'Class:Attachment/Attribute:contact_id+' => '',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: TriggerOnAttachmentDownload
|
||||
//
|
||||
|
||||
Dict::Add('DE DE', 'German', 'Deutsch', array(
|
||||
Dict::Add('DE DE', 'German', 'Deutsch', [
|
||||
'Class:TriggerOnAttachmentDownload' => 'Trigger (beim Herunterladen eines Attachment eines Objekts)',
|
||||
'Class:TriggerOnAttachmentDownload+' => 'Trigger für das Herunterladen des Attachments der angegebenen Klasse oder einer Unterklasse',
|
||||
'Class:TriggerOnAttachmentCreate' => 'Trigger (on object\'s attachment create)~~',
|
||||
@@ -90,5 +90,5 @@ Dict::Add('DE DE', 'German', 'Deutsch', array(
|
||||
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email+' => 'If checked, the file will be automatically attached to the email when an email action is triggered~~',
|
||||
'Class:TriggerOnAttachmentDelete' => 'Trigger (on object\'s attachment delete)~~',
|
||||
'Class:TriggerOnAttachmentDelete+' => 'Trigger on object\'s attachment delete~~',
|
||||
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
|
||||
));
|
||||
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
|
||||
]);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Copyright (C) 2013-2024 Combodo SAS
|
||||
*
|
||||
@@ -17,7 +18,7 @@
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
*/
|
||||
|
||||
Dict::Add('EN US', 'English', 'English', array(
|
||||
Dict::Add('EN US', 'English', 'English', [
|
||||
'Attachments:TabTitle_Count' => 'Attachments (%1$d)',
|
||||
'Attachments:EmptyTabTitle' => 'Attachments',
|
||||
'Attachments:FieldsetTitle' => 'Attachments',
|
||||
@@ -38,13 +39,13 @@ or ask your '.ITOP_APPLICATION_SHORT.' administrator if the '.ITOP_APPLICATION_S
|
||||
'Attachments:Render:Icons' => 'Display as icons',
|
||||
'Attachments:Render:Table' => 'Display as list',
|
||||
'UI:Attachments:DropYourFileHint' => 'Drop files anywhere in this area',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: Attachment
|
||||
//
|
||||
|
||||
Dict::Add('EN US', 'English', 'English', array(
|
||||
Dict::Add('EN US', 'English', 'English', [
|
||||
'Class:Attachment' => 'Attachment',
|
||||
'Class:Attachment+' => '',
|
||||
'Class:Attachment/Attribute:expire' => 'Expire',
|
||||
@@ -59,10 +60,9 @@ Dict::Add('EN US', 'English', 'English', array(
|
||||
'Class:Attachment/Attribute:item_org_id+' => '',
|
||||
'Class:Attachment/Attribute:contents' => 'Contents',
|
||||
'Class:Attachment/Attribute:contents+' => '',
|
||||
));
|
||||
]);
|
||||
|
||||
|
||||
Dict::Add('EN US', 'English', 'English', array(
|
||||
Dict::Add('EN US', 'English', 'English', [
|
||||
'Attachments:File:Thumbnail' => 'Icon',
|
||||
'Attachments:File:Name' => 'File name',
|
||||
'Attachments:File:Date' => 'Upload date',
|
||||
@@ -70,25 +70,25 @@ Dict::Add('EN US', 'English', 'English', array(
|
||||
'Attachments:File:Size' => 'Size',
|
||||
'Attachments:File:MimeType' => 'Type',
|
||||
'Attachments:File:DownloadsCount' => 'Downloads',
|
||||
));
|
||||
]);
|
||||
//
|
||||
// Class: Attachment
|
||||
//
|
||||
|
||||
Dict::Add('EN US', 'English', 'English', array(
|
||||
Dict::Add('EN US', 'English', 'English', [
|
||||
'Class:Attachment/Attribute:creation_date' => 'Creation date',
|
||||
'Class:Attachment/Attribute:creation_date+' => '',
|
||||
'Class:Attachment/Attribute:user_id' => 'User id',
|
||||
'Class:Attachment/Attribute:user_id+' => '',
|
||||
'Class:Attachment/Attribute:contact_id' => 'Contact id',
|
||||
'Class:Attachment/Attribute:contact_id+' => '',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: TriggerOnAttachmentDownload
|
||||
//
|
||||
|
||||
Dict::Add('EN US', 'English', 'English', array(
|
||||
Dict::Add('EN US', 'English', 'English', [
|
||||
'Class:TriggerOnAttachmentDownload' => 'Trigger (on object\'s attachment download)',
|
||||
'Class:TriggerOnAttachmentDownload+' => 'Trigger on object\'s attachment download of [a child class of] the given class',
|
||||
'Class:TriggerOnAttachmentCreate' => 'Trigger (on object\'s attachment create)',
|
||||
@@ -97,5 +97,5 @@ Dict::Add('EN US', 'English', 'English', array(
|
||||
'Class:TriggerOnAttachmentDelete+' => 'Trigger on object\'s attachment delete',
|
||||
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email' => 'Add file in email',
|
||||
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email+' => 'If checked, the file will be automatically attached to the email when an email action is triggered',
|
||||
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger',
|
||||
));
|
||||
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger',
|
||||
]);
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Spanish Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
* @author Miguel Turrubiates <miguel_tf@yahoo.com>
|
||||
* @notas Utilizar codificación UTF-8 para mostrar acentos y otros caracteres especiales
|
||||
* @notas Utilizar codificación UTF-8 para mostrar acentos y otros caracteres especiales
|
||||
*/
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array(
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellano', [
|
||||
'Attachments:TabTitle_Count' => 'Anexos (%1$d)',
|
||||
'Attachments:EmptyTabTitle' => 'Anexos',
|
||||
'Attachments:FieldsetTitle' => 'Anexos',
|
||||
@@ -28,13 +29,13 @@ o pregunte al administador de iTop si el servidor que ha quedado sin espacio en
|
||||
'Attachments:Render:Icons' => 'Desplegar como icono',
|
||||
'Attachments:Render:Table' => 'Desplegar como lista',
|
||||
'UI:Attachments:DropYourFileHint' => 'Arrastre los archivos en cualquier lugar de esta área',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: Attachment
|
||||
//
|
||||
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array(
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellano', [
|
||||
'Class:Attachment' => 'Anexo',
|
||||
'Class:Attachment+' => 'Anexo',
|
||||
'Class:Attachment/Attribute:expire' => 'Expira',
|
||||
@@ -49,10 +50,9 @@ Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array(
|
||||
'Class:Attachment/Attribute:item_org_id+' => '',
|
||||
'Class:Attachment/Attribute:contents' => 'Contenido',
|
||||
'Class:Attachment/Attribute:contents+' => '',
|
||||
));
|
||||
]);
|
||||
|
||||
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array(
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellano', [
|
||||
'Attachments:File:Thumbnail' => 'Ícono',
|
||||
'Attachments:File:Name' => 'Nombre de Archivo',
|
||||
'Attachments:File:Date' => 'Fecha de Carga',
|
||||
@@ -60,25 +60,25 @@ Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array(
|
||||
'Attachments:File:Size' => 'Tamaño',
|
||||
'Attachments:File:MimeType' => 'Tipo',
|
||||
'Attachments:File:DownloadsCount' => 'Descargas',
|
||||
));
|
||||
]);
|
||||
//
|
||||
// Class: Attachment
|
||||
//
|
||||
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array(
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellano', [
|
||||
'Class:Attachment/Attribute:creation_date' => 'Fecha de Creación',
|
||||
'Class:Attachment/Attribute:creation_date+' => '',
|
||||
'Class:Attachment/Attribute:user_id' => 'Id del Usuario',
|
||||
'Class:Attachment/Attribute:user_id+' => '',
|
||||
'Class:Attachment/Attribute:contact_id' => 'Id del Contacto',
|
||||
'Class:Attachment/Attribute:contact_id+' => '',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: TriggerOnAttachmentDownload
|
||||
//
|
||||
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array(
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellano', [
|
||||
'Class:TriggerOnAttachmentDownload' => 'Disparador (al descargar el archivo adjunto del objeto)',
|
||||
'Class:TriggerOnAttachmentDownload+' => 'Disparador al descargar el archivo adjunto del objeto de [una clase secundaria de] la clase dada',
|
||||
'Class:TriggerOnAttachmentCreate' => 'Trigger (on object\'s attachment create)~~',
|
||||
@@ -87,5 +87,5 @@ Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array(
|
||||
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email+' => 'If checked, the file will be automatically attached to the email when an email action is triggered~~',
|
||||
'Class:TriggerOnAttachmentDelete' => 'Trigger (on object\'s attachment delete)~~',
|
||||
'Class:TriggerOnAttachmentDelete+' => 'Trigger on object\'s attachment delete~~',
|
||||
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
|
||||
));
|
||||
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
|
||||
]);
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('FR FR', 'French', 'Français', array(
|
||||
Dict::Add('FR FR', 'French', 'Français', [
|
||||
'Attachments:TabTitle_Count' => 'Pièces jointes (%1$d)',
|
||||
'Attachments:EmptyTabTitle' => 'Pièces jointes',
|
||||
'Attachments:FieldsetTitle' => 'Pièces jointes',
|
||||
@@ -30,13 +31,13 @@ Soit demandez à votre administrateur système s\'il reste de la place disque di
|
||||
'Attachments:Render:Icons' => 'Affichage en icônes',
|
||||
'Attachments:Render:Table' => 'Affichage en liste',
|
||||
'UI:Attachments:DropYourFileHint' => 'Déposez vos fichiers dans cet espace',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: Attachment
|
||||
//
|
||||
|
||||
Dict::Add('FR FR', 'French', 'Français', array(
|
||||
Dict::Add('FR FR', 'French', 'Français', [
|
||||
'Class:Attachment' => 'Attachement',
|
||||
'Class:Attachment+' => '',
|
||||
'Class:Attachment/Attribute:expire' => 'Expire',
|
||||
@@ -51,10 +52,9 @@ Dict::Add('FR FR', 'French', 'Français', array(
|
||||
'Class:Attachment/Attribute:item_org_id+' => '',
|
||||
'Class:Attachment/Attribute:contents' => 'Contenu',
|
||||
'Class:Attachment/Attribute:contents+' => '',
|
||||
));
|
||||
]);
|
||||
|
||||
|
||||
Dict::Add('FR FR', 'French', 'Français', array(
|
||||
Dict::Add('FR FR', 'French', 'Français', [
|
||||
'Attachments:File:Thumbnail' => 'Icône',
|
||||
'Attachments:File:Name' => 'Nom du fichier',
|
||||
'Attachments:File:Date' => 'Date de chargement',
|
||||
@@ -62,25 +62,25 @@ Dict::Add('FR FR', 'French', 'Français', array(
|
||||
'Attachments:File:Size' => 'Taille',
|
||||
'Attachments:File:MimeType' => 'Type',
|
||||
'Attachments:File:DownloadsCount' => 'Téléchargements',
|
||||
));
|
||||
]);
|
||||
//
|
||||
// Class: Attachment
|
||||
//
|
||||
|
||||
Dict::Add('FR FR', 'French', 'Français', array(
|
||||
Dict::Add('FR FR', 'French', 'Français', [
|
||||
'Class:Attachment/Attribute:creation_date' => 'Date de création',
|
||||
'Class:Attachment/Attribute:creation_date+' => '',
|
||||
'Class:Attachment/Attribute:user_id' => 'Utilisateur',
|
||||
'Class:Attachment/Attribute:user_id+' => '',
|
||||
'Class:Attachment/Attribute:contact_id' => 'Contact',
|
||||
'Class:Attachment/Attribute:contact_id+' => '',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: TriggerOnAttachmentDownload
|
||||
//
|
||||
|
||||
Dict::Add('FR FR', 'French', 'Français', array(
|
||||
Dict::Add('FR FR', 'French', 'Français', [
|
||||
'Class:TriggerOnAttachmentDownload' => 'Déclencheur sur le téléchargement d\'une pièce jointe d\'un objet',
|
||||
'Class:TriggerOnAttachmentDownload+' => '',
|
||||
'Class:TriggerOnAttachmentCreate' => 'Déclencheur sur la création d\'une pièce jointe',
|
||||
@@ -89,5 +89,5 @@ Dict::Add('FR FR', 'French', 'Français', array(
|
||||
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email+' => 'Si coché, le fichier sera automatiquement attaché à l\'email quand l\'action email est lancée',
|
||||
'Class:TriggerOnAttachmentDelete' => 'Déclencheur sur la suppression d\'une pièce jointe',
|
||||
'Class:TriggerOnAttachmentDelete+' => '',
|
||||
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Les Triggers sur les objets ne sont pas autorisés sur la classe Attachement. Veuillez utiliser les triggers spécifiques pour cette classe',
|
||||
));
|
||||
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Les Triggers sur les objets ne sont pas autorisés sur la classe Attachement. Veuillez utiliser les triggers spécifiques pour cette classe',
|
||||
]);
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('HU HU', 'Hungarian', 'Magyar', array(
|
||||
Dict::Add('HU HU', 'Hungarian', 'Magyar', [
|
||||
'Attachments:TabTitle_Count' => 'Mellékletek (%1$d)',
|
||||
'Attachments:EmptyTabTitle' => 'Mellékletek',
|
||||
'Attachments:FieldsetTitle' => 'Mellékletek',
|
||||
@@ -28,13 +29,13 @@ Dict::Add('HU HU', 'Hungarian', 'Magyar', array(
|
||||
'Attachments:Render:Icons' => 'Mutassa ikonként',
|
||||
'Attachments:Render:Table' => 'Mutassa listaként',
|
||||
'UI:Attachments:DropYourFileHint' => 'Húzza a fájlokat erre a területre',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: Attachment
|
||||
//
|
||||
|
||||
Dict::Add('HU HU', 'Hungarian', 'Magyar', array(
|
||||
Dict::Add('HU HU', 'Hungarian', 'Magyar', [
|
||||
'Class:Attachment' => 'Mellékletek',
|
||||
'Class:Attachment+' => '~~',
|
||||
'Class:Attachment/Attribute:expire' => 'Lejárat',
|
||||
@@ -49,10 +50,9 @@ Dict::Add('HU HU', 'Hungarian', 'Magyar', array(
|
||||
'Class:Attachment/Attribute:item_org_id+' => '~~',
|
||||
'Class:Attachment/Attribute:contents' => 'Tartalom',
|
||||
'Class:Attachment/Attribute:contents+' => '~~',
|
||||
));
|
||||
]);
|
||||
|
||||
|
||||
Dict::Add('HU HU', 'Hungarian', 'Magyar', array(
|
||||
Dict::Add('HU HU', 'Hungarian', 'Magyar', [
|
||||
'Attachments:File:Thumbnail' => 'Ikon',
|
||||
'Attachments:File:Name' => 'Fájlnév',
|
||||
'Attachments:File:Date' => 'Feltöltés dátuma',
|
||||
@@ -60,25 +60,25 @@ Dict::Add('HU HU', 'Hungarian', 'Magyar', array(
|
||||
'Attachments:File:Size' => 'Méret',
|
||||
'Attachments:File:MimeType' => 'Típus',
|
||||
'Attachments:File:DownloadsCount' => 'Downloads~~',
|
||||
));
|
||||
]);
|
||||
//
|
||||
// Class: Attachment
|
||||
//
|
||||
|
||||
Dict::Add('HU HU', 'Hungarian', 'Magyar', array(
|
||||
Dict::Add('HU HU', 'Hungarian', 'Magyar', [
|
||||
'Class:Attachment/Attribute:creation_date' => 'Létrehozás dátuma',
|
||||
'Class:Attachment/Attribute:creation_date+' => '~~',
|
||||
'Class:Attachment/Attribute:user_id' => 'Felhasználó',
|
||||
'Class:Attachment/Attribute:user_id+' => '~~',
|
||||
'Class:Attachment/Attribute:contact_id' => 'Kapcsolattartó',
|
||||
'Class:Attachment/Attribute:contact_id+' => '~~',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: TriggerOnAttachmentDownload
|
||||
//
|
||||
|
||||
Dict::Add('HU HU', 'Hungarian', 'Magyar', array(
|
||||
Dict::Add('HU HU', 'Hungarian', 'Magyar', [
|
||||
'Class:TriggerOnAttachmentDownload' => 'Trigger (on object\'s attachment download)~~',
|
||||
'Class:TriggerOnAttachmentDownload+' => 'Trigger on object\'s attachment download of [a child class of] the given class~~',
|
||||
'Class:TriggerOnAttachmentCreate' => 'Trigger (on object\'s attachment create)~~',
|
||||
@@ -87,5 +87,5 @@ Dict::Add('HU HU', 'Hungarian', 'Magyar', array(
|
||||
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email+' => 'If checked, the file will be automatically attached to the email when an email action is triggered~~',
|
||||
'Class:TriggerOnAttachmentDelete' => 'Trigger (on object\'s attachment delete)~~',
|
||||
'Class:TriggerOnAttachmentDelete+' => 'Trigger on object\'s attachment delete~~',
|
||||
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
|
||||
));
|
||||
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
|
||||
]);
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', [
|
||||
'Attachments:TabTitle_Count' => 'Allegati (%1$d)',
|
||||
'Attachments:EmptyTabTitle' => 'Allegati',
|
||||
'Attachments:FieldsetTitle' => 'Allegati',
|
||||
@@ -30,13 +31,13 @@ Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
'Attachments:Render:Icons' => 'Visualizza come icone',
|
||||
'Attachments:Render:Table' => 'Visualizza come lista',
|
||||
'UI:Attachments:DropYourFileHint' => 'Rilascia i file ovunque in quest\'area',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: Attachment
|
||||
//
|
||||
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', [
|
||||
'Class:Attachment' => 'Allegato',
|
||||
'Class:Attachment+' => '~~',
|
||||
'Class:Attachment/Attribute:expire' => 'Scadenza',
|
||||
@@ -51,10 +52,9 @@ Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
'Class:Attachment/Attribute:item_org_id+' => '~~',
|
||||
'Class:Attachment/Attribute:contents' => 'Contenuti',
|
||||
'Class:Attachment/Attribute:contents+' => '~~',
|
||||
));
|
||||
]);
|
||||
|
||||
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', [
|
||||
'Attachments:File:Thumbnail' => 'Icona',
|
||||
'Attachments:File:Name' => 'Nome del file',
|
||||
'Attachments:File:Date' => 'Data di caricamento',
|
||||
@@ -62,32 +62,32 @@ Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
'Attachments:File:Size' => 'Dimensione',
|
||||
'Attachments:File:MimeType' => 'Tipo',
|
||||
'Attachments:File:DownloadsCount' => 'Download',
|
||||
));
|
||||
]);
|
||||
//
|
||||
// Class: Attachment
|
||||
//
|
||||
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', [
|
||||
'Class:Attachment/Attribute:creation_date' => 'Data di creazione',
|
||||
'Class:Attachment/Attribute:creation_date+' => '~~',
|
||||
'Class:Attachment/Attribute:user_id' => 'ID utente',
|
||||
'Class:Attachment/Attribute:user_id+' => '~~',
|
||||
'Class:Attachment/Attribute:contact_id' => 'ID contatto',
|
||||
'Class:Attachment/Attribute:contact_id+' => '~~',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: TriggerOnAttachmentDownload
|
||||
//
|
||||
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', [
|
||||
'Class:TriggerOnAttachmentDownload' => 'Trigger (al download di un allegato dell\'oggetto)',
|
||||
'Class:TriggerOnAttachmentDownload+' => 'Trigger al download di un allegato di un oggetto di [una sottoclasse di] la classe data',
|
||||
'Class:TriggerOnAttachmentCreate' => 'Trigger (on object\'s attachment create)~~',
|
||||
'Class:TriggerOnAttachmentCreate+' => 'Trigger on object\'s attachment create~~',
|
||||
'Class:TriggerOnAttachmentCreate' => 'Trigger (on object\'s attachment create)~~',
|
||||
'Class:TriggerOnAttachmentCreate+' => 'Trigger on object\'s attachment create~~',
|
||||
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email' => 'Add file in email~~',
|
||||
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email+' => 'If checked, the file will be automatically attached to the email when an email action is triggered~~',
|
||||
'Class:TriggerOnAttachmentDelete' => 'Trigger (on object\'s attachment delete)~~',
|
||||
'Class:TriggerOnAttachmentDelete+' => 'Trigger on object\'s attachment delete~~',
|
||||
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
|
||||
));
|
||||
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
|
||||
]);
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('JA JP', 'Japanese', '日本語', array(
|
||||
Dict::Add('JA JP', 'Japanese', '日本語', [
|
||||
'Attachments:TabTitle_Count' => '添付 (%1$d)',
|
||||
'Attachments:EmptyTabTitle' => '添付',
|
||||
'Attachments:FieldsetTitle' => '添付',
|
||||
@@ -30,13 +31,13 @@ or ask your '.ITOP_APPLICATION_SHORT.' administrator if the '.ITOP_APPLICATION_S
|
||||
'Attachments:Render:Icons' => 'Display as icons~~',
|
||||
'Attachments:Render:Table' => 'Display as list~~',
|
||||
'UI:Attachments:DropYourFileHint' => 'Drop files anywhere in this area~~',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: Attachment
|
||||
//
|
||||
|
||||
Dict::Add('JA JP', 'Japanese', '日本語', array(
|
||||
Dict::Add('JA JP', 'Japanese', '日本語', [
|
||||
'Class:Attachment' => 'Attachment~~',
|
||||
'Class:Attachment+' => '~~',
|
||||
'Class:Attachment/Attribute:expire' => 'Expire~~',
|
||||
@@ -51,10 +52,9 @@ Dict::Add('JA JP', 'Japanese', '日本語', array(
|
||||
'Class:Attachment/Attribute:item_org_id+' => '~~',
|
||||
'Class:Attachment/Attribute:contents' => 'Contents~~',
|
||||
'Class:Attachment/Attribute:contents+' => '~~',
|
||||
));
|
||||
]);
|
||||
|
||||
|
||||
Dict::Add('JA JP', 'Japanese', '日本語', array(
|
||||
Dict::Add('JA JP', 'Japanese', '日本語', [
|
||||
'Attachments:File:Thumbnail' => 'Icon~~',
|
||||
'Attachments:File:Name' => 'File name~~',
|
||||
'Attachments:File:Date' => 'Upload date~~',
|
||||
@@ -62,25 +62,25 @@ Dict::Add('JA JP', 'Japanese', '日本語', array(
|
||||
'Attachments:File:Size' => 'Size~~',
|
||||
'Attachments:File:MimeType' => 'Type~~',
|
||||
'Attachments:File:DownloadsCount' => 'Downloads~~',
|
||||
));
|
||||
]);
|
||||
//
|
||||
// Class: Attachment
|
||||
//
|
||||
|
||||
Dict::Add('JA JP', 'Japanese', '日本語', array(
|
||||
Dict::Add('JA JP', 'Japanese', '日本語', [
|
||||
'Class:Attachment/Attribute:creation_date' => 'Creation date~~',
|
||||
'Class:Attachment/Attribute:creation_date+' => '~~',
|
||||
'Class:Attachment/Attribute:user_id' => 'User id~~',
|
||||
'Class:Attachment/Attribute:user_id+' => '~~',
|
||||
'Class:Attachment/Attribute:contact_id' => 'Contact id~~',
|
||||
'Class:Attachment/Attribute:contact_id+' => '~~',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: TriggerOnAttachmentDownload
|
||||
//
|
||||
|
||||
Dict::Add('JA JP', 'Japanese', '日本語', array(
|
||||
Dict::Add('JA JP', 'Japanese', '日本語', [
|
||||
'Class:TriggerOnAttachmentDownload' => 'Trigger (on object\'s attachment download)~~',
|
||||
'Class:TriggerOnAttachmentDownload+' => 'Trigger on object\'s attachment download of [a child class of] the given class~~',
|
||||
'Class:TriggerOnAttachmentCreate' => 'Trigger (on object\'s attachment create)~~',
|
||||
@@ -89,5 +89,5 @@ Dict::Add('JA JP', 'Japanese', '日本語', array(
|
||||
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email+' => 'If checked, the file will be automatically attached to the email when an email action is triggered~~',
|
||||
'Class:TriggerOnAttachmentDelete' => 'Trigger (on object\'s attachment delete)~~',
|
||||
'Class:TriggerOnAttachmentDelete+' => 'Trigger on object\'s attachment delete~~',
|
||||
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
|
||||
));
|
||||
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
|
||||
]);
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* @author LinProfs <info@linprofs.com>
|
||||
* @author Jeffrey Bostoen <info@jeffreybostoen.be> (2018 - 2022)
|
||||
* @author Thomas Casteleyn <thomas.casteleyn@super-visions.com>
|
||||
*/
|
||||
Dict::Add('NL NL', 'Dutch', 'Nederlands', array(
|
||||
Dict::Add('NL NL', 'Dutch', 'Nederlands', [
|
||||
'Attachments:TabTitle_Count' => 'Bijlagen (%1$d)',
|
||||
'Attachments:EmptyTabTitle' => 'Bijlagen',
|
||||
'Attachments:FieldsetTitle' => 'Bijlagen',
|
||||
@@ -32,13 +33,13 @@ of vraag de iTop administrator om de opslagruimte van de iTop-server na te kijke
|
||||
'Attachments:Render:Icons' => 'Toon als pictogram',
|
||||
'Attachments:Render:Table' => 'Toon als lijst',
|
||||
'UI:Attachments:DropYourFileHint' => 'Sleep bestanden in dit gebied',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: Attachment
|
||||
//
|
||||
|
||||
Dict::Add('NL NL', 'Dutch', 'Nederlands', array(
|
||||
Dict::Add('NL NL', 'Dutch', 'Nederlands', [
|
||||
'Class:Attachment' => 'Bijlage',
|
||||
'Class:Attachment+' => '',
|
||||
'Class:Attachment/Attribute:expire' => 'Vervalt',
|
||||
@@ -53,10 +54,9 @@ Dict::Add('NL NL', 'Dutch', 'Nederlands', array(
|
||||
'Class:Attachment/Attribute:item_org_id+' => '',
|
||||
'Class:Attachment/Attribute:contents' => 'Inhoud',
|
||||
'Class:Attachment/Attribute:contents+' => '',
|
||||
));
|
||||
]);
|
||||
|
||||
|
||||
Dict::Add('NL NL', 'Dutch', 'Nederlands', array(
|
||||
Dict::Add('NL NL', 'Dutch', 'Nederlands', [
|
||||
'Attachments:File:Thumbnail' => 'Pictogram',
|
||||
'Attachments:File:Name' => 'Bestandsnaam',
|
||||
'Attachments:File:Date' => 'Geüpload op',
|
||||
@@ -64,32 +64,32 @@ Dict::Add('NL NL', 'Dutch', 'Nederlands', array(
|
||||
'Attachments:File:Size' => 'Grootte',
|
||||
'Attachments:File:MimeType' => 'Type',
|
||||
'Attachments:File:DownloadsCount' => 'Downloads',
|
||||
));
|
||||
]);
|
||||
//
|
||||
// Class: Attachment
|
||||
//
|
||||
|
||||
Dict::Add('NL NL', 'Dutch', 'Nederlands', array(
|
||||
Dict::Add('NL NL', 'Dutch', 'Nederlands', [
|
||||
'Class:Attachment/Attribute:creation_date' => 'Datum creatie',
|
||||
'Class:Attachment/Attribute:creation_date+' => '',
|
||||
'Class:Attachment/Attribute:user_id' => 'ID Gebruiker',
|
||||
'Class:Attachment/Attribute:user_id+' => '',
|
||||
'Class:Attachment/Attribute:contact_id' => 'ID Contact',
|
||||
'Class:Attachment/Attribute:contact_id+' => '',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: TriggerOnAttachmentDownload
|
||||
//
|
||||
|
||||
Dict::Add('NL NL', 'Dutch', 'Nederlands', array(
|
||||
Dict::Add('NL NL', 'Dutch', 'Nederlands', [
|
||||
'Class:TriggerOnAttachmentDownload' => 'Trigger (Bij het downloaden van een bijlage)',
|
||||
'Class:TriggerOnAttachmentDownload+' => 'Trigger bij het downloaden van een bijlage van een object van de opgegeven klasse (of subklasse ervan)',
|
||||
'Class:TriggerOnAttachmentCreate' => 'Trigger (Bij het toevoegen van een bijlage)',
|
||||
'Class:TriggerOnAttachmentCreate+' => 'Trigger bij het toevoegen van een bijlage aan een object van de opgegeven klasse (of subklasse ervan)',
|
||||
'Class:TriggerOnAttachmentCreate' => 'Trigger (Bij het toevoegen van een bijlage)',
|
||||
'Class:TriggerOnAttachmentCreate+' => 'Trigger bij het toevoegen van een bijlage aan een object van de opgegeven klasse (of subklasse ervan)',
|
||||
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email' => 'Bestand toevoegen in e-mail',
|
||||
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email+'=> 'If checked, the file will be automatically attached to the email when an email action is triggered~~',
|
||||
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email+' => 'If checked, the file will be automatically attached to the email when an email action is triggered~~',
|
||||
'Class:TriggerOnAttachmentDelete' => 'Trigger (Bij het verwijderen van een bijlage)',
|
||||
'Class:TriggerOnAttachmentDelete+' => 'Trigger bij het verwijderen van een bijlage van een object van de opgegeven klasse (of subklasse ervan)',
|
||||
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
|
||||
));
|
||||
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
|
||||
]);
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('PL PL', 'Polish', 'Polski', array(
|
||||
Dict::Add('PL PL', 'Polish', 'Polski', [
|
||||
'Attachments:TabTitle_Count' => 'Załączniki (%1$d)',
|
||||
'Attachments:EmptyTabTitle' => 'Załączniki',
|
||||
'Attachments:FieldsetTitle' => 'Załączniki',
|
||||
@@ -30,13 +31,13 @@ lub zapytaj administratora '.ITOP_APPLICATION_SHORT.', czy dysk serwera '.ITOP_A
|
||||
'Attachments:Render:Icons' => 'Wyświetlaj jako ikony',
|
||||
'Attachments:Render:Table' => 'Wyświetl jako listę',
|
||||
'UI:Attachments:DropYourFileHint' => 'Upuść pliki w dowolnym miejscu w tym obszarze',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: Attachment
|
||||
//
|
||||
|
||||
Dict::Add('PL PL', 'Polish', 'Polski', array(
|
||||
Dict::Add('PL PL', 'Polish', 'Polski', [
|
||||
'Class:Attachment' => 'Załącznik',
|
||||
'Class:Attachment+' => '',
|
||||
'Class:Attachment/Attribute:expire' => 'Wygasa',
|
||||
@@ -51,10 +52,9 @@ Dict::Add('PL PL', 'Polish', 'Polski', array(
|
||||
'Class:Attachment/Attribute:item_org_id+' => '',
|
||||
'Class:Attachment/Attribute:contents' => 'Zawartość',
|
||||
'Class:Attachment/Attribute:contents+' => '',
|
||||
));
|
||||
]);
|
||||
|
||||
|
||||
Dict::Add('PL PL', 'Polish', 'Polski', array(
|
||||
Dict::Add('PL PL', 'Polish', 'Polski', [
|
||||
'Attachments:File:Thumbnail' => 'Ikona',
|
||||
'Attachments:File:Name' => 'Nazwa pliku',
|
||||
'Attachments:File:Date' => 'Data przesłania',
|
||||
@@ -62,32 +62,32 @@ Dict::Add('PL PL', 'Polish', 'Polski', array(
|
||||
'Attachments:File:Size' => 'Rozmiar',
|
||||
'Attachments:File:MimeType' => 'Typ',
|
||||
'Attachments:File:DownloadsCount' => 'Pobrano',
|
||||
));
|
||||
]);
|
||||
//
|
||||
// Class: Attachment
|
||||
//
|
||||
|
||||
Dict::Add('PL PL', 'Polish', 'Polski', array(
|
||||
Dict::Add('PL PL', 'Polish', 'Polski', [
|
||||
'Class:Attachment/Attribute:creation_date' => 'Data utworzenia',
|
||||
'Class:Attachment/Attribute:creation_date+' => '',
|
||||
'Class:Attachment/Attribute:user_id' => 'Id użytkownika',
|
||||
'Class:Attachment/Attribute:user_id+' => '',
|
||||
'Class:Attachment/Attribute:contact_id' => 'Id kontaktu',
|
||||
'Class:Attachment/Attribute:contact_id+' => '',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: TriggerOnAttachmentDownload
|
||||
//
|
||||
|
||||
Dict::Add('PL PL', 'Polish', 'Polski', array(
|
||||
Dict::Add('PL PL', 'Polish', 'Polski', [
|
||||
'Class:TriggerOnAttachmentDownload' => 'Wyzwalacz (po pobraniu załącznika obiektu)',
|
||||
'Class:TriggerOnAttachmentDownload+' => 'Wyzwalacz po pobraniu załącznika obiektu [klasy podrzędnej] danej klasy',
|
||||
'Class:TriggerOnAttachmentCreate' => 'Trigger (on object\'s attachment create)~~',
|
||||
'Class:TriggerOnAttachmentCreate+' => 'Trigger on object\'s attachment create~~',
|
||||
'Class:TriggerOnAttachmentCreate' => 'Trigger (on object\'s attachment create)~~',
|
||||
'Class:TriggerOnAttachmentCreate+' => 'Trigger on object\'s attachment create~~',
|
||||
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email' => 'Add file in email~~',
|
||||
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email+' => 'If checked, the file will be automatically attached to the email when an email action is triggered~~',
|
||||
'Class:TriggerOnAttachmentDelete' => 'Trigger (on object\'s attachment delete)~~',
|
||||
'Class:TriggerOnAttachmentDelete+' => 'Trigger on object\'s attachment delete~~',
|
||||
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
|
||||
));
|
||||
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
|
||||
]);
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', [
|
||||
'Attachments:TabTitle_Count' => 'Anexos (%1$d)',
|
||||
'Attachments:EmptyTabTitle' => 'Anexos',
|
||||
'Attachments:FieldsetTitle' => 'Anexos',
|
||||
@@ -30,13 +31,13 @@ ou entre em contato com o seu administrador do '.ITOP_APPLICATION_SHORT.' pois o
|
||||
'Attachments:Render:Icons' => 'Exibir como ícones',
|
||||
'Attachments:Render:Table' => 'Exibir como lista',
|
||||
'UI:Attachments:DropYourFileHint' => 'Solte arquivos em qualquer lugar nesta área',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: Attachment
|
||||
//
|
||||
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', [
|
||||
'Class:Attachment' => 'Anexo',
|
||||
'Class:Attachment+' => '',
|
||||
'Class:Attachment/Attribute:expire' => 'Expira',
|
||||
@@ -51,10 +52,9 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
'Class:Attachment/Attribute:item_org_id+' => '',
|
||||
'Class:Attachment/Attribute:contents' => 'Conteúdo',
|
||||
'Class:Attachment/Attribute:contents+' => '',
|
||||
));
|
||||
]);
|
||||
|
||||
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', [
|
||||
'Attachments:File:Thumbnail' => 'Ícone',
|
||||
'Attachments:File:Name' => 'Nome do arquivo',
|
||||
'Attachments:File:Date' => 'Data de envio',
|
||||
@@ -62,25 +62,25 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
'Attachments:File:Size' => 'Tamanho',
|
||||
'Attachments:File:MimeType' => 'Tipo',
|
||||
'Attachments:File:DownloadsCount' => 'Downloads~~',
|
||||
));
|
||||
]);
|
||||
//
|
||||
// Class: Attachment
|
||||
//
|
||||
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', [
|
||||
'Class:Attachment/Attribute:creation_date' => 'Data de criação',
|
||||
'Class:Attachment/Attribute:creation_date+' => '',
|
||||
'Class:Attachment/Attribute:user_id' => 'Identificador do usuário',
|
||||
'Class:Attachment/Attribute:user_id+' => '',
|
||||
'Class:Attachment/Attribute:contact_id' => 'Identificador do contato',
|
||||
'Class:Attachment/Attribute:contact_id+' => '',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: TriggerOnAttachmentDownload
|
||||
//
|
||||
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', [
|
||||
'Class:TriggerOnAttachmentDownload' => 'Trigger (on object\'s attachment download)~~',
|
||||
'Class:TriggerOnAttachmentDownload+' => 'Trigger on object\'s attachment download of [a child class of] the given class~~',
|
||||
'Class:TriggerOnAttachmentCreate' => 'Trigger (on object\'s attachment create)~~',
|
||||
@@ -89,5 +89,5 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email+' => 'If checked, the file will be automatically attached to the email when an email action is triggered~~',
|
||||
'Class:TriggerOnAttachmentDelete' => 'Trigger (on object\'s attachment delete)~~',
|
||||
'Class:TriggerOnAttachmentDelete+' => 'Trigger on object\'s attachment delete~~',
|
||||
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
|
||||
));
|
||||
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
|
||||
]);
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* @author Vladimir Kunin <v.b.kunin@gmail.com>
|
||||
*
|
||||
*/
|
||||
Dict::Add('RU RU', 'Russian', 'Русский', array(
|
||||
Dict::Add('RU RU', 'Russian', 'Русский', [
|
||||
'Attachments:TabTitle_Count' => 'Вложения (%1$d)',
|
||||
'Attachments:EmptyTabTitle' => 'Вложения',
|
||||
'Attachments:FieldsetTitle' => 'Вложения',
|
||||
@@ -31,13 +32,13 @@ or ask your '.ITOP_APPLICATION_SHORT.' administrator if the '.ITOP_APPLICATION_S
|
||||
'Attachments:Render:Icons' => 'Display as icons~~',
|
||||
'Attachments:Render:Table' => 'Display as list~~',
|
||||
'UI:Attachments:DropYourFileHint' => 'Drop files anywhere in this area~~',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: Attachment
|
||||
//
|
||||
|
||||
Dict::Add('RU RU', 'Russian', 'Русский', array(
|
||||
Dict::Add('RU RU', 'Russian', 'Русский', [
|
||||
'Class:Attachment' => 'Вложение',
|
||||
'Class:Attachment+' => '',
|
||||
'Class:Attachment/Attribute:expire' => 'Истекает',
|
||||
@@ -52,10 +53,9 @@ Dict::Add('RU RU', 'Russian', 'Русский', array(
|
||||
'Class:Attachment/Attribute:item_org_id+' => '',
|
||||
'Class:Attachment/Attribute:contents' => 'Содержимое',
|
||||
'Class:Attachment/Attribute:contents+' => '',
|
||||
));
|
||||
]);
|
||||
|
||||
|
||||
Dict::Add('RU RU', 'Russian', 'Русский', array(
|
||||
Dict::Add('RU RU', 'Russian', 'Русский', [
|
||||
'Attachments:File:Thumbnail' => 'Предпросмотр',
|
||||
'Attachments:File:Name' => 'Имя файла',
|
||||
'Attachments:File:Date' => 'Дата',
|
||||
@@ -63,25 +63,25 @@ Dict::Add('RU RU', 'Russian', 'Русский', array(
|
||||
'Attachments:File:Size' => 'Размер',
|
||||
'Attachments:File:MimeType' => 'Тип',
|
||||
'Attachments:File:DownloadsCount' => 'Downloads~~',
|
||||
));
|
||||
]);
|
||||
//
|
||||
// Class: Attachment
|
||||
//
|
||||
|
||||
Dict::Add('RU RU', 'Russian', 'Русский', array(
|
||||
Dict::Add('RU RU', 'Russian', 'Русский', [
|
||||
'Class:Attachment/Attribute:creation_date' => 'Дата создания',
|
||||
'Class:Attachment/Attribute:creation_date+' => '',
|
||||
'Class:Attachment/Attribute:user_id' => 'Пользователь',
|
||||
'Class:Attachment/Attribute:user_id+' => '',
|
||||
'Class:Attachment/Attribute:contact_id' => 'Контакт',
|
||||
'Class:Attachment/Attribute:contact_id+' => '',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: TriggerOnAttachmentDownload
|
||||
//
|
||||
|
||||
Dict::Add('RU RU', 'Russian', 'Русский', array(
|
||||
Dict::Add('RU RU', 'Russian', 'Русский', [
|
||||
'Class:TriggerOnAttachmentDownload' => 'Trigger (on object\'s attachment download)~~',
|
||||
'Class:TriggerOnAttachmentDownload+' => 'Trigger on object\'s attachment download of [a child class of] the given class~~',
|
||||
'Class:TriggerOnAttachmentCreate' => 'Trigger (on object\'s attachment create)~~',
|
||||
@@ -90,5 +90,5 @@ Dict::Add('RU RU', 'Russian', 'Русский', array(
|
||||
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email+' => 'If checked, the file will be automatically attached to the email when an email action is triggered~~',
|
||||
'Class:TriggerOnAttachmentDelete' => 'Trigger (on object\'s attachment delete)~~',
|
||||
'Class:TriggerOnAttachmentDelete+' => 'Trigger on object\'s attachment delete~~',
|
||||
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
|
||||
));
|
||||
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
|
||||
]);
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('SK SK', 'Slovak', 'Slovenčina', array(
|
||||
Dict::Add('SK SK', 'Slovak', 'Slovenčina', [
|
||||
'Attachments:TabTitle_Count' => 'Prílohy (%1$d)',
|
||||
'Attachments:EmptyTabTitle' => 'Prílohy',
|
||||
'Attachments:FieldsetTitle' => 'Prílohy',
|
||||
@@ -30,13 +31,13 @@ or ask your '.ITOP_APPLICATION_SHORT.' administrator if the '.ITOP_APPLICATION_S
|
||||
'Attachments:Render:Icons' => 'Display as icons~~',
|
||||
'Attachments:Render:Table' => 'Display as list~~',
|
||||
'UI:Attachments:DropYourFileHint' => 'Drop files anywhere in this area~~',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: Attachment
|
||||
//
|
||||
|
||||
Dict::Add('SK SK', 'Slovak', 'Slovenčina', array(
|
||||
Dict::Add('SK SK', 'Slovak', 'Slovenčina', [
|
||||
'Class:Attachment' => 'Attachment~~',
|
||||
'Class:Attachment+' => '~~',
|
||||
'Class:Attachment/Attribute:expire' => 'Expire~~',
|
||||
@@ -51,10 +52,9 @@ Dict::Add('SK SK', 'Slovak', 'Slovenčina', array(
|
||||
'Class:Attachment/Attribute:item_org_id+' => '~~',
|
||||
'Class:Attachment/Attribute:contents' => 'Contents~~',
|
||||
'Class:Attachment/Attribute:contents+' => '~~',
|
||||
));
|
||||
]);
|
||||
|
||||
|
||||
Dict::Add('SK SK', 'Slovak', 'Slovenčina', array(
|
||||
Dict::Add('SK SK', 'Slovak', 'Slovenčina', [
|
||||
'Attachments:File:Thumbnail' => 'Icon~~',
|
||||
'Attachments:File:Name' => 'File name~~',
|
||||
'Attachments:File:Date' => 'Upload date~~',
|
||||
@@ -62,25 +62,25 @@ Dict::Add('SK SK', 'Slovak', 'Slovenčina', array(
|
||||
'Attachments:File:Size' => 'Size~~',
|
||||
'Attachments:File:MimeType' => 'Type~~',
|
||||
'Attachments:File:DownloadsCount' => 'Downloads~~',
|
||||
));
|
||||
]);
|
||||
//
|
||||
// Class: Attachment
|
||||
//
|
||||
|
||||
Dict::Add('SK SK', 'Slovak', 'Slovenčina', array(
|
||||
Dict::Add('SK SK', 'Slovak', 'Slovenčina', [
|
||||
'Class:Attachment/Attribute:creation_date' => 'Creation date~~',
|
||||
'Class:Attachment/Attribute:creation_date+' => '~~',
|
||||
'Class:Attachment/Attribute:user_id' => 'User id~~',
|
||||
'Class:Attachment/Attribute:user_id+' => '~~',
|
||||
'Class:Attachment/Attribute:contact_id' => 'Contact id~~',
|
||||
'Class:Attachment/Attribute:contact_id+' => '~~',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: TriggerOnAttachmentDownload
|
||||
//
|
||||
|
||||
Dict::Add('SK SK', 'Slovak', 'Slovenčina', array(
|
||||
Dict::Add('SK SK', 'Slovak', 'Slovenčina', [
|
||||
'Class:TriggerOnAttachmentDownload' => 'Trigger (on object\'s attachment download)~~',
|
||||
'Class:TriggerOnAttachmentDownload+' => 'Trigger on object\'s attachment download of [a child class of] the given class~~',
|
||||
'Class:TriggerOnAttachmentCreate' => 'Trigger (on object\'s attachment create)~~',
|
||||
@@ -89,5 +89,5 @@ Dict::Add('SK SK', 'Slovak', 'Slovenčina', array(
|
||||
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email+' => 'If checked, the file will be automatically attached to the email when an email action is triggered~~',
|
||||
'Class:TriggerOnAttachmentDelete' => 'Trigger (on object\'s attachment delete)~~',
|
||||
'Class:TriggerOnAttachmentDelete+' => 'Trigger on object\'s attachment delete~~',
|
||||
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
|
||||
));
|
||||
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
|
||||
]);
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('TR TR', 'Turkish', 'Türkçe', array(
|
||||
Dict::Add('TR TR', 'Turkish', 'Türkçe', [
|
||||
'Attachments:TabTitle_Count' => 'Attachments (%1$d)~~',
|
||||
'Attachments:EmptyTabTitle' => 'Attachments~~',
|
||||
'Attachments:FieldsetTitle' => 'Attachments~~',
|
||||
@@ -30,13 +31,13 @@ or ask your '.ITOP_APPLICATION_SHORT.' administrator if the '.ITOP_APPLICATION_S
|
||||
'Attachments:Render:Icons' => 'Display as icons~~',
|
||||
'Attachments:Render:Table' => 'Display as list~~',
|
||||
'UI:Attachments:DropYourFileHint' => 'Drop files anywhere in this area~~',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: Attachment
|
||||
//
|
||||
|
||||
Dict::Add('TR TR', 'Turkish', 'Türkçe', array(
|
||||
Dict::Add('TR TR', 'Turkish', 'Türkçe', [
|
||||
'Class:Attachment' => 'Attachment~~',
|
||||
'Class:Attachment+' => '~~',
|
||||
'Class:Attachment/Attribute:expire' => 'Expire~~',
|
||||
@@ -51,10 +52,9 @@ Dict::Add('TR TR', 'Turkish', 'Türkçe', array(
|
||||
'Class:Attachment/Attribute:item_org_id+' => '~~',
|
||||
'Class:Attachment/Attribute:contents' => 'Contents~~',
|
||||
'Class:Attachment/Attribute:contents+' => '~~',
|
||||
));
|
||||
]);
|
||||
|
||||
|
||||
Dict::Add('TR TR', 'Turkish', 'Türkçe', array(
|
||||
Dict::Add('TR TR', 'Turkish', 'Türkçe', [
|
||||
'Attachments:File:Thumbnail' => 'Icon~~',
|
||||
'Attachments:File:Name' => 'File name~~',
|
||||
'Attachments:File:Date' => 'Upload date~~',
|
||||
@@ -62,25 +62,25 @@ Dict::Add('TR TR', 'Turkish', 'Türkçe', array(
|
||||
'Attachments:File:Size' => 'Size~~',
|
||||
'Attachments:File:MimeType' => 'Type~~',
|
||||
'Attachments:File:DownloadsCount' => 'Downloads~~',
|
||||
));
|
||||
]);
|
||||
//
|
||||
// Class: Attachment
|
||||
//
|
||||
|
||||
Dict::Add('TR TR', 'Turkish', 'Türkçe', array(
|
||||
Dict::Add('TR TR', 'Turkish', 'Türkçe', [
|
||||
'Class:Attachment/Attribute:creation_date' => 'Creation date~~',
|
||||
'Class:Attachment/Attribute:creation_date+' => '~~',
|
||||
'Class:Attachment/Attribute:user_id' => 'User id~~',
|
||||
'Class:Attachment/Attribute:user_id+' => '~~',
|
||||
'Class:Attachment/Attribute:contact_id' => 'Contact id~~',
|
||||
'Class:Attachment/Attribute:contact_id+' => '~~',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: TriggerOnAttachmentDownload
|
||||
//
|
||||
|
||||
Dict::Add('TR TR', 'Turkish', 'Türkçe', array(
|
||||
Dict::Add('TR TR', 'Turkish', 'Türkçe', [
|
||||
'Class:TriggerOnAttachmentDownload' => 'Trigger (on object\'s attachment download)~~',
|
||||
'Class:TriggerOnAttachmentDownload+' => 'Trigger on object\'s attachment download of [a child class of] the given class~~',
|
||||
'Class:TriggerOnAttachmentCreate' => 'Trigger (on object\'s attachment create)~~',
|
||||
@@ -89,5 +89,5 @@ Dict::Add('TR TR', 'Turkish', 'Türkçe', array(
|
||||
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email+' => 'If checked, the file will be automatically attached to the email when an email action is triggered~~',
|
||||
'Class:TriggerOnAttachmentDelete' => 'Trigger (on object\'s attachment delete)~~',
|
||||
'Class:TriggerOnAttachmentDelete+' => 'Trigger on object\'s attachment delete~~',
|
||||
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
|
||||
));
|
||||
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
|
||||
]);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
@@ -9,7 +10,7 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('ZH CN', 'Chinese', '简体中文', array(
|
||||
Dict::Add('ZH CN', 'Chinese', '简体中文', [
|
||||
'Attachments:TabTitle_Count' => '附件 (%1$d)',
|
||||
'Attachments:EmptyTabTitle' => '附件',
|
||||
'Attachments:FieldsetTitle' => '附件',
|
||||
@@ -30,13 +31,13 @@ Dict::Add('ZH CN', 'Chinese', '简体中文', array(
|
||||
'Attachments:Render:Icons' => '显示为图标',
|
||||
'Attachments:Render:Table' => '显示为列表',
|
||||
'UI:Attachments:DropYourFileHint' => '将文件拖放到此区域的任意位置',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: Attachment
|
||||
//
|
||||
|
||||
Dict::Add('ZH CN', 'Chinese', '简体中文', array(
|
||||
Dict::Add('ZH CN', 'Chinese', '简体中文', [
|
||||
'Class:Attachment' => '附件',
|
||||
'Class:Attachment+' => '',
|
||||
'Class:Attachment/Attribute:expire' => '过期',
|
||||
@@ -51,10 +52,9 @@ Dict::Add('ZH CN', 'Chinese', '简体中文', array(
|
||||
'Class:Attachment/Attribute:item_org_id+' => '',
|
||||
'Class:Attachment/Attribute:contents' => '内容',
|
||||
'Class:Attachment/Attribute:contents+' => '',
|
||||
));
|
||||
]);
|
||||
|
||||
|
||||
Dict::Add('ZH CN', 'Chinese', '简体中文', array(
|
||||
Dict::Add('ZH CN', 'Chinese', '简体中文', [
|
||||
'Attachments:File:Thumbnail' => '图标',
|
||||
'Attachments:File:Name' => '文件名',
|
||||
'Attachments:File:Date' => '上传日期',
|
||||
@@ -62,32 +62,32 @@ Dict::Add('ZH CN', 'Chinese', '简体中文', array(
|
||||
'Attachments:File:Size' => '大小',
|
||||
'Attachments:File:MimeType' => '类型',
|
||||
'Attachments:File:DownloadsCount' => '下载',
|
||||
));
|
||||
]);
|
||||
//
|
||||
// Class: Attachment
|
||||
//
|
||||
|
||||
Dict::Add('ZH CN', 'Chinese', '简体中文', array(
|
||||
Dict::Add('ZH CN', 'Chinese', '简体中文', [
|
||||
'Class:Attachment/Attribute:creation_date' => '创建日期',
|
||||
'Class:Attachment/Attribute:creation_date+' => '~~',
|
||||
'Class:Attachment/Attribute:user_id' => '用户编号',
|
||||
'Class:Attachment/Attribute:user_id+' => '~~',
|
||||
'Class:Attachment/Attribute:contact_id' => '联系人编号',
|
||||
'Class:Attachment/Attribute:contact_id+' => '~~',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: TriggerOnAttachmentDownload
|
||||
//
|
||||
|
||||
Dict::Add('ZH CN', 'Chinese', '简体中文', array(
|
||||
Dict::Add('ZH CN', 'Chinese', '简体中文', [
|
||||
'Class:TriggerOnAttachmentDownload' => '触发器 (于对象附件下载时)',
|
||||
'Class:TriggerOnAttachmentDownload+' => '触发器于指定类型 [子类型] 对象附件下载时',
|
||||
'Class:TriggerOnAttachmentCreate' => 'Trigger (on object\'s attachment create)~~',
|
||||
'Class:TriggerOnAttachmentCreate+' => 'Trigger on object\'s attachment create~~',
|
||||
'Class:TriggerOnAttachmentCreate+' => 'Trigger on object\'s attachment create~~',
|
||||
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email' => 'Add file in email~~',
|
||||
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email+' => 'If checked, the file will be automatically attached to the email when an email action is triggered~~',
|
||||
'Class:TriggerOnAttachmentDelete' => 'Trigger (on object\'s attachment delete)~~',
|
||||
'Class:TriggerOnAttachmentDelete+' => 'Trigger on object\'s attachment delete~~',
|
||||
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
|
||||
));
|
||||
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
|
||||
]);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
@@ -11,33 +12,29 @@ use Combodo\iTop\Service\Events\iEventServiceSetup;
|
||||
|
||||
class AttachmentPlugIn implements iApplicationUIExtension, iEventServiceSetup
|
||||
{
|
||||
const ENUM_GUI_ALL = 'all';
|
||||
const ENUM_GUI_BACKOFFICE = 'backoffice';
|
||||
const ENUM_GUI_PORTALS = 'portals';
|
||||
public const ENUM_GUI_ALL = 'all';
|
||||
public const ENUM_GUI_BACKOFFICE = 'backoffice';
|
||||
public const ENUM_GUI_PORTALS = 'portals';
|
||||
|
||||
public function OnDisplayProperties($oObject, WebPage $oPage, $bEditMode = false)
|
||||
{
|
||||
if ($this->GetAttachmentsPosition() == 'properties')
|
||||
{
|
||||
if ($this->GetAttachmentsPosition() == 'properties') {
|
||||
$this->DisplayAttachments($oObject, $oPage, $bEditMode);
|
||||
}
|
||||
}
|
||||
|
||||
public function OnDisplayRelations($oObject, WebPage $oPage, $bEditMode = false)
|
||||
{
|
||||
if ($this->GetAttachmentsPosition() == 'relations')
|
||||
{
|
||||
if ($this->GetAttachmentsPosition() == 'relations') {
|
||||
$this->DisplayAttachments($oObject, $oPage, $bEditMode);
|
||||
}
|
||||
}
|
||||
|
||||
public function OnFormSubmit($oObject, $sFormPrefix = '')
|
||||
{
|
||||
if ($this->IsTargetObject($oObject))
|
||||
{
|
||||
if ($this->IsTargetObject($oObject)) {
|
||||
// For new objects attachments are processed in OnDBInsert
|
||||
if (!$oObject->IsNew())
|
||||
{
|
||||
if (!$oObject->IsNew()) {
|
||||
self::UpdateAttachments($oObject);
|
||||
}
|
||||
}
|
||||
@@ -53,12 +50,9 @@ class AttachmentPlugIn implements iApplicationUIExtension, iEventServiceSetup
|
||||
public static function GetMaxUploadSize()
|
||||
{
|
||||
$sMaxUpload = ini_get('upload_max_filesize');
|
||||
if (!$sMaxUpload)
|
||||
{
|
||||
if (!$sMaxUpload) {
|
||||
$result = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$result = utils::ConvertToBytes($sMaxUpload);
|
||||
}
|
||||
|
||||
@@ -71,13 +65,11 @@ class AttachmentPlugIn implements iApplicationUIExtension, iEventServiceSetup
|
||||
* @return bool
|
||||
* @since 3.2.1 N°7534
|
||||
*/
|
||||
public static function IsAttachmentAllowedForObject(cmdbAbstractObject $oObject) : bool
|
||||
public static function IsAttachmentAllowedForObject(cmdbAbstractObject $oObject): bool
|
||||
{
|
||||
$aAllowedClasses = MetaModel::GetModuleSetting('itop-attachments', 'allowed_classes', array('Ticket'));
|
||||
foreach ($aAllowedClasses as $sAllowedClass)
|
||||
{
|
||||
if ($oObject instanceof $sAllowedClass)
|
||||
{
|
||||
$aAllowedClasses = MetaModel::GetModuleSetting('itop-attachments', 'allowed_classes', ['Ticket']);
|
||||
foreach ($aAllowedClasses as $sAllowedClass) {
|
||||
if ($oObject instanceof $sAllowedClass) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -92,24 +84,15 @@ class AttachmentPlugIn implements iApplicationUIExtension, iEventServiceSetup
|
||||
public static function GetMaxUpload()
|
||||
{
|
||||
$iMaxUpload = static::GetMaxUploadSize();
|
||||
if (!$iMaxUpload)
|
||||
{
|
||||
if (!$iMaxUpload) {
|
||||
$sRet = Dict::S('Attachments:UploadNotAllowedOnThisSystem');
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($iMaxUpload > 1024 * 1024 * 1024)
|
||||
{
|
||||
} else {
|
||||
if ($iMaxUpload > 1024 * 1024 * 1024) {
|
||||
$sRet = Dict::Format('Attachment:Max_Go', sprintf('%0.2f', $iMaxUpload / (1024 * 1024 * 1024)));
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($iMaxUpload > 1024 * 1024)
|
||||
{
|
||||
} else {
|
||||
if ($iMaxUpload > 1024 * 1024) {
|
||||
$sRet = Dict::Format('Attachment:Max_Mo', sprintf('%0.2f', $iMaxUpload / (1024 * 1024)));
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$sRet = Dict::Format('Attachment:Max_Ko', sprintf('%0.2f', $iMaxUpload / (1024)));
|
||||
}
|
||||
}
|
||||
@@ -128,9 +111,8 @@ class AttachmentPlugIn implements iApplicationUIExtension, iEventServiceSetup
|
||||
// Delete all "pending" attachments for this form
|
||||
$sOQL = 'SELECT Attachment WHERE temp_id = :temp_id';
|
||||
$oSearch = DBObjectSearch::FromOQL($sOQL);
|
||||
$oSet = new DBObjectSet($oSearch, array(), array('temp_id' => $sTempId));
|
||||
while ($oAttachment = $oSet->Fetch())
|
||||
{
|
||||
$oSet = new DBObjectSet($oSearch, [], ['temp_id' => $sTempId]);
|
||||
while ($oAttachment = $oSet->Fetch()) {
|
||||
$oAttachment->DBDelete();
|
||||
// Pending attachment, don't mention it in the history
|
||||
}
|
||||
@@ -138,7 +120,7 @@ class AttachmentPlugIn implements iApplicationUIExtension, iEventServiceSetup
|
||||
|
||||
public function EnumUsedAttributes($oObject)
|
||||
{
|
||||
return array();
|
||||
return [];
|
||||
}
|
||||
|
||||
public function GetIcon($oObject)
|
||||
@@ -149,17 +131,17 @@ class AttachmentPlugIn implements iApplicationUIExtension, iEventServiceSetup
|
||||
public function GetHilightClass($oObject)
|
||||
{
|
||||
// Possible return values are:
|
||||
// HILIGHT_CLASS_CRITICAL, HILIGHT_CLASS_WARNING, HILIGHT_CLASS_OK, HILIGHT_CLASS_NONE
|
||||
// HILIGHT_CLASS_CRITICAL, HILIGHT_CLASS_WARNING, HILIGHT_CLASS_OK, HILIGHT_CLASS_NONE
|
||||
return HILIGHT_CLASS_NONE;
|
||||
}
|
||||
|
||||
public function EnumAllowedActions(DBObjectSet $oSet)
|
||||
{
|
||||
// No action
|
||||
return array();
|
||||
return [];
|
||||
}
|
||||
|
||||
public function RegisterEventsAndListeners() : void
|
||||
public function RegisterEventsAndListeners(): void
|
||||
{
|
||||
EventService::RegisterListener(EVENT_DB_AFTER_WRITE, [$this, 'OnDBAfterWrite']);
|
||||
EventService::RegisterListener(EVENT_DB_AFTER_DELETE, [$this, 'OnDBAfterDelete']);
|
||||
@@ -171,17 +153,14 @@ class AttachmentPlugIn implements iApplicationUIExtension, iEventServiceSetup
|
||||
$oCMDBChange = $oEventData->Get('cmdb_change');
|
||||
$bIsNew = $oEventData->Get('is_new');
|
||||
|
||||
if ($this->IsTargetObject($oObject))
|
||||
{
|
||||
if($bIsNew){
|
||||
if ($this->IsTargetObject($oObject)) {
|
||||
if ($bIsNew) {
|
||||
self::UpdateAttachments($oObject, $oCMDBChange);
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
// Get all current attachments
|
||||
$oSearch = DBObjectSearch::FromOQL("SELECT Attachment WHERE item_class = :class AND item_id = :item_id");
|
||||
$oSet = new DBObjectSet($oSearch, array(), array('class' => get_class($oObject), 'item_id' => $oObject->GetKey()));
|
||||
while ($oAttachment = $oSet->Fetch())
|
||||
{
|
||||
$oSet = new DBObjectSet($oSearch, [], ['class' => get_class($oObject), 'item_id' => $oObject->GetKey()]);
|
||||
while ($oAttachment = $oSet->Fetch()) {
|
||||
$oAttachment->SetItem($oObject, true /*updateonchange*/);
|
||||
}
|
||||
}
|
||||
@@ -192,12 +171,10 @@ class AttachmentPlugIn implements iApplicationUIExtension, iEventServiceSetup
|
||||
{
|
||||
$oObject = $oEventData->Get('object');
|
||||
|
||||
if ($this->IsTargetObject($oObject))
|
||||
{
|
||||
if ($this->IsTargetObject($oObject)) {
|
||||
$oSearch = DBObjectSearch::FromOQL("SELECT Attachment WHERE item_class = :class AND item_id = :item_id");
|
||||
$oSet = new DBObjectSet($oSearch, array(), array('class' => get_class($oObject), 'item_id' => $oObject->GetKey()));
|
||||
while ($oAttachment = $oSet->Fetch())
|
||||
{
|
||||
$oSet = new DBObjectSet($oSearch, [], ['class' => get_class($oObject), 'item_id' => $oObject->GetKey()]);
|
||||
while ($oAttachment = $oSet->Fetch()) {
|
||||
$oAttachment->DBDelete();
|
||||
}
|
||||
}
|
||||
@@ -211,11 +188,9 @@ class AttachmentPlugIn implements iApplicationUIExtension, iEventServiceSetup
|
||||
|
||||
protected function IsTargetObject($oObject)
|
||||
{
|
||||
$aAllowedClasses = MetaModel::GetModuleSetting('itop-attachments', 'allowed_classes', array('Ticket'));
|
||||
foreach ($aAllowedClasses as $sAllowedClass)
|
||||
{
|
||||
if ($oObject instanceof $sAllowedClass)
|
||||
{
|
||||
$aAllowedClasses = MetaModel::GetModuleSetting('itop-attachments', 'allowed_classes', ['Ticket']);
|
||||
foreach ($aAllowedClasses as $sAllowedClass) {
|
||||
if ($oObject instanceof $sAllowedClass) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -228,7 +203,7 @@ class AttachmentPlugIn implements iApplicationUIExtension, iEventServiceSetup
|
||||
return MetaModel::GetModuleSetting('itop-attachments', 'position', 'relations');
|
||||
}
|
||||
|
||||
var $m_bDeleteEnabled = true;
|
||||
public $m_bDeleteEnabled = true;
|
||||
|
||||
public function EnableDelete($bEnabled)
|
||||
{
|
||||
@@ -249,34 +224,28 @@ class AttachmentPlugIn implements iApplicationUIExtension, iEventServiceSetup
|
||||
public function DisplayAttachments(DBObject $oObject, WebPage $oPage, $bEditMode = false)
|
||||
{
|
||||
// Exit here if the class is not allowed
|
||||
if (!$this->IsTargetObject($oObject))
|
||||
{
|
||||
if (!$this->IsTargetObject($oObject)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$sObjClass = get_class($oObject);
|
||||
$iObjKey = $oObject->GetKey();
|
||||
$sTransactionId = $oPage->GetTransactionId();
|
||||
if ($bEditMode && empty($sTransactionId))
|
||||
{
|
||||
if ($bEditMode && empty($sTransactionId)) {
|
||||
throw new InvalidParameterException('Attachments renderer : invalid transaction id');
|
||||
}
|
||||
$oAttachmentsRenderer = AttachmentsRendererFactory::GetInstance($oPage, $sObjClass, $iObjKey, $sTransactionId);
|
||||
|
||||
if ($this->GetAttachmentsPosition() === 'relations')
|
||||
{
|
||||
if ($this->GetAttachmentsPosition() === 'relations') {
|
||||
$iCount = $oAttachmentsRenderer->GetAttachmentsSet()->Count() + $oAttachmentsRenderer->GetTempAttachmentsSet()->Count();
|
||||
$sTitle = ($iCount > 0) ? Dict::Format('Attachments:TabTitle_Count', $iCount) : Dict::S('Attachments:EmptyTabTitle');
|
||||
$oPage->SetCurrentTab('Attachments:Tab', $sTitle);
|
||||
}
|
||||
|
||||
|
||||
$bIsReadOnlyState = self::IsReadonlyState($oObject, $oObject->GetState(), AttachmentPlugIn::ENUM_GUI_BACKOFFICE);
|
||||
if ($bEditMode && !$bIsReadOnlyState)
|
||||
{
|
||||
if ($bEditMode && !$bIsReadOnlyState) {
|
||||
$oAttachmentsRenderer->RenderEditAttachmentsList();
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$oAttachmentsRenderer->RenderViewAttachmentsList();
|
||||
}
|
||||
}
|
||||
@@ -300,27 +269,23 @@ class AttachmentPlugIn implements iApplicationUIExtension, iEventServiceSetup
|
||||
*/
|
||||
protected static function UpdateAttachments($oObject, $oCMDBChange = null)
|
||||
{
|
||||
if (utils::ReadParam('attachment_plugin', 'not-in-form') == 'not-in-form')
|
||||
{
|
||||
if (utils::ReadParam('attachment_plugin', 'not-in-form') == 'not-in-form') {
|
||||
// Workaround to an issue in iTop < 2.0
|
||||
// Leave silently if there is no trace of the attachment form
|
||||
return;
|
||||
}
|
||||
$sTransactionId = utils::ReadParam('transaction_id', null, false, 'transaction_id');
|
||||
if (!is_null($sTransactionId))
|
||||
{
|
||||
$aActions = array();
|
||||
$aRemovedAttachmentIds = utils::ReadParam('removed_attachments', array());
|
||||
if (!is_null($sTransactionId)) {
|
||||
$aActions = [];
|
||||
$aRemovedAttachmentIds = utils::ReadParam('removed_attachments', []);
|
||||
|
||||
// Get all current attachments
|
||||
$oSearch = DBObjectSearch::FromOQL("SELECT Attachment WHERE item_class = :class AND item_id = :item_id");
|
||||
$oSearch->AllowAllData();
|
||||
$oSet = new DBObjectSet($oSearch, array(), array('class' => get_class($oObject), 'item_id' => $oObject->GetKey()));
|
||||
while ($oAttachment = $oSet->Fetch())
|
||||
{
|
||||
$oSet = new DBObjectSet($oSearch, [], ['class' => get_class($oObject), 'item_id' => $oObject->GetKey()]);
|
||||
while ($oAttachment = $oSet->Fetch()) {
|
||||
// Remove attachments that are no longer attached to the current object
|
||||
if (in_array($oAttachment->GetKey(), $aRemovedAttachmentIds))
|
||||
{
|
||||
if (in_array($oAttachment->GetKey(), $aRemovedAttachmentIds)) {
|
||||
$aData = ['attachment' => $oAttachment];
|
||||
$oObject->FireEvent(EVENT_REMOVE_ATTACHMENT_FROM_OBJECT, $aData);
|
||||
$oAttachment->DBDelete();
|
||||
@@ -335,11 +300,9 @@ class AttachmentPlugIn implements iApplicationUIExtension, iEventServiceSetup
|
||||
$sOQL = 'SELECT Attachment WHERE temp_id = :temp_id';
|
||||
$oSearch = DBObjectSearch::FromOQL($sOQL);
|
||||
$oSearch->AllowAllData();
|
||||
$oSet = new DBObjectSet($oSearch, array(), array('temp_id' => $sTempId));
|
||||
while ($oAttachment = $oSet->Fetch())
|
||||
{
|
||||
if (in_array($oAttachment->GetKey(), $aRemovedAttachmentIds))
|
||||
{
|
||||
$oSet = new DBObjectSet($oSearch, [], ['temp_id' => $sTempId]);
|
||||
while ($oAttachment = $oSet->Fetch()) {
|
||||
if (in_array($oAttachment->GetKey(), $aRemovedAttachmentIds)) {
|
||||
$oAttachment->DBDelete();
|
||||
// temporary attachment removed, don't even mention it in the history
|
||||
} else {
|
||||
@@ -352,10 +315,8 @@ class AttachmentPlugIn implements iApplicationUIExtension, iEventServiceSetup
|
||||
$oObject->FireEvent(EVENT_ADD_ATTACHMENT_TO_OBJECT, $aData);
|
||||
}
|
||||
}
|
||||
if (count($aActions) > 0)
|
||||
{
|
||||
foreach ($aActions as $oChangeOp)
|
||||
{
|
||||
if (count($aActions) > 0) {
|
||||
foreach ($aActions as $oChangeOp) {
|
||||
self::RecordHistory($oCMDBChange, $oObject, $oChangeOp);
|
||||
}
|
||||
|
||||
@@ -367,11 +328,10 @@ class AttachmentPlugIn implements iApplicationUIExtension, iEventServiceSetup
|
||||
public static function CopyAttachments($oObject, $sTransactionId)
|
||||
{
|
||||
$oSearch = DBObjectSearch::FromOQL("SELECT Attachment WHERE item_class = :class AND item_id = :item_id");
|
||||
$oSet = new DBObjectSet($oSearch, array(), array('class' => get_class($oObject), 'item_id' => $oObject->GetKey()));
|
||||
$oSet = new DBObjectSet($oSearch, [], ['class' => get_class($oObject), 'item_id' => $oObject->GetKey()]);
|
||||
// Attach new (temporary) attachments
|
||||
$sTempId = utils::GetUploadTempId($sTransactionId);
|
||||
while ($oAttachment = $oSet->Fetch())
|
||||
{
|
||||
while ($oAttachment = $oSet->Fetch()) {
|
||||
$oTempAttachment = clone $oAttachment;
|
||||
$oTempAttachment->Set('expire', time() + utils::GetConfig()->Get('draft_attachments_lifetime'));
|
||||
$oTempAttachment->Set('item_id', null);
|
||||
@@ -384,15 +344,11 @@ class AttachmentPlugIn implements iApplicationUIExtension, iEventServiceSetup
|
||||
public static function GetFileIcon($sFileName)
|
||||
{
|
||||
$aPathParts = pathinfo($sFileName);
|
||||
if (!array_key_exists('extension', $aPathParts))
|
||||
{
|
||||
if (!array_key_exists('extension', $aPathParts)) {
|
||||
// No extension: use the default icon
|
||||
$sIcon = 'icons8-file.svg';
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (strtolower($aPathParts['extension']))
|
||||
{
|
||||
} else {
|
||||
switch (strtolower($aPathParts['extension'])) {
|
||||
case 'doc':
|
||||
case 'docx':
|
||||
$sIcon = 'icons8-word.svg';
|
||||
@@ -425,7 +381,7 @@ class AttachmentPlugIn implements iApplicationUIExtension, iEventServiceSetup
|
||||
case 'vb':
|
||||
$sIcon = 'icons8-code-file.svg';
|
||||
break;
|
||||
|
||||
|
||||
case 'pdf':
|
||||
$sIcon = 'icons8-pdf.svg';
|
||||
break;
|
||||
@@ -478,7 +434,7 @@ class AttachmentPlugIn implements iApplicationUIExtension, iEventServiceSetup
|
||||
case 'ai':
|
||||
$sIcon = 'icons8-image-file.svg';
|
||||
break;
|
||||
|
||||
|
||||
case 'zip':
|
||||
case 'gz':
|
||||
case 'tgz':
|
||||
@@ -512,34 +468,34 @@ class AttachmentPlugIn implements iApplicationUIExtension, iEventServiceSetup
|
||||
case 'wma':
|
||||
$sIcon = 'icons8-audio-file.svg';
|
||||
break;
|
||||
|
||||
|
||||
case 'csv':
|
||||
$sIcon = 'icons8-csv.svg';
|
||||
break;
|
||||
|
||||
|
||||
case 'log':
|
||||
$sIcon = 'icons8-event-log.svg';
|
||||
break;
|
||||
|
||||
|
||||
case 'sql':
|
||||
$sIcon = 'icons8-sql.svg';
|
||||
break;
|
||||
|
||||
|
||||
case 'xml':
|
||||
$sIcon = 'icons8-xml-file.svg';
|
||||
break;
|
||||
|
||||
break;
|
||||
|
||||
case 'email':
|
||||
case 'eml':
|
||||
case 'emlx':
|
||||
case 'msg':
|
||||
$sIcon = 'icons8-mail.svg';
|
||||
break;
|
||||
|
||||
|
||||
case 'patch':
|
||||
$sIcon = 'icons8-bandage.svg';
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
$sIcon = 'icons8-file.svg';
|
||||
break;
|
||||
@@ -552,8 +508,7 @@ class AttachmentPlugIn implements iApplicationUIExtension, iEventServiceSetup
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
private static function RecordHistory($oCMDBChange, $oTargetObject, $oMyChangeOp)
|
||||
{
|
||||
if (!is_null($oCMDBChange))
|
||||
{
|
||||
if (!is_null($oCMDBChange)) {
|
||||
$oMyChangeOp->Set("change", $oCMDBChange->GetKey());
|
||||
}
|
||||
$oMyChangeOp->Set("objclass", get_class($oTargetObject));
|
||||
@@ -566,14 +521,11 @@ class AttachmentPlugIn implements iApplicationUIExtension, iEventServiceSetup
|
||||
{
|
||||
$oBlob = $oAttachment->Get('contents');
|
||||
$sFileName = $oBlob->GetFileName();
|
||||
if ($bCreate)
|
||||
{
|
||||
if ($bCreate) {
|
||||
$oChangeOp = new CMDBChangeOpAttachmentAdded();
|
||||
$oChangeOp->Set('attachment_id', $oAttachment->GetKey());
|
||||
$oChangeOp->Set('filename', $sFileName);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$oChangeOp = new CMDBChangeOpAttachmentRemoved();
|
||||
$oChangeOp->Set('filename', $sFileName);
|
||||
}
|
||||
@@ -595,44 +547,36 @@ class AttachmentPlugIn implements iApplicationUIExtension, iEventServiceSetup
|
||||
*/
|
||||
public static function IsReadonlyState(DBObject $oObject, $sState, $sGUI = self::ENUM_GUI_ALL)
|
||||
{
|
||||
$aParamDefaultValue = array(
|
||||
static::ENUM_GUI_ALL => array(
|
||||
'Ticket' => array('closed'),
|
||||
),
|
||||
);
|
||||
$aParamDefaultValue = [
|
||||
static::ENUM_GUI_ALL => [
|
||||
'Ticket' => ['closed'],
|
||||
],
|
||||
];
|
||||
|
||||
$bReadonly = false;
|
||||
$sClass = get_class($oObject);
|
||||
$aReadonlyStatus = MetaModel::GetModuleSetting('itop-attachments', 'readonly_states', $aParamDefaultValue);
|
||||
if (!empty($aReadonlyStatus))
|
||||
{
|
||||
if (!empty($aReadonlyStatus)) {
|
||||
// Merging GUIs entries
|
||||
$aEntries = array();
|
||||
$aEntries = [];
|
||||
// - All
|
||||
if (array_key_exists(static::ENUM_GUI_ALL, $aReadonlyStatus))
|
||||
{
|
||||
if (array_key_exists(static::ENUM_GUI_ALL, $aReadonlyStatus)) {
|
||||
$aEntries = array_merge_recursive($aEntries, $aReadonlyStatus[static::ENUM_GUI_ALL]);
|
||||
}
|
||||
// - Backoffice & Portals
|
||||
foreach (array(static::ENUM_GUI_BACKOFFICE, static::ENUM_GUI_PORTALS) as $sEnumGUI)
|
||||
{
|
||||
if (in_array($sGUI, array(static::ENUM_GUI_ALL, $sEnumGUI)))
|
||||
{
|
||||
if (array_key_exists($sEnumGUI, $aReadonlyStatus))
|
||||
{
|
||||
foreach ([static::ENUM_GUI_BACKOFFICE, static::ENUM_GUI_PORTALS] as $sEnumGUI) {
|
||||
if (in_array($sGUI, [static::ENUM_GUI_ALL, $sEnumGUI])) {
|
||||
if (array_key_exists($sEnumGUI, $aReadonlyStatus)) {
|
||||
$aEntries = array_merge_recursive($aEntries, $aReadonlyStatus[$sEnumGUI]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$aParentClasses = array_reverse(MetaModel::EnumParentClasses($sClass, ENUM_PARENT_CLASSES_ALL));
|
||||
foreach ($aParentClasses as $sParentClass)
|
||||
{
|
||||
if (array_key_exists($sParentClass, $aEntries))
|
||||
{
|
||||
foreach ($aParentClasses as $sParentClass) {
|
||||
if (array_key_exists($sParentClass, $aEntries)) {
|
||||
// If we found an ancestor of the object's class, we stop looking event if the current state is not specified
|
||||
if (in_array($oObject->GetState(), $aEntries[$sParentClass]))
|
||||
{
|
||||
if (in_array($oObject->GetState(), $aEntries[$sParentClass])) {
|
||||
$bReadonly = true;
|
||||
}
|
||||
break;
|
||||
@@ -643,7 +587,6 @@ class AttachmentPlugIn implements iApplicationUIExtension, iEventServiceSetup
|
||||
return $bReadonly;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -658,38 +601,38 @@ class CMDBChangeOpAttachmentAdded extends CMDBChangeOp
|
||||
{
|
||||
public static function Init()
|
||||
{
|
||||
$aParams = array
|
||||
(
|
||||
$aParams =
|
||||
[
|
||||
"category" => "core/cmdb, grant_by_profile",
|
||||
"key_type" => "",
|
||||
"name_attcode" => "change",
|
||||
"state_attcode" => "",
|
||||
"reconc_keys" => array(),
|
||||
"reconc_keys" => [],
|
||||
"db_table" => "priv_changeop_attachment_added",
|
||||
"db_key_field" => "id",
|
||||
"db_finalclass_field" => "",
|
||||
);
|
||||
];
|
||||
MetaModel::Init_Params($aParams);
|
||||
MetaModel::Init_InheritAttributes();
|
||||
MetaModel::Init_AddAttribute(new AttributeExternalKey("attachment_id", array(
|
||||
MetaModel::Init_AddAttribute(new AttributeExternalKey("attachment_id", [
|
||||
"targetclass" => "Attachment",
|
||||
"allowed_values" => null,
|
||||
"sql" => "attachment_id",
|
||||
"is_null_allowed" => true,
|
||||
"on_target_delete" => DEL_SILENT,
|
||||
"depends_on" => array(),
|
||||
)));
|
||||
MetaModel::Init_AddAttribute(new AttributeString("filename", array(
|
||||
"depends_on" => [],
|
||||
]));
|
||||
MetaModel::Init_AddAttribute(new AttributeString("filename", [
|
||||
"allowed_values" => null,
|
||||
"sql" => "filename",
|
||||
"default_value" => "",
|
||||
"is_null_allowed" => false,
|
||||
"depends_on" => array(),
|
||||
)));
|
||||
"depends_on" => [],
|
||||
]));
|
||||
|
||||
// Display lists
|
||||
MetaModel::Init_SetZListItems('details', array('attachment_id')); // Attributes to be displayed for the complete details
|
||||
MetaModel::Init_SetZListItems('list', array('attachment_id')); // Attributes to be displayed for a list
|
||||
MetaModel::Init_SetZListItems('details', ['attachment_id']); // Attributes to be displayed for the complete details
|
||||
MetaModel::Init_SetZListItems('list', ['attachment_id']); // Attributes to be displayed for a list
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -709,12 +652,15 @@ class CMDBChangeOpAttachmentAdded extends CMDBChangeOp
|
||||
$oAttachment = $oMonoObjectSet->Fetch();
|
||||
$oDoc = $oAttachment->Get('contents');
|
||||
$sPreview = $oDoc->IsPreviewAvailable() ? 'data-preview="true"' : '';
|
||||
$sResult = Dict::Format('Attachments:History_File_Added',
|
||||
'<span class="attachment-history-added attachment"><a '.$sPreview.' target="_blank" href="'.$oDoc->GetDownloadURL($sTargetObjectClass,
|
||||
$iTargetObjectKey, 'contents').'">'.$sFilename.'</a></span>');
|
||||
}
|
||||
else
|
||||
{
|
||||
$sResult = Dict::Format(
|
||||
'Attachments:History_File_Added',
|
||||
'<span class="attachment-history-added attachment"><a '.$sPreview.' target="_blank" href="'.$oDoc->GetDownloadURL(
|
||||
$sTargetObjectClass,
|
||||
$iTargetObjectKey,
|
||||
'contents'
|
||||
).'">'.$sFilename.'</a></span>'
|
||||
);
|
||||
} else {
|
||||
$sResult = Dict::Format('Attachments:History_File_Added', '<span class="attachment-history-deleted">'.$sFilename.'</span>');
|
||||
}
|
||||
|
||||
@@ -726,30 +672,30 @@ class CMDBChangeOpAttachmentRemoved extends CMDBChangeOp
|
||||
{
|
||||
public static function Init()
|
||||
{
|
||||
$aParams = array
|
||||
(
|
||||
$aParams =
|
||||
[
|
||||
"category" => "core/cmdb, grant_by_profile",
|
||||
"key_type" => "",
|
||||
"name_attcode" => "change",
|
||||
"state_attcode" => "",
|
||||
"reconc_keys" => array(),
|
||||
"reconc_keys" => [],
|
||||
"db_table" => "priv_changeop_attachment_removed",
|
||||
"db_key_field" => "id",
|
||||
"db_finalclass_field" => "",
|
||||
);
|
||||
];
|
||||
MetaModel::Init_Params($aParams);
|
||||
MetaModel::Init_InheritAttributes();
|
||||
MetaModel::Init_AddAttribute(new AttributeString("filename", array(
|
||||
MetaModel::Init_AddAttribute(new AttributeString("filename", [
|
||||
"allowed_values" => null,
|
||||
"sql" => "filename",
|
||||
"default_value" => "",
|
||||
"is_null_allowed" => false,
|
||||
"depends_on" => array(),
|
||||
)));
|
||||
"depends_on" => [],
|
||||
]));
|
||||
|
||||
// Display lists
|
||||
MetaModel::Init_SetZListItems('details', array('filename')); // Attributes to be displayed for the complete details
|
||||
MetaModel::Init_SetZListItems('list', array('filename')); // Attributes to be displayed for a list
|
||||
MetaModel::Init_SetZListItems('details', ['filename']); // Attributes to be displayed for the complete details
|
||||
MetaModel::Init_SetZListItems('list', ['filename']); // Attributes to be displayed for a list
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -758,8 +704,10 @@ class CMDBChangeOpAttachmentRemoved extends CMDBChangeOp
|
||||
public function GetDescription()
|
||||
{
|
||||
// Temporary, until we change the options of GetDescription() -needs a more global revision
|
||||
$sResult = Dict::Format('Attachments:History_File_Removed',
|
||||
'<span class="attachment-history-deleted">'.utils::EscapeHtml($this->Get('filename')).'</span>');
|
||||
$sResult = Dict::Format(
|
||||
'Attachments:History_File_Removed',
|
||||
'<span class="attachment-history-deleted">'.utils::EscapeHtml($this->Get('filename')).'</span>'
|
||||
);
|
||||
|
||||
return $sResult;
|
||||
}
|
||||
@@ -776,29 +724,22 @@ class AttachmentsHelper
|
||||
public static function GetAttachmentsDateAddedFromDb($sObjClass, $iObjKey)
|
||||
{
|
||||
$sQuery = "SELECT CMDBChangeOpAttachmentAdded WHERE objclass='$sObjClass' AND objkey=$iObjKey";
|
||||
try
|
||||
{
|
||||
try {
|
||||
$oSearch = DBObjectSearch::FromOQL($sQuery);
|
||||
}
|
||||
catch (OQLException $e)
|
||||
{
|
||||
return array();
|
||||
} catch (OQLException $e) {
|
||||
return [];
|
||||
}
|
||||
$oSet = new DBObjectSet($oSearch);
|
||||
|
||||
try
|
||||
{
|
||||
$aAttachmentDates = array();
|
||||
while ($oChangeOpAttAdded = $oSet->Fetch())
|
||||
{
|
||||
try {
|
||||
$aAttachmentDates = [];
|
||||
while ($oChangeOpAttAdded = $oSet->Fetch()) {
|
||||
$iAttachmentId = $oChangeOpAttAdded->Get('attachment_id');
|
||||
$sAttachmentDate = $oChangeOpAttAdded->Get('date');
|
||||
$aAttachmentDates[$iAttachmentId] = $sAttachmentDate;
|
||||
}
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
return array();
|
||||
} catch (Exception $e) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return $aAttachmentDates;
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<?php
|
||||
|
||||
// Copyright (C) 2010-2024 Combodo SAS
|
||||
//
|
||||
// This file is part of iTop.
|
||||
//
|
||||
// iTop is free software; you can redistribute it and/or modify
|
||||
// iTop is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
@@ -16,11 +17,10 @@
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with iTop. If not, see <http://www.gnu.org/licenses/>
|
||||
|
||||
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'itop-attachments/3.3.0',
|
||||
array(
|
||||
[
|
||||
// Identification
|
||||
//
|
||||
'label' => 'Tickets Attachments',
|
||||
@@ -28,52 +28,51 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Setup
|
||||
//
|
||||
'dependencies' => array(),
|
||||
'dependencies' => [],
|
||||
'mandatory' => false,
|
||||
'visible' => true,
|
||||
'installer' => 'AttachmentInstaller',
|
||||
|
||||
// Components
|
||||
//
|
||||
'datamodel' => array(
|
||||
'datamodel' => [
|
||||
'vendor/autoload.php',
|
||||
'main.itop-attachments.php',
|
||||
'src/Trigger/TriggerOnAttachmentCreate.php',
|
||||
'src/Trigger/TriggerOnAttachmentDelete.php',
|
||||
'src/Trigger/TriggerOnAttachmentDownload.php',
|
||||
'renderers.itop-attachments.php',
|
||||
),
|
||||
'webservice' => array(
|
||||
|
||||
),
|
||||
'dictionary' => array(
|
||||
],
|
||||
'webservice' => [
|
||||
|
||||
),
|
||||
'data.struct' => array(
|
||||
],
|
||||
'dictionary' => [
|
||||
|
||||
],
|
||||
'data.struct' => [
|
||||
// add your 'structure' definition XML files here,
|
||||
),
|
||||
'data.sample' => array(
|
||||
],
|
||||
'data.sample' => [
|
||||
// add your sample data XML files here,
|
||||
),
|
||||
|
||||
],
|
||||
|
||||
// Documentation
|
||||
//
|
||||
'doc.manual_setup' => '', // hyperlink to manual setup documentation, if any
|
||||
'doc.more_information' => '', // hyperlink to more information, if any
|
||||
'doc.more_information' => '', // hyperlink to more information, if any
|
||||
|
||||
// Default settings
|
||||
//
|
||||
'settings' => array(
|
||||
'allowed_classes' => array('Ticket'), // List of classes for which to manage "Attachments"
|
||||
'settings' => [
|
||||
'allowed_classes' => ['Ticket'], // List of classes for which to manage "Attachments"
|
||||
'position' => 'relations', // Where to display the attachments: relations | properties
|
||||
'preview_max_width' => 290,
|
||||
'icon_preview_max_size' => 500000, // Maximum size for attachment preview to be displayed as an icon. In bits
|
||||
),
|
||||
)
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
if (!class_exists('AttachmentInstaller'))
|
||||
{
|
||||
if (!class_exists('AttachmentInstaller')) {
|
||||
// Module installation handler
|
||||
//
|
||||
class AttachmentInstaller extends ModuleInstallerAPI
|
||||
@@ -94,7 +93,8 @@ if (!class_exists('AttachmentInstaller'))
|
||||
* @throws \MySQLException
|
||||
* @throws \MySQLHasGoneAwayException
|
||||
*/
|
||||
public static function GetOrphanAttachmentIds($sTableName, $iBulkSize){
|
||||
public static function GetOrphanAttachmentIds($sTableName, $iBulkSize)
|
||||
{
|
||||
$sSqlQuery = <<<SQL
|
||||
SELECT id as attachment_id FROM `$sTableName` WHERE (`item_id`='' OR `item_id` IS NULL) LIMIT {$iBulkSize};
|
||||
SQL;
|
||||
@@ -102,7 +102,7 @@ SQL;
|
||||
$oQueryResult = CMDBSource::Query($sSqlQuery);
|
||||
|
||||
$aIds = [];
|
||||
while($aRow = $oQueryResult->fetch_array()){
|
||||
while ($aRow = $oQueryResult->fetch_array()) {
|
||||
$aIds[] = $aRow['attachment_id'];
|
||||
}
|
||||
|
||||
@@ -117,15 +117,13 @@ SQL;
|
||||
*/
|
||||
public static function BeforeDatabaseCreation(Config $oConfiguration, $sPreviousVersion, $sCurrentVersion)
|
||||
{
|
||||
if ($sPreviousVersion != '')
|
||||
{
|
||||
if ($sPreviousVersion != '') {
|
||||
// Migrating from a previous version
|
||||
// Check for records where item_id = '', since they are not attached to any object and cannot be migrated to the objkey schema
|
||||
$sTableName = MetaModel::DBGetTable('Attachment');
|
||||
$sCountQuery = "SELECT COUNT(*) FROM `$sTableName` WHERE (`item_id`='' OR `item_id` IS NULL)";
|
||||
$iCount = CMDBSource::QueryToScalar($sCountQuery);
|
||||
if ($iCount > 0)
|
||||
{
|
||||
if ($iCount > 0) {
|
||||
SetupLog::Info("Cleanup of orphan attachments that cannot be migrated to the new ObjKey model: $iCount record(s) must be deleted.");
|
||||
|
||||
$iBulkSize = 100;
|
||||
@@ -141,7 +139,7 @@ SQL;
|
||||
$iDeletedCount += count($aIds);
|
||||
$fElapsed = microtime(true) - $fStartTime;
|
||||
|
||||
if ($fElapsed > $iMaxDuration){
|
||||
if ($fElapsed > $iMaxDuration) {
|
||||
SetupLog::Info(sprintf("Cleanup of orphan attachments interrupted after %.3f s. $iDeletedCount records were deleted among $iCount.", $fElapsed));
|
||||
break;
|
||||
}
|
||||
@@ -149,12 +147,10 @@ SQL;
|
||||
$aIds = self::GetOrphanAttachmentIds($sTableName, $iBulkSize);
|
||||
}
|
||||
|
||||
if (count($aIds) === 0){
|
||||
if (count($aIds) === 0) {
|
||||
SetupLog::Info("Cleanup of orphan attachments successfully completed.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
SetupLog::Info("No orphan attachment found.");
|
||||
}
|
||||
}
|
||||
@@ -169,7 +165,7 @@ SQL;
|
||||
public static function AfterDatabaseCreation(Config $oConfiguration, $sPreviousVersion, $sCurrentVersion)
|
||||
{
|
||||
// For each record having item_org_id unset,
|
||||
// get the org_id from the container object
|
||||
// get the org_id from the container object
|
||||
//
|
||||
// Prerequisite: change null into 0 (workaround to the fact that we cannot use IS NULL in OQL)
|
||||
SetupLog::Info("Initializing attachment/item_org_id - null to zero");
|
||||
@@ -185,11 +181,10 @@ SQL;
|
||||
'Attachment' => [
|
||||
'item_class',
|
||||
'item_id',
|
||||
]
|
||||
],
|
||||
]);
|
||||
$iUpdated = 0;
|
||||
while ($oAttachment = $oSet->Fetch())
|
||||
{
|
||||
while ($oAttachment = $oSet->Fetch()) {
|
||||
if (empty($oAttachment->Get('item_class'))) {
|
||||
//do not treat orphan attachment
|
||||
continue;
|
||||
|
||||
@@ -40,14 +40,14 @@ class EventListener implements iEventServiceSetup
|
||||
[$this, 'OnAttachmentDownloadActivateTriggers'],
|
||||
'Attachment'
|
||||
);
|
||||
EventService::RegisterListener(
|
||||
\EVENT_ADD_ATTACHMENT_TO_OBJECT,
|
||||
[$this, 'OnAttachmentAddedActivateTriggers']
|
||||
);
|
||||
EventService::RegisterListener(
|
||||
\EVENT_REMOVE_ATTACHMENT_FROM_OBJECT,
|
||||
[$this, 'OnAttachmentRemovedActivateTriggers']
|
||||
);
|
||||
EventService::RegisterListener(
|
||||
\EVENT_ADD_ATTACHMENT_TO_OBJECT,
|
||||
[$this, 'OnAttachmentAddedActivateTriggers']
|
||||
);
|
||||
EventService::RegisterListener(
|
||||
\EVENT_REMOVE_ATTACHMENT_FROM_OBJECT,
|
||||
[$this, 'OnAttachmentRemovedActivateTriggers']
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -70,77 +70,77 @@ class EventListener implements iEventServiceSetup
|
||||
/** @var \ormDocument $oDocument */
|
||||
$oDocument = $oEventData->Get('document');
|
||||
|
||||
$this->OnAttachmentActivateTriggers(
|
||||
$oHostObj,
|
||||
$oAttachment,
|
||||
$oDocument,
|
||||
TriggerOnAttachmentDownload::class
|
||||
);
|
||||
}
|
||||
$this->OnAttachmentActivateTriggers(
|
||||
$oHostObj,
|
||||
$oAttachment,
|
||||
$oDocument,
|
||||
TriggerOnAttachmentDownload::class
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback when an Attachment is added: Activate corresponding triggers
|
||||
*
|
||||
* @param \Combodo\iTop\Service\Events\EventData $oEventData
|
||||
*
|
||||
* @return void
|
||||
* @throws \CoreException
|
||||
*/
|
||||
public function OnAttachmentAddedActivateTriggers(EventData $oEventData): void
|
||||
{
|
||||
/** @var DBObject $oAttachment */
|
||||
$oAttachment = $oEventData->Get('attachment');
|
||||
/** @var DBObject $oHostObj */
|
||||
$oHostObj = $oEventData->Get('object');
|
||||
/** @var ormDocument $oDocument */
|
||||
$oDocument = $oAttachment->Get('contents');
|
||||
/**
|
||||
* Callback when an Attachment is added: Activate corresponding triggers
|
||||
*
|
||||
* @param \Combodo\iTop\Service\Events\EventData $oEventData
|
||||
*
|
||||
* @return void
|
||||
* @throws \CoreException
|
||||
*/
|
||||
public function OnAttachmentAddedActivateTriggers(EventData $oEventData): void
|
||||
{
|
||||
/** @var DBObject $oAttachment */
|
||||
$oAttachment = $oEventData->Get('attachment');
|
||||
/** @var DBObject $oHostObj */
|
||||
$oHostObj = $oEventData->Get('object');
|
||||
/** @var ormDocument $oDocument */
|
||||
$oDocument = $oAttachment->Get('contents');
|
||||
|
||||
$this->OnAttachmentActivateTriggers(
|
||||
$oHostObj,
|
||||
$oAttachment,
|
||||
$oDocument,
|
||||
\TriggerOnAttachmentCreate::class
|
||||
);
|
||||
}
|
||||
$this->OnAttachmentActivateTriggers(
|
||||
$oHostObj,
|
||||
$oAttachment,
|
||||
$oDocument,
|
||||
\TriggerOnAttachmentCreate::class
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback when an Attachment is removed: Activate corresponding triggers
|
||||
*
|
||||
* @param \Combodo\iTop\Service\Events\EventData $oEventData
|
||||
*
|
||||
* @return void
|
||||
* @throws \CoreException
|
||||
*/
|
||||
public function OnAttachmentRemovedActivateTriggers(EventData $oEventData): void
|
||||
{
|
||||
/** @var DBObject $oAttachment */
|
||||
$oAttachment = $oEventData->Get('attachment');
|
||||
/** @var DBObject $oHostObj */
|
||||
$oHostObj = $oEventData->Get('object');
|
||||
/** @var ormDocument $oDocument */
|
||||
$oDocument = $oAttachment->Get('contents');
|
||||
/**
|
||||
* Callback when an Attachment is removed: Activate corresponding triggers
|
||||
*
|
||||
* @param \Combodo\iTop\Service\Events\EventData $oEventData
|
||||
*
|
||||
* @return void
|
||||
* @throws \CoreException
|
||||
*/
|
||||
public function OnAttachmentRemovedActivateTriggers(EventData $oEventData): void
|
||||
{
|
||||
/** @var DBObject $oAttachment */
|
||||
$oAttachment = $oEventData->Get('attachment');
|
||||
/** @var DBObject $oHostObj */
|
||||
$oHostObj = $oEventData->Get('object');
|
||||
/** @var ormDocument $oDocument */
|
||||
$oDocument = $oAttachment->Get('contents');
|
||||
|
||||
$this->OnAttachmentActivateTriggers(
|
||||
$oHostObj,
|
||||
$oAttachment,
|
||||
$oDocument,
|
||||
\TriggerOnAttachmentDelete::class
|
||||
);
|
||||
}
|
||||
$this->OnAttachmentActivateTriggers(
|
||||
$oHostObj,
|
||||
$oAttachment,
|
||||
$oDocument,
|
||||
\TriggerOnAttachmentDelete::class
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback when an Attachment downloaded, added or removed: Activate corresponding triggers
|
||||
*
|
||||
* @param DBObject $oHostObj
|
||||
* @param DBObject $oAttachment
|
||||
* @param ormDocument $oDocument
|
||||
* @param string $sTriggerClass
|
||||
*
|
||||
* @return void
|
||||
* @throws \CoreException
|
||||
*/
|
||||
protected function OnAttachmentActivateTriggers(DBObject $oHostObj, DBObject $oAttachment, ormDocument $oDocument, string $sTriggerClass): void
|
||||
{
|
||||
/**
|
||||
* Callback when an Attachment downloaded, added or removed: Activate corresponding triggers
|
||||
*
|
||||
* @param DBObject $oHostObj
|
||||
* @param DBObject $oAttachment
|
||||
* @param ormDocument $oDocument
|
||||
* @param string $sTriggerClass
|
||||
*
|
||||
* @return void
|
||||
* @throws \CoreException
|
||||
*/
|
||||
protected function OnAttachmentActivateTriggers(DBObject $oHostObj, DBObject $oAttachment, ormDocument $oDocument, string $sTriggerClass): void
|
||||
{
|
||||
$aTriggerContextArgs = [
|
||||
'this->object()' => $oHostObj,
|
||||
'attachment->object()' => $oAttachment,
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Class TriggerOnAttachmentCreate
|
||||
*
|
||||
@@ -20,29 +19,28 @@ class TriggerOnAttachmentCreate extends TriggerOnObject
|
||||
*/
|
||||
public static function Init()
|
||||
{
|
||||
$aParams = array
|
||||
(
|
||||
$aParams =
|
||||
[
|
||||
"category" => "grant_by_profile,core/cmdb,application",
|
||||
"key_type" => "autoincrement",
|
||||
"name_attcode" => "description",
|
||||
"complementary_name_attcode" => ['finalclass', 'complement'],
|
||||
"complementary_name_attcode" => ['finalclass', 'complement'],
|
||||
"state_attcode" => "",
|
||||
"reconc_keys" => ['description'],
|
||||
"db_table" => "priv_trigger_onattcreate",
|
||||
"db_key_field" => "id",
|
||||
"db_finalclass_field" => "",
|
||||
"display_template" => "",
|
||||
);
|
||||
];
|
||||
MetaModel::Init_Params($aParams);
|
||||
MetaModel::Init_InheritAttributes();
|
||||
MetaModel::Init_AddAttribute(new AttributeBoolean("file_in_email", array("sql"=>'file_in_email', "is_null_allowed"=>false, "default_value"=>'true', "allowed_values"=>null, "depends_on"=>array(), "always_load_in_tables"=>false)));
|
||||
|
||||
MetaModel::Init_AddAttribute(new AttributeBoolean("file_in_email", ["sql" => 'file_in_email', "is_null_allowed" => false, "default_value" => 'true', "allowed_values" => null, "depends_on" => [], "always_load_in_tables" => false]));
|
||||
|
||||
// Display lists
|
||||
MetaModel::Init_SetZListItems('details', array('description', 'context', 'filter', 'action_list', 'target_class', 'file_in_email')); // Attributes to be displayed for the complete details
|
||||
MetaModel::Init_SetZListItems('list', array('finalclass', 'target_class')); // Attributes to be displayed for a list
|
||||
MetaModel::Init_SetZListItems('details', ['description', 'context', 'filter', 'action_list', 'target_class', 'file_in_email']); // Attributes to be displayed for the complete details
|
||||
MetaModel::Init_SetZListItems('list', ['finalclass', 'target_class']); // Attributes to be displayed for a list
|
||||
// Search criteria
|
||||
MetaModel::Init_SetZListItems('standard_search', array('description', 'target_class')); // Criteria of the std search form
|
||||
MetaModel::Init_SetZListItems('standard_search', ['description', 'target_class']); // Criteria of the std search form
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Class TriggerOnAttachmentCreate
|
||||
*
|
||||
@@ -20,28 +19,28 @@ class TriggerOnAttachmentDelete extends TriggerOnObject
|
||||
*/
|
||||
public static function Init()
|
||||
{
|
||||
$aParams = array
|
||||
(
|
||||
$aParams =
|
||||
[
|
||||
"category" => "grant_by_profile,core/cmdb,application",
|
||||
"key_type" => "autoincrement",
|
||||
"name_attcode" => "description",
|
||||
"complementary_name_attcode" => ['finalclass', 'complement'],
|
||||
"complementary_name_attcode" => ['finalclass', 'complement'],
|
||||
"state_attcode" => "",
|
||||
"reconc_keys" => ['description'],
|
||||
"db_table" => "priv_trigger_onattdelete",
|
||||
"db_key_field" => "id",
|
||||
"db_finalclass_field" => "",
|
||||
"display_template" => "",
|
||||
);
|
||||
];
|
||||
MetaModel::Init_Params($aParams);
|
||||
MetaModel::Init_InheritAttributes();
|
||||
|
||||
// Display lists
|
||||
MetaModel::Init_SetZListItems('details', array('description', 'context', 'filter', 'action_list', 'target_class')); // Attributes to be displayed for the complete details
|
||||
MetaModel::Init_SetZListItems('list', array('finalclass', 'target_class')); // Attributes to be displayed for a list
|
||||
MetaModel::Init_SetZListItems('details', ['description', 'context', 'filter', 'action_list', 'target_class']); // Attributes to be displayed for the complete details
|
||||
MetaModel::Init_SetZListItems('list', ['finalclass', 'target_class']); // Attributes to be displayed for a list
|
||||
// Search criteria
|
||||
MetaModel::Init_SetZListItems('standard_search', array('description', 'target_class')); // Criteria of the std search form
|
||||
MetaModel::Init_SetZListItems('standard_search', ['description', 'target_class']); // Criteria of the std search form
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,27 +7,27 @@
|
||||
*/
|
||||
class TriggerOnAttachmentDownload extends TriggerOnAttributeBlobDownload
|
||||
{
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @throws \CoreException
|
||||
* @throws \Exception
|
||||
*/
|
||||
public static function Init()
|
||||
{
|
||||
$aParams = array
|
||||
(
|
||||
"category" => "grant_by_profile,core/cmdb,application",
|
||||
"key_type" => "autoincrement",
|
||||
"name_attcode" => "description",
|
||||
"complementary_name_attcode" => ['finalclass', 'complement'],
|
||||
"state_attcode" => "",
|
||||
"reconc_keys" => ['description'],
|
||||
"db_table" => "priv_trigger_onattdownload",
|
||||
"db_key_field" => "id",
|
||||
"db_finalclass_field" => "",
|
||||
"display_template" => "",
|
||||
);
|
||||
MetaModel::Init_Params($aParams);
|
||||
MetaModel::Init_InheritAttributes();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @throws \CoreException
|
||||
* @throws \Exception
|
||||
*/
|
||||
public static function Init()
|
||||
{
|
||||
$aParams =
|
||||
[
|
||||
"category" => "grant_by_profile,core/cmdb,application",
|
||||
"key_type" => "autoincrement",
|
||||
"name_attcode" => "description",
|
||||
"complementary_name_attcode" => ['finalclass', 'complement'],
|
||||
"state_attcode" => "",
|
||||
"reconc_keys" => ['description'],
|
||||
"db_table" => "priv_trigger_onattdownload",
|
||||
"db_key_field" => "id",
|
||||
"db_finalclass_field" => "",
|
||||
"display_template" => "",
|
||||
];
|
||||
MetaModel::Init_Params($aParams);
|
||||
MetaModel::Init_InheritAttributes();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
// Copyright (C) 2014-2024 Combodo SAS
|
||||
//
|
||||
// This file is part of iTop.
|
||||
@@ -16,7 +17,6 @@
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with iTop. If not, see <http://www.gnu.org/licenses/>
|
||||
|
||||
|
||||
class DBRestore extends DBBackup
|
||||
{
|
||||
/** @var string */
|
||||
@@ -54,12 +54,9 @@ class DBRestore extends DBBackup
|
||||
$sPwd = self::EscapeShellArg($this->sDBPwd);
|
||||
$sDBName = self::EscapeShellArg($this->sDBName);
|
||||
$sMySQLExe = DBBackup::MakeSafeMySQLCommand($this->sMySQLBinDir, 'mysql');
|
||||
if (is_null($this->iDBPort))
|
||||
{
|
||||
if (is_null($this->iDBPort)) {
|
||||
$sPortOption = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$sPortOption = '--port='.$this->iDBPort.' ';
|
||||
}
|
||||
$sTlsOptions = self::GetMysqlCliTlsOptions($this->oConfig);
|
||||
@@ -70,26 +67,20 @@ class DBRestore extends DBBackup
|
||||
|
||||
// Now run the command for real
|
||||
$this->LogInfo("Executing command: $sCommandDisplay");
|
||||
$aOutput = array();
|
||||
$aOutput = [];
|
||||
$iRetCode = 0;
|
||||
exec($sCommand, $aOutput, $iRetCode);
|
||||
foreach($aOutput as $sLine)
|
||||
{
|
||||
foreach ($aOutput as $sLine) {
|
||||
$this->LogInfo("mysql said: $sLine");
|
||||
}
|
||||
if ($iRetCode != 0)
|
||||
{
|
||||
if ($iRetCode != 0) {
|
||||
$this->LogError("Failed to execute: $sCommandDisplay. The command returned:$iRetCode");
|
||||
foreach($aOutput as $sLine)
|
||||
{
|
||||
foreach ($aOutput as $sLine) {
|
||||
$this->LogError("mysql said: $sLine");
|
||||
}
|
||||
if (count($aOutput) == 1)
|
||||
{
|
||||
if (count($aOutput) == 1) {
|
||||
$sMoreInfo = trim($aOutput[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$sMoreInfo = "Check the log file '".realpath(APPROOT.'/log/error.log')."' for more information.";
|
||||
}
|
||||
throw new BackupException("Failed to execute mysql: ".$sMoreInfo);
|
||||
@@ -120,7 +111,6 @@ class DBRestore extends DBBackup
|
||||
//safe zone for db backup => cron is stopped/ itop in readonly
|
||||
$this->LogInfo("Starting restore of ".basename($sFile));
|
||||
|
||||
|
||||
$sNormalizedFile = strtolower(basename($sFile));
|
||||
if (substr($sNormalizedFile, -4) == '.zip') {
|
||||
$this->LogInfo('zip file detected');
|
||||
@@ -170,7 +160,7 @@ class DBRestore extends DBBackup
|
||||
@chmod($sConfigFile, 0440); // Read-only
|
||||
|
||||
$aExtraFiles = $this->ListExtraFiles($sDataDir);
|
||||
foreach($aExtraFiles as $sSourceFilePath => $sDestinationFilePath) {
|
||||
foreach ($aExtraFiles as $sSourceFilePath => $sDestinationFilePath) {
|
||||
SetupUtils::builddir(dirname($sDestinationFilePath));
|
||||
rename($sSourceFilePath, $sDestinationFilePath);
|
||||
}
|
||||
@@ -191,9 +181,7 @@ class DBRestore extends DBBackup
|
||||
$this->LogInfo("Keep maintenance mode after restore");
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
} finally {
|
||||
IssueLog::Info('Backup Restore - LOCK released.');
|
||||
$oRestoreMutex->Unlock();
|
||||
}
|
||||
@@ -209,10 +197,9 @@ class DBRestore extends DBBackup
|
||||
{
|
||||
$aExtraFiles = [];
|
||||
$aStandardFiles = ['config-itop.php', 'itop-dump.sql', 'production-modules', 'delta.xml'];
|
||||
$oDirectoryIterator = new RecursiveDirectoryIterator($sDataDir, FilesystemIterator::CURRENT_AS_FILEINFO|FilesystemIterator::SKIP_DOTS);
|
||||
$oDirectoryIterator = new RecursiveDirectoryIterator($sDataDir, FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::SKIP_DOTS);
|
||||
$oIterator = new RecursiveIteratorIterator($oDirectoryIterator);
|
||||
foreach ($oIterator as $oFileInfo)
|
||||
{
|
||||
foreach ($oIterator as $oFileInfo) {
|
||||
if (in_array($oFileInfo->getFilename(), $aStandardFiles)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
// Copyright (C) 2014-2024 Combodo SAS
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
@@ -14,30 +15,24 @@
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
require_once(APPROOT.'setup/setuputils.class.inc.php');
|
||||
require_once(APPROOT.'setup/backup.class.inc.php');
|
||||
require_once(APPROOT.'core/mutex.class.inc.php');
|
||||
|
||||
|
||||
define('BACKUP_DEFAULT_FORMAT', '__DB__-%Y-%m-%d_%H_%M');
|
||||
|
||||
class BackupHandler extends ModuleHandlerAPI
|
||||
{
|
||||
public static function OnMetaModelStarted()
|
||||
{
|
||||
try
|
||||
{
|
||||
try {
|
||||
$oRestoreMutex = new iTopMutex('restore.'.utils::GetCurrentEnvironment());
|
||||
if ($oRestoreMutex->IsLocked())
|
||||
{
|
||||
if ($oRestoreMutex->IsLocked()) {
|
||||
IssueLog::Info(__class__.'::'.__function__.' A user is trying to use iTop while a restore is running. The requested page is in read-only mode.');
|
||||
MetaModel::GetConfig()->Set('access_mode', ACCESS_READONLY, 'itop-backup');
|
||||
MetaModel::GetConfig()->Set('access_message', ' - '.dict::S('bkp-restore-running'), 'itop-backup');
|
||||
}
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
} catch (Exception $e) {
|
||||
IssueLog::Error(__class__.'::'.__function__.' Failed to check if a backup/restore is running: '.$e->getMessage());
|
||||
}
|
||||
}
|
||||
@@ -65,22 +60,20 @@ class DBBackupScheduled extends DBBackup
|
||||
*/
|
||||
public function ListFiles($sBackupDir)
|
||||
{
|
||||
$aFiles = array();
|
||||
$aTimes = array();
|
||||
$aFiles = [];
|
||||
$aTimes = [];
|
||||
// Legacy format -limited to 4 Gb
|
||||
foreach(glob($sBackupDir.'*.zip') as $sFilePath)
|
||||
{
|
||||
foreach (glob($sBackupDir.'*.zip') as $sFilePath) {
|
||||
$aFiles[] = $sFilePath;
|
||||
$aTimes[] = filemtime($sFilePath); // unix time
|
||||
}
|
||||
// Modern format
|
||||
foreach(glob($sBackupDir.'*.tar.gz') as $sFilePath)
|
||||
{
|
||||
foreach (glob($sBackupDir.'*.tar.gz') as $sFilePath) {
|
||||
$aFiles[] = $sFilePath;
|
||||
$aTimes[] = filemtime($sFilePath); // unix time
|
||||
}
|
||||
array_multisort($aTimes, $aFiles);
|
||||
|
||||
|
||||
return $aFiles;
|
||||
}
|
||||
}
|
||||
@@ -107,20 +100,14 @@ class BackupExec extends AbstractWeeklyScheduledProcess
|
||||
*/
|
||||
public function __construct($sBackupDir = null, $iRetentionCount = null)
|
||||
{
|
||||
if (is_null($sBackupDir))
|
||||
{
|
||||
if (is_null($sBackupDir)) {
|
||||
$this->sBackupDir = utils::GetDataPath().'backups/auto/';
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$this->sBackupDir = $sBackupDir;
|
||||
}
|
||||
if (is_null($iRetentionCount))
|
||||
{
|
||||
if (is_null($iRetentionCount)) {
|
||||
$this->iRetentionCount = MetaModel::GetConfig()->GetModuleSetting($this->GetModuleName(), 'retention_count', 5);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$this->iRetentionCount = $iRetentionCount;
|
||||
}
|
||||
}
|
||||
@@ -135,53 +122,43 @@ class BackupExec extends AbstractWeeklyScheduledProcess
|
||||
$oMutex = new iTopMutex('backup.'.utils::GetCurrentEnvironment());
|
||||
$oMutex->Lock();
|
||||
|
||||
try
|
||||
{
|
||||
try {
|
||||
// Make sure the target directory exists
|
||||
SetupUtils::builddir($this->sBackupDir);
|
||||
|
||||
|
||||
$oBackup = new DBBackupScheduled();
|
||||
|
||||
// Eliminate files exceeding the retention setting
|
||||
//
|
||||
if ($this->iRetentionCount > 0)
|
||||
{
|
||||
if ($this->iRetentionCount > 0) {
|
||||
$aFiles = $oBackup->ListFiles($this->sBackupDir);
|
||||
while (count($aFiles) >= $this->iRetentionCount)
|
||||
{
|
||||
while (count($aFiles) >= $this->iRetentionCount) {
|
||||
$sFileToDelete = array_shift($aFiles);
|
||||
unlink($sFileToDelete);
|
||||
if (file_exists($sFileToDelete))
|
||||
{
|
||||
if (file_exists($sFileToDelete)) {
|
||||
// Ok, do not loop indefinitely on this
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Do execute the backup
|
||||
//
|
||||
$oBackup->SetMySQLBinDir(MetaModel::GetConfig()->GetModuleSetting($this->GetModuleName(), 'mysql_bindir', ''));
|
||||
|
||||
$sBackupFileFormat = MetaModel::GetConfig()->GetModuleSetting($this->GetModuleName(), 'file_name_format', '__DB__-%Y-%m-%d_%H_%M');
|
||||
$sName = $oBackup->MakeName($sBackupFileFormat);
|
||||
if ($sName == '')
|
||||
{
|
||||
if ($sName == '') {
|
||||
$sName = $oBackup->MakeName(BACKUP_DEFAULT_FORMAT);
|
||||
}
|
||||
$sBackupFile = $this->sBackupDir.$sName;
|
||||
$sSourceConfigFile = APPCONF.utils::GetCurrentEnvironment().'/'.ITOP_CONFIG_FILE;
|
||||
try
|
||||
{
|
||||
try {
|
||||
$oBackup->CreateCompressedBackup($sBackupFile, $sSourceConfigFile);
|
||||
}
|
||||
catch (BackupException $e)
|
||||
{
|
||||
} catch (BackupException $e) {
|
||||
throw new ProcessFatalException($e->getMessage());
|
||||
}
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
} catch (Exception $e) {
|
||||
$oMutex->Unlock();
|
||||
throw $e;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<?php
|
||||
|
||||
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'itop-backup/3.3.0',
|
||||
array(
|
||||
[
|
||||
// Identification
|
||||
//
|
||||
'label' => 'Backup utilities',
|
||||
@@ -12,31 +11,31 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Setup
|
||||
//
|
||||
'dependencies' => array(
|
||||
),
|
||||
'dependencies' => [
|
||||
],
|
||||
'mandatory' => true,
|
||||
'visible' => false,
|
||||
|
||||
// Components
|
||||
//
|
||||
'datamodel' => array(
|
||||
'datamodel' => [
|
||||
'main.itop-backup.php',
|
||||
),
|
||||
'webservice' => array(
|
||||
],
|
||||
'webservice' => [
|
||||
//'webservices.itop-backup.php',
|
||||
),
|
||||
'dictionary' => array(
|
||||
],
|
||||
'dictionary' => [
|
||||
'en.dict.itop-backup.php',
|
||||
'fr.dict.itop-backup.php',
|
||||
//'de.dict.itop-backup.php',
|
||||
),
|
||||
'data.struct' => array(
|
||||
],
|
||||
'data.struct' => [
|
||||
//'data.struct.itop-backup.xml',
|
||||
),
|
||||
'data.sample' => array(
|
||||
],
|
||||
'data.sample' => [
|
||||
//'data.sample.itop-backup.xml',
|
||||
),
|
||||
|
||||
],
|
||||
|
||||
// Documentation
|
||||
//
|
||||
'doc.manual_setup' => '',
|
||||
@@ -44,14 +43,14 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Default settings
|
||||
//
|
||||
'settings' => array(
|
||||
'settings' => [
|
||||
'mysql_bindir' => '',
|
||||
'week_days' => 'monday, tuesday, wednesday, thursday, friday',
|
||||
'time' => '23:30',
|
||||
//'file_name_format' => '__DB__-%Y-%m-%d_%H_%M',
|
||||
'retention_count' => 5,
|
||||
'retention_count' => 5,
|
||||
'enabled' => true,
|
||||
'itop_backup_incident' => '',
|
||||
),
|
||||
)
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
//
|
||||
// iTop module definition file
|
||||
//
|
||||
@@ -6,7 +7,7 @@
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'itop-bridge-cmdb-services/3.3.0',
|
||||
array(
|
||||
[
|
||||
// Identification
|
||||
//
|
||||
'label' => 'Bridge for CMDB and Services',
|
||||
@@ -14,40 +15,37 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Setup
|
||||
//
|
||||
'dependencies' => array(
|
||||
'dependencies' => [
|
||||
'itop-config-mgmt/2.7.1',
|
||||
'itop-service-mgmt/2.7.1 || itop-service-mgmt-provider/2.7.1',
|
||||
),
|
||||
],
|
||||
'mandatory' => false,
|
||||
'visible' => false,
|
||||
'auto_select' => 'SetupInfo::ModuleIsSelected("itop-config-mgmt") && (SetupInfo::ModuleIsSelected("itop-service-mgmt") || SetupInfo::ModuleIsSelected("itop-service-mgmt-provider")) ',
|
||||
|
||||
// Components
|
||||
//
|
||||
'datamodel' => array(
|
||||
),
|
||||
'webservice' => array(
|
||||
|
||||
),
|
||||
'data.struct' => array(
|
||||
'datamodel' => [
|
||||
],
|
||||
'webservice' => [
|
||||
|
||||
],
|
||||
'data.struct' => [
|
||||
// add your 'structure' definition XML files here,
|
||||
),
|
||||
'data.sample' => array(
|
||||
],
|
||||
'data.sample' => [
|
||||
// add your sample data XML files here,
|
||||
),
|
||||
|
||||
],
|
||||
|
||||
// Documentation
|
||||
//
|
||||
'doc.manual_setup' => '', // hyperlink to manual setup documentation, if any
|
||||
'doc.more_information' => '', // hyperlink to more information, if any
|
||||
'doc.more_information' => '', // hyperlink to more information, if any
|
||||
|
||||
// Default settings
|
||||
//
|
||||
'settings' => array(
|
||||
'settings' => [
|
||||
// Module specific settings go here, if any
|
||||
),
|
||||
)
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* @author Benjamin Planque <benjamin.planque@combodo.com>
|
||||
*
|
||||
*/
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', [
|
||||
'Class:lnkFunctionalCIToTicket' => 'Relação entre IC / Solicitação',
|
||||
'Class:lnkFunctionalCIToTicket+' => '',
|
||||
'Class:lnkFunctionalCIToTicket/Name' => '%1$s / %2$s~~',
|
||||
@@ -30,12 +31,12 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
'Class:lnkFunctionalCIToTicket/Attribute:impact_code/Value:manual' => 'Adicionado manualmente',
|
||||
'Class:lnkFunctionalCIToTicket/Attribute:impact_code/Value:computed' => 'Computado',
|
||||
'Class:lnkFunctionalCIToTicket/Attribute:impact_code/Value:not_impacted' => 'Não impactado',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: FunctionalCI
|
||||
//
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', [
|
||||
'Class:FunctionalCI/Attribute:tickets_list' => 'Solicitações',
|
||||
'Class:FunctionalCI/Attribute:tickets_list+' => 'Todas as Solicitações associadas à este Item de Configuração (IC)',
|
||||
));
|
||||
]);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
//
|
||||
// iTop module definition file
|
||||
//
|
||||
@@ -6,7 +7,7 @@
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'itop-bridge-cmdb-ticket/3.3.0',
|
||||
array(
|
||||
[
|
||||
// Identification
|
||||
//
|
||||
'label' => 'Bridge for CMDB and Ticket',
|
||||
@@ -14,40 +15,37 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Setup
|
||||
//
|
||||
'dependencies' => array(
|
||||
'dependencies' => [
|
||||
'itop-config-mgmt/2.7.1',
|
||||
'itop-tickets/2.7.0',
|
||||
),
|
||||
],
|
||||
'mandatory' => false,
|
||||
'visible' => false,
|
||||
'auto_select' => 'SetupInfo::ModuleIsSelected("itop-config-mgmt") && SetupInfo::ModuleIsSelected("itop-tickets") ',
|
||||
|
||||
// Components
|
||||
//
|
||||
'datamodel' => array(
|
||||
),
|
||||
'webservice' => array(
|
||||
|
||||
),
|
||||
'data.struct' => array(
|
||||
'datamodel' => [
|
||||
],
|
||||
'webservice' => [
|
||||
|
||||
],
|
||||
'data.struct' => [
|
||||
// add your 'structure' definition XML files here,
|
||||
),
|
||||
'data.sample' => array(
|
||||
],
|
||||
'data.sample' => [
|
||||
// add your sample data XML files here,
|
||||
),
|
||||
|
||||
],
|
||||
|
||||
// Documentation
|
||||
//
|
||||
'doc.manual_setup' => '', // hyperlink to manual setup documentation, if any
|
||||
'doc.more_information' => '', // hyperlink to more information, if any
|
||||
'doc.more_information' => '', // hyperlink to more information, if any
|
||||
|
||||
// Default settings
|
||||
//
|
||||
'settings' => array(
|
||||
'settings' => [
|
||||
// Module specific settings go here, if any
|
||||
),
|
||||
)
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
//
|
||||
// iTop module definition file
|
||||
//
|
||||
@@ -6,7 +7,7 @@
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'itop-bridge-datacenter-mgmt-services/3.3.0',
|
||||
array(
|
||||
[
|
||||
// Identification
|
||||
//
|
||||
'label' => 'Bridge for CMDB Virtualization objects and Services',
|
||||
@@ -14,28 +15,28 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Setup
|
||||
//
|
||||
'dependencies' => array(
|
||||
'dependencies' => [
|
||||
'itop-config-mgmt/2.7.1',
|
||||
'itop-service-mgmt/2.7.1 || itop-service-mgmt-provider/2.7.1',
|
||||
'itop-datacenter-mgmt/3.1.0',
|
||||
),
|
||||
],
|
||||
'mandatory' => false,
|
||||
'visible' => false,
|
||||
'auto_select' => 'SetupInfo::ModuleIsSelected("itop-datacenter-mgmt") && (SetupInfo::ModuleIsSelected("itop-service-mgmt") || SetupInfo::ModuleIsSelected("itop-service-mgmt-provider")) ',
|
||||
|
||||
// Components
|
||||
//
|
||||
'datamodel' => array(
|
||||
),
|
||||
'webservice' => array(
|
||||
'datamodel' => [
|
||||
],
|
||||
'webservice' => [
|
||||
|
||||
),
|
||||
'data.struct' => array(
|
||||
],
|
||||
'data.struct' => [
|
||||
// add your 'structure' definition XML files here,
|
||||
),
|
||||
'data.sample' => array(
|
||||
],
|
||||
'data.sample' => [
|
||||
// add your sample data XML files here,
|
||||
),
|
||||
],
|
||||
|
||||
// Documentation
|
||||
//
|
||||
@@ -44,11 +45,8 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Default settings
|
||||
//
|
||||
'settings' => array(
|
||||
'settings' => [
|
||||
// Module specific settings go here, if any
|
||||
),
|
||||
)
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
//
|
||||
// iTop module definition file
|
||||
//
|
||||
@@ -6,7 +7,7 @@
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'itop-bridge-endusers-devices-services/3.3.0',
|
||||
array(
|
||||
[
|
||||
// Identification
|
||||
//
|
||||
'label' => 'Bridge for CMDB endusers objects and Services',
|
||||
@@ -14,29 +15,29 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Setup
|
||||
//
|
||||
'dependencies' => array(
|
||||
'dependencies' => [
|
||||
'itop-config-mgmt/2.7.1',
|
||||
'itop-service-mgmt/2.7.1 || itop-service-mgmt-provider/2.7.1',
|
||||
'itop-endusers-devices/3.1.0',
|
||||
|
||||
),
|
||||
],
|
||||
'mandatory' => false,
|
||||
'visible' => false,
|
||||
'auto_select' => 'SetupInfo::ModuleIsSelected("itop-endusers-devices") && (SetupInfo::ModuleIsSelected("itop-service-mgmt") || SetupInfo::ModuleIsSelected("itop-service-mgmt-provider")) ',
|
||||
|
||||
// Components
|
||||
//
|
||||
'datamodel' => array(
|
||||
),
|
||||
'webservice' => array(
|
||||
'datamodel' => [
|
||||
],
|
||||
'webservice' => [
|
||||
|
||||
),
|
||||
'data.struct' => array(
|
||||
],
|
||||
'data.struct' => [
|
||||
// add your 'structure' definition XML files here,
|
||||
),
|
||||
'data.sample' => array(
|
||||
],
|
||||
'data.sample' => [
|
||||
// add your sample data XML files here,
|
||||
),
|
||||
],
|
||||
|
||||
// Documentation
|
||||
//
|
||||
@@ -45,11 +46,8 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Default settings
|
||||
//
|
||||
'settings' => array(
|
||||
'settings' => [
|
||||
// Module specific settings go here, if any
|
||||
),
|
||||
)
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
//
|
||||
// iTop module definition file
|
||||
//
|
||||
@@ -6,7 +7,7 @@
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'itop-bridge-storage-mgmt-services/3.3.0',
|
||||
array(
|
||||
[
|
||||
// Identification
|
||||
//
|
||||
'label' => 'Bridge for CMDB Virtualization objects and Services',
|
||||
@@ -14,28 +15,28 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Setup
|
||||
//
|
||||
'dependencies' => array(
|
||||
'dependencies' => [
|
||||
'itop-config-mgmt/2.7.1',
|
||||
'itop-service-mgmt/2.7.1 || itop-service-mgmt-provider/2.7.1',
|
||||
'itop-storage-mgmt/3.1.0',
|
||||
),
|
||||
],
|
||||
'mandatory' => false,
|
||||
'visible' => false,
|
||||
'auto_select' => 'SetupInfo::ModuleIsSelected("itop-storage-mgmt") && (SetupInfo::ModuleIsSelected("itop-service-mgmt") || SetupInfo::ModuleIsSelected("itop-service-mgmt-provider")) ',
|
||||
|
||||
// Components
|
||||
//
|
||||
'datamodel' => array(
|
||||
),
|
||||
'webservice' => array(
|
||||
'datamodel' => [
|
||||
],
|
||||
'webservice' => [
|
||||
|
||||
),
|
||||
'data.struct' => array(
|
||||
],
|
||||
'data.struct' => [
|
||||
// add your 'structure' definition XML files here,
|
||||
),
|
||||
'data.sample' => array(
|
||||
],
|
||||
'data.sample' => [
|
||||
// add your sample data XML files here,
|
||||
),
|
||||
],
|
||||
|
||||
// Documentation
|
||||
//
|
||||
@@ -44,11 +45,8 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Default settings
|
||||
//
|
||||
'settings' => array(
|
||||
'settings' => [
|
||||
// Module specific settings go here, if any
|
||||
),
|
||||
)
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
//
|
||||
// iTop module definition file
|
||||
//
|
||||
@@ -6,7 +7,7 @@
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'itop-bridge-virtualization-mgmt-services/3.3.0',
|
||||
array(
|
||||
[
|
||||
// Identification
|
||||
//
|
||||
'label' => 'Bridge for CMDB Virtualization objects and Services',
|
||||
@@ -14,28 +15,28 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Setup
|
||||
//
|
||||
'dependencies' => array(
|
||||
'dependencies' => [
|
||||
'itop-config-mgmt/2.7.1',
|
||||
'itop-service-mgmt/2.7.1 || itop-service-mgmt-provider/2.7.1',
|
||||
'itop-virtualization-mgmt/3.1.0',
|
||||
),
|
||||
],
|
||||
'mandatory' => false,
|
||||
'visible' => false,
|
||||
'auto_select' => 'SetupInfo::ModuleIsSelected("itop-virtualization-mgmt") && (SetupInfo::ModuleIsSelected("itop-service-mgmt") || SetupInfo::ModuleIsSelected("itop-service-mgmt-provider")) ',
|
||||
|
||||
// Components
|
||||
//
|
||||
'datamodel' => array(
|
||||
),
|
||||
'webservice' => array(
|
||||
'datamodel' => [
|
||||
],
|
||||
'webservice' => [
|
||||
|
||||
),
|
||||
'data.struct' => array(
|
||||
],
|
||||
'data.struct' => [
|
||||
// add your 'structure' definition XML files here,
|
||||
),
|
||||
'data.sample' => array(
|
||||
],
|
||||
'data.sample' => [
|
||||
// add your sample data XML files here,
|
||||
),
|
||||
],
|
||||
|
||||
// Documentation
|
||||
//
|
||||
@@ -44,11 +45,8 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Default settings
|
||||
//
|
||||
'settings' => array(
|
||||
'settings' => [
|
||||
// Module specific settings go here, if any
|
||||
),
|
||||
)
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<?php
|
||||
|
||||
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'itop-bridge-virtualization-storage/3.3.0',
|
||||
array(
|
||||
[
|
||||
// Identification
|
||||
//
|
||||
'label' => 'Links between virtualization and storage',
|
||||
@@ -12,25 +11,25 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Setup
|
||||
//
|
||||
'dependencies' => array(
|
||||
'dependencies' => [
|
||||
'itop-storage-mgmt/2.2.0',
|
||||
'itop-virtualization-mgmt/2.2.0',
|
||||
),
|
||||
],
|
||||
'mandatory' => false,
|
||||
'visible' => false,
|
||||
'auto_select' => 'SetupInfo::ModuleIsSelected("itop-storage-mgmt") && SetupInfo::ModuleIsSelected("itop-virtualization-mgmt")',
|
||||
|
||||
// Components
|
||||
//
|
||||
'datamodel' => array(
|
||||
),
|
||||
'data.struct' => array(
|
||||
'datamodel' => [
|
||||
],
|
||||
'data.struct' => [
|
||||
//'data.struct.itop-change-mgmt.xml',
|
||||
),
|
||||
'data.sample' => array(
|
||||
],
|
||||
'data.sample' => [
|
||||
//'data.sample.itop-change-mgmt.xml',
|
||||
),
|
||||
|
||||
],
|
||||
|
||||
// Documentation
|
||||
//
|
||||
'doc.manual_setup' => '',
|
||||
@@ -38,7 +37,7 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Default settings
|
||||
//
|
||||
'settings' => array(
|
||||
),
|
||||
)
|
||||
'settings' => [
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<?php
|
||||
|
||||
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'itop-change-mgmt-itil/3.3.0',
|
||||
array(
|
||||
[
|
||||
// Identification
|
||||
//
|
||||
'label' => 'Change Management ITIL',
|
||||
@@ -12,24 +11,24 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Setup
|
||||
//
|
||||
'dependencies' => array(
|
||||
'dependencies' => [
|
||||
'itop-config-mgmt/2.2.0',
|
||||
'itop-tickets/2.0.0',
|
||||
),
|
||||
],
|
||||
'mandatory' => false,
|
||||
'visible' => true,
|
||||
|
||||
// Components
|
||||
//
|
||||
'datamodel' => array(
|
||||
),
|
||||
'data.struct' => array(
|
||||
'datamodel' => [
|
||||
],
|
||||
'data.struct' => [
|
||||
//'data.struct.itop-change-mgmt.xml',
|
||||
),
|
||||
'data.sample' => array(
|
||||
],
|
||||
'data.sample' => [
|
||||
//'data.sample.itop-change-mgmt.xml',
|
||||
),
|
||||
|
||||
],
|
||||
|
||||
// Documentation
|
||||
//
|
||||
'doc.manual_setup' => '',
|
||||
@@ -37,7 +36,7 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Default settings
|
||||
//
|
||||
'settings' => array(
|
||||
),
|
||||
)
|
||||
'settings' => [
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<?php
|
||||
|
||||
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'itop-change-mgmt/3.3.0',
|
||||
array(
|
||||
[
|
||||
// Identification
|
||||
//
|
||||
'label' => 'Change Management',
|
||||
@@ -12,25 +11,25 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Setup
|
||||
//
|
||||
'dependencies' => array(
|
||||
'dependencies' => [
|
||||
'itop-config-mgmt/2.2.0',
|
||||
'itop-tickets/2.0.0',
|
||||
),
|
||||
],
|
||||
'mandatory' => false,
|
||||
'visible' => true,
|
||||
'installer' => 'ChangeManagementInstaller',
|
||||
|
||||
// Components
|
||||
//
|
||||
'datamodel' => array(
|
||||
),
|
||||
'data.struct' => array(
|
||||
'datamodel' => [
|
||||
],
|
||||
'data.struct' => [
|
||||
//'data.struct.itop-change-mgmt.xml',
|
||||
),
|
||||
'data.sample' => array(
|
||||
],
|
||||
'data.sample' => [
|
||||
//'data.sample.itop-change-mgmt.xml',
|
||||
),
|
||||
|
||||
],
|
||||
|
||||
// Documentation
|
||||
//
|
||||
'doc.manual_setup' => '',
|
||||
@@ -38,9 +37,9 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Default settings
|
||||
//
|
||||
'settings' => array(
|
||||
),
|
||||
)
|
||||
'settings' => [
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
// Module installation handler
|
||||
@@ -63,7 +62,7 @@ class ChangeManagementInstaller extends ModuleInstallerAPI
|
||||
{
|
||||
// If you want to migrate data from one format to another, do it here
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Handler called after the creation/update of the database schema
|
||||
* @param $oConfiguration Config The new configuration of the application
|
||||
@@ -82,8 +81,7 @@ class ChangeManagementInstaller extends ModuleInstallerAPI
|
||||
|
||||
$sField = 'start_date';
|
||||
|
||||
if (CMDBSource::IsField($sSourceTable, $sField) && CMDBSource::IsField($sTargetTable, $sField) && CMDBSource::IsField($sSourceTable, $sSourceKeyField) && CMDBSource::IsField($sTargetTable, $sTargetKeyField))
|
||||
{
|
||||
if (CMDBSource::IsField($sSourceTable, $sField) && CMDBSource::IsField($sTargetTable, $sField) && CMDBSource::IsField($sSourceTable, $sSourceKeyField) && CMDBSource::IsField($sTargetTable, $sTargetKeyField)) {
|
||||
SetupLog::Info("Issue #464 - Copying change/start_date into ticket/start_date");
|
||||
$sRepair = "UPDATE `$sTargetTable`, `$sSourceTable` SET `$sTargetTable`.`$sField` = `$sSourceTable`.`$sField` WHERE `$sTargetTable`.`$sField` IS NULL AND`$sTargetTable`.`$sTargetKeyField` = `$sSourceTable`.`$sSourceKeyField`";
|
||||
CMDBSource::Query($sRepair);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,10 +1,9 @@
|
||||
<?php
|
||||
|
||||
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'itop-config-mgmt/3.3.0',
|
||||
array(
|
||||
[
|
||||
// Identification
|
||||
//
|
||||
'label' => 'Configuration Management (CMDB)',
|
||||
@@ -12,25 +11,25 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Setup
|
||||
//
|
||||
'dependencies' => array(
|
||||
'dependencies' => [
|
||||
'itop-structure/2.7.1',
|
||||
),
|
||||
],
|
||||
'mandatory' => false,
|
||||
'visible' => true,
|
||||
'installer' => 'ConfigMgmtInstaller',
|
||||
|
||||
// Components
|
||||
//
|
||||
'datamodel' => array(
|
||||
'datamodel' => [
|
||||
'model.itop-config-mgmt.php',
|
||||
'main.itop-config-mgmt.php',
|
||||
),
|
||||
'data.struct' => array(
|
||||
],
|
||||
'data.struct' => [
|
||||
'data/en_us.data.itop-brand.xml',
|
||||
'data/en_us.data.itop-osfamily.xml',
|
||||
'data/en_us.data.itop-osversion.xml',
|
||||
),
|
||||
'data.sample' => array(
|
||||
],
|
||||
'data.sample' => [
|
||||
'data.sample.model.xml',
|
||||
'data.sample.networkdevicetype.xml',
|
||||
'data.sample.servers.xml',
|
||||
@@ -42,8 +41,8 @@ SetupWebPage::AddModule(
|
||||
'data.sample.webapp.xml',
|
||||
'data.sample.applications.xml',
|
||||
'data.sample.applicationsolutionci.xml',
|
||||
),
|
||||
|
||||
],
|
||||
|
||||
// Documentation
|
||||
//
|
||||
'doc.manual_setup' => '',
|
||||
@@ -51,13 +50,12 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Default settings
|
||||
//
|
||||
'settings' => array(
|
||||
),
|
||||
)
|
||||
'settings' => [
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
if (!class_exists('ConfigMgmtInstaller'))
|
||||
{
|
||||
if (!class_exists('ConfigMgmtInstaller')) {
|
||||
// Module installation handler
|
||||
//
|
||||
class ConfigMgmtInstaller extends ModuleInstallerAPI
|
||||
@@ -76,8 +74,7 @@ if (!class_exists('ConfigMgmtInstaller'))
|
||||
*/
|
||||
public static function BeforeDatabaseCreation(Config $oConfiguration, $sPreviousVersion, $sCurrentVersion)
|
||||
{
|
||||
if (strlen($sPreviousVersion) > 0)
|
||||
{
|
||||
if (strlen($sPreviousVersion) > 0) {
|
||||
// If you want to migrate data from one format to another, do it here
|
||||
self::RenameEnumValueInDB('Software', 'type', 'DBserver', 'DBServer');
|
||||
self::RenameEnumValueInDB('Software', 'type', 'Webserver', 'WebServer');
|
||||
@@ -95,7 +92,7 @@ if (!class_exists('ConfigMgmtInstaller'))
|
||||
self::RenameClassInDB('IPinterface', 'IPInterface');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Handler called after the creation/update of the database schema
|
||||
* @param $oConfiguration Config The new configuration of the application
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
@@ -16,8 +17,6 @@ require_once(APPROOT.'application/startup.inc.php');
|
||||
LoginWebPage::DoLogin(); // Check user rights and prompt if needed
|
||||
ApplicationMenu::CheckMenuIdEnabled('ConfigEditor');
|
||||
|
||||
|
||||
$oConfigEditorController = new ConfigEditorController();
|
||||
$oConfigEditorController->SetDefaultOperation('Edit');
|
||||
$oConfigEditorController->HandleOperation();
|
||||
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', [
|
||||
'itop-config/Operation:Edit/Title' => 'Modifica file di configurazione',
|
||||
'config-edit-intro' => 'Prestare molta attenzione durante la modifica del file di configurazione.',
|
||||
'Menu:ConfigEditor' => 'Configurazione',
|
||||
@@ -27,4 +28,4 @@ Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
'config-error-file-changed' => 'Errore: il file di configurazione è stato modificato da quando lo hai aperto e non può essere salvato. Aggiorna e applica nuovamente le tue modifiche.',
|
||||
'config-not-allowed-in-demo' => 'Spiacente, '.ITOP_APPLICATION_SHORT.' è in <b>modalità dimostrativa</b>: il file di configurazione non può essere modificato.',
|
||||
'config-interactive-not-allowed' => 'La modifica interattiva della configurazione di '.ITOP_APPLICATION_SHORT.' è stata disabilitata. Vedere <code>\'config_editor\' => \'disabled\'</code> nel file di configurazione.',
|
||||
));
|
||||
]);
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', [
|
||||
'Menu:ConfigFileEditor' => 'Configurações',
|
||||
'itop-config/Operation:Edit/Title' => 'Editor do arquivo de configuração',
|
||||
'config-edit-intro' => 'Tenha cuidado ao editar o arquivo de configuração',
|
||||
@@ -28,4 +29,4 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
'config-error-file-changed' => 'Error: The Configuration file has changed since you opened it and cannot be saved. Refresh and apply your changes again.~~',
|
||||
'config-not-allowed-in-demo' => 'Sorry, '.ITOP_APPLICATION_SHORT.' is in <b>demonstration mode</b>: the configuration file cannot be edited.~~',
|
||||
'config-interactive-not-allowed' => ITOP_APPLICATION_SHORT.' interactive edition of the configuration as been disabled. See <code>\'config_editor\' => \'disabled\'</code> in the configuration file.~~',
|
||||
));
|
||||
]);
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<?php
|
||||
|
||||
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'itop-config/3.3.0',
|
||||
array(
|
||||
[
|
||||
// Identification
|
||||
//
|
||||
'label' => 'Configuration editor',
|
||||
@@ -12,27 +11,27 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Setup
|
||||
//
|
||||
'dependencies' => array(),
|
||||
'dependencies' => [],
|
||||
'mandatory' => true,
|
||||
'visible' => false,
|
||||
|
||||
// Components
|
||||
//
|
||||
'datamodel' => array(
|
||||
'datamodel' => [
|
||||
'src/Validator/ConfigNodesVisitor.php',
|
||||
'src/Validator/iTopConfigAstValidator.php',
|
||||
'src/Validator/iTopConfigSyntaxValidator.php',
|
||||
'src/Validator/iTopConfigValidator.php',
|
||||
'src/Controller/ConfigEditorController.php',
|
||||
),
|
||||
'webservice' => array(),
|
||||
'dictionary' => array(
|
||||
],
|
||||
'webservice' => [],
|
||||
'dictionary' => [
|
||||
'en.dict.itop-config.php',
|
||||
'fr.dict.itop-config.php',
|
||||
),
|
||||
'data.struct' => array(),
|
||||
'data.sample' => array(),
|
||||
|
||||
],
|
||||
'data.struct' => [],
|
||||
'data.sample' => [],
|
||||
|
||||
// Documentation
|
||||
//
|
||||
'doc.manual_setup' => '',
|
||||
@@ -40,6 +39,6 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Default settings
|
||||
//
|
||||
'settings' => array(),
|
||||
)
|
||||
'settings' => [],
|
||||
]
|
||||
);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* @copyright Copyright (C) 2010-2025 Combodo SAS
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
@@ -17,24 +18,25 @@ use utils;
|
||||
|
||||
class ConfigEditorController extends Controller
|
||||
{
|
||||
public const ROUTE_NAMESPACE = 'config_editor';
|
||||
public const MODULE_NAME = "itop-config";
|
||||
public const ROUTE_NAMESPACE = 'config_editor';
|
||||
public const MODULE_NAME = "itop-config";
|
||||
protected array $aWarnings = [];
|
||||
protected array $aInfo = [];
|
||||
protected array $aErrors = [];
|
||||
protected array $aSuccesses = [];
|
||||
|
||||
public function __construct() {
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct(MODULESROOT.static::MODULE_NAME.'/templates', static::MODULE_NAME);
|
||||
}
|
||||
|
||||
public function OperationEdit() : void
|
||||
{
|
||||
public function OperationEdit(): void
|
||||
{
|
||||
$bShowEditor = true;
|
||||
$sConfigChecksum = '';
|
||||
$sCurrentConfig = '';
|
||||
|
||||
try {
|
||||
try {
|
||||
$sOperation = utils::ReadParam('edit_operation');
|
||||
if (MetaModel::GetConfig()->Get('demo_mode')) {
|
||||
throw new Exception(Dict::S('config-not-allowed-in-demo'), iTopConfigValidator::CONFIG_INFO);
|
||||
@@ -52,8 +54,7 @@ class ConfigEditorController extends Controller
|
||||
try {
|
||||
if ($sOperation == 'revert') {
|
||||
$this->AddAlert(Dict::S('config-reverted'), iTopConfigValidator::CONFIG_WARNING);
|
||||
}
|
||||
else if ($sOperation == 'save') {
|
||||
} elseif ($sOperation == 'save') {
|
||||
$sTransactionId = utils::ReadParam('transaction_id', '', false, 'transaction_id');
|
||||
if (!utils::IsTransactionValid($sTransactionId)) {
|
||||
throw new Exception(Dict::S('config-error-transaction'), iTopConfigValidator::CONFIG_ERROR);
|
||||
@@ -99,24 +100,21 @@ class ConfigEditorController extends Controller
|
||||
|
||||
$this->AddAlert($oValidator->CheckAsyncTasksRetryConfig($oTempConfig), iTopConfigValidator::CONFIG_WARNING);
|
||||
|
||||
|
||||
// Read the config from disk after save
|
||||
$sCurrentConfig = file_get_contents($sConfigFile);
|
||||
$sConfigChecksum = md5($sCurrentConfig);
|
||||
}
|
||||
}
|
||||
catch (Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
$this->AddAlertFromException($e);
|
||||
}
|
||||
|
||||
$this->AddAceScripts();
|
||||
}
|
||||
catch (Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
$bShowEditor = false;
|
||||
$this->AddAlertFromException($e);
|
||||
}
|
||||
|
||||
// display page
|
||||
// display page
|
||||
$this->DisplayPage([
|
||||
'aErrors' => $this->aErrors,
|
||||
'aWarnings' => $this->aWarnings,
|
||||
@@ -127,7 +125,7 @@ class ConfigEditorController extends Controller
|
||||
'sChecksum' => $sConfigChecksum,
|
||||
'sPrevConfig' => $sCurrentConfig,
|
||||
'sNewConfig' => $sCurrentConfig,
|
||||
]);
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -143,7 +141,6 @@ class ConfigEditorController extends Controller
|
||||
$this->AddLinkedScript(utils::GetAbsoluteUrlAppRoot().$sAceDir.'ext-searchbox.js');
|
||||
}
|
||||
|
||||
|
||||
public function AddAlertFromException(Exception $e): void
|
||||
{
|
||||
$this->AddAlert($e->getMessage(), $e->getCode());
|
||||
@@ -158,18 +155,18 @@ class ConfigEditorController extends Controller
|
||||
return;
|
||||
}
|
||||
switch ($iLevel) {
|
||||
case iTopConfigValidator::CONFIG_SUCCESS :
|
||||
case iTopConfigValidator::CONFIG_SUCCESS:
|
||||
$this->aSuccesses[] = $sMessage;
|
||||
break;
|
||||
case iTopConfigValidator::CONFIG_WARNING :
|
||||
case iTopConfigValidator::CONFIG_WARNING:
|
||||
$this->aWarnings[] = $sMessage;
|
||||
break;
|
||||
case iTopConfigValidator::CONFIG_INFO :
|
||||
case iTopConfigValidator::CONFIG_INFO:
|
||||
$this->aInfo[] = $sMessage;
|
||||
break;
|
||||
default :
|
||||
default:
|
||||
$this->aErrors[] = $sMessage;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Created by Bruno DA SILVA, working for Combodo
|
||||
* Date: 31/12/2019
|
||||
@@ -7,7 +8,6 @@
|
||||
|
||||
namespace Combodo\iTop\Config\Validator;
|
||||
|
||||
|
||||
use PhpParser\NodeTraverser;
|
||||
use PhpParser\ParserFactory;
|
||||
|
||||
@@ -23,17 +23,17 @@ class iTopConfigAstValidator
|
||||
*/
|
||||
public function Validate($sConfig)
|
||||
{
|
||||
$oParser = (new ParserFactory())->createForNewestSupportedVersion();
|
||||
$oParser = (new ParserFactory())->createForNewestSupportedVersion();
|
||||
|
||||
$oNodeVisitor = new ConfigNodesVisitor();
|
||||
|
||||
try {
|
||||
$aInitialNodes = $oParser->parse($sConfig);
|
||||
} catch (\Error $e) {
|
||||
$sMessage = 'Invalid configuration: '. \Dict::Format('config-parse-error', $e->getMessage(), $e->getLine());
|
||||
$sMessage = 'Invalid configuration: '.\Dict::Format('config-parse-error', $e->getMessage(), $e->getLine());
|
||||
throw new \Exception($sMessage, iTopConfigValidator::CONFIG_ERROR, $e);
|
||||
}catch (\Exception $e) {
|
||||
$sMessage = 'Invalid configuration: '. \Dict::Format('config-parse-error', $e->getMessage(), $e->getLine());
|
||||
} catch (\Exception $e) {
|
||||
$sMessage = 'Invalid configuration: '.\Dict::Format('config-parse-error', $e->getMessage(), $e->getLine());
|
||||
throw new \Exception($sMessage, iTopConfigValidator::CONFIG_ERROR, $e);
|
||||
}
|
||||
|
||||
@@ -41,4 +41,4 @@ class iTopConfigAstValidator
|
||||
$oTraverser->addVisitor($oNodeVisitor);
|
||||
$oTraverser->traverse($aInitialNodes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Created by Bruno DA SILVA, working for Combodo
|
||||
* Date: 31/12/2019
|
||||
@@ -9,7 +10,6 @@ namespace Combodo\iTop\Config\Validator;
|
||||
|
||||
class iTopConfigSyntaxValidator
|
||||
{
|
||||
|
||||
/**
|
||||
* @param $sRawConfig
|
||||
*
|
||||
@@ -22,15 +22,13 @@ class iTopConfigSyntaxValidator
|
||||
ob_start();
|
||||
// in PHP < 7.0.0 syntax errors are in output
|
||||
// in PHP >= 7.0.0 syntax errors are thrown as Error
|
||||
$sConfig = preg_replace(array('#^\s*<\?php#', '#\?>\s*$#'), '', $sRawConfig);
|
||||
$sConfig = preg_replace(['#^\s*<\?php#', '#\?>\s*$#'], '', $sRawConfig);
|
||||
eval('if(0){'.trim($sConfig).'}');
|
||||
$sNoise = trim(ob_get_contents());
|
||||
}
|
||||
catch (\Error $e) {
|
||||
} catch (\Error $e) {
|
||||
// ParseError only thrown in PHP7
|
||||
throw new \Exception('Error in configuration: '.$e->getMessage().' at line '.$e->getLine(), iTopConfigValidator::CONFIG_ERROR);
|
||||
}
|
||||
finally {
|
||||
} finally {
|
||||
ob_end_clean();
|
||||
}
|
||||
|
||||
@@ -40,11 +38,10 @@ class iTopConfigSyntaxValidator
|
||||
$sLine = $aMatches[3];
|
||||
$sMessage = \Dict::Format('config-parse-error', $sMessage, $sLine);
|
||||
throw new \Exception($sMessage, iTopConfigValidator::CONFIG_ERROR);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
// Note: sNoise is an html output, but so far it was ok for me (e.g. showing the entire call stack)
|
||||
throw new \Exception('Syntax error in configuration file: <tt>'.$sNoise.'</tt>', iTopConfigValidator::CONFIG_ERROR);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,18 +5,19 @@ namespace Combodo\iTop\Config\Validator;
|
||||
use AsyncTask;
|
||||
use ReflectionClass;
|
||||
|
||||
class iTopConfigValidator {
|
||||
const CONFIG_ERROR = 0;
|
||||
const CONFIG_WARNING = 1;
|
||||
const CONFIG_INFO = 2;
|
||||
const CONFIG_SUCCESS = 3;
|
||||
class iTopConfigValidator
|
||||
{
|
||||
public const CONFIG_ERROR = 0;
|
||||
public const CONFIG_WARNING = 1;
|
||||
public const CONFIG_INFO = 2;
|
||||
public const CONFIG_SUCCESS = 3;
|
||||
|
||||
/**
|
||||
* @param $sRawConfig
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function Validate($sRawConfig):void
|
||||
public function Validate($sRawConfig): void
|
||||
{
|
||||
$oiTopConfigValidator = new iTopConfigAstValidator();
|
||||
$oiTopConfigValidator->Validate($sRawConfig);
|
||||
@@ -26,7 +27,7 @@ class iTopConfigValidator {
|
||||
$oiTopConfigValidator->Validate($sRawConfig);
|
||||
}
|
||||
|
||||
function DBPasswordIsOk($sPassword):bool
|
||||
public function DBPasswordIsOk($sPassword): bool
|
||||
{
|
||||
$bIsWindows = (array_key_exists('WINDIR', $_SERVER) || array_key_exists('windir', $_SERVER));
|
||||
|
||||
@@ -37,7 +38,6 @@ class iTopConfigValidator {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public function CheckAsyncTasksRetryConfig(\Config $oTempConfig): array
|
||||
{
|
||||
$aWarnings = [];
|
||||
@@ -56,4 +56,4 @@ class iTopConfigValidator {
|
||||
return $aWarnings;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', [
|
||||
'iTopUpdate:UI:PageTitle' => 'Atualização do '.ITOP_APPLICATION_SHORT,
|
||||
'itop-core-update:UI:SelectUpdateFile' => 'Atualização do '.ITOP_APPLICATION_SHORT,
|
||||
'itop-core-update:UI:ConfirmUpdate' => 'Atualização do '.ITOP_APPLICATION_SHORT,
|
||||
@@ -95,7 +96,5 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
'Class:ModuleInstallation/Attribute:installed' => 'Instalado em',
|
||||
'Class:ModuleInstallation/Attribute:name' => 'Nome',
|
||||
'Class:ModuleInstallation/Attribute:version' => 'Versão',
|
||||
'Class:ModuleInstallation/Attribute:comment' => 'Comentário'
|
||||
));
|
||||
|
||||
|
||||
'Class:ModuleInstallation/Attribute:comment' => 'Comentário',
|
||||
]);
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<?php
|
||||
|
||||
// Copyright (C) 2010-2024 Combodo SAS
|
||||
//
|
||||
// This file is part of iTop.
|
||||
//
|
||||
// iTop is free software; you can redistribute it and/or modify
|
||||
// iTop is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
@@ -19,7 +20,7 @@
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'itop-datacenter-mgmt/3.3.0',
|
||||
array(
|
||||
[
|
||||
// Identification
|
||||
//
|
||||
'label' => 'Datacenter Management',
|
||||
@@ -27,36 +28,35 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Setup
|
||||
//
|
||||
'dependencies' => array(
|
||||
'itop-config-mgmt/2.2.0'
|
||||
),
|
||||
'dependencies' => [
|
||||
'itop-config-mgmt/2.2.0',
|
||||
],
|
||||
'mandatory' => false,
|
||||
'visible' => true,
|
||||
|
||||
// Components
|
||||
//
|
||||
'datamodel' => array(),
|
||||
'webservice' => array(
|
||||
|
||||
),
|
||||
'data.struct' => array(
|
||||
'datamodel' => [],
|
||||
'webservice' => [
|
||||
|
||||
],
|
||||
'data.struct' => [
|
||||
// add your 'structure' definition XML files here,
|
||||
),
|
||||
'data.sample' => array(
|
||||
],
|
||||
'data.sample' => [
|
||||
// add your sample data XML files here,
|
||||
'data.sample.racks.xml',
|
||||
),
|
||||
|
||||
],
|
||||
|
||||
// Documentation
|
||||
//
|
||||
'doc.manual_setup' => '', // hyperlink to manual setup documentation, if any
|
||||
'doc.more_information' => '', // hyperlink to more information, if any
|
||||
'doc.more_information' => '', // hyperlink to more information, if any
|
||||
|
||||
// Default settings
|
||||
//
|
||||
'settings' => array(
|
||||
'settings' => [
|
||||
// Module specific settings go here, if any
|
||||
),
|
||||
)
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
// Copyright (C) 2010-2024 Combodo SAS
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
@@ -26,7 +27,7 @@
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'itop-endusers-devices/3.3.0',
|
||||
array(
|
||||
[
|
||||
// Identification
|
||||
//
|
||||
'label' => 'End-user Devices Management',
|
||||
@@ -34,42 +35,41 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Setup
|
||||
//
|
||||
'dependencies' => array(
|
||||
'itop-config-mgmt/2.2.0'
|
||||
),
|
||||
'dependencies' => [
|
||||
'itop-config-mgmt/2.2.0',
|
||||
],
|
||||
'mandatory' => false,
|
||||
'visible' => true,
|
||||
'installer' => 'EndUserMgmtInstaller',
|
||||
|
||||
// Components
|
||||
//
|
||||
'datamodel' => array(
|
||||
),
|
||||
'webservice' => array(
|
||||
|
||||
),
|
||||
'data.struct' => array(
|
||||
'datamodel' => [
|
||||
],
|
||||
'webservice' => [
|
||||
|
||||
],
|
||||
'data.struct' => [
|
||||
// add your 'structure' definition XML files here,
|
||||
),
|
||||
'data.sample' => array(
|
||||
],
|
||||
'data.sample' => [
|
||||
// add your sample data XML files here,
|
||||
),
|
||||
|
||||
],
|
||||
|
||||
// Documentation
|
||||
//
|
||||
'doc.manual_setup' => '', // hyperlink to manual setup documentation, if any
|
||||
'doc.more_information' => '', // hyperlink to more information, if any
|
||||
'doc.more_information' => '', // hyperlink to more information, if any
|
||||
|
||||
// Default settings
|
||||
//
|
||||
'settings' => array(
|
||||
'settings' => [
|
||||
// Module specific settings go here, if any
|
||||
),
|
||||
)
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
if (!class_exists('EndUserMgmtInstaller'))
|
||||
{
|
||||
if (!class_exists('EndUserMgmtInstaller')) {
|
||||
// Module installation handler
|
||||
//
|
||||
class EndUserMgmtInstaller extends ModuleInstallerAPI
|
||||
@@ -88,13 +88,12 @@ if (!class_exists('EndUserMgmtInstaller'))
|
||||
*/
|
||||
public static function BeforeDatabaseCreation(Config $oConfiguration, $sPreviousVersion, $sCurrentVersion)
|
||||
{
|
||||
if (strlen($sPreviousVersion) > 0)
|
||||
{
|
||||
if (strlen($sPreviousVersion) > 0) {
|
||||
// If you want to migrate data from one format to another, do it here
|
||||
self::RenameClassInDB('IpPhone', 'IPPhone');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Handler called after the creation/update of the database schema
|
||||
* @param $oConfiguration Config The new configuration of the application
|
||||
@@ -106,4 +105,3 @@ if (!class_exists('EndUserMgmtInstaller'))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<?php
|
||||
|
||||
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'itop-faq-light/3.3.0',
|
||||
array(
|
||||
[
|
||||
// Identification
|
||||
//
|
||||
'label' => 'Frequently Asked Questions Database',
|
||||
@@ -12,24 +11,24 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Setup
|
||||
//
|
||||
'dependencies' => array(
|
||||
'dependencies' => [
|
||||
'itop-structure/3.0.0 || itop-portal/3.0.0',
|
||||
),
|
||||
],
|
||||
'mandatory' => false,
|
||||
'visible' => true,
|
||||
'installer' => 'FAQLightInstaller',
|
||||
|
||||
// Components
|
||||
//
|
||||
'datamodel' => array(
|
||||
),
|
||||
'data.struct' => array(
|
||||
'datamodel' => [
|
||||
],
|
||||
'data.struct' => [
|
||||
//'data.struct.itop-knownerror-mgmt.xml',
|
||||
),
|
||||
'data.sample' => array(
|
||||
],
|
||||
'data.sample' => [
|
||||
'data.sample.faq-domains.xml',
|
||||
),
|
||||
|
||||
],
|
||||
|
||||
// Documentation
|
||||
//
|
||||
'doc.manual_setup' => '', // No manual installation instructions
|
||||
@@ -37,13 +36,12 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Default settings
|
||||
//
|
||||
'settings' => array(
|
||||
),
|
||||
)
|
||||
'settings' => [
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
if (!class_exists('FAQLightInstaller'))
|
||||
{
|
||||
if (!class_exists('FAQLightInstaller')) {
|
||||
// Module installation handler
|
||||
//
|
||||
class FAQLightInstaller extends ModuleInstallerAPI
|
||||
@@ -62,13 +60,12 @@ if (!class_exists('FAQLightInstaller'))
|
||||
*/
|
||||
public static function BeforeDatabaseCreation(Config $oConfiguration, $sPreviousVersion, $sCurrentVersion)
|
||||
{
|
||||
if (strlen($sPreviousVersion) > 0)
|
||||
{
|
||||
if (strlen($sPreviousVersion) > 0) {
|
||||
// If you want to migrate data from one format to another, do it here
|
||||
self::RenameClassInDB('FAQcategory', 'FAQCategory');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Handler called after the creation/update of the database schema
|
||||
* @param $oConfiguration Config The new configuration of the application
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Copyright (C) 2013-2024 Combodo SAS
|
||||
*
|
||||
@@ -25,7 +26,7 @@
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'itop-files-information/3.3.0',
|
||||
array(
|
||||
[
|
||||
// Identification
|
||||
//
|
||||
'label' => 'iTop files information',
|
||||
@@ -33,22 +34,22 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Setup
|
||||
//
|
||||
'dependencies' => array(
|
||||
),
|
||||
'dependencies' => [
|
||||
],
|
||||
'mandatory' => false,
|
||||
'visible' => false,
|
||||
|
||||
// Components
|
||||
//
|
||||
'datamodel' => array(
|
||||
'src/Service/FilesInformation.php',
|
||||
'src/Service/FilesInformationException.php',
|
||||
'datamodel' => [
|
||||
'src/Service/FilesInformation.php',
|
||||
'src/Service/FilesInformationException.php',
|
||||
'src/Service/FilesInformationUtils.php',
|
||||
'src/Service/FilesIntegrity.php',
|
||||
),
|
||||
'webservice' => array(),
|
||||
'data.struct' => array(),
|
||||
'data.sample' => array(),
|
||||
],
|
||||
'webservice' => [],
|
||||
'data.struct' => [],
|
||||
'data.sample' => [],
|
||||
|
||||
// Documentation
|
||||
//
|
||||
@@ -57,6 +58,6 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Default settings
|
||||
//
|
||||
'settings' => array(),
|
||||
)
|
||||
'settings' => [],
|
||||
]
|
||||
);
|
||||
|
||||
@@ -7,35 +7,35 @@
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'itop-full-itil/3.3.0',
|
||||
array(
|
||||
[
|
||||
// Identification
|
||||
//
|
||||
'label' => 'Bridge - Request management ITIL + Incident management ITIL',
|
||||
'category' => 'business',
|
||||
// Setup
|
||||
//
|
||||
'dependencies' => array(
|
||||
'dependencies' => [
|
||||
'itop-request-mgmt-itil/2.3.0',
|
||||
'itop-incident-mgmt-itil/2.3.0',
|
||||
),
|
||||
],
|
||||
'mandatory' => false,
|
||||
'visible' => false,
|
||||
'auto_select' => 'SetupInfo::ModuleIsSelected("itop-request-mgmt-itil") && SetupInfo::ModuleIsSelected("itop-incident-mgmt-itil")',
|
||||
// Components
|
||||
//
|
||||
'datamodel' => array(),
|
||||
'webservice' => array(),
|
||||
'data.struct' => array(// add your 'structure' definition XML files here,
|
||||
),
|
||||
'data.sample' => array(// add your sample data XML files here,
|
||||
),
|
||||
'datamodel' => [],
|
||||
'webservice' => [],
|
||||
'data.struct' => [// add your 'structure' definition XML files here,
|
||||
],
|
||||
'data.sample' => [// add your sample data XML files here,
|
||||
],
|
||||
// Documentation
|
||||
//
|
||||
'doc.manual_setup' => '', // hyperlink to manual setup documentation, if any
|
||||
'doc.more_information' => '', // hyperlink to more information, if any
|
||||
// Default settings
|
||||
//
|
||||
'settings' => array(// Module specific settings go here, if any
|
||||
),
|
||||
)
|
||||
'settings' => [// Module specific settings go here, if any
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
// Copyright (C) 2024 Combodo SAS
|
||||
//
|
||||
// This file is part of iTop.
|
||||
@@ -41,10 +42,9 @@ require_once(__DIR__.'/hubruntimeenvironment.class.inc.php');
|
||||
*/
|
||||
class DBBackupWithErrorReporting extends DBBackup
|
||||
{
|
||||
protected $aInfos = [];
|
||||
|
||||
protected $aInfos = array();
|
||||
|
||||
protected $aErrors = array();
|
||||
protected $aErrors = [];
|
||||
|
||||
protected function LogInfo($sMsg)
|
||||
{
|
||||
@@ -79,19 +79,16 @@ function DoBackup($sTargetFile)
|
||||
// Make sure the target directory exists
|
||||
$sBackupDir = dirname($sTargetFile);
|
||||
SetupUtils::builddir($sBackupDir);
|
||||
|
||||
|
||||
$oBackup = new DBBackupWithErrorReporting();
|
||||
$oBackup->SetMySQLBinDir(MetaModel::GetConfig()->GetModuleSetting('itop-backup', 'mysql_bindir', ''));
|
||||
$sSourceConfigFile = APPCONF.utils::GetCurrentEnvironment().'/'.ITOP_CONFIG_FILE;
|
||||
|
||||
|
||||
$oMutex = new iTopMutex('backup.'.utils::GetCurrentEnvironment());
|
||||
$oMutex->Lock();
|
||||
try
|
||||
{
|
||||
try {
|
||||
$oBackup->CreateCompressedBackup($sTargetFile, $sSourceConfigFile);
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
} catch (Exception $e) {
|
||||
$oMutex->Unlock();
|
||||
throw $e;
|
||||
}
|
||||
@@ -101,22 +98,22 @@ function DoBackup($sTargetFile)
|
||||
|
||||
/**
|
||||
* Outputs the status of the current ajax execution (as a JSON structure)
|
||||
*
|
||||
*
|
||||
* @param string $sMessage
|
||||
* @param bool $bSuccess
|
||||
* @param number $iErrorCode
|
||||
* @param array $aMoreFields
|
||||
* Extra fields to pass to the caller, if needed
|
||||
*/
|
||||
function ReportStatus($sMessage, $bSuccess, $iErrorCode = 0, $aMoreFields = array())
|
||||
function ReportStatus($sMessage, $bSuccess, $iErrorCode = 0, $aMoreFields = [])
|
||||
{
|
||||
// Do not use AjaxPage during setup phases, because it uses InterfaceDiscovery in Twig compilation
|
||||
$oPage = new JsonPage();
|
||||
$aResult = array(
|
||||
$aResult = [
|
||||
'code' => $iErrorCode,
|
||||
'message' => $sMessage,
|
||||
'fields' => $aMoreFields
|
||||
);
|
||||
'fields' => $aMoreFields,
|
||||
];
|
||||
$oPage->SetData($aResult);
|
||||
$oPage->SetOutputDataOnly(true);
|
||||
$oPage->output();
|
||||
@@ -124,154 +121,137 @@ function ReportStatus($sMessage, $bSuccess, $iErrorCode = 0, $aMoreFields = arra
|
||||
|
||||
/**
|
||||
* Helper to output the status of a successful execution
|
||||
*
|
||||
*
|
||||
* @param string $sMessage
|
||||
* @param array $aMoreFields
|
||||
* Extra fields to pass to the caller, if needed
|
||||
*/
|
||||
function ReportSuccess($sMessage, $aMoreFields = array())
|
||||
function ReportSuccess($sMessage, $aMoreFields = [])
|
||||
{
|
||||
ReportStatus($sMessage, true, 0, $aMoreFields);
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper to output the status of a failed execution
|
||||
*
|
||||
*
|
||||
* @param string $sMessage
|
||||
* @param number $iErrorCode
|
||||
* @param array $aMoreFields
|
||||
* Extra fields to pass to the caller, if needed
|
||||
*/
|
||||
function ReportError($sMessage, $iErrorCode, $aMoreFields = array())
|
||||
function ReportError($sMessage, $iErrorCode, $aMoreFields = [])
|
||||
{
|
||||
if ($iErrorCode==0)
|
||||
{
|
||||
if ($iErrorCode == 0) {
|
||||
// 0 means no error, so change it if no meaningful error code is supplied
|
||||
$iErrorCode = -1;
|
||||
}
|
||||
ReportStatus($sMessage, false, $iErrorCode, $aMoreFields);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
try {
|
||||
SetupUtils::ExitMaintenanceMode(false); // Reset maintenance mode in case of problem
|
||||
|
||||
utils::PushArchiveMode(false);
|
||||
|
||||
|
||||
ini_set('max_execution_time', max(3600, ini_get('max_execution_time'))); // Under Windows SQL/backup operations are part of the PHP timeout and require extra time
|
||||
ini_set('display_errors', 1); // Make sure that fatal errors remain visible from the end-user
|
||||
|
||||
|
||||
// Most of the ajax calls are done without the MetaModel being loaded
|
||||
// Therefore, the language must be passed as an argument,
|
||||
// and the dictionnaries be loaded here
|
||||
// Therefore, the language must be passed as an argument,
|
||||
// and the dictionnaries be loaded here
|
||||
$sLanguage = utils::ReadParam('language', '');
|
||||
if ($sLanguage!='')
|
||||
{
|
||||
foreach (glob(APPROOT.'env-production/dictionaries/*.dict.php') as $sFilePath)
|
||||
{
|
||||
require_once ($sFilePath);
|
||||
if ($sLanguage != '') {
|
||||
foreach (glob(APPROOT.'env-production/dictionaries/*.dict.php') as $sFilePath) {
|
||||
require_once($sFilePath);
|
||||
}
|
||||
|
||||
|
||||
$aLanguages = Dict::GetLanguages();
|
||||
if (array_key_exists($sLanguage, $aLanguages))
|
||||
{
|
||||
if (array_key_exists($sLanguage, $aLanguages)) {
|
||||
Dict::SetUserLanguage($sLanguage);
|
||||
}
|
||||
}
|
||||
$sOperation = utils::ReadParam('operation', '');
|
||||
switch ($sOperation)
|
||||
{
|
||||
switch ($sOperation) {
|
||||
case 'check_before_backup':
|
||||
require_once (APPROOT.'/application/startup.inc.php');
|
||||
require_once (APPROOT.'/application/loginwebpage.class.inc.php');
|
||||
require_once(APPROOT.'/application/startup.inc.php');
|
||||
require_once(APPROOT.'/application/loginwebpage.class.inc.php');
|
||||
LoginWebPage::DoLogin(true); // Check user rights and prompt if needed (must be admin)
|
||||
|
||||
$sDBBackupPath = utils::GetDataPath().'backups/manual';
|
||||
$aChecks = SetupUtils::CheckBackupPrerequisites($sDBBackupPath);
|
||||
$bFailed = false;
|
||||
foreach ($aChecks as $oCheckResult)
|
||||
{
|
||||
if ($oCheckResult->iSeverity==CheckResult::ERROR)
|
||||
{
|
||||
foreach ($aChecks as $oCheckResult) {
|
||||
if ($oCheckResult->iSeverity == CheckResult::ERROR) {
|
||||
$bFailed = true;
|
||||
ReportError($oCheckResult->sLabel, -2);
|
||||
}
|
||||
}
|
||||
if (!$bFailed)
|
||||
{
|
||||
if (!$bFailed) {
|
||||
// Continue the checks
|
||||
$fFreeSpace = SetupUtils::CheckDiskSpace($sDBBackupPath);
|
||||
if ($fFreeSpace!==false)
|
||||
{
|
||||
if ($fFreeSpace !== false) {
|
||||
$sMessage = Dict::Format('iTopHub:BackupFreeDiskSpaceIn', SetupUtils::HumanReadableSize($fFreeSpace), dirname($sDBBackupPath));
|
||||
ReportSuccess($sMessage);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
ReportError(Dict::S('iTopHub:FailedToCheckFreeDiskSpace'), -1);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
break;
|
||||
|
||||
case 'do_backup':
|
||||
require_once (APPROOT.'/application/startup.inc.php');
|
||||
require_once (APPROOT.'/application/loginwebpage.class.inc.php');
|
||||
require_once(APPROOT.'/application/startup.inc.php');
|
||||
require_once(APPROOT.'/application/loginwebpage.class.inc.php');
|
||||
LoginWebPage::DoLogin(true); // Check user rights and prompt if needed (must be admin)
|
||||
|
||||
try
|
||||
{
|
||||
if (MetaModel::GetConfig()->Get('demo_mode')) throw new Exception('Sorry the installation of extensions is not allowed in demo mode');
|
||||
try {
|
||||
if (MetaModel::GetConfig()->Get('demo_mode')) {
|
||||
throw new Exception('Sorry the installation of extensions is not allowed in demo mode');
|
||||
}
|
||||
SetupLog::Info('Backup starts...');
|
||||
set_time_limit(0);
|
||||
$sBackupPath = APPROOT.'/data/backups/manual/backup-';
|
||||
$iSuffix = 1;
|
||||
$sSuffix = '';
|
||||
// Generate a unique name...
|
||||
do
|
||||
{
|
||||
do {
|
||||
$sBackupFile = $sBackupPath.date('Y-m-d-His').$sSuffix;
|
||||
$sSuffix = '-'.$iSuffix;
|
||||
$iSuffix++ ;
|
||||
}
|
||||
while (file_exists($sBackupFile));
|
||||
} while (file_exists($sBackupFile));
|
||||
|
||||
$oBackup = DoBackup($sBackupFile);
|
||||
$aErrors = $oBackup->GetErrors();
|
||||
if (count($aErrors)>0)
|
||||
{
|
||||
if (count($aErrors) > 0) {
|
||||
SetupLog::Error('Backup failed.');
|
||||
SetupLog::Error(implode("\n", $aErrors));
|
||||
ReportError(Dict::S('iTopHub:BackupFailed'), -1, $aErrors);
|
||||
}
|
||||
else
|
||||
{
|
||||
ReportError(Dict::S('iTopHub:BackupFailed'), -1, $aErrors);
|
||||
} else {
|
||||
SetupLog::Info('Backup successfully completed.');
|
||||
ReportSuccess(Dict::S('iTopHub:BackupOk'));
|
||||
}
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
} catch (Exception $e) {
|
||||
SetupLog::Error($e->getMessage());
|
||||
ReportError($e->getMessage(), $e->getCode());
|
||||
}
|
||||
break;
|
||||
|
||||
break;
|
||||
|
||||
case 'compile':
|
||||
SetupLog::Info('Deployment starts...');
|
||||
$sAuthent = utils::ReadParam('authent', '', false, 'raw_data');
|
||||
if (!file_exists(utils::GetDataPath().'hub/compile_authent') || $sAuthent !== file_get_contents(utils::GetDataPath().'hub/compile_authent'))
|
||||
{
|
||||
throw new SecurityException(Dict::S('iTopHub:FailAuthent'));
|
||||
if (!file_exists(utils::GetDataPath().'hub/compile_authent') || $sAuthent !== file_get_contents(utils::GetDataPath().'hub/compile_authent')) {
|
||||
throw new SecurityException(Dict::S('iTopHub:FailAuthent'));
|
||||
}
|
||||
// First step: prepare the datamodel, if it fails, roll-back
|
||||
$aSelectedExtensionCodes = utils::ReadParam('extension_codes', array());
|
||||
$aSelectedExtensionDirs = utils::ReadParam('extension_dirs', array());
|
||||
$aSelectedExtensionCodes = utils::ReadParam('extension_codes', []);
|
||||
$aSelectedExtensionDirs = utils::ReadParam('extension_dirs', []);
|
||||
|
||||
$oRuntimeEnv = new HubRunTimeEnvironment('production', false); // use a temp environment: production-build
|
||||
$oRuntimeEnv->MoveSelectedExtensions(APPROOT.'/data/downloaded-extensions/', $aSelectedExtensionDirs);
|
||||
|
||||
$oConfig = new Config(APPCONF.'production/'.ITOP_CONFIG_FILE);
|
||||
if ($oConfig->Get('demo_mode')) throw new Exception('Sorry the installation of extensions is not allowed in demo mode');
|
||||
if ($oConfig->Get('demo_mode')) {
|
||||
throw new Exception('Sorry the installation of extensions is not allowed in demo mode');
|
||||
}
|
||||
|
||||
$aSelectModules = $oRuntimeEnv->CompileFrom('production', false); // WARNING symlinks does not seem to be compatible with manual Commit
|
||||
|
||||
@@ -289,21 +269,19 @@ try
|
||||
$oRuntimeEnv->Commit();
|
||||
|
||||
// Report the success in a way that will be detected by the ajax caller
|
||||
SetupLog::Info('Compilation completed...');
|
||||
SetupLog::Info('Compilation completed...');
|
||||
ReportSuccess('Ok'); // No access to Dict::S here
|
||||
break;
|
||||
|
||||
break;
|
||||
|
||||
case 'move_to_production':
|
||||
// Second step: update the schema and the data
|
||||
// Everything happening below is based on env-production
|
||||
$oRuntimeEnv = new RunTimeEnvironment('production', true);
|
||||
|
||||
try
|
||||
{
|
||||
try {
|
||||
SetupLog::Info('Move to production starts...');
|
||||
$sAuthent = utils::ReadParam('authent', '', false, 'raw_data');
|
||||
if (!file_exists(utils::GetDataPath().'hub/compile_authent') || $sAuthent !== file_get_contents(utils::GetDataPath().'hub/compile_authent'))
|
||||
{
|
||||
$sAuthent = utils::ReadParam('authent', '', false, 'raw_data');
|
||||
if (!file_exists(utils::GetDataPath().'hub/compile_authent') || $sAuthent !== file_get_contents(utils::GetDataPath().'hub/compile_authent')) {
|
||||
throw new SecurityException(Dict::S('iTopHub:FailAuthent'));
|
||||
}
|
||||
unlink(utils::GetDataPath().'hub/compile_authent');
|
||||
@@ -315,15 +293,11 @@ try
|
||||
|
||||
$aAvailableModules = $oRuntimeEnv->AnalyzeInstallation($oConfig, $oRuntimeEnv->GetBuildDir(), true);
|
||||
|
||||
$aSelectedModules = array();
|
||||
foreach ($aAvailableModules as $sModuleId => $aModule)
|
||||
{
|
||||
if (($sModuleId == ROOT_MODULE) || ($sModuleId == DATAMODEL_MODULE))
|
||||
{
|
||||
$aSelectedModules = [];
|
||||
foreach ($aAvailableModules as $sModuleId => $aModule) {
|
||||
if (($sModuleId == ROOT_MODULE) || ($sModuleId == DATAMODEL_MODULE)) {
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$aSelectedModules[] = $sModuleId;
|
||||
}
|
||||
}
|
||||
@@ -349,17 +323,14 @@ try
|
||||
|
||||
// Default choices = as before
|
||||
$oExtensionsMap->LoadChoicesFromDatabase($oConfig);
|
||||
foreach ($oExtensionsMap->GetAllExtensions() as $oExtension)
|
||||
{
|
||||
foreach ($oExtensionsMap->GetAllExtensions() as $oExtension) {
|
||||
// Plus all "remote" extensions
|
||||
if ($oExtension->sSource==iTopExtension::SOURCE_REMOTE)
|
||||
{
|
||||
if ($oExtension->sSource == iTopExtension::SOURCE_REMOTE) {
|
||||
$oExtensionsMap->MarkAsChosen($oExtension->sCode);
|
||||
}
|
||||
}
|
||||
$aSelectedExtensionCodes = array();
|
||||
foreach ($oExtensionsMap->GetChoices() as $oExtension)
|
||||
{
|
||||
$aSelectedExtensionCodes = [];
|
||||
foreach ($oExtensionsMap->GetChoices() as $oExtension) {
|
||||
$aSelectedExtensionCodes[] = $oExtension->sCode;
|
||||
}
|
||||
$aSelectedExtensions = $oExtensionsMap->GetChoices();
|
||||
@@ -368,34 +339,27 @@ try
|
||||
// Report the success in a way that will be detected by the ajax caller
|
||||
SetupLog::Info('Deployment successfully completed.');
|
||||
ReportSuccess(Dict::S('iTopHub:CompiledOK'));
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
if(file_exists(utils::GetDataPath().'hub/compile_authent'))
|
||||
{
|
||||
} catch (Exception $e) {
|
||||
if (file_exists(utils::GetDataPath().'hub/compile_authent')) {
|
||||
unlink(utils::GetDataPath().'hub/compile_authent');
|
||||
}
|
||||
// Note: at this point, the dictionnary is not necessarily loaded
|
||||
SetupLog::Error(get_class($e).': '.Dict::S('iTopHub:ConfigurationSafelyReverted')."\n".$e->getMessage());
|
||||
SetupLog::Error('Debug trace: '.$e->getTraceAsString());
|
||||
ReportError($e->getMessage(), $e->getCode());
|
||||
}
|
||||
finally
|
||||
{
|
||||
} finally {
|
||||
SetupUtils::ExitReadOnlyMode();
|
||||
}
|
||||
break;
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
ReportError("Invalid operation: '$sOperation'", -1);
|
||||
}
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
} catch (Exception $e) {
|
||||
SetupLog::Error(get_class($e).': '.Dict::S('iTopHub:ConfigurationSafelyReverted')."\n".$e->getMessage());
|
||||
SetupLog::Error('Debug trace: '.$e->getTraceAsString());
|
||||
|
||||
|
||||
utils::PopArchiveMode();
|
||||
|
||||
|
||||
ReportError($e->getMessage(), $e->getCode());
|
||||
}
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', [
|
||||
'Menu:iTopHub' => 'iTop Hub',
|
||||
'Menu:iTopHub:Register' => 'Conectar ao iTop Hub',
|
||||
'Menu:iTopHub:Register+' => 'Vá para o iTop Hub para atualizar sua instância '.ITOP_APPLICATION_SHORT,
|
||||
@@ -64,4 +65,4 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
'iTopHub:InstallationStatus:Installed_Version' => '%1$s versão: %2$s',
|
||||
'iTopHub:InstallationStatus:Installed' => 'Instalado',
|
||||
'iTopHub:InstallationStatus:Version_NotInstalled' => 'Versão %1$s <b>NÃO</b> instalada',
|
||||
));
|
||||
]);
|
||||
|
||||
@@ -16,7 +16,7 @@ function DisplayStatus(WebPage $oPage)
|
||||
$oPage->add('<div class="module-selection-body">');
|
||||
// Now scan the extensions and display a report of the extensions brought by the hub
|
||||
$sPath = utils::GetDataPath().'downloaded-extensions/';
|
||||
$aExtraDirs = array();
|
||||
$aExtraDirs = [];
|
||||
if (is_dir($sPath)) {
|
||||
$aExtraDirs[] = $sPath; // Also read the extra downloaded-modules directory
|
||||
}
|
||||
@@ -25,7 +25,7 @@ function DisplayStatus(WebPage $oPage)
|
||||
|
||||
foreach ($oExtensionsMap->GetAllExtensions() as $oExtension) {
|
||||
if ($oExtension->sSource == iTopExtension::SOURCE_REMOTE) {
|
||||
$aCSSClasses = array('landing-extension');
|
||||
$aCSSClasses = ['landing-extension'];
|
||||
if ($oExtension->sInstalledVersion === '') {
|
||||
$aCSSClasses[] = 'landing-installation';
|
||||
$sInstallation = Dict::Format('iTopHub:InstallationStatus:Version_NotInstalled', $oExtension->sVersion);
|
||||
@@ -68,12 +68,11 @@ function DoLanding(WebPage $oPage)
|
||||
|
||||
$oPage->add('<div class="module-selection-body" style="text-align: center; line-height: 14em;"><h2>'.Dict::S('iTopHub:Uncompressing').'</h2></div>');
|
||||
|
||||
|
||||
$sProduct = utils::ReadParam('applicationName', '', false, 'raw_data');
|
||||
$sVersion = utils::ReadParam('applicationVersion', '', false, 'raw_data');
|
||||
$sInstanceUUID = utils::ReadParam('uuidFile', '', false, 'raw_data');
|
||||
$sDatabaseUUID = utils::ReadParam('uuidBdd', '', false, 'raw_data');
|
||||
$aExtensions = utils::ReadParam('extensions', array(), false, 'raw_data');
|
||||
$aExtensions = utils::ReadParam('extensions', [], false, 'raw_data');
|
||||
|
||||
// Basic consistency validation
|
||||
if ($sProduct != ITOP_APPLICATION) {
|
||||
@@ -128,7 +127,7 @@ function DoLanding(WebPage $oPage)
|
||||
}
|
||||
|
||||
// Now scan the extensions and display a report of the extensions brought by the hub
|
||||
$sNextPage = utils::GetAbsoluteUrlModulePage('itop-hub-connector', 'land.php', array('operation' => 'install'));
|
||||
$sNextPage = utils::GetAbsoluteUrlModulePage('itop-hub-connector', 'land.php', ['operation' => 'install']);
|
||||
$oPage->add_ready_script("window.location.href='$sNextPage'");
|
||||
|
||||
}
|
||||
@@ -148,11 +147,10 @@ function DoInstall(WebPage $oPage)
|
||||
$oPage->set_title(Dict::S('iTopHub:Landing:Install'));
|
||||
$oPage->add('<div id="installation-summary" class="module-selection-body" style="position: relative">');
|
||||
|
||||
|
||||
// Now scan the extensions and display a report of the extensions brought by the hub
|
||||
// Now scan the extensions and display a report of the extensions brought by the hub
|
||||
$sPath = utils::GetDataPath().'downloaded-extensions/';
|
||||
$aExtraDirs = array();
|
||||
$aExtraDirs = [];
|
||||
if (is_dir($sPath)) {
|
||||
$aExtraDirs[] = $sPath; // Also read the extra downloaded-modules directory
|
||||
}
|
||||
@@ -175,14 +173,14 @@ function DoInstall(WebPage $oPage)
|
||||
$oPage->add('</div>');
|
||||
$oPage->add('</div>');
|
||||
} else {
|
||||
$aCSSClasses = array('landing-extension');
|
||||
$aCSSClasses = ['landing-extension'];
|
||||
if ($oExtension->sInstalledVersion === '') {
|
||||
$aCSSClasses[] = 'landing-installation';
|
||||
$sInstallation = Dict::Format('iTopHub:InstallationEffect:Install', $oExtension->sVersion);
|
||||
} else if ($oExtension->sInstalledVersion == $oExtension->sVersion) {
|
||||
} elseif ($oExtension->sInstalledVersion == $oExtension->sVersion) {
|
||||
$aCSSClasses[] = 'landing-no-change';
|
||||
$sInstallation = Dict::Format('iTopHub:InstallationEffect:NoChange', $oExtension->sVersion);
|
||||
} else if (version_compare($oExtension->sInstalledVersion, $oExtension->sVersion, '<')) {
|
||||
} elseif (version_compare($oExtension->sInstalledVersion, $oExtension->sVersion, '<')) {
|
||||
$aCSSClasses[] = 'landing-upgrade';
|
||||
$sInstallation = Dict::Format('iTopHub:InstallationEffect:Upgrade', $oExtension->sInstalledVersion, $oExtension->sVersion);
|
||||
} else {
|
||||
@@ -213,10 +211,8 @@ function DoInstall(WebPage $oPage)
|
||||
|
||||
$oPage->add('</div>'); // module-selection-body
|
||||
|
||||
|
||||
$oPage->LinkStylesheetFromAppRoot('css/font-awesome/css/all.min.css');
|
||||
|
||||
|
||||
$oPage->add('<div id="hub_installation_widget"></div>');
|
||||
$oPage->add('<fieldset id="database-backup-fieldset"><legend>'.Dict::S('iTopHub:DBBackupLabel').'</legend>');
|
||||
$oPage->add('<div id="backup_form"><input id="backup_checkbox" type="checkbox" checked><label for="backup_checkbox"> '.Dict::S('iTopHub:DBBackupSentence').'</label></div>');
|
||||
@@ -224,22 +220,22 @@ function DoInstall(WebPage $oPage)
|
||||
$oPage->add('</fieldset>');
|
||||
$oPage->add('<p style="text-align: center"><input type="button" id="hub_start_installation" type="button" disabled value="'.Dict::S('iTopHub:DeployBtn').'"/></p>');
|
||||
|
||||
$sIframeUrl = utils::GetAbsoluteUrlModulePage('itop-hub-connector', 'launch.php', array('target' => 'inform_after_setup'));
|
||||
$sStatusPageUrl = utils::GetAbsoluteUrlModulePage('itop-hub-connector', 'land.php', array('operation' => 'done'));
|
||||
$sIframeUrl = utils::GetAbsoluteUrlModulePage('itop-hub-connector', 'launch.php', ['target' => 'inform_after_setup']);
|
||||
$sStatusPageUrl = utils::GetAbsoluteUrlModulePage('itop-hub-connector', 'land.php', ['operation' => 'done']);
|
||||
|
||||
$aWidgetParams = array(
|
||||
'self_url' => utils::GetAbsoluteUrlModulePage('itop-hub-connector', 'ajax.php', array('maintenance' => true)),
|
||||
$aWidgetParams = [
|
||||
'self_url' => utils::GetAbsoluteUrlModulePage('itop-hub-connector', 'ajax.php', ['maintenance' => true]),
|
||||
'iframe_url' => $sIframeUrl,
|
||||
'redirect_after_completion_url' => $sStatusPageUrl,
|
||||
'mysql_bindir' => MetaModel::GetConfig()->GetModuleSetting('itop-backup', 'mysql_bindir', ''),
|
||||
'labels' => array(
|
||||
'labels' => [
|
||||
'database_backup' => Dict::S('iTopHub:InstallationProgress:DatabaseBackup'),
|
||||
'extensions_installation' => Dict::S('iTopHub:InstallationProgress:ExtensionsInstallation'),
|
||||
'installation_successful' => Dict::S('iTopHub:InstallationProgress:InstallationSuccessful'),
|
||||
'rollback' => Dict::S('iTopHub:ConfigurationSafelyReverted'),
|
||||
),
|
||||
],
|
||||
'authent' => $sUID,
|
||||
);
|
||||
];
|
||||
|
||||
$sWidgetParams = json_encode($aWidgetParams);
|
||||
|
||||
@@ -249,7 +245,6 @@ function DoInstall(WebPage $oPage)
|
||||
$oPage->add('<div id="debug"></div>');
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
require_once(APPROOT.'/application/application.inc.php');
|
||||
require_once(APPROOT.'/setup/setuppage.class.inc.php');
|
||||
@@ -266,7 +261,8 @@ try {
|
||||
$oPage->LinkScriptFromModule('itop-hub-connector/js/hub.js');
|
||||
$oPage->LinkStylesheetFromAppRoot('css/font-combodo/font-combodo.css');
|
||||
|
||||
$oPage->add_style(<<<CSS
|
||||
$oPage->add_style(
|
||||
<<<CSS
|
||||
div.choice { margin: 0.5em;}
|
||||
div.choice a { text-decoration:none; font-weight: bold; color: #1C94C4 }
|
||||
div.description { margin-left: 2em; }
|
||||
@@ -295,8 +291,7 @@ CSS
|
||||
}
|
||||
|
||||
$oPage->output();
|
||||
}
|
||||
catch (Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
require_once(APPROOT.'/setup/setuppage.class.inc.php');
|
||||
$oP = new ErrorPage(Dict::S('UI:PageTitle:FatalError'));
|
||||
$oP->add("<h1>".Dict::S('UI:FatalErrorMessage')."</h1>\n");
|
||||
@@ -312,7 +307,7 @@ catch (Exception $e) {
|
||||
$oLog->Set('issue', 'PHP Exception');
|
||||
$oLog->Set('impact', 'Page could not be displayed');
|
||||
$oLog->Set('callstack', $e->getTrace());
|
||||
$oLog->Set('data', array());
|
||||
$oLog->Set('data', []);
|
||||
$oLog->DBInsertNoReload();
|
||||
}
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ use Combodo\iTop\Application\WebPage\NiceWebPage;
|
||||
*/
|
||||
function CleanVersionNumber($sString)
|
||||
{
|
||||
$aMatches = array();
|
||||
$aMatches = [];
|
||||
if (preg_match("|^([0-9\\.]+)-|", $sString, $aMatches)) {
|
||||
return $aMatches[1];
|
||||
}
|
||||
@@ -124,11 +124,11 @@ function CleanVersionNumber($sString)
|
||||
|
||||
function collect_configuration()
|
||||
{
|
||||
$aConfiguration = array(
|
||||
'php' => array(),
|
||||
'mysql' => array(),
|
||||
'apache' => array(),
|
||||
);
|
||||
$aConfiguration = [
|
||||
'php' => [],
|
||||
'mysql' => [],
|
||||
'apache' => [],
|
||||
];
|
||||
|
||||
// Database information
|
||||
$m_oMysqli = CMDBSource::GetMysqli();
|
||||
@@ -170,7 +170,7 @@ function collect_configuration()
|
||||
|
||||
// PHP extensions
|
||||
if (!MetaModel::GetConfig()->GetModuleSetting('itop-hub-connector', 'php_extensions_enable', true)) {
|
||||
$aConfiguration['php_extensions'] = array();
|
||||
$aConfiguration['php_extensions'] = [];
|
||||
} else {
|
||||
foreach (get_loaded_extensions() as $extension) {
|
||||
$aConfiguration['php_extensions'][$extension] = $extension;
|
||||
@@ -178,8 +178,8 @@ function collect_configuration()
|
||||
}
|
||||
|
||||
// Collect some PHP settings having a known impact on iTop
|
||||
$aIniGet = MetaModel::GetConfig()->GetModuleSetting('itop-hub-connector', 'php_settings_array', array()); // by default, on the time of the writting, it values are : array('post_max_size', 'upload_max_filesize', 'apc.enabled', 'timezone', 'memory_limit', 'max_execution_time');
|
||||
$aConfiguration['php_settings'] = array();
|
||||
$aIniGet = MetaModel::GetConfig()->GetModuleSetting('itop-hub-connector', 'php_settings_array', []); // by default, on the time of the writting, it values are : array('post_max_size', 'upload_max_filesize', 'apc.enabled', 'timezone', 'memory_limit', 'max_execution_time');
|
||||
$aConfiguration['php_settings'] = [];
|
||||
foreach ($aIniGet as $iniGet) {
|
||||
$aConfiguration['php_settings'][$iniGet] = (string)ini_get($iniGet);
|
||||
}
|
||||
@@ -197,22 +197,22 @@ function collect_configuration()
|
||||
// iTop Installation Options, i.e. "Extensions"
|
||||
$oExtensionMap = new iTopExtensionsMap();
|
||||
$oExtensionMap->LoadChoicesFromDatabase($oConfig);
|
||||
$aConfiguration['itop_extensions'] = array();
|
||||
$aConfiguration['itop_extensions'] = [];
|
||||
foreach ($oExtensionMap->GetChoices() as $oExtension) {
|
||||
switch ($oExtension->sSource) {
|
||||
case iTopExtension::SOURCE_MANUAL:
|
||||
case iTopExtension::SOURCE_REMOTE:
|
||||
$aConfiguration['itop_extensions'][$oExtension->sCode] = array(
|
||||
$aConfiguration['itop_extensions'][$oExtension->sCode] = [
|
||||
'label' => $oExtension->sLabel,
|
||||
'value' => $oExtension->sInstalledVersion,
|
||||
);
|
||||
];
|
||||
break;
|
||||
|
||||
default:
|
||||
$aConfiguration['itop_installation_options'][$oExtension->sCode] = array(
|
||||
$aConfiguration['itop_installation_options'][$oExtension->sCode] = [
|
||||
'label' => $oExtension->sLabel,
|
||||
'value' => true,
|
||||
);
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -223,13 +223,13 @@ function MakeDataToPost($sTargetRoute)
|
||||
{
|
||||
if (MetaModel::GetConfig()->Get('demo_mode')) {
|
||||
// Don't expose such information in demo mode
|
||||
$aDataToPost = array('disabled' => true, 'reason' => 'demo_mode');
|
||||
$aDataToPost = ['disabled' => true, 'reason' => 'demo_mode'];
|
||||
} else {
|
||||
$aConfiguration = collect_configuration();
|
||||
|
||||
$aDataToPost = array(
|
||||
$aDataToPost = [
|
||||
'itop_hub_target_route' => $sTargetRoute,
|
||||
'itop_stack' => array(
|
||||
'itop_stack' => [
|
||||
"uuidBdd" => (string)trim(DBProperty::GetProperty('database_uuid', ''), '{}'), // TODO check if empty and... regenerate a new UUID ??
|
||||
"uuidFile" => (string)trim(@file_get_contents(utils::GetDataPath()."instance.txt"), "{} \n"), // TODO check if empty and... regenerate a new UUID ??
|
||||
'instance_friendly_name' => (string)$_SERVER['SERVER_NAME'],
|
||||
@@ -242,8 +242,8 @@ function MakeDataToPost($sTargetRoute)
|
||||
'itop_modules' => (object)$aConfiguration['itop_modules'],
|
||||
'itop_extensions' => (object)$aConfiguration['itop_extensions'],
|
||||
'itop_installation_options' => (object)$aConfiguration['itop_installation_options'],
|
||||
),
|
||||
'server_stack' => array(
|
||||
],
|
||||
'server_stack' => [
|
||||
'os_name' => (string)PHP_OS,
|
||||
'web_server_name' => (string)$aConfiguration['web_server_name'],
|
||||
'web_server_version' => (string)$aConfiguration['web_server_version'],
|
||||
@@ -253,8 +253,8 @@ function MakeDataToPost($sTargetRoute)
|
||||
'php_version' => (string)CleanVersionNumber(phpversion()),
|
||||
'php_settings' => (object)$aConfiguration['php_settings'],
|
||||
'php_extensions' => (object)$aConfiguration['php_extensions'],
|
||||
),
|
||||
);
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
return $aDataToPost;
|
||||
@@ -282,21 +282,21 @@ try {
|
||||
|
||||
switch ($sTargetRoute) {
|
||||
case 'inform_after_setup':
|
||||
// Hidden IFRAME at the end of the setup
|
||||
$sParamToken = utils::ReadParam('setup_token');
|
||||
$oTokenValidation = new TokenValidation();
|
||||
$bIsTokenValid = $oTokenValidation->isSetupTokenValid($sParamToken);
|
||||
if (UserRights::IsAdministrator() || $bIsTokenValid) {
|
||||
$oPage = new NiceWebPage('');
|
||||
$aDataToPost = MakeDataToPost($sTargetRoute);
|
||||
$oPage->add('<form id="hub_launch_form" action="'.$sHubUrlStateless.'" method="post">');
|
||||
$oPage->add('<input type="hidden" name="json" value="'.utils::EscapeHtml(json_encode($aDataToPost)).'">');
|
||||
$oPage->add_ready_script('$("#hub_launch_form").trigger(\'submit\');');
|
||||
} else {
|
||||
IssueLog::Error('TokenValidation failed on inform_after_setup page');
|
||||
throw new Exception("Not allowed");
|
||||
}
|
||||
break;
|
||||
// Hidden IFRAME at the end of the setup
|
||||
$sParamToken = utils::ReadParam('setup_token');
|
||||
$oTokenValidation = new TokenValidation();
|
||||
$bIsTokenValid = $oTokenValidation->isSetupTokenValid($sParamToken);
|
||||
if (UserRights::IsAdministrator() || $bIsTokenValid) {
|
||||
$oPage = new NiceWebPage('');
|
||||
$aDataToPost = MakeDataToPost($sTargetRoute);
|
||||
$oPage->add('<form id="hub_launch_form" action="'.$sHubUrlStateless.'" method="post">');
|
||||
$oPage->add('<input type="hidden" name="json" value="'.utils::EscapeHtml(json_encode($aDataToPost)).'">');
|
||||
$oPage->add_ready_script('$("#hub_launch_form").trigger(\'submit\');');
|
||||
} else {
|
||||
IssueLog::Error('TokenValidation failed on inform_after_setup page');
|
||||
throw new Exception("Not allowed");
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
// All other cases, special "Hub like" web page
|
||||
@@ -335,7 +335,8 @@ try {
|
||||
$sButtonLabelClose = Dict::S('iTopHub:CloseBtn');
|
||||
$sButtonLabelGo = Dict::S('iTopHub:GoBtn');
|
||||
$sButtonLabelTooltip = Dict::S('iTopHub:GoBtn:Tooltip');
|
||||
$oPage->add(<<<HTML
|
||||
$oPage->add(
|
||||
<<<HTML
|
||||
<p>
|
||||
<button type="button" class="ibo-button" id="CancelBtn" title="Go back to iTop"><img src="$sCloseUrl"><span class="ibo-button--label">$sButtonLabelClose</span></button>
|
||||
<span class="horiz-spacer"></span>
|
||||
@@ -403,8 +404,7 @@ JS
|
||||
}
|
||||
|
||||
$oPage->output();
|
||||
}
|
||||
catch (CoreException $e) {
|
||||
} catch (CoreException $e) {
|
||||
require_once(APPROOT.'/setup/setuppage.class.inc.php');
|
||||
$oP = new ErrorPage(Dict::S('UI:PageTitle:FatalError'));
|
||||
$oP->add("<h1>".Dict::S('UI:FatalErrorMessage')."</h1>\n");
|
||||
@@ -429,8 +429,7 @@ catch (CoreException $e) {
|
||||
|
||||
// For debugging only
|
||||
// throw $e;
|
||||
}
|
||||
catch (Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
require_once(APPROOT.'/setup/setuppage.class.inc.php');
|
||||
$oP = new ErrorPage(Dict::S('UI:PageTitle:FatalError'));
|
||||
$oP->add("<h1>".Dict::S('UI:FatalErrorMessage')."</h1>\n");
|
||||
@@ -446,11 +445,10 @@ catch (Exception $e) {
|
||||
$oLog->Set('issue', 'PHP Exception');
|
||||
$oLog->Set('impact', 'Page could not be displayed');
|
||||
$oLog->Set('callstack', $e->getTrace());
|
||||
$oLog->Set('data', array());
|
||||
$oLog->Set('data', []);
|
||||
$oLog->DBInsertNoReload();
|
||||
}
|
||||
|
||||
IssueLog::Error($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
//
|
||||
// iTop module definition file
|
||||
//
|
||||
@@ -6,7 +7,7 @@
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'itop-hub-connector/3.3.0',
|
||||
array(
|
||||
[
|
||||
// Identification
|
||||
//
|
||||
'label' => 'iTop Hub Connector',
|
||||
@@ -14,31 +15,31 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Setup
|
||||
//
|
||||
'dependencies' => array(
|
||||
'dependencies' => [
|
||||
'itop-config-mgmt/2.4.0', // Actually this module requires iTop 2.4.1 minimum
|
||||
),
|
||||
],
|
||||
'mandatory' => false,
|
||||
'visible' => true,
|
||||
|
||||
// Components
|
||||
//
|
||||
'datamodel' => array(
|
||||
'datamodel' => [
|
||||
'menus.php',
|
||||
'hubnewsroomprovider.class.inc.php',
|
||||
),
|
||||
'webservice' => array(
|
||||
|
||||
),
|
||||
'data.struct' => array(
|
||||
'hubnewsroomprovider.class.inc.php',
|
||||
],
|
||||
'webservice' => [
|
||||
|
||||
],
|
||||
'data.struct' => [
|
||||
// add your 'structure' definition XML files here,
|
||||
),
|
||||
'data.sample' => array(
|
||||
],
|
||||
'data.sample' => [
|
||||
// add your sample data XML files here,
|
||||
),
|
||||
|
||||
],
|
||||
|
||||
// Documentation
|
||||
//
|
||||
'doc.manual_setup' => '', // hyperlink to manual setup documentation, if any
|
||||
'doc.more_information' => '', // hyperlink to more information, if any
|
||||
)
|
||||
'doc.more_information' => '', // hyperlink to more information, if any
|
||||
]
|
||||
);
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', [
|
||||
'Menu:IncidentManagement' => 'Gestione incidente',
|
||||
'Menu:IncidentManagement+' => 'Gestione incidente',
|
||||
'Menu:Incident:Overview' => 'Overview',
|
||||
@@ -31,8 +32,7 @@ Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
'UI-IncidentManagementOverview-OpenIncidentByStatus' => 'Incidenti aperti per stato',
|
||||
'UI-IncidentManagementOverview-OpenIncidentByAgent' => 'Incidenti aperti per agente',
|
||||
'UI-IncidentManagementOverview-OpenIncidentByCustomer' => 'Incidenti aperti per cliente',
|
||||
));
|
||||
|
||||
]);
|
||||
|
||||
// Dictionnay conventions
|
||||
// Class:<class_name>
|
||||
@@ -48,7 +48,7 @@ Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
// Class: Incident
|
||||
//
|
||||
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', [
|
||||
'Class:Incident' => 'Incidente',
|
||||
'Class:Incident+' => '~~',
|
||||
'Class:Incident/Attribute:status' => 'Stato',
|
||||
@@ -227,4 +227,4 @@ Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
'Class:Incident/Method:ResolveChildTickets' => 'ResolveChildTickets~~',
|
||||
'Class:Incident/Method:ResolveChildTickets+' => 'Risoluzione a cascata delle richieste figlie (ev_autoresolve), e allineare le seguenti caratteristiche: servizio, team, agente e risoluzione',
|
||||
'Tickets:Related:OpenIncidents' => 'Incidenti aperti',
|
||||
));
|
||||
]);
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<?php
|
||||
|
||||
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'itop-incident-mgmt-itil/3.3.0',
|
||||
array(
|
||||
[
|
||||
// Identification
|
||||
//
|
||||
'label' => 'Incident Management ITIL',
|
||||
@@ -12,25 +11,25 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Setup
|
||||
//
|
||||
'dependencies' => array(
|
||||
'dependencies' => [
|
||||
'itop-config-mgmt/2.4.0',
|
||||
'itop-tickets/2.4.0',
|
||||
'itop-profiles-itil/2.3.0',
|
||||
),
|
||||
],
|
||||
'mandatory' => false,
|
||||
'visible' => true,
|
||||
|
||||
// Components
|
||||
//
|
||||
'datamodel' => array(
|
||||
),
|
||||
'data.struct' => array(
|
||||
'datamodel' => [
|
||||
],
|
||||
'data.struct' => [
|
||||
|
||||
),
|
||||
'data.sample' => array(
|
||||
],
|
||||
'data.sample' => [
|
||||
//'data.sample.itop-request-mgmt.xml',
|
||||
),
|
||||
|
||||
],
|
||||
|
||||
// Documentation
|
||||
//
|
||||
'doc.manual_setup' => '',
|
||||
@@ -38,7 +37,7 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Default settings
|
||||
//
|
||||
'settings' => array(
|
||||
),
|
||||
)
|
||||
'settings' => [
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', [
|
||||
'Class:KnownError' => 'Errori conosciuti',
|
||||
'Class:KnownError+' => 'Errori documentati per problemi noti',
|
||||
'Class:KnownError/Attribute:name' => 'Nome',
|
||||
@@ -52,13 +53,13 @@ Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
'Class:KnownError/Attribute:ci_list+' => 'All the configuration items that are related to this known error~~',
|
||||
'Class:KnownError/Attribute:document_list' => 'Documenti',
|
||||
'Class:KnownError/Attribute:document_list+' => 'All the documents linked to this known error~~',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: lnkErrorToFunctionalCI
|
||||
//
|
||||
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', [
|
||||
'Class:lnkErrorToFunctionalCI' => 'Link Errore /CIFunzionale',
|
||||
'Class:lnkErrorToFunctionalCI+' => 'Infra impattata dall\'errore conosciuto',
|
||||
'Class:lnkErrorToFunctionalCI/Name' => '%1$s / %2$s~~',
|
||||
@@ -72,13 +73,13 @@ Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
'Class:lnkErrorToFunctionalCI/Attribute:error_name+' => '~~',
|
||||
'Class:lnkErrorToFunctionalCI/Attribute:reason' => 'Ragione',
|
||||
'Class:lnkErrorToFunctionalCI/Attribute:reason+' => '~~',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: lnkDocumentToError
|
||||
//
|
||||
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', [
|
||||
'Class:lnkDocumentToError' => 'Link Documento / Errore',
|
||||
'Class:lnkDocumentToError+' => 'Link tra il documento e l\'errore conosciuto',
|
||||
'Class:lnkDocumentToError/Name' => '%1$s / %2$s~~',
|
||||
@@ -92,9 +93,9 @@ Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
'Class:lnkDocumentToError/Attribute:error_name+' => '~~',
|
||||
'Class:lnkDocumentToError/Attribute:link_type' => 'link_type',
|
||||
'Class:lnkDocumentToError/Attribute:link_type+' => '~~',
|
||||
));
|
||||
]);
|
||||
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', [
|
||||
'Menu:ProblemManagement' => 'Gestione dei problemi',
|
||||
'Menu:ProblemManagement+' => 'Gestione dei problemi',
|
||||
'Menu:Problem:Shortcuts' => 'Scorciatoia',
|
||||
@@ -104,4 +105,4 @@ Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
'Menu:SearchError+' => 'Ricerca per errori conosciuti',
|
||||
'Menu:Problem:KnownErrors' => 'Tutti gli errori conosciuti',
|
||||
'Menu:Problem:KnownErrors+' => 'Tutti gli errori conosciuti',
|
||||
));
|
||||
]);
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', [
|
||||
'Class:KnownError' => 'Erro Conhecido',
|
||||
'Class:KnownError+' => 'Erro documentado de um problema conhecido',
|
||||
'Class:KnownError/Attribute:name' => 'Nome',
|
||||
@@ -52,13 +53,13 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
'Class:KnownError/Attribute:ci_list+' => 'Todos os Itens de Configuração (ICs) associados à este Erro conhecido',
|
||||
'Class:KnownError/Attribute:document_list' => 'Documentos',
|
||||
'Class:KnownError/Attribute:document_list+' => 'Todos os Documentos associados à este Erro conhecido',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: lnkErrorToFunctionalCI
|
||||
//
|
||||
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', [
|
||||
'Class:lnkErrorToFunctionalCI' => 'Relação entre Erro conhecido / IC',
|
||||
'Class:lnkErrorToFunctionalCI+' => 'Itens de configuração (IC) associados à este Erro conhecido',
|
||||
'Class:lnkErrorToFunctionalCI/Name' => '%1$s / %2$s~~',
|
||||
@@ -72,13 +73,13 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
'Class:lnkErrorToFunctionalCI/Attribute:error_name+' => '',
|
||||
'Class:lnkErrorToFunctionalCI/Attribute:reason' => 'Motivo do link',
|
||||
'Class:lnkErrorToFunctionalCI/Attribute:reason+' => '',
|
||||
));
|
||||
]);
|
||||
|
||||
//
|
||||
// Class: lnkDocumentToError
|
||||
//
|
||||
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', [
|
||||
'Class:lnkDocumentToError' => 'Relação entre Documento / Erro',
|
||||
'Class:lnkDocumentToError+' => 'Uma ligação entre um documento e um erro conhecido',
|
||||
'Class:lnkDocumentToError/Name' => '%1$s / %2$s~~',
|
||||
@@ -92,9 +93,9 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
'Class:lnkDocumentToError/Attribute:error_name+' => '',
|
||||
'Class:lnkDocumentToError/Attribute:link_type' => 'Tipo de link',
|
||||
'Class:lnkDocumentToError/Attribute:link_type+' => '',
|
||||
));
|
||||
]);
|
||||
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', [
|
||||
'Menu:ProblemManagement' => 'Gerenciamento de Problemas',
|
||||
'Menu:ProblemManagement+' => 'Lista de Gerenciamento de Problemas',
|
||||
'Menu:Problem:Shortcuts' => 'Atalhos',
|
||||
@@ -104,4 +105,4 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
'Menu:SearchError+' => '',
|
||||
'Menu:Problem:KnownErrors' => 'Erros Conhecidos',
|
||||
'Menu:Problem:KnownErrors+' => 'Erro documentado de um problema conhecido',
|
||||
));
|
||||
]);
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<?php
|
||||
|
||||
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'itop-knownerror-mgmt/3.3.0',
|
||||
array(
|
||||
[
|
||||
// Identification
|
||||
//
|
||||
'label' => 'Known Errors Database',
|
||||
@@ -12,22 +11,22 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Setup
|
||||
//
|
||||
'dependencies' => array(
|
||||
'dependencies' => [
|
||||
'itop-config-mgmt/2.2.0',
|
||||
),
|
||||
],
|
||||
'mandatory' => false,
|
||||
'visible' => true,
|
||||
|
||||
// Components
|
||||
//
|
||||
'datamodel' => array(
|
||||
),
|
||||
'data.struct' => array(
|
||||
'datamodel' => [
|
||||
],
|
||||
'data.struct' => [
|
||||
//'data.struct.itop-knownerror-mgmt.xml',
|
||||
),
|
||||
'data.sample' => array(
|
||||
),
|
||||
|
||||
],
|
||||
'data.sample' => [
|
||||
],
|
||||
|
||||
// Documentation
|
||||
//
|
||||
'doc.manual_setup' => '', // No manual installation instructions
|
||||
@@ -35,7 +34,7 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Default settings
|
||||
//
|
||||
'settings' => array(
|
||||
),
|
||||
)
|
||||
'settings' => [
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
//
|
||||
// iTop module definition file
|
||||
//
|
||||
@@ -6,7 +7,7 @@
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'itop-oauth-client/3.3.0',
|
||||
array(
|
||||
[
|
||||
// Identification
|
||||
//
|
||||
'label' => 'OAuth 2.0 client',
|
||||
@@ -14,39 +15,38 @@ SetupWebPage::AddModule(
|
||||
|
||||
// Setup
|
||||
//
|
||||
'dependencies' => array(
|
||||
'dependencies' => [
|
||||
'itop-welcome-itil/3.1.0,',
|
||||
),
|
||||
],
|
||||
'mandatory' => false,
|
||||
'visible' => true,
|
||||
|
||||
// Components
|
||||
//
|
||||
'datamodel' => array(
|
||||
'datamodel' => [
|
||||
'vendor/autoload.php',
|
||||
'src/Service/PopupMenuExtension.php',
|
||||
'src/Service/ApplicationUIExtension.php',
|
||||
),
|
||||
'webservice' => array(
|
||||
|
||||
),
|
||||
'data.struct' => array(
|
||||
],
|
||||
'webservice' => [
|
||||
|
||||
],
|
||||
'data.struct' => [
|
||||
// add your 'structure' definition XML files here,
|
||||
),
|
||||
'data.sample' => array(
|
||||
],
|
||||
'data.sample' => [
|
||||
// add your sample data XML files here,
|
||||
),
|
||||
|
||||
],
|
||||
|
||||
// Documentation
|
||||
//
|
||||
'doc.manual_setup' => '', // hyperlink to manual setup documentation, if any
|
||||
'doc.more_information' => '', // hyperlink to more information, if any
|
||||
'doc.more_information' => '', // hyperlink to more information, if any
|
||||
|
||||
// Default settings
|
||||
//
|
||||
'settings' => array(
|
||||
'settings' => [
|
||||
// Module specific settings go here, if any
|
||||
),
|
||||
)
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('CS CZ', 'Czech', 'Čeština', array(
|
||||
Dict::Add('CS CZ', 'Czech', 'Čeština', [
|
||||
'Page:DefaultTitle' => 'Uživatelský portál %1$s',
|
||||
'Page:PleaseWait' => 'Počkejte prosím',
|
||||
'Page:Home' => 'Domů',
|
||||
@@ -53,19 +54,19 @@ Dict::Add('CS CZ', 'Czech', 'Čeština', array(
|
||||
'Portal:File:DisplayInfo' => '<a href="%2$s" class="file_download_link">%1$s</a>',
|
||||
'Portal:File:DisplayInfo+' => '%1$s (%2$s) <a href="%3$s" class="file_open_link" target="_blank">Otevřít</a> / <a href="%4$s" class="file_download_link">Stáhnout</a>',
|
||||
'Portal:Calendar-FirstDayOfWeek' => 'cs', //work with moment.js locales
|
||||
));
|
||||
]);
|
||||
|
||||
// Object form
|
||||
Dict::Add('CS CZ', 'Czech', 'Čeština', array(
|
||||
Dict::Add('CS CZ', 'Czech', 'Čeština', [
|
||||
'Portal:Form:Caselog:Entry:Close:Tooltip' => 'Zavřít tento vstup',
|
||||
'Portal:Form:Close:Warning' => 'Opravdu chcete opustit tento formulář? Data vložená do formuláře budou ztracena ',
|
||||
'Portal:Error:ObjectCannotBeCreated' => 'Chyba: objekt nelze vytvořit. Před opětovným odesláním tohoto formuláře zkontrolujte související objekty a přílohy.',
|
||||
'Portal:Error:ObjectCannotBeUpdated' => 'Chyba: objekt nelze vytvořit. Před opětovným odesláním tohoto formuláře zkontrolujte související objekty a přílohy.',
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
));
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
]);
|
||||
|
||||
// UserProfile brick
|
||||
Dict::Add('CS CZ', 'Czech', 'Čeština', array(
|
||||
Dict::Add('CS CZ', 'Czech', 'Čeština', [
|
||||
'Brick:Portal:UserProfile:Name' => 'Uživatelský profil',
|
||||
'Brick:Portal:UserProfile:Navigation:Dropdown:MyProfil' => 'Můj profil',
|
||||
'Brick:Portal:UserProfile:Navigation:Dropdown:Logout' => 'Odhlásit',
|
||||
@@ -76,15 +77,15 @@ Dict::Add('CS CZ', 'Czech', 'Čeština', array(
|
||||
'Brick:Portal:UserProfile:Password:CantChangeForUnknownReason' => 'Nepodařilo se změnit heslo, kontaktujte prosím administrátora',
|
||||
'Brick:Portal:UserProfile:PersonalInformations:Title' => 'Osobní informace',
|
||||
'Brick:Portal:UserProfile:Photo:Title' => 'Foto',
|
||||
));
|
||||
]);
|
||||
|
||||
// AggregatePageBrick
|
||||
Dict::Add('CS CZ', 'Czech', 'Čeština', array(
|
||||
Dict::Add('CS CZ', 'Czech', 'Čeština', [
|
||||
'Brick:Portal:AggregatePage:DefaultTitle' => 'Nástěnka',
|
||||
));
|
||||
]);
|
||||
|
||||
// BrowseBrick brick
|
||||
Dict::Add('CS CZ', 'Czech', 'Čeština', array(
|
||||
Dict::Add('CS CZ', 'Czech', 'Čeština', [
|
||||
'Brick:Portal:Browse:Name' => 'Procházet položky',
|
||||
'Brick:Portal:Browse:Mode:List' => 'Seznam',
|
||||
'Brick:Portal:Browse:Mode:Tree' => 'Strom',
|
||||
@@ -98,10 +99,10 @@ Dict::Add('CS CZ', 'Czech', 'Čeština', array(
|
||||
'Brick:Portal:Browse:Tree:CollapseAll' => 'Sbalit vše',
|
||||
'Brick:Portal:Browse:Filter:NoData' => 'Žádná položka',
|
||||
'Brick:Portal:Browse:Mosaic:Back' => 'Zpět',
|
||||
));
|
||||
]);
|
||||
|
||||
// ManageBrick brick
|
||||
Dict::Add('CS CZ', 'Czech', 'Čeština', array(
|
||||
Dict::Add('CS CZ', 'Czech', 'Čeština', [
|
||||
'Brick:Portal:Manage:Name' => 'Spravovat položky',
|
||||
'Brick:Portal:Manage:Table:NoData' => 'Žádná položka',
|
||||
'Brick:Portal:Manage:Table:ItemActions' => 'Akce',
|
||||
@@ -116,10 +117,10 @@ Dict::Add('CS CZ', 'Czech', 'Čeština', array(
|
||||
'Brick:Portal:Manage:fct:avg' => 'Průměr',
|
||||
'Brick:Portal:Manage:fct:min' => 'Min',
|
||||
'Brick:Portal:Manage:fct:max' => 'Max',
|
||||
));
|
||||
]);
|
||||
|
||||
// ObjectBrick brick
|
||||
Dict::Add('CS CZ', 'Czech', 'Čeština', array(
|
||||
Dict::Add('CS CZ', 'Czech', 'Čeština', [
|
||||
'Brick:Portal:Object:Name' => 'Objekt',
|
||||
'Brick:Portal:Object:Form:Create:Title' => 'Nový %1$s',
|
||||
'Brick:Portal:Object:Form:Edit:Title' => 'Aktualizace %1$s',
|
||||
@@ -131,18 +132,18 @@ Dict::Add('CS CZ', 'Czech', 'Čeština', array(
|
||||
'Brick:Portal:Object:Search:Hierarchy:Title' => 'Vybrat %1$s',
|
||||
'Brick:Portal:Object:Copy:TextToCopy' => '%1$s: %2$s',
|
||||
'Brick:Portal:Object:Copy:Tooltip' => 'Zkopíruj odkaz na objekt',
|
||||
'Brick:Portal:Object:Copy:CopiedTooltip' => 'Zkopírováno'
|
||||
));
|
||||
'Brick:Portal:Object:Copy:CopiedTooltip' => 'Zkopírováno',
|
||||
]);
|
||||
|
||||
// CreateBrick brick
|
||||
Dict::Add('CS CZ', 'Czech', 'Čeština', array(
|
||||
Dict::Add('CS CZ', 'Czech', 'Čeština', [
|
||||
'Brick:Portal:Create:Name' => 'Rychlé vytvoření',
|
||||
'Brick:Portal:Create:ChooseType' => 'Vyberte typ',
|
||||
));
|
||||
]);
|
||||
|
||||
// Filter brick
|
||||
Dict::Add('CS CZ', 'Czech', 'Čeština', array(
|
||||
Dict::Add('CS CZ', 'Czech', 'Čeština', [
|
||||
'Brick:Portal:Filter:Name' => 'Předfiltrování dlaždice',
|
||||
'Brick:Portal:Filter:SearchInput:Placeholder' => 'např. připojení k wifi',
|
||||
'Brick:Portal:Filter:SearchInput:Submit' => 'Vyhledat',
|
||||
));
|
||||
]);
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('DA DA', 'Danish', 'Dansk', array(
|
||||
Dict::Add('DA DA', 'Danish', 'Dansk', [
|
||||
'Page:DefaultTitle' => '%1$s User portal~~',
|
||||
'Page:PleaseWait' => 'Please wait...~~',
|
||||
'Page:Home' => 'Home~~',
|
||||
@@ -53,19 +54,19 @@ Dict::Add('DA DA', 'Danish', 'Dansk', array(
|
||||
'Portal:File:DisplayInfo' => '<a href="%2$s" class="file_download_link">%1$s</a>~~',
|
||||
'Portal:File:DisplayInfo+' => '%1$s (%2$s) <a href="%3$s" class="file_open_link" target="_blank">Open</a> / <a href="%4$s" class="file_download_link">Download</a>~~',
|
||||
'Portal:Calendar-FirstDayOfWeek' => 'da', //work with moment.js locales
|
||||
));
|
||||
]);
|
||||
|
||||
// Object form
|
||||
Dict::Add('DA DA', 'Danish', 'Dansk', array(
|
||||
Dict::Add('DA DA', 'Danish', 'Dansk', [
|
||||
'Portal:Form:Caselog:Entry:Close:Tooltip' => 'Close this entry~~',
|
||||
'Portal:Form:Close:Warning' => 'Do you want to leave this form? Data entered may be lost~~',
|
||||
'Portal:Error:ObjectCannotBeCreated' => 'Error: object cannot be created. Check associated objects and attachments before submitting this form again.~~',
|
||||
'Portal:Error:ObjectCannotBeUpdated' => 'Error: object cannot be updated. Check associated objects and attachments before submitting this form again.~~',
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
));
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
]);
|
||||
|
||||
// UserProfile brick
|
||||
Dict::Add('DA DA', 'Danish', 'Dansk', array(
|
||||
Dict::Add('DA DA', 'Danish', 'Dansk', [
|
||||
'Brick:Portal:UserProfile:Name' => 'User profile~~',
|
||||
'Brick:Portal:UserProfile:Navigation:Dropdown:MyProfil' => 'My profile~~',
|
||||
'Brick:Portal:UserProfile:Navigation:Dropdown:Logout' => 'Logoff~~',
|
||||
@@ -76,15 +77,15 @@ Dict::Add('DA DA', 'Danish', 'Dansk', array(
|
||||
'Brick:Portal:UserProfile:Password:CantChangeForUnknownReason' => 'Can\'t change password, please contact your %1$s administrator~~',
|
||||
'Brick:Portal:UserProfile:PersonalInformations:Title' => 'Personal information~~',
|
||||
'Brick:Portal:UserProfile:Photo:Title' => 'Photo~~',
|
||||
));
|
||||
]);
|
||||
|
||||
// AggregatePageBrick
|
||||
Dict::Add('DA DA', 'Danish', 'Dansk', array(
|
||||
Dict::Add('DA DA', 'Danish', 'Dansk', [
|
||||
'Brick:Portal:AggregatePage:DefaultTitle' => 'Dashboard~~',
|
||||
));
|
||||
]);
|
||||
|
||||
// BrowseBrick brick
|
||||
Dict::Add('DA DA', 'Danish', 'Dansk', array(
|
||||
Dict::Add('DA DA', 'Danish', 'Dansk', [
|
||||
'Brick:Portal:Browse:Name' => 'Browse throught items~~',
|
||||
'Brick:Portal:Browse:Mode:List' => 'List~~',
|
||||
'Brick:Portal:Browse:Mode:Tree' => 'Tree~~',
|
||||
@@ -98,10 +99,10 @@ Dict::Add('DA DA', 'Danish', 'Dansk', array(
|
||||
'Brick:Portal:Browse:Tree:CollapseAll' => 'Collapse all~~',
|
||||
'Brick:Portal:Browse:Filter:NoData' => 'No item~~',
|
||||
'Brick:Portal:Browse:Mosaic:Back' => 'Back~~',
|
||||
));
|
||||
]);
|
||||
|
||||
// ManageBrick brick
|
||||
Dict::Add('DA DA', 'Danish', 'Dansk', array(
|
||||
Dict::Add('DA DA', 'Danish', 'Dansk', [
|
||||
'Brick:Portal:Manage:Name' => 'Manage items~~',
|
||||
'Brick:Portal:Manage:Table:NoData' => 'No item.~~',
|
||||
'Brick:Portal:Manage:Table:ItemActions' => 'Actions~~',
|
||||
@@ -116,10 +117,10 @@ Dict::Add('DA DA', 'Danish', 'Dansk', array(
|
||||
'Brick:Portal:Manage:fct:avg' => 'Average~~',
|
||||
'Brick:Portal:Manage:fct:min' => 'Min~~',
|
||||
'Brick:Portal:Manage:fct:max' => 'Max~~',
|
||||
));
|
||||
]);
|
||||
|
||||
// ObjectBrick brick
|
||||
Dict::Add('DA DA', 'Danish', 'Dansk', array(
|
||||
Dict::Add('DA DA', 'Danish', 'Dansk', [
|
||||
'Brick:Portal:Object:Name' => 'Object~~',
|
||||
'Brick:Portal:Object:Form:Create:Title' => 'New %1$s~~',
|
||||
'Brick:Portal:Object:Form:Edit:Title' => 'Updating %1$s~~',
|
||||
@@ -131,18 +132,18 @@ Dict::Add('DA DA', 'Danish', 'Dansk', array(
|
||||
'Brick:Portal:Object:Search:Hierarchy:Title' => 'Select %1$s~~',
|
||||
'Brick:Portal:Object:Copy:TextToCopy' => '%2$s',
|
||||
'Brick:Portal:Object:Copy:Tooltip' => 'Copy object link~~',
|
||||
'Brick:Portal:Object:Copy:CopiedTooltip' => 'Copied~~'
|
||||
));
|
||||
'Brick:Portal:Object:Copy:CopiedTooltip' => 'Copied~~',
|
||||
]);
|
||||
|
||||
// CreateBrick brick
|
||||
Dict::Add('DA DA', 'Danish', 'Dansk', array(
|
||||
Dict::Add('DA DA', 'Danish', 'Dansk', [
|
||||
'Brick:Portal:Create:Name' => 'Quick creation~~',
|
||||
'Brick:Portal:Create:ChooseType' => 'Please, choose a type~~',
|
||||
));
|
||||
]);
|
||||
|
||||
// Filter brick
|
||||
Dict::Add('DA DA', 'Danish', 'Dansk', array(
|
||||
Dict::Add('DA DA', 'Danish', 'Dansk', [
|
||||
'Brick:Portal:Filter:Name' => 'Prefilter a brick~~',
|
||||
'Brick:Portal:Filter:SearchInput:Placeholder' => 'eg. connect wifi~~',
|
||||
'Brick:Portal:Filter:SearchInput:Submit' => 'Search~~',
|
||||
));
|
||||
]);
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('DE DE', 'German', 'Deutsch', array(
|
||||
Dict::Add('DE DE', 'German', 'Deutsch', [
|
||||
'Page:DefaultTitle' => '%1$s - Benutzer Portal',
|
||||
'Page:PleaseWait' => 'Bitte warten...',
|
||||
'Page:Home' => 'Start',
|
||||
@@ -53,19 +54,19 @@ Dict::Add('DE DE', 'German', 'Deutsch', array(
|
||||
'Portal:File:DisplayInfo' => '<a href="%2$s" class="file_download_link">%1$s</a>',
|
||||
'Portal:File:DisplayInfo+' => '%1$s (%2$s) <a href="%3$s" class="file_open_link" target="_blank">Öffnen</a> / <a href="%4$s" class="file_download_link">Download</a>',
|
||||
'Portal:Calendar-FirstDayOfWeek' => 'de', //work with moment.js locales
|
||||
));
|
||||
]);
|
||||
|
||||
// Object form
|
||||
Dict::Add('DE DE', 'German', 'Deutsch', array(
|
||||
Dict::Add('DE DE', 'German', 'Deutsch', [
|
||||
'Portal:Form:Caselog:Entry:Close:Tooltip' => 'Dieses Objekt schließen',
|
||||
'Portal:Form:Close:Warning' => 'Soll diese Eingabemaske verlassen werden? Eingegebene Daten werden nicht gespeichert.',
|
||||
'Portal:Error:ObjectCannotBeCreated' => 'Error: Objekt kann nicht erzeugt werden. Prüfen Sie verknüpfte Objekte und Anhänge bevor Sie dieses Formular erneut abschicken.',
|
||||
'Portal:Error:ObjectCannotBeUpdated' => 'Error: Objekt kann nicht geupdated werden. Prüfen Sie verknüpfte Objekte und Anhänge bevor Sie dieses Formular erneut abschicken.',
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
));
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
]);
|
||||
|
||||
// UserProfile brick
|
||||
Dict::Add('DE DE', 'German', 'Deutsch', array(
|
||||
Dict::Add('DE DE', 'German', 'Deutsch', [
|
||||
'Brick:Portal:UserProfile:Name' => 'Benutzer Profil',
|
||||
'Brick:Portal:UserProfile:Navigation:Dropdown:MyProfil' => 'Mein Profil',
|
||||
'Brick:Portal:UserProfile:Navigation:Dropdown:Logout' => 'Abmelden',
|
||||
@@ -76,15 +77,15 @@ Dict::Add('DE DE', 'German', 'Deutsch', array(
|
||||
'Brick:Portal:UserProfile:Password:CantChangeForUnknownReason' => 'Passwort kann nicht geändert werden - bitte kontaktieren Sie Ihren %1$s Administrator',
|
||||
'Brick:Portal:UserProfile:PersonalInformations:Title' => 'Persönliche Informationen',
|
||||
'Brick:Portal:UserProfile:Photo:Title' => 'Foto',
|
||||
));
|
||||
]);
|
||||
|
||||
// AggregatePageBrick
|
||||
Dict::Add('DE DE', 'German', 'Deutsch', array(
|
||||
Dict::Add('DE DE', 'German', 'Deutsch', [
|
||||
'Brick:Portal:AggregatePage:DefaultTitle' => 'Dashboard',
|
||||
));
|
||||
]);
|
||||
|
||||
// BrowseBrick brick
|
||||
Dict::Add('DE DE', 'German', 'Deutsch', array(
|
||||
Dict::Add('DE DE', 'German', 'Deutsch', [
|
||||
'Brick:Portal:Browse:Name' => 'Liste durchgehen',
|
||||
'Brick:Portal:Browse:Mode:List' => 'Liste',
|
||||
'Brick:Portal:Browse:Mode:Tree' => 'Baum',
|
||||
@@ -98,10 +99,10 @@ Dict::Add('DE DE', 'German', 'Deutsch', array(
|
||||
'Brick:Portal:Browse:Tree:CollapseAll' => 'Alle kollabieren',
|
||||
'Brick:Portal:Browse:Filter:NoData' => 'Kein Eintrag',
|
||||
'Brick:Portal:Browse:Mosaic:Back' => 'Zurück',
|
||||
));
|
||||
]);
|
||||
|
||||
// ManageBrick brick
|
||||
Dict::Add('DE DE', 'German', 'Deutsch', array(
|
||||
Dict::Add('DE DE', 'German', 'Deutsch', [
|
||||
'Brick:Portal:Manage:Name' => 'Einträge managen',
|
||||
'Brick:Portal:Manage:Table:NoData' => 'Kein Eintrag.',
|
||||
'Brick:Portal:Manage:Table:ItemActions' => 'Aktionen',
|
||||
@@ -116,10 +117,10 @@ Dict::Add('DE DE', 'German', 'Deutsch', array(
|
||||
'Brick:Portal:Manage:fct:avg' => 'Durchschnitt',
|
||||
'Brick:Portal:Manage:fct:min' => 'Minimum',
|
||||
'Brick:Portal:Manage:fct:max' => 'Maximum',
|
||||
));
|
||||
]);
|
||||
|
||||
// ObjectBrick brick
|
||||
Dict::Add('DE DE', 'German', 'Deutsch', array(
|
||||
Dict::Add('DE DE', 'German', 'Deutsch', [
|
||||
'Brick:Portal:Object:Name' => 'Object',
|
||||
'Brick:Portal:Object:Form:Create:Title' => 'Neue %1$s',
|
||||
'Brick:Portal:Object:Form:Edit:Title' => 'Wird aktualisiert %1$s',
|
||||
@@ -131,18 +132,18 @@ Dict::Add('DE DE', 'German', 'Deutsch', array(
|
||||
'Brick:Portal:Object:Search:Hierarchy:Title' => 'Select %1$s',
|
||||
'Brick:Portal:Object:Copy:TextToCopy' => '%2$s',
|
||||
'Brick:Portal:Object:Copy:Tooltip' => 'Objektverknüpfung kopieren',
|
||||
'Brick:Portal:Object:Copy:CopiedTooltip' => 'Kopiert'
|
||||
));
|
||||
'Brick:Portal:Object:Copy:CopiedTooltip' => 'Kopiert',
|
||||
]);
|
||||
|
||||
// CreateBrick brick
|
||||
Dict::Add('DE DE', 'German', 'Deutsch', array(
|
||||
Dict::Add('DE DE', 'German', 'Deutsch', [
|
||||
'Brick:Portal:Create:Name' => 'Schnelles Erstellen',
|
||||
'Brick:Portal:Create:ChooseType' => 'Bitte wählen Sie einen Typ',
|
||||
));
|
||||
]);
|
||||
|
||||
// Filter brick
|
||||
Dict::Add('DE DE', 'German', 'Deutsch', array(
|
||||
Dict::Add('DE DE', 'German', 'Deutsch', [
|
||||
'Brick:Portal:Filter:Name' => 'Brick vorfiltern',
|
||||
'Brick:Portal:Filter:SearchInput:Placeholder' => 'z.B. connect wifi',
|
||||
'Brick:Portal:Filter:SearchInput:Submit' => 'Suchen',
|
||||
));
|
||||
]);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Copyright (C) 2013-2024 Combodo SAS
|
||||
*
|
||||
@@ -18,7 +19,7 @@
|
||||
*/
|
||||
|
||||
// Portal
|
||||
Dict::Add('EN US', 'English', 'English', array(
|
||||
Dict::Add('EN US', 'English', 'English', [
|
||||
'Page:DefaultTitle' => '%1$s User portal',
|
||||
'Page:PleaseWait' => 'Please wait...',
|
||||
'Page:Home' => 'Home',
|
||||
@@ -62,19 +63,19 @@ Dict::Add('EN US', 'English', 'English', array(
|
||||
'Portal:File:DisplayInfo' => '<a href="%2$s" class="file_download_link">%1$s</a>',
|
||||
'Portal:File:DisplayInfo+' => '%1$s (%2$s) <a href="%3$s" class="file_open_link" target="_blank">Open</a> / <a href="%4$s" class="file_download_link">Download</a>',
|
||||
'Portal:Calendar-FirstDayOfWeek' => 'en-us', //work with moment.js locales
|
||||
));
|
||||
]);
|
||||
|
||||
// Object form
|
||||
Dict::Add('EN US', 'English', 'English', array(
|
||||
Dict::Add('EN US', 'English', 'English', [
|
||||
'Portal:Form:Caselog:Entry:Close:Tooltip' => 'Close this entry',
|
||||
'Portal:Form:Close:Warning' => 'Do you want to leave this form? Data entered may be lost',
|
||||
'Portal:Error:ObjectCannotBeCreated' => 'Error: object cannot be created. Check associated objects and attachments before submitting this form again.',
|
||||
'Portal:Error:ObjectCannotBeUpdated' => 'Error: object cannot be updated. Check associated objects and attachments before submitting this form again.',
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s',
|
||||
));
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s',
|
||||
]);
|
||||
|
||||
// UserProfile brick
|
||||
Dict::Add('EN US', 'English', 'English', array(
|
||||
Dict::Add('EN US', 'English', 'English', [
|
||||
'Brick:Portal:UserProfile:Name' => 'User profile',
|
||||
'Brick:Portal:UserProfile:Navigation:Dropdown:MyProfil' => 'My profile',
|
||||
'Brick:Portal:UserProfile:Navigation:Dropdown:Logout' => 'Logoff',
|
||||
@@ -85,15 +86,15 @@ Dict::Add('EN US', 'English', 'English', array(
|
||||
'Brick:Portal:UserProfile:Password:CantChangeForUnknownReason' => 'Can\'t change password, please contact your %1$s administrator',
|
||||
'Brick:Portal:UserProfile:PersonalInformations:Title' => 'Personal information',
|
||||
'Brick:Portal:UserProfile:Photo:Title' => 'Photo',
|
||||
));
|
||||
]);
|
||||
|
||||
// AggregatePageBrick
|
||||
Dict::Add('EN US', 'English', 'English', array(
|
||||
Dict::Add('EN US', 'English', 'English', [
|
||||
'Brick:Portal:AggregatePage:DefaultTitle' => 'Dashboard',
|
||||
));
|
||||
]);
|
||||
|
||||
// BrowseBrick brick
|
||||
Dict::Add('EN US', 'English', 'English', array(
|
||||
Dict::Add('EN US', 'English', 'English', [
|
||||
'Brick:Portal:Browse:Name' => 'Browse throught items',
|
||||
'Brick:Portal:Browse:Mode:List' => 'List',
|
||||
'Brick:Portal:Browse:Mode:Tree' => 'Tree',
|
||||
@@ -107,10 +108,10 @@ Dict::Add('EN US', 'English', 'English', array(
|
||||
'Brick:Portal:Browse:Tree:CollapseAll' => 'Collapse all',
|
||||
'Brick:Portal:Browse:Filter:NoData' => 'No item',
|
||||
'Brick:Portal:Browse:Mosaic:Back' => 'Back',
|
||||
));
|
||||
]);
|
||||
|
||||
// ManageBrick brick
|
||||
Dict::Add('EN US', 'English', 'English', array(
|
||||
Dict::Add('EN US', 'English', 'English', [
|
||||
'Brick:Portal:Manage:Name' => 'Manage items',
|
||||
'Brick:Portal:Manage:Table:NoData' => 'No item.',
|
||||
'Brick:Portal:Manage:Table:ItemActions' => 'Actions',
|
||||
@@ -125,10 +126,10 @@ Dict::Add('EN US', 'English', 'English', array(
|
||||
'Brick:Portal:Manage:fct:avg' => 'Average',
|
||||
'Brick:Portal:Manage:fct:min' => 'Min',
|
||||
'Brick:Portal:Manage:fct:max' => 'Max',
|
||||
));
|
||||
]);
|
||||
|
||||
// ObjectBrick brick
|
||||
Dict::Add('EN US', 'English', 'English', array(
|
||||
Dict::Add('EN US', 'English', 'English', [
|
||||
'Brick:Portal:Object:Name' => 'Object',
|
||||
'Brick:Portal:Object:Form:Create:Title' => 'New %1$s',
|
||||
'Brick:Portal:Object:Form:Edit:Title' => 'Updating %1$s',
|
||||
@@ -140,18 +141,18 @@ Dict::Add('EN US', 'English', 'English', array(
|
||||
'Brick:Portal:Object:Search:Hierarchy:Title' => 'Select %1$s',
|
||||
'Brick:Portal:Object:Copy:TextToCopy' => '%2$s',
|
||||
'Brick:Portal:Object:Copy:Tooltip' => 'Copy object link',
|
||||
'Brick:Portal:Object:Copy:CopiedTooltip' => 'Copied'
|
||||
));
|
||||
'Brick:Portal:Object:Copy:CopiedTooltip' => 'Copied',
|
||||
]);
|
||||
|
||||
// CreateBrick brick
|
||||
Dict::Add('EN US', 'English', 'English', array(
|
||||
Dict::Add('EN US', 'English', 'English', [
|
||||
'Brick:Portal:Create:Name' => 'Quick creation',
|
||||
'Brick:Portal:Create:ChooseType' => 'Please, choose a type',
|
||||
));
|
||||
]);
|
||||
|
||||
// Filter brick
|
||||
Dict::Add('EN US', 'English', 'English', array(
|
||||
Dict::Add('EN US', 'English', 'English', [
|
||||
'Brick:Portal:Filter:Name' => 'Prefilter a brick',
|
||||
'Brick:Portal:Filter:SearchInput:Placeholder' => 'eg. connect wifi',
|
||||
'Brick:Portal:Filter:SearchInput:Submit' => 'Search',
|
||||
));
|
||||
]);
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @copyright Copyright (C) 2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
// Portal
|
||||
Dict::Add('EN GB', 'British English', 'British English', array(
|
||||
Dict::Add('EN GB', 'British English', 'British English', [
|
||||
'Page:DefaultTitle' => '%1$s User portal',
|
||||
'Page:PleaseWait' => 'Please wait...',
|
||||
'Page:Home' => 'Home',
|
||||
@@ -49,19 +50,19 @@ Dict::Add('EN GB', 'British English', 'British English', array(
|
||||
'Portal:File:DisplayInfo' => '<a href="%2$s" class="file_download_link">%1$s</a>',
|
||||
'Portal:File:DisplayInfo+' => '%1$s (%2$s) <a href="%3$s" class="file_open_link" target="_blank">Open</a> / <a href="%4$s" class="file_download_link">Download</a>',
|
||||
'Portal:Calendar-FirstDayOfWeek' => 'en-gb',
|
||||
));
|
||||
]);
|
||||
|
||||
// Object form
|
||||
Dict::Add('EN GB', 'British English', 'British English', array(
|
||||
Dict::Add('EN GB', 'British English', 'British English', [
|
||||
'Portal:Form:Caselog:Entry:Close:Tooltip' => 'Close this entry',
|
||||
'Portal:Form:Close:Warning' => 'Do you want to leave this form? Data entered may be lost',
|
||||
'Portal:Error:ObjectCannotBeCreated' => 'Error: object cannot be created. Check associated objects and attachments before submitting this form again.',
|
||||
'Portal:Error:ObjectCannotBeUpdated' => 'Error: object cannot be updated. Check associated objects and attachments before submitting this form again.',
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s',
|
||||
));
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s',
|
||||
]);
|
||||
|
||||
// UserProfile brick
|
||||
Dict::Add('EN GB', 'British English', 'British English', array(
|
||||
Dict::Add('EN GB', 'British English', 'British English', [
|
||||
'Brick:Portal:UserProfile:Name' => 'User profile',
|
||||
'Brick:Portal:UserProfile:Navigation:Dropdown:MyProfil' => 'My profile',
|
||||
'Brick:Portal:UserProfile:Navigation:Dropdown:Logout' => 'Log off',
|
||||
@@ -72,15 +73,15 @@ Dict::Add('EN GB', 'British English', 'British English', array(
|
||||
'Brick:Portal:UserProfile:Password:CantChangeForUnknownReason' => 'Can\'t change password, please contact your %1$s administrator',
|
||||
'Brick:Portal:UserProfile:PersonalInformations:Title' => 'Personal information',
|
||||
'Brick:Portal:UserProfile:Photo:Title' => 'Photo',
|
||||
));
|
||||
]);
|
||||
|
||||
// AggregatePageBrick
|
||||
Dict::Add('EN GB', 'British English', 'British English', array(
|
||||
Dict::Add('EN GB', 'British English', 'British English', [
|
||||
'Brick:Portal:AggregatePage:DefaultTitle' => 'Dashboard',
|
||||
));
|
||||
]);
|
||||
|
||||
// BrowseBrick brick
|
||||
Dict::Add('EN GB', 'British English', 'British English', array(
|
||||
Dict::Add('EN GB', 'British English', 'British English', [
|
||||
'Brick:Portal:Browse:Name' => 'Browse through items',
|
||||
'Brick:Portal:Browse:Mode:List' => 'List',
|
||||
'Brick:Portal:Browse:Mode:Tree' => 'Tree',
|
||||
@@ -94,10 +95,10 @@ Dict::Add('EN GB', 'British English', 'British English', array(
|
||||
'Brick:Portal:Browse:Tree:CollapseAll' => 'Collapse all',
|
||||
'Brick:Portal:Browse:Filter:NoData' => 'No item',
|
||||
'Brick:Portal:Browse:Mosaic:Back' => 'Back',
|
||||
));
|
||||
]);
|
||||
|
||||
// ManageBrick brick
|
||||
Dict::Add('EN GB', 'British English', 'British English', array(
|
||||
Dict::Add('EN GB', 'British English', 'British English', [
|
||||
'Brick:Portal:Manage:Name' => 'Manage items',
|
||||
'Brick:Portal:Manage:Table:NoData' => 'No item.',
|
||||
'Brick:Portal:Manage:Table:ItemActions' => 'Actions',
|
||||
@@ -112,10 +113,10 @@ Dict::Add('EN GB', 'British English', 'British English', array(
|
||||
'Brick:Portal:Manage:fct:avg' => 'Average',
|
||||
'Brick:Portal:Manage:fct:min' => 'Min',
|
||||
'Brick:Portal:Manage:fct:max' => 'Max',
|
||||
));
|
||||
]);
|
||||
|
||||
// ObjectBrick brick
|
||||
Dict::Add('EN GB', 'British English', 'British English', array(
|
||||
Dict::Add('EN GB', 'British English', 'British English', [
|
||||
'Brick:Portal:Object:Name' => 'Object',
|
||||
'Brick:Portal:Object:Form:Create:Title' => 'New %1$s',
|
||||
'Brick:Portal:Object:Form:Edit:Title' => 'Updating %1$s',
|
||||
@@ -127,18 +128,18 @@ Dict::Add('EN GB', 'British English', 'British English', array(
|
||||
'Brick:Portal:Object:Search:Hierarchy:Title' => 'Select %1$s',
|
||||
'Brick:Portal:Object:Copy:TextToCopy' => '%2$s',
|
||||
'Brick:Portal:Object:Copy:Tooltip' => 'Copy object link',
|
||||
'Brick:Portal:Object:Copy:CopiedTooltip' => 'Copied'
|
||||
));
|
||||
'Brick:Portal:Object:Copy:CopiedTooltip' => 'Copied',
|
||||
]);
|
||||
|
||||
// CreateBrick brick
|
||||
Dict::Add('EN GB', 'British English', 'British English', array(
|
||||
Dict::Add('EN GB', 'British English', 'British English', [
|
||||
'Brick:Portal:Create:Name' => 'Quick creation',
|
||||
'Brick:Portal:Create:ChooseType' => 'Please, choose a type',
|
||||
));
|
||||
]);
|
||||
|
||||
// Filter brick
|
||||
Dict::Add('EN GB', 'British English', 'British English', array(
|
||||
Dict::Add('EN GB', 'British English', 'British English', [
|
||||
'Brick:Portal:Filter:Name' => 'Prefilter a brick',
|
||||
'Brick:Portal:Filter:SearchInput:Placeholder' => 'eg. connect wifi',
|
||||
'Brick:Portal:Filter:SearchInput:Submit' => 'Search',
|
||||
));
|
||||
]);
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Spanish Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
* @author Miguel Turrubiates <miguel_tf@yahoo.com>
|
||||
* @notas Utilizar codificación UTF-8 para mostrar acentos y otros caracteres especiales
|
||||
* @notas Utilizar codificación UTF-8 para mostrar acentos y otros caracteres especiales
|
||||
*/
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array(
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellano', [
|
||||
'Page:DefaultTitle' => '%1$s - Portal de Usuario',
|
||||
'Page:PleaseWait' => 'Por favor espere...',
|
||||
'Page:Home' => 'Inicio',
|
||||
@@ -51,19 +52,19 @@ Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array(
|
||||
'Portal:File:DisplayInfo' => '<a href="%2$s" class="file_download_link">%1$s</a>',
|
||||
'Portal:File:DisplayInfo+' => '%1$s (%2$s) <a href="%3$s" class="file_open_link" target="_blank">Abierto</a> / <a href="%4$s" class="file_download_link">Descarga</a>',
|
||||
'Portal:Calendar-FirstDayOfWeek' => 'es', //work with moment.js locales
|
||||
));
|
||||
]);
|
||||
|
||||
// Object form
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array(
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellano', [
|
||||
'Portal:Form:Caselog:Entry:Close:Tooltip' => 'Cerrar este registro',
|
||||
'Portal:Form:Close:Warning' => '¿Desea abandorar este formulario? Datos modificados se perderan',
|
||||
'Portal:Error:ObjectCannotBeCreated' => 'Error: no se puede crear el objeto. Verifique los objetos asociados y archivos adjuntos antes de enviar nuevamente este formulario.',
|
||||
'Portal:Error:ObjectCannotBeUpdated' => 'Error: no se puede actualizar el objeto. Verifique los objetos asociados y archivos adjuntos antes de enviar nuevamente este formulario.',
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
));
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
]);
|
||||
|
||||
// UserProfile brick
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array(
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellano', [
|
||||
'Brick:Portal:UserProfile:Name' => 'Perfil del usuario',
|
||||
'Brick:Portal:UserProfile:Navigation:Dropdown:MyProfil' => 'Mi perfil',
|
||||
'Brick:Portal:UserProfile:Navigation:Dropdown:Logout' => 'Cerrar Sesión',
|
||||
@@ -74,15 +75,15 @@ Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array(
|
||||
'Brick:Portal:UserProfile:Password:CantChangeForUnknownReason' => 'No se puede cambiar la contraseña, póngase en contacto con el administrador de %1$s',
|
||||
'Brick:Portal:UserProfile:PersonalInformations:Title' => 'Información Personal',
|
||||
'Brick:Portal:UserProfile:Photo:Title' => 'Foto',
|
||||
));
|
||||
]);
|
||||
|
||||
// AggregatePageBrick
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array(
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellano', [
|
||||
'Brick:Portal:AggregatePage:DefaultTitle' => 'Tablero de Control',
|
||||
));
|
||||
]);
|
||||
|
||||
// BrowseBrick brick
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array(
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellano', [
|
||||
'Brick:Portal:Browse:Name' => 'Buscar en todos los elementos',
|
||||
'Brick:Portal:Browse:Mode:List' => 'Lista',
|
||||
'Brick:Portal:Browse:Mode:Tree' => 'Árbol',
|
||||
@@ -96,10 +97,10 @@ Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array(
|
||||
'Brick:Portal:Browse:Tree:CollapseAll' => 'Desplegar todo',
|
||||
'Brick:Portal:Browse:Filter:NoData' => 'Sin elementos',
|
||||
'Brick:Portal:Browse:Mosaic:Back' => 'Volver',
|
||||
));
|
||||
]);
|
||||
|
||||
// ManageBrick brick
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array(
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellano', [
|
||||
'Brick:Portal:Manage:Name' => 'Administrar elementos',
|
||||
'Brick:Portal:Manage:Table:NoData' => 'Sin elementos',
|
||||
'Brick:Portal:Manage:Table:ItemActions' => 'Acciones',
|
||||
@@ -114,10 +115,10 @@ Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array(
|
||||
'Brick:Portal:Manage:fct:avg' => 'Promedio',
|
||||
'Brick:Portal:Manage:fct:min' => 'Mínimo',
|
||||
'Brick:Portal:Manage:fct:max' => 'Máximo',
|
||||
));
|
||||
]);
|
||||
|
||||
// ObjectBrick brick
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array(
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellano', [
|
||||
'Brick:Portal:Object:Name' => 'Objecto',
|
||||
'Brick:Portal:Object:Form:Create:Title' => 'Nuevo %1$s',
|
||||
'Brick:Portal:Object:Form:Edit:Title' => 'Actualizando %1$s',
|
||||
@@ -129,18 +130,18 @@ Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array(
|
||||
'Brick:Portal:Object:Search:Hierarchy:Title' => 'Selección %1$s',
|
||||
'Brick:Portal:Object:Copy:TextToCopy' => '%2$s',
|
||||
'Brick:Portal:Object:Copy:Tooltip' => 'Copiar liga al objeto',
|
||||
'Brick:Portal:Object:Copy:CopiedTooltip' => 'Copiado'
|
||||
));
|
||||
'Brick:Portal:Object:Copy:CopiedTooltip' => 'Copiado',
|
||||
]);
|
||||
|
||||
// CreateBrick brick
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array(
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellano', [
|
||||
'Brick:Portal:Create:Name' => 'Creación rápida',
|
||||
'Brick:Portal:Create:ChooseType' => 'Por favor, seleccione un tipo',
|
||||
));
|
||||
]);
|
||||
|
||||
// Filter brick
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array(
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellano', [
|
||||
'Brick:Portal:Filter:Name' => 'Prefiltrar bloque',
|
||||
'Brick:Portal:Filter:SearchInput:Placeholder' => 'Ej.:. Conectar a WiFi',
|
||||
'Brick:Portal:Filter:SearchInput:Submit' => 'Buscar',
|
||||
));
|
||||
]);
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('FR FR', 'French', 'Français', array(
|
||||
Dict::Add('FR FR', 'French', 'Français', [
|
||||
'Page:DefaultTitle' => 'Portail utilisateur %1$s',
|
||||
'Page:PleaseWait' => 'Veuillez patienter...',
|
||||
'Page:Home' => 'Accueil',
|
||||
@@ -53,19 +54,19 @@ Dict::Add('FR FR', 'French', 'Français', array(
|
||||
'Portal:File:DisplayInfo' => '<a href="%2$s" class="file_download_link">%1$s</a>',
|
||||
'Portal:File:DisplayInfo+' => '%1$s (%2$s) <a href="%3$s" class="file_open_link" target="_blank">Ouvrir</a> / <a href="%4$s" class="file_download_link">Télécharger</a>',
|
||||
'Portal:Calendar-FirstDayOfWeek' => 'fr', //work with moment.js locales
|
||||
));
|
||||
]);
|
||||
|
||||
// Object form
|
||||
Dict::Add('FR FR', 'French', 'Français', array(
|
||||
Dict::Add('FR FR', 'French', 'Français', [
|
||||
'Portal:Form:Caselog:Entry:Close:Tooltip' => 'Fermer cette entrée',
|
||||
'Portal:Form:Close:Warning' => 'Voulez-vous quitter ce formulaire ? Les données saisies seront perdues',
|
||||
'Portal:Error:ObjectCannotBeCreated' => 'Erreur: L\'objet n\'a pas été créé. Vérifiez les objets liés et les attachements avant de soumettre à nouveau le formulaire.',
|
||||
'Portal:Error:ObjectCannotBeUpdated' => 'Erreur: L\'objet n\'a pas été modifié. Vérifiez les objets liés et les attachements avant de soumettre à nouveau le formulaire.',
|
||||
'Portal:Error:CheckToWriteFailed' => 'Erreur durant la validation du champ \'%1$s\' : %2$s',
|
||||
));
|
||||
'Portal:Error:CheckToWriteFailed' => 'Erreur durant la validation du champ \'%1$s\' : %2$s',
|
||||
]);
|
||||
|
||||
// UserProfile brick
|
||||
Dict::Add('FR FR', 'French', 'Français', array(
|
||||
Dict::Add('FR FR', 'French', 'Français', [
|
||||
'Brick:Portal:UserProfile:Name' => 'Profil utilisateur',
|
||||
'Brick:Portal:UserProfile:Navigation:Dropdown:MyProfil' => 'Mon profil',
|
||||
'Brick:Portal:UserProfile:Navigation:Dropdown:Logout' => 'Déconnexion',
|
||||
@@ -76,15 +77,15 @@ Dict::Add('FR FR', 'French', 'Français', array(
|
||||
'Brick:Portal:UserProfile:Password:CantChangeForUnknownReason' => 'Impossible de modifier votre mot de passe, veuillez contacter votre administrateur %1$s',
|
||||
'Brick:Portal:UserProfile:PersonalInformations:Title' => 'Informations personnelles',
|
||||
'Brick:Portal:UserProfile:Photo:Title' => 'Photo',
|
||||
));
|
||||
]);
|
||||
|
||||
// AggregatePageBrick
|
||||
Dict::Add('FR FR', 'French', 'Français', array(
|
||||
Dict::Add('FR FR', 'French', 'Français', [
|
||||
'Brick:Portal:AggregatePage:DefaultTitle' => 'Tableau de bord',
|
||||
));
|
||||
]);
|
||||
|
||||
// BrowseBrick brick
|
||||
Dict::Add('FR FR', 'French', 'Français', array(
|
||||
Dict::Add('FR FR', 'French', 'Français', [
|
||||
'Brick:Portal:Browse:Name' => 'Navigation dans les éléments',
|
||||
'Brick:Portal:Browse:Mode:List' => 'Liste',
|
||||
'Brick:Portal:Browse:Mode:Tree' => 'Hiérarchie',
|
||||
@@ -98,10 +99,10 @@ Dict::Add('FR FR', 'French', 'Français', array(
|
||||
'Brick:Portal:Browse:Tree:CollapseAll' => 'Tout replier',
|
||||
'Brick:Portal:Browse:Filter:NoData' => 'Aucun élément',
|
||||
'Brick:Portal:Browse:Mosaic:Back' => 'Retour',
|
||||
));
|
||||
]);
|
||||
|
||||
// ManageBrick brick
|
||||
Dict::Add('FR FR', 'French', 'Français', array(
|
||||
Dict::Add('FR FR', 'French', 'Français', [
|
||||
'Brick:Portal:Manage:Name' => 'Gestion d\'éléments',
|
||||
'Brick:Portal:Manage:Table:NoData' => 'Aucun élément',
|
||||
'Brick:Portal:Manage:Table:ItemActions' => 'Actions',
|
||||
@@ -116,10 +117,10 @@ Dict::Add('FR FR', 'French', 'Français', array(
|
||||
'Brick:Portal:Manage:fct:avg' => 'Moyenne',
|
||||
'Brick:Portal:Manage:fct:min' => 'Min',
|
||||
'Brick:Portal:Manage:fct:max' => 'Max',
|
||||
));
|
||||
]);
|
||||
|
||||
// ObjectBrick brick
|
||||
Dict::Add('FR FR', 'French', 'Français', array(
|
||||
Dict::Add('FR FR', 'French', 'Français', [
|
||||
'Brick:Portal:Object:Name' => 'Objet',
|
||||
'Brick:Portal:Object:Form:Create:Title' => 'Création de %1$s',
|
||||
'Brick:Portal:Object:Form:Edit:Title' => 'Modification de %1$s',
|
||||
@@ -131,18 +132,18 @@ Dict::Add('FR FR', 'French', 'Français', array(
|
||||
'Brick:Portal:Object:Search:Hierarchy:Title' => 'Sélection de %1$s',
|
||||
'Brick:Portal:Object:Copy:TextToCopy' => '%2$s',
|
||||
'Brick:Portal:Object:Copy:Tooltip' => 'Copier l\'url de l\'objet',
|
||||
'Brick:Portal:Object:Copy:CopiedTooltip' => 'Copié'
|
||||
));
|
||||
'Brick:Portal:Object:Copy:CopiedTooltip' => 'Copié',
|
||||
]);
|
||||
|
||||
// CreateBrick brick
|
||||
Dict::Add('FR FR', 'French', 'Français', array(
|
||||
Dict::Add('FR FR', 'French', 'Français', [
|
||||
'Brick:Portal:Create:Name' => 'Création rapide',
|
||||
'Brick:Portal:Create:ChooseType' => 'Veuillez choisir le type',
|
||||
));
|
||||
]);
|
||||
|
||||
// Filter brick
|
||||
Dict::Add('FR FR', 'French', 'Français', array(
|
||||
Dict::Add('FR FR', 'French', 'Français', [
|
||||
'Brick:Portal:Filter:Name' => 'Préfiltre une brique',
|
||||
'Brick:Portal:Filter:SearchInput:Placeholder' => 'ex : connecter wifi',
|
||||
'Brick:Portal:Filter:SearchInput:Submit' => 'Rechercher',
|
||||
));
|
||||
]);
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('HU HU', 'Hungarian', 'Magyar', array(
|
||||
Dict::Add('HU HU', 'Hungarian', 'Magyar', [
|
||||
'Page:DefaultTitle' => '%1$s Felhasználói portál',
|
||||
'Page:PleaseWait' => 'Kérem várjon...',
|
||||
'Page:Home' => 'Kezdőlap',
|
||||
@@ -53,19 +54,19 @@ Dict::Add('HU HU', 'Hungarian', 'Magyar', array(
|
||||
'Portal:File:DisplayInfo' => '<a href="%2$s" class="file_download_link">%1$s</a>',
|
||||
'Portal:File:DisplayInfo+' => '%1$s (%2$s) <a href="%3$s" class="file_open_link" target="_blank">Megnyitás</a> / <a href="%4$s" class="file_download_link">Letöltés</a>',
|
||||
'Portal:Calendar-FirstDayOfWeek' => 'hu', //work with moment.js locales
|
||||
));
|
||||
]);
|
||||
|
||||
// Object form
|
||||
Dict::Add('HU HU', 'Hungarian', 'Magyar', array(
|
||||
Dict::Add('HU HU', 'Hungarian', 'Magyar', [
|
||||
'Portal:Form:Caselog:Entry:Close:Tooltip' => 'Bejegyzés bezárása',
|
||||
'Portal:Form:Close:Warning' => 'Szeretné elhagyni ezt az űrlapot? A megadott adatok elveszhetnek',
|
||||
'Portal:Error:ObjectCannotBeCreated' => 'Hiba: az objektum nem hozható létre. Ellenőrizze a kapcsolódó objektumokat és mellékleteket, mielőtt újra elküldi ezt az űrlapot.',
|
||||
'Portal:Error:ObjectCannotBeUpdated' => 'Hiba: az objektum nem frissíthető. Ellenőrizze a kapcsolódó objektumokat és mellékleteket, mielőtt újra elküldi ezt az űrlapot.',
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
));
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
]);
|
||||
|
||||
// UserProfile brick
|
||||
Dict::Add('HU HU', 'Hungarian', 'Magyar', array(
|
||||
Dict::Add('HU HU', 'Hungarian', 'Magyar', [
|
||||
'Brick:Portal:UserProfile:Name' => 'Felhasználói profil',
|
||||
'Brick:Portal:UserProfile:Navigation:Dropdown:MyProfil' => 'Saját profil',
|
||||
'Brick:Portal:UserProfile:Navigation:Dropdown:Logout' => 'Kijelentkezés',
|
||||
@@ -76,15 +77,15 @@ Dict::Add('HU HU', 'Hungarian', 'Magyar', array(
|
||||
'Brick:Portal:UserProfile:Password:CantChangeForUnknownReason' => 'Nem tudja megváltoztatni a jelszót, lépjen kapcsolatba a %1$s rendszergazdával',
|
||||
'Brick:Portal:UserProfile:PersonalInformations:Title' => 'Személyi adatok',
|
||||
'Brick:Portal:UserProfile:Photo:Title' => 'Fénykép',
|
||||
));
|
||||
]);
|
||||
|
||||
// AggregatePageBrick
|
||||
Dict::Add('HU HU', 'Hungarian', 'Magyar', array(
|
||||
Dict::Add('HU HU', 'Hungarian', 'Magyar', [
|
||||
'Brick:Portal:AggregatePage:DefaultTitle' => 'Műszerfal',
|
||||
));
|
||||
]);
|
||||
|
||||
// BrowseBrick brick
|
||||
Dict::Add('HU HU', 'Hungarian', 'Magyar', array(
|
||||
Dict::Add('HU HU', 'Hungarian', 'Magyar', [
|
||||
'Brick:Portal:Browse:Name' => 'Böngésszen az elemek között',
|
||||
'Brick:Portal:Browse:Mode:List' => 'Lista',
|
||||
'Brick:Portal:Browse:Mode:Tree' => 'Fa',
|
||||
@@ -98,10 +99,10 @@ Dict::Add('HU HU', 'Hungarian', 'Magyar', array(
|
||||
'Brick:Portal:Browse:Tree:CollapseAll' => 'Összecsukás',
|
||||
'Brick:Portal:Browse:Filter:NoData' => 'Nincs elem',
|
||||
'Brick:Portal:Browse:Mosaic:Back' => 'Vissza',
|
||||
));
|
||||
]);
|
||||
|
||||
// ManageBrick brick
|
||||
Dict::Add('HU HU', 'Hungarian', 'Magyar', array(
|
||||
Dict::Add('HU HU', 'Hungarian', 'Magyar', [
|
||||
'Brick:Portal:Manage:Name' => 'Elemek kezelése',
|
||||
'Brick:Portal:Manage:Table:NoData' => 'Nincs elem',
|
||||
'Brick:Portal:Manage:Table:ItemActions' => 'Műveletek',
|
||||
@@ -116,10 +117,10 @@ Dict::Add('HU HU', 'Hungarian', 'Magyar', array(
|
||||
'Brick:Portal:Manage:fct:avg' => 'Átlag',
|
||||
'Brick:Portal:Manage:fct:min' => 'Minimum',
|
||||
'Brick:Portal:Manage:fct:max' => 'Maximum',
|
||||
));
|
||||
]);
|
||||
|
||||
// ObjectBrick brick
|
||||
Dict::Add('HU HU', 'Hungarian', 'Magyar', array(
|
||||
Dict::Add('HU HU', 'Hungarian', 'Magyar', [
|
||||
'Brick:Portal:Object:Name' => 'Objektum',
|
||||
'Brick:Portal:Object:Form:Create:Title' => 'Új %1$s',
|
||||
'Brick:Portal:Object:Form:Edit:Title' => '%1$s frissítése',
|
||||
@@ -131,18 +132,18 @@ Dict::Add('HU HU', 'Hungarian', 'Magyar', array(
|
||||
'Brick:Portal:Object:Search:Hierarchy:Title' => '%1$s kiválasztása',
|
||||
'Brick:Portal:Object:Copy:TextToCopy' => '%2$s',
|
||||
'Brick:Portal:Object:Copy:Tooltip' => 'Objektum hivatkozás másolása',
|
||||
'Brick:Portal:Object:Copy:CopiedTooltip' => 'Másolva'
|
||||
));
|
||||
'Brick:Portal:Object:Copy:CopiedTooltip' => 'Másolva',
|
||||
]);
|
||||
|
||||
// CreateBrick brick
|
||||
Dict::Add('HU HU', 'Hungarian', 'Magyar', array(
|
||||
Dict::Add('HU HU', 'Hungarian', 'Magyar', [
|
||||
'Brick:Portal:Create:Name' => 'Gyors létrehozás',
|
||||
'Brick:Portal:Create:ChooseType' => 'Válasszon típust',
|
||||
));
|
||||
]);
|
||||
|
||||
// Filter brick
|
||||
Dict::Add('HU HU', 'Hungarian', 'Magyar', array(
|
||||
Dict::Add('HU HU', 'Hungarian', 'Magyar', [
|
||||
'Brick:Portal:Filter:Name' => 'Tégla előszűrése',
|
||||
'Brick:Portal:Filter:SearchInput:Placeholder' => 'pl. wifi kapcsolat',
|
||||
'Brick:Portal:Filter:SearchInput:Submit' => 'Keresés',
|
||||
));
|
||||
]);
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', [
|
||||
'Page:DefaultTitle' => '%1$s Portale Utente',
|
||||
'Page:PleaseWait' => 'Attendere…',
|
||||
'Page:Home' => 'Home',
|
||||
@@ -53,19 +54,19 @@ Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
'Portal:File:DisplayInfo' => '<a href="%2$s" class="file_download_link">%1$s</a>',
|
||||
'Portal:File:DisplayInfo+' => '%1$s (%2$s) <a href="%3$s" class="file_open_link" target="_blank">Open</a> / <a href="%4$s" class="file_download_link">Download</a>~~',
|
||||
'Portal:Calendar-FirstDayOfWeek' => 'it', //work with moment.js locales
|
||||
));
|
||||
]);
|
||||
|
||||
// Object form
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', [
|
||||
'Portal:Form:Caselog:Entry:Close:Tooltip' => 'Close this entry~~',
|
||||
'Portal:Form:Close:Warning' => 'Do you want to leave this form? Data entered may be lost~~',
|
||||
'Portal:Error:ObjectCannotBeCreated' => 'Error: object cannot be created. Check associated objects and attachments before submitting this form again.~~',
|
||||
'Portal:Error:ObjectCannotBeUpdated' => 'Error: object cannot be updated. Check associated objects and attachments before submitting this form again.~~',
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
));
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
]);
|
||||
|
||||
// UserProfile brick
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', [
|
||||
'Brick:Portal:UserProfile:Name' => 'User profile~~',
|
||||
'Brick:Portal:UserProfile:Navigation:Dropdown:MyProfil' => 'My profile~~',
|
||||
'Brick:Portal:UserProfile:Navigation:Dropdown:Logout' => 'Logoff~~',
|
||||
@@ -76,15 +77,15 @@ Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
'Brick:Portal:UserProfile:Password:CantChangeForUnknownReason' => 'Can\'t change password, please contact your %1$s administrator~~',
|
||||
'Brick:Portal:UserProfile:PersonalInformations:Title' => 'Personal information~~',
|
||||
'Brick:Portal:UserProfile:Photo:Title' => 'Photo~~',
|
||||
));
|
||||
]);
|
||||
|
||||
// AggregatePageBrick
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', [
|
||||
'Brick:Portal:AggregatePage:DefaultTitle' => 'Dashboard~~',
|
||||
));
|
||||
]);
|
||||
|
||||
// BrowseBrick brick
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', [
|
||||
'Brick:Portal:Browse:Name' => 'Browse throught items~~',
|
||||
'Brick:Portal:Browse:Mode:List' => 'List~~',
|
||||
'Brick:Portal:Browse:Mode:Tree' => 'Tree~~',
|
||||
@@ -98,10 +99,10 @@ Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
'Brick:Portal:Browse:Tree:CollapseAll' => 'Collapse all~~',
|
||||
'Brick:Portal:Browse:Filter:NoData' => 'No item~~',
|
||||
'Brick:Portal:Browse:Mosaic:Back' => 'Back~~',
|
||||
));
|
||||
]);
|
||||
|
||||
// ManageBrick brick
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', [
|
||||
'Brick:Portal:Manage:Name' => 'Manage items~~',
|
||||
'Brick:Portal:Manage:Table:NoData' => 'No item.~~',
|
||||
'Brick:Portal:Manage:Table:ItemActions' => 'Actions~~',
|
||||
@@ -116,10 +117,10 @@ Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
'Brick:Portal:Manage:fct:avg' => 'Average~~',
|
||||
'Brick:Portal:Manage:fct:min' => 'Min~~',
|
||||
'Brick:Portal:Manage:fct:max' => 'Max~~',
|
||||
));
|
||||
]);
|
||||
|
||||
// ObjectBrick brick
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', [
|
||||
'Brick:Portal:Object:Name' => 'Object~~',
|
||||
'Brick:Portal:Object:Form:Create:Title' => 'New %1$s~~',
|
||||
'Brick:Portal:Object:Form:Edit:Title' => 'Updating %1$s~~',
|
||||
@@ -131,18 +132,18 @@ Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
'Brick:Portal:Object:Search:Hierarchy:Title' => 'Select %1$s~~',
|
||||
'Brick:Portal:Object:Copy:TextToCopy' => '%2$s',
|
||||
'Brick:Portal:Object:Copy:Tooltip' => 'Copy object link~~',
|
||||
'Brick:Portal:Object:Copy:CopiedTooltip' => 'Copied~~'
|
||||
));
|
||||
'Brick:Portal:Object:Copy:CopiedTooltip' => 'Copied~~',
|
||||
]);
|
||||
|
||||
// CreateBrick brick
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', [
|
||||
'Brick:Portal:Create:Name' => 'Quick creation~~',
|
||||
'Brick:Portal:Create:ChooseType' => 'Please, choose a type~~',
|
||||
));
|
||||
]);
|
||||
|
||||
// Filter brick
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', [
|
||||
'Brick:Portal:Filter:Name' => 'Prefilter a brick~~',
|
||||
'Brick:Portal:Filter:SearchInput:Placeholder' => 'eg. connect wifi~~',
|
||||
'Brick:Portal:Filter:SearchInput:Submit' => 'Search~~',
|
||||
));
|
||||
]);
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('JA JP', 'Japanese', '日本語', array(
|
||||
Dict::Add('JA JP', 'Japanese', '日本語', [
|
||||
'Page:DefaultTitle' => '%1$s User portal~~',
|
||||
'Page:PleaseWait' => 'Please wait...~~',
|
||||
'Page:Home' => 'Home~~',
|
||||
@@ -53,19 +54,19 @@ Dict::Add('JA JP', 'Japanese', '日本語', array(
|
||||
'Portal:File:DisplayInfo' => '<a href="%2$s" class="file_download_link">%1$s</a>~~',
|
||||
'Portal:File:DisplayInfo+' => '%1$s (%2$s) <a href="%3$s" class="file_open_link" target="_blank">Open</a> / <a href="%4$s" class="file_download_link">Download</a>~~',
|
||||
'Portal:Calendar-FirstDayOfWeek' => 'ja', //work with moment.js locales
|
||||
));
|
||||
]);
|
||||
|
||||
// Object form
|
||||
Dict::Add('JA JP', 'Japanese', '日本語', array(
|
||||
Dict::Add('JA JP', 'Japanese', '日本語', [
|
||||
'Portal:Form:Caselog:Entry:Close:Tooltip' => 'Close this entry~~',
|
||||
'Portal:Form:Close:Warning' => 'Do you want to leave this form? Data entered may be lost~~',
|
||||
'Portal:Error:ObjectCannotBeCreated' => 'Error: object cannot be created. Check associated objects and attachments before submitting this form again.~~',
|
||||
'Portal:Error:ObjectCannotBeUpdated' => 'Error: object cannot be updated. Check associated objects and attachments before submitting this form again.~~',
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
));
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
]);
|
||||
|
||||
// UserProfile brick
|
||||
Dict::Add('JA JP', 'Japanese', '日本語', array(
|
||||
Dict::Add('JA JP', 'Japanese', '日本語', [
|
||||
'Brick:Portal:UserProfile:Name' => 'User profile~~',
|
||||
'Brick:Portal:UserProfile:Navigation:Dropdown:MyProfil' => 'My profile~~',
|
||||
'Brick:Portal:UserProfile:Navigation:Dropdown:Logout' => 'Logoff~~',
|
||||
@@ -76,15 +77,15 @@ Dict::Add('JA JP', 'Japanese', '日本語', array(
|
||||
'Brick:Portal:UserProfile:Password:CantChangeForUnknownReason' => 'Can\'t change password, please contact your %1$s administrator~~',
|
||||
'Brick:Portal:UserProfile:PersonalInformations:Title' => 'Personal information~~',
|
||||
'Brick:Portal:UserProfile:Photo:Title' => 'Photo~~',
|
||||
));
|
||||
]);
|
||||
|
||||
// AggregatePageBrick
|
||||
Dict::Add('JA JP', 'Japanese', '日本語', array(
|
||||
Dict::Add('JA JP', 'Japanese', '日本語', [
|
||||
'Brick:Portal:AggregatePage:DefaultTitle' => 'Dashboard~~',
|
||||
));
|
||||
]);
|
||||
|
||||
// BrowseBrick brick
|
||||
Dict::Add('JA JP', 'Japanese', '日本語', array(
|
||||
Dict::Add('JA JP', 'Japanese', '日本語', [
|
||||
'Brick:Portal:Browse:Name' => 'Browse throught items~~',
|
||||
'Brick:Portal:Browse:Mode:List' => 'List~~',
|
||||
'Brick:Portal:Browse:Mode:Tree' => 'Tree~~',
|
||||
@@ -98,10 +99,10 @@ Dict::Add('JA JP', 'Japanese', '日本語', array(
|
||||
'Brick:Portal:Browse:Tree:CollapseAll' => 'Collapse all~~',
|
||||
'Brick:Portal:Browse:Filter:NoData' => 'No item~~',
|
||||
'Brick:Portal:Browse:Mosaic:Back' => 'Back~~',
|
||||
));
|
||||
]);
|
||||
|
||||
// ManageBrick brick
|
||||
Dict::Add('JA JP', 'Japanese', '日本語', array(
|
||||
Dict::Add('JA JP', 'Japanese', '日本語', [
|
||||
'Brick:Portal:Manage:Name' => 'Manage items~~',
|
||||
'Brick:Portal:Manage:Table:NoData' => 'No item.~~',
|
||||
'Brick:Portal:Manage:Table:ItemActions' => 'Actions~~',
|
||||
@@ -116,10 +117,10 @@ Dict::Add('JA JP', 'Japanese', '日本語', array(
|
||||
'Brick:Portal:Manage:fct:avg' => 'Average~~',
|
||||
'Brick:Portal:Manage:fct:min' => 'Min~~',
|
||||
'Brick:Portal:Manage:fct:max' => 'Max~~',
|
||||
));
|
||||
]);
|
||||
|
||||
// ObjectBrick brick
|
||||
Dict::Add('JA JP', 'Japanese', '日本語', array(
|
||||
Dict::Add('JA JP', 'Japanese', '日本語', [
|
||||
'Brick:Portal:Object:Name' => 'Object~~',
|
||||
'Brick:Portal:Object:Form:Create:Title' => 'New %1$s~~',
|
||||
'Brick:Portal:Object:Form:Edit:Title' => 'Updating %1$s~~',
|
||||
@@ -131,18 +132,18 @@ Dict::Add('JA JP', 'Japanese', '日本語', array(
|
||||
'Brick:Portal:Object:Search:Hierarchy:Title' => 'Select %1$s~~',
|
||||
'Brick:Portal:Object:Copy:TextToCopy' => '%2$s',
|
||||
'Brick:Portal:Object:Copy:Tooltip' => 'Copy object link~~',
|
||||
'Brick:Portal:Object:Copy:CopiedTooltip' => 'Copied~~'
|
||||
));
|
||||
'Brick:Portal:Object:Copy:CopiedTooltip' => 'Copied~~',
|
||||
]);
|
||||
|
||||
// CreateBrick brick
|
||||
Dict::Add('JA JP', 'Japanese', '日本語', array(
|
||||
Dict::Add('JA JP', 'Japanese', '日本語', [
|
||||
'Brick:Portal:Create:Name' => 'Quick creation~~',
|
||||
'Brick:Portal:Create:ChooseType' => 'Please, choose a type~~',
|
||||
));
|
||||
]);
|
||||
|
||||
// Filter brick
|
||||
Dict::Add('JA JP', 'Japanese', '日本語', array(
|
||||
Dict::Add('JA JP', 'Japanese', '日本語', [
|
||||
'Brick:Portal:Filter:Name' => 'Prefilter a brick~~',
|
||||
'Brick:Portal:Filter:SearchInput:Placeholder' => 'eg. connect wifi~~',
|
||||
'Brick:Portal:Filter:SearchInput:Submit' => 'Search~~',
|
||||
));
|
||||
]);
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* @author Jeffrey Bostoen <info@jeffreybostoen.be> (2018 - 2022)
|
||||
*
|
||||
*/
|
||||
Dict::Add('NL NL', 'Dutch', 'Nederlands', array(
|
||||
Dict::Add('NL NL', 'Dutch', 'Nederlands', [
|
||||
'Page:DefaultTitle' => '%1$s Gebruikersportaal',
|
||||
'Page:PleaseWait' => 'Even geduld...',
|
||||
'Page:Home' => 'Welkom',
|
||||
@@ -54,19 +55,19 @@ Dict::Add('NL NL', 'Dutch', 'Nederlands', array(
|
||||
'Portal:File:DisplayInfo' => '<a href="%2$s" class="file_download_link">%1$s</a>',
|
||||
'Portal:File:DisplayInfo+' => '%1$s (%2$s) <a href="%3$s" class="file_open_link" target="_blank">Open</a> / <a href="%4$s" class="file_download_link">Download</a>',
|
||||
'Portal:Calendar-FirstDayOfWeek' => 'nl', //work with moment.js locales
|
||||
));
|
||||
]);
|
||||
|
||||
// Object form
|
||||
Dict::Add('NL NL', 'Dutch', 'Nederlands', array(
|
||||
Dict::Add('NL NL', 'Dutch', 'Nederlands', [
|
||||
'Portal:Form:Caselog:Entry:Close:Tooltip' => 'Sluit dit item.',
|
||||
'Portal:Form:Close:Warning' => 'Ben je zeker dat je dit venster wil sluiten? Ingevoerde gegevens kunnen verloren gaan.',
|
||||
'Portal:Error:ObjectCannotBeCreated' => 'Fout: object kan niet worden aangemaakt. Kijk verwante objecten en bijlagen na vooraleer dit formulier opnieuw te versturen.',
|
||||
'Portal:Error:ObjectCannotBeUpdated' => 'Fout: object kan niet worden aangepast. Kijk verwante objecten en bijlagen na vooraleer dit formulier opnieuw te versturen.',
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
));
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
]);
|
||||
|
||||
// UserProfile brick
|
||||
Dict::Add('NL NL', 'Dutch', 'Nederlands', array(
|
||||
Dict::Add('NL NL', 'Dutch', 'Nederlands', [
|
||||
'Brick:Portal:UserProfile:Name' => 'Gebruikersprofiel',
|
||||
'Brick:Portal:UserProfile:Navigation:Dropdown:MyProfil' => 'Mijn profiel',
|
||||
'Brick:Portal:UserProfile:Navigation:Dropdown:Logout' => 'Uitloggen',
|
||||
@@ -77,15 +78,15 @@ Dict::Add('NL NL', 'Dutch', 'Nederlands', array(
|
||||
'Brick:Portal:UserProfile:Password:CantChangeForUnknownReason' => 'Jouw wachtwoord kan niet gewijzigd worden. Neem contact op met de beheerder',
|
||||
'Brick:Portal:UserProfile:PersonalInformations:Title' => 'Persoonlijke informatie',
|
||||
'Brick:Portal:UserProfile:Photo:Title' => 'Foto',
|
||||
));
|
||||
]);
|
||||
|
||||
// AggregatePageBrick
|
||||
Dict::Add('NL NL', 'Dutch', 'Nederlands', array(
|
||||
Dict::Add('NL NL', 'Dutch', 'Nederlands', [
|
||||
'Brick:Portal:AggregatePage:DefaultTitle' => 'Dashboard',
|
||||
));
|
||||
]);
|
||||
|
||||
// BrowseBrick brick
|
||||
Dict::Add('NL NL', 'Dutch', 'Nederlands', array(
|
||||
Dict::Add('NL NL', 'Dutch', 'Nederlands', [
|
||||
'Brick:Portal:Browse:Name' => 'Bladeren',
|
||||
'Brick:Portal:Browse:Mode:List' => 'Lijst',
|
||||
'Brick:Portal:Browse:Mode:Tree' => 'Boomstructuur',
|
||||
@@ -99,10 +100,10 @@ Dict::Add('NL NL', 'Dutch', 'Nederlands', array(
|
||||
'Brick:Portal:Browse:Tree:CollapseAll' => 'Verberg alles',
|
||||
'Brick:Portal:Browse:Filter:NoData' => 'Geen gegevens',
|
||||
'Brick:Portal:Browse:Mosaic:Back' => 'Terug',
|
||||
));
|
||||
]);
|
||||
|
||||
// ManageBrick brick
|
||||
Dict::Add('NL NL', 'Dutch', 'Nederlands', array(
|
||||
Dict::Add('NL NL', 'Dutch', 'Nederlands', [
|
||||
'Brick:Portal:Manage:Name' => 'Beheer items',
|
||||
'Brick:Portal:Manage:Table:NoData' => 'Geen gegevens',
|
||||
'Brick:Portal:Manage:Table:ItemActions' => 'Acties',
|
||||
@@ -117,10 +118,10 @@ Dict::Add('NL NL', 'Dutch', 'Nederlands', array(
|
||||
'Brick:Portal:Manage:fct:avg' => 'Gemiddelde',
|
||||
'Brick:Portal:Manage:fct:min' => 'Min',
|
||||
'Brick:Portal:Manage:fct:max' => 'Max',
|
||||
));
|
||||
]);
|
||||
|
||||
// ObjectBrick brick
|
||||
Dict::Add('NL NL', 'Dutch', 'Nederlands', array(
|
||||
Dict::Add('NL NL', 'Dutch', 'Nederlands', [
|
||||
'Brick:Portal:Object:Name' => 'Object',
|
||||
'Brick:Portal:Object:Form:Create:Title' => 'Nieuw %1$s',
|
||||
'Brick:Portal:Object:Form:Edit:Title' => 'Verwerken %1$s',
|
||||
@@ -132,18 +133,18 @@ Dict::Add('NL NL', 'Dutch', 'Nederlands', array(
|
||||
'Brick:Portal:Object:Search:Hierarchy:Title' => 'Selecteer %1$s',
|
||||
'Brick:Portal:Object:Copy:TextToCopy' => '%2$s',
|
||||
'Brick:Portal:Object:Copy:Tooltip' => 'Kopieer link naar object',
|
||||
'Brick:Portal:Object:Copy:CopiedTooltip' => 'Gekopieerd'
|
||||
));
|
||||
'Brick:Portal:Object:Copy:CopiedTooltip' => 'Gekopieerd',
|
||||
]);
|
||||
|
||||
// CreateBrick brick
|
||||
Dict::Add('NL NL', 'Dutch', 'Nederlands', array(
|
||||
Dict::Add('NL NL', 'Dutch', 'Nederlands', [
|
||||
'Brick:Portal:Create:Name' => 'Snel aanmaken',
|
||||
'Brick:Portal:Create:ChooseType' => 'Geef een type op.',
|
||||
));
|
||||
]);
|
||||
|
||||
// Filter brick
|
||||
Dict::Add('NL NL', 'Dutch', 'Nederlands', array(
|
||||
Dict::Add('NL NL', 'Dutch', 'Nederlands', [
|
||||
'Brick:Portal:Filter:Name' => 'Voorfilteren van een bouwsteen',
|
||||
'Brick:Portal:Filter:SearchInput:Placeholder' => 'bv. wifi-verbinding',
|
||||
'Brick:Portal:Filter:SearchInput:Submit' => 'Zoek',
|
||||
));
|
||||
]);
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('PL PL', 'Polish', 'Polski', array(
|
||||
Dict::Add('PL PL', 'Polish', 'Polski', [
|
||||
'Page:DefaultTitle' => '%1$s portal użytkownika',
|
||||
'Page:PleaseWait' => 'Proszę czekać...',
|
||||
'Page:Home' => 'Start',
|
||||
@@ -53,19 +54,19 @@ Dict::Add('PL PL', 'Polish', 'Polski', array(
|
||||
'Portal:File:DisplayInfo' => '<a href="%2$s" class="file_download_link">%1$s</a>',
|
||||
'Portal:File:DisplayInfo+' => '%1$s (%2$s) <a href="%3$s" class="file_open_link" target="_blank">Open</a> / <a href="%4$s" class="file_download_link">Pobierz</a>',
|
||||
'Portal:Calendar-FirstDayOfWeek' => 'en-us', //work with moment.js locales
|
||||
));
|
||||
]);
|
||||
|
||||
// Object form
|
||||
Dict::Add('PL PL', 'Polish', 'Polski', array(
|
||||
Dict::Add('PL PL', 'Polish', 'Polski', [
|
||||
'Portal:Form:Caselog:Entry:Close:Tooltip' => 'Zamknij ten wpis',
|
||||
'Portal:Form:Close:Warning' => 'Chcesz opuścić ten formularz? Wprowadzone dane mogą zostać utracone',
|
||||
'Portal:Error:ObjectCannotBeCreated' => 'Błąd: nie można utworzyć obiektu. Sprawdź powiązane obiekty i załączniki przed ponownym przesłaniem tego formularza.',
|
||||
'Portal:Error:ObjectCannotBeUpdated' => 'Błąd: nie można zaktualizować obiektu. Sprawdź powiązane obiekty i załączniki przed ponownym przesłaniem tego formularza.',
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
));
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
]);
|
||||
|
||||
// UserProfile brick
|
||||
Dict::Add('PL PL', 'Polish', 'Polski', array(
|
||||
Dict::Add('PL PL', 'Polish', 'Polski', [
|
||||
'Brick:Portal:UserProfile:Name' => 'Profil użytkownika',
|
||||
'Brick:Portal:UserProfile:Navigation:Dropdown:MyProfil' => 'Mój profil',
|
||||
'Brick:Portal:UserProfile:Navigation:Dropdown:Logout' => 'Wyloguj',
|
||||
@@ -76,15 +77,15 @@ Dict::Add('PL PL', 'Polish', 'Polski', array(
|
||||
'Brick:Portal:UserProfile:Password:CantChangeForUnknownReason' => 'Nie można zmienić hasła. Skontaktuj się z administratorem %1$s',
|
||||
'Brick:Portal:UserProfile:PersonalInformations:Title' => 'Informacje osobiste',
|
||||
'Brick:Portal:UserProfile:Photo:Title' => 'Zdjęcie',
|
||||
));
|
||||
]);
|
||||
|
||||
// AggregatePageBrick
|
||||
Dict::Add('PL PL', 'Polish', 'Polski', array(
|
||||
Dict::Add('PL PL', 'Polish', 'Polski', [
|
||||
'Brick:Portal:AggregatePage:DefaultTitle' => 'Pulpit',
|
||||
));
|
||||
]);
|
||||
|
||||
// BrowseBrick brick
|
||||
Dict::Add('PL PL', 'Polish', 'Polski', array(
|
||||
Dict::Add('PL PL', 'Polish', 'Polski', [
|
||||
'Brick:Portal:Browse:Name' => 'Przeglądaj elementy',
|
||||
'Brick:Portal:Browse:Mode:List' => 'Lista',
|
||||
'Brick:Portal:Browse:Mode:Tree' => 'Drzewo',
|
||||
@@ -98,10 +99,10 @@ Dict::Add('PL PL', 'Polish', 'Polski', array(
|
||||
'Brick:Portal:Browse:Tree:CollapseAll' => 'Zwiń wszystkie',
|
||||
'Brick:Portal:Browse:Filter:NoData' => 'Brak elementu',
|
||||
'Brick:Portal:Browse:Mosaic:Back' => 'Wstecz',
|
||||
));
|
||||
]);
|
||||
|
||||
// ManageBrick brick
|
||||
Dict::Add('PL PL', 'Polish', 'Polski', array(
|
||||
Dict::Add('PL PL', 'Polish', 'Polski', [
|
||||
'Brick:Portal:Manage:Name' => 'Zarządzaj elementami',
|
||||
'Brick:Portal:Manage:Table:NoData' => 'Brak elementu.',
|
||||
'Brick:Portal:Manage:Table:ItemActions' => 'Akcje',
|
||||
@@ -116,10 +117,10 @@ Dict::Add('PL PL', 'Polish', 'Polski', array(
|
||||
'Brick:Portal:Manage:fct:avg' => 'Średnia',
|
||||
'Brick:Portal:Manage:fct:min' => 'Minimum',
|
||||
'Brick:Portal:Manage:fct:max' => 'Maksimum',
|
||||
));
|
||||
]);
|
||||
|
||||
// ObjectBrick brick
|
||||
Dict::Add('PL PL', 'Polish', 'Polski', array(
|
||||
Dict::Add('PL PL', 'Polish', 'Polski', [
|
||||
'Brick:Portal:Object:Name' => 'Obiekty',
|
||||
'Brick:Portal:Object:Form:Create:Title' => 'Nowy %1$s',
|
||||
'Brick:Portal:Object:Form:Edit:Title' => 'Aktualizacja %1$s',
|
||||
@@ -131,18 +132,18 @@ Dict::Add('PL PL', 'Polish', 'Polski', array(
|
||||
'Brick:Portal:Object:Search:Hierarchy:Title' => 'Wybierz %1$s',
|
||||
'Brick:Portal:Object:Copy:TextToCopy' => '%2$s',
|
||||
'Brick:Portal:Object:Copy:Tooltip' => 'Skopiuj obiekt',
|
||||
'Brick:Portal:Object:Copy:CopiedTooltip' => 'Skopiowano'
|
||||
));
|
||||
'Brick:Portal:Object:Copy:CopiedTooltip' => 'Skopiowano',
|
||||
]);
|
||||
|
||||
// CreateBrick brick
|
||||
Dict::Add('PL PL', 'Polish', 'Polski', array(
|
||||
Dict::Add('PL PL', 'Polish', 'Polski', [
|
||||
'Brick:Portal:Create:Name' => 'Szybkie tworzenie',
|
||||
'Brick:Portal:Create:ChooseType' => 'Proszę wybrać typ',
|
||||
));
|
||||
]);
|
||||
|
||||
// Filter brick
|
||||
Dict::Add('PL PL', 'Polish', 'Polski', array(
|
||||
Dict::Add('PL PL', 'Polish', 'Polski', [
|
||||
'Brick:Portal:Filter:Name' => 'Wstępny filtr',
|
||||
'Brick:Portal:Filter:SearchInput:Placeholder' => 'na przykład. podłącz wifi',
|
||||
'Brick:Portal:Filter:SearchInput:Submit' => 'Szukaj',
|
||||
));
|
||||
]);
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', [
|
||||
'Page:DefaultTitle' => 'Portal do Usuário do '.ITOP_APPLICATION_SHORT,
|
||||
'Page:PleaseWait' => 'Aguarde...',
|
||||
'Page:Home' => 'Página inicial',
|
||||
@@ -53,19 +54,19 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
'Portal:File:DisplayInfo' => '<a href="%2$s" class="file_download_link">%1$s</a>',
|
||||
'Portal:File:DisplayInfo+' => '%1$s (%2$s) <a href="%3$s" class="file_open_link" target="_blank">Abrir</a> / <a href="%4$s" class="file_download_link">Download</a>',
|
||||
'Portal:Calendar-FirstDayOfWeek' => 'pt-br', //work with moment.js locales
|
||||
));
|
||||
]);
|
||||
|
||||
// Object form
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', [
|
||||
'Portal:Form:Caselog:Entry:Close:Tooltip' => 'Fechar esta solicitação',
|
||||
'Portal:Form:Close:Warning' => 'Você deseja abandonar esta página? Os dados digitados podem ser perdidos',
|
||||
'Portal:Error:ObjectCannotBeCreated' => 'Erro: objeto não pode ser criado. Verifique os objetos e anexos associados antes de enviar novamente este formulário',
|
||||
'Portal:Error:ObjectCannotBeUpdated' => 'Erro: objeto não pode ser atualizado. Verifique os objetos e anexos associados antes de enviar novamente este formulário',
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
));
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
]);
|
||||
|
||||
// UserProfile brick
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', [
|
||||
'Brick:Portal:UserProfile:Name' => 'Perfil de Usuário',
|
||||
'Brick:Portal:UserProfile:Navigation:Dropdown:MyProfil' => 'Meu Perfil',
|
||||
'Brick:Portal:UserProfile:Navigation:Dropdown:Logout' => 'Sair',
|
||||
@@ -76,15 +77,15 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
'Brick:Portal:UserProfile:Password:CantChangeForUnknownReason' => 'Não foi possível alterar sua senha, entre em contato com a T.I.',
|
||||
'Brick:Portal:UserProfile:PersonalInformations:Title' => 'Informações pessoais',
|
||||
'Brick:Portal:UserProfile:Photo:Title' => 'Imagem',
|
||||
));
|
||||
]);
|
||||
|
||||
// AggregatePageBrick
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', [
|
||||
'Brick:Portal:AggregatePage:DefaultTitle' => 'Painel do '.ITOP_APPLICATION_SHORT,
|
||||
));
|
||||
]);
|
||||
|
||||
// BrowseBrick brick
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', [
|
||||
'Brick:Portal:Browse:Name' => 'Navegar por itens',
|
||||
'Brick:Portal:Browse:Mode:List' => 'Lista',
|
||||
'Brick:Portal:Browse:Mode:Tree' => 'Cascata',
|
||||
@@ -98,10 +99,10 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
'Brick:Portal:Browse:Tree:CollapseAll' => 'Recolher todos',
|
||||
'Brick:Portal:Browse:Filter:NoData' => 'Sem dados',
|
||||
'Brick:Portal:Browse:Mosaic:Back' => 'Voltar',
|
||||
));
|
||||
]);
|
||||
|
||||
// ManageBrick brick
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', [
|
||||
'Brick:Portal:Manage:Name' => 'Gerenciar itens',
|
||||
'Brick:Portal:Manage:Table:NoData' => 'Sem dados',
|
||||
'Brick:Portal:Manage:Table:ItemActions' => 'Ações',
|
||||
@@ -116,10 +117,10 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
'Brick:Portal:Manage:fct:avg' => 'Média',
|
||||
'Brick:Portal:Manage:fct:min' => 'Min.',
|
||||
'Brick:Portal:Manage:fct:max' => 'Máx.',
|
||||
));
|
||||
]);
|
||||
|
||||
// ObjectBrick brick
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', [
|
||||
'Brick:Portal:Object:Name' => 'Objeto',
|
||||
'Brick:Portal:Object:Form:Create:Title' => 'Novo %1$s',
|
||||
'Brick:Portal:Object:Form:Edit:Title' => 'Alterar %1$s',
|
||||
@@ -131,18 +132,18 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
'Brick:Portal:Object:Search:Hierarchy:Title' => 'Selecionar %1$s',
|
||||
'Brick:Portal:Object:Copy:TextToCopy' => '%2$s',
|
||||
'Brick:Portal:Object:Copy:Tooltip' => 'Copiar',
|
||||
'Brick:Portal:Object:Copy:CopiedTooltip' => 'Copiado'
|
||||
));
|
||||
'Brick:Portal:Object:Copy:CopiedTooltip' => 'Copiado',
|
||||
]);
|
||||
|
||||
// CreateBrick brick
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', [
|
||||
'Brick:Portal:Create:Name' => 'Criação rápida',
|
||||
'Brick:Portal:Create:ChooseType' => 'Por favor, escolha um tipo:',
|
||||
));
|
||||
]);
|
||||
|
||||
// Filter brick
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', [
|
||||
'Brick:Portal:Filter:Name' => 'Filtro ativado',
|
||||
'Brick:Portal:Filter:SearchInput:Placeholder' => 'ex. conectar ao WiFi',
|
||||
'Brick:Portal:Filter:SearchInput:Submit' => 'Pesquisa',
|
||||
));
|
||||
]);
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* @author Vladimir Kunin <v.b.kunin@gmail.com>
|
||||
*
|
||||
*/
|
||||
Dict::Add('RU RU', 'Russian', 'Русский', array(
|
||||
Dict::Add('RU RU', 'Russian', 'Русский', [
|
||||
'Page:DefaultTitle' => 'Пользовательский портал %1$s',
|
||||
'Page:PleaseWait' => 'Пожалуйста, подождите...',
|
||||
'Page:Home' => 'Домашняя страница',
|
||||
@@ -54,19 +55,19 @@ Dict::Add('RU RU', 'Russian', 'Русский', array(
|
||||
'Portal:File:DisplayInfo' => '<a href="%2$s" class="file_download_link">%1$s</a>',
|
||||
'Portal:File:DisplayInfo+' => '%1$s (%2$s) <a href="%3$s" class="file_open_link" target="_blank">Открыть</a> / <a href="%4$s" class="file_download_link">Скачать</a>',
|
||||
'Portal:Calendar-FirstDayOfWeek' => 'ru', //work with moment.js locales
|
||||
));
|
||||
]);
|
||||
|
||||
// Object form
|
||||
Dict::Add('RU RU', 'Russian', 'Русский', array(
|
||||
Dict::Add('RU RU', 'Russian', 'Русский', [
|
||||
'Portal:Form:Caselog:Entry:Close:Tooltip' => 'Close this entry~~',
|
||||
'Portal:Form:Close:Warning' => 'Вы действительно хотите закрыть эту форму? Введённые данные могут быть утеряны.',
|
||||
'Portal:Error:ObjectCannotBeCreated' => 'Error: object cannot be created. Check associated objects and attachments before submitting this form again.~~',
|
||||
'Portal:Error:ObjectCannotBeUpdated' => 'Error: object cannot be updated. Check associated objects and attachments before submitting this form again.~~',
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
));
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
]);
|
||||
|
||||
// UserProfile brick
|
||||
Dict::Add('RU RU', 'Russian', 'Русский', array(
|
||||
Dict::Add('RU RU', 'Russian', 'Русский', [
|
||||
'Brick:Portal:UserProfile:Name' => 'Профиль пользователя',
|
||||
'Brick:Portal:UserProfile:Navigation:Dropdown:MyProfil' => 'Мой профиль',
|
||||
'Brick:Portal:UserProfile:Navigation:Dropdown:Logout' => 'Выйти',
|
||||
@@ -77,15 +78,15 @@ Dict::Add('RU RU', 'Russian', 'Русский', array(
|
||||
'Brick:Portal:UserProfile:Password:CantChangeForUnknownReason' => 'Не удалось изменить пароль, пожалуйста, свяжитесь с вашим администратором %1$s.',
|
||||
'Brick:Portal:UserProfile:PersonalInformations:Title' => 'Персональная информация',
|
||||
'Brick:Portal:UserProfile:Photo:Title' => 'Фотография',
|
||||
));
|
||||
]);
|
||||
|
||||
// AggregatePageBrick
|
||||
Dict::Add('RU RU', 'Russian', 'Русский', array(
|
||||
Dict::Add('RU RU', 'Russian', 'Русский', [
|
||||
'Brick:Portal:AggregatePage:DefaultTitle' => 'Дашборд',
|
||||
));
|
||||
]);
|
||||
|
||||
// BrowseBrick brick
|
||||
Dict::Add('RU RU', 'Russian', 'Русский', array(
|
||||
Dict::Add('RU RU', 'Russian', 'Русский', [
|
||||
'Brick:Portal:Browse:Name' => 'Просмотр элементов',
|
||||
'Brick:Portal:Browse:Mode:List' => 'Список',
|
||||
'Brick:Portal:Browse:Mode:Tree' => 'Дерево',
|
||||
@@ -99,10 +100,10 @@ Dict::Add('RU RU', 'Russian', 'Русский', array(
|
||||
'Brick:Portal:Browse:Tree:CollapseAll' => 'Свернуть все',
|
||||
'Brick:Portal:Browse:Filter:NoData' => 'Нет элементов',
|
||||
'Brick:Portal:Browse:Mosaic:Back' => 'Назад',
|
||||
));
|
||||
]);
|
||||
|
||||
// ManageBrick brick
|
||||
Dict::Add('RU RU', 'Russian', 'Русский', array(
|
||||
Dict::Add('RU RU', 'Russian', 'Русский', [
|
||||
'Brick:Portal:Manage:Name' => 'Управление элементами',
|
||||
'Brick:Portal:Manage:Table:NoData' => 'Нет элементов',
|
||||
'Brick:Portal:Manage:Table:ItemActions' => 'Действия',
|
||||
@@ -117,10 +118,10 @@ Dict::Add('RU RU', 'Russian', 'Русский', array(
|
||||
'Brick:Portal:Manage:fct:avg' => 'Среднее',
|
||||
'Brick:Portal:Manage:fct:min' => 'Минимум',
|
||||
'Brick:Portal:Manage:fct:max' => 'Максимум',
|
||||
));
|
||||
]);
|
||||
|
||||
// ObjectBrick brick
|
||||
Dict::Add('RU RU', 'Russian', 'Русский', array(
|
||||
Dict::Add('RU RU', 'Russian', 'Русский', [
|
||||
'Brick:Portal:Object:Name' => 'Object',
|
||||
'Brick:Portal:Object:Form:Create:Title' => 'Создать %1$s',
|
||||
'Brick:Portal:Object:Form:Edit:Title' => 'Обновление %1$s',
|
||||
@@ -132,18 +133,18 @@ Dict::Add('RU RU', 'Russian', 'Русский', array(
|
||||
'Brick:Portal:Object:Search:Hierarchy:Title' => 'Выбрать %1$s',
|
||||
'Brick:Portal:Object:Copy:TextToCopy' => '%2$s',
|
||||
'Brick:Portal:Object:Copy:Tooltip' => 'Скопировать ссылку на объект',
|
||||
'Brick:Portal:Object:Copy:CopiedTooltip' => 'Ссылка скопирована'
|
||||
));
|
||||
'Brick:Portal:Object:Copy:CopiedTooltip' => 'Ссылка скопирована',
|
||||
]);
|
||||
|
||||
// CreateBrick brick
|
||||
Dict::Add('RU RU', 'Russian', 'Русский', array(
|
||||
Dict::Add('RU RU', 'Russian', 'Русский', [
|
||||
'Brick:Portal:Create:Name' => 'Быстрое создание',
|
||||
'Brick:Portal:Create:ChooseType' => 'Пожалуйста, выберите тип',
|
||||
));
|
||||
]);
|
||||
|
||||
// Filter brick
|
||||
Dict::Add('RU RU', 'Russian', 'Русский', array(
|
||||
Dict::Add('RU RU', 'Russian', 'Русский', [
|
||||
'Brick:Portal:Filter:Name' => 'Фильтр',
|
||||
'Brick:Portal:Filter:SearchInput:Placeholder' => 'например, подключить wi-fi',
|
||||
'Brick:Portal:Filter:SearchInput:Submit' => 'Искать',
|
||||
));
|
||||
]);
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('SK SK', 'Slovak', 'Slovenčina', array(
|
||||
Dict::Add('SK SK', 'Slovak', 'Slovenčina', [
|
||||
'Page:DefaultTitle' => '%1$s User portal~~',
|
||||
'Page:PleaseWait' => 'Please wait...~~',
|
||||
'Page:Home' => 'Home~~',
|
||||
@@ -53,19 +54,19 @@ Dict::Add('SK SK', 'Slovak', 'Slovenčina', array(
|
||||
'Portal:File:DisplayInfo' => '<a href="%2$s" class="file_download_link">%1$s</a>~~',
|
||||
'Portal:File:DisplayInfo+' => '%1$s (%2$s) <a href="%3$s" class="file_open_link" target="_blank">Open</a> / <a href="%4$s" class="file_download_link">Download</a>~~',
|
||||
'Portal:Calendar-FirstDayOfWeek' => 'en-us~~', //work with moment.js locales
|
||||
));
|
||||
]);
|
||||
|
||||
// Object form
|
||||
Dict::Add('SK SK', 'Slovak', 'Slovenčina', array(
|
||||
Dict::Add('SK SK', 'Slovak', 'Slovenčina', [
|
||||
'Portal:Form:Caselog:Entry:Close:Tooltip' => 'Close this entry~~',
|
||||
'Portal:Form:Close:Warning' => 'Do you want to leave this form? Data entered may be lost~~',
|
||||
'Portal:Error:ObjectCannotBeCreated' => 'Error: object cannot be created. Check associated objects and attachments before submitting this form again.~~',
|
||||
'Portal:Error:ObjectCannotBeUpdated' => 'Error: object cannot be updated. Check associated objects and attachments before submitting this form again.~~',
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
));
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
]);
|
||||
|
||||
// UserProfile brick
|
||||
Dict::Add('SK SK', 'Slovak', 'Slovenčina', array(
|
||||
Dict::Add('SK SK', 'Slovak', 'Slovenčina', [
|
||||
'Brick:Portal:UserProfile:Name' => 'User profile~~',
|
||||
'Brick:Portal:UserProfile:Navigation:Dropdown:MyProfil' => 'My profile~~',
|
||||
'Brick:Portal:UserProfile:Navigation:Dropdown:Logout' => 'Logoff~~',
|
||||
@@ -76,15 +77,15 @@ Dict::Add('SK SK', 'Slovak', 'Slovenčina', array(
|
||||
'Brick:Portal:UserProfile:Password:CantChangeForUnknownReason' => 'Can\'t change password, please contact your %1$s administrator~~',
|
||||
'Brick:Portal:UserProfile:PersonalInformations:Title' => 'Personal information~~',
|
||||
'Brick:Portal:UserProfile:Photo:Title' => 'Photo~~',
|
||||
));
|
||||
]);
|
||||
|
||||
// AggregatePageBrick
|
||||
Dict::Add('SK SK', 'Slovak', 'Slovenčina', array(
|
||||
Dict::Add('SK SK', 'Slovak', 'Slovenčina', [
|
||||
'Brick:Portal:AggregatePage:DefaultTitle' => 'Dashboard~~',
|
||||
));
|
||||
]);
|
||||
|
||||
// BrowseBrick brick
|
||||
Dict::Add('SK SK', 'Slovak', 'Slovenčina', array(
|
||||
Dict::Add('SK SK', 'Slovak', 'Slovenčina', [
|
||||
'Brick:Portal:Browse:Name' => 'Browse throught items~~',
|
||||
'Brick:Portal:Browse:Mode:List' => 'List~~',
|
||||
'Brick:Portal:Browse:Mode:Tree' => 'Tree~~',
|
||||
@@ -98,10 +99,10 @@ Dict::Add('SK SK', 'Slovak', 'Slovenčina', array(
|
||||
'Brick:Portal:Browse:Tree:CollapseAll' => 'Collapse all~~',
|
||||
'Brick:Portal:Browse:Filter:NoData' => 'No item~~',
|
||||
'Brick:Portal:Browse:Mosaic:Back' => 'Back~~',
|
||||
));
|
||||
]);
|
||||
|
||||
// ManageBrick brick
|
||||
Dict::Add('SK SK', 'Slovak', 'Slovenčina', array(
|
||||
Dict::Add('SK SK', 'Slovak', 'Slovenčina', [
|
||||
'Brick:Portal:Manage:Name' => 'Manage items~~',
|
||||
'Brick:Portal:Manage:Table:NoData' => 'No item.~~',
|
||||
'Brick:Portal:Manage:Table:ItemActions' => 'Actions~~',
|
||||
@@ -116,10 +117,10 @@ Dict::Add('SK SK', 'Slovak', 'Slovenčina', array(
|
||||
'Brick:Portal:Manage:fct:avg' => 'Average~~',
|
||||
'Brick:Portal:Manage:fct:min' => 'Min~~',
|
||||
'Brick:Portal:Manage:fct:max' => 'Max~~',
|
||||
));
|
||||
]);
|
||||
|
||||
// ObjectBrick brick
|
||||
Dict::Add('SK SK', 'Slovak', 'Slovenčina', array(
|
||||
Dict::Add('SK SK', 'Slovak', 'Slovenčina', [
|
||||
'Brick:Portal:Object:Name' => 'Object~~',
|
||||
'Brick:Portal:Object:Form:Create:Title' => 'New %1$s~~',
|
||||
'Brick:Portal:Object:Form:Edit:Title' => 'Updating %1$s~~',
|
||||
@@ -131,18 +132,18 @@ Dict::Add('SK SK', 'Slovak', 'Slovenčina', array(
|
||||
'Brick:Portal:Object:Search:Hierarchy:Title' => 'Select %1$s~~',
|
||||
'Brick:Portal:Object:Copy:TextToCopy' => '%2$s',
|
||||
'Brick:Portal:Object:Copy:Tooltip' => 'Copy object link~~',
|
||||
'Brick:Portal:Object:Copy:CopiedTooltip' => 'Copied~~'
|
||||
));
|
||||
'Brick:Portal:Object:Copy:CopiedTooltip' => 'Copied~~',
|
||||
]);
|
||||
|
||||
// CreateBrick brick
|
||||
Dict::Add('SK SK', 'Slovak', 'Slovenčina', array(
|
||||
Dict::Add('SK SK', 'Slovak', 'Slovenčina', [
|
||||
'Brick:Portal:Create:Name' => 'Quick creation~~',
|
||||
'Brick:Portal:Create:ChooseType' => 'Please, choose a type~~',
|
||||
));
|
||||
]);
|
||||
|
||||
// Filter brick
|
||||
Dict::Add('SK SK', 'Slovak', 'Slovenčina', array(
|
||||
Dict::Add('SK SK', 'Slovak', 'Slovenčina', [
|
||||
'Brick:Portal:Filter:Name' => 'Prefilter a brick~~',
|
||||
'Brick:Portal:Filter:SearchInput:Placeholder' => 'eg. connect wifi~~',
|
||||
'Brick:Portal:Filter:SearchInput:Submit' => 'Search~~',
|
||||
));
|
||||
]);
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('TR TR', 'Turkish', 'Türkçe', array(
|
||||
Dict::Add('TR TR', 'Turkish', 'Türkçe', [
|
||||
'Page:DefaultTitle' => '%1$s User portal~~',
|
||||
'Page:PleaseWait' => 'Please wait...~~',
|
||||
'Page:Home' => 'Home~~',
|
||||
@@ -53,19 +54,19 @@ Dict::Add('TR TR', 'Turkish', 'Türkçe', array(
|
||||
'Portal:File:DisplayInfo' => '<a href="%2$s" class="file_download_link">%1$s</a>~~',
|
||||
'Portal:File:DisplayInfo+' => '%1$s (%2$s) <a href="%3$s" class="file_open_link" target="_blank">Open</a> / <a href="%4$s" class="file_download_link">Download</a>~~',
|
||||
'Portal:Calendar-FirstDayOfWeek' => 'tr', //work with moment.js locales
|
||||
));
|
||||
]);
|
||||
|
||||
// Object form
|
||||
Dict::Add('TR TR', 'Turkish', 'Türkçe', array(
|
||||
Dict::Add('TR TR', 'Turkish', 'Türkçe', [
|
||||
'Portal:Form:Caselog:Entry:Close:Tooltip' => 'Close this entry~~',
|
||||
'Portal:Form:Close:Warning' => 'Do you want to leave this form? Data entered may be lost~~',
|
||||
'Portal:Error:ObjectCannotBeCreated' => 'Error: object cannot be created. Check associated objects and attachments before submitting this form again.~~',
|
||||
'Portal:Error:ObjectCannotBeUpdated' => 'Error: object cannot be updated. Check associated objects and attachments before submitting this form again.~~',
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
));
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
]);
|
||||
|
||||
// UserProfile brick
|
||||
Dict::Add('TR TR', 'Turkish', 'Türkçe', array(
|
||||
Dict::Add('TR TR', 'Turkish', 'Türkçe', [
|
||||
'Brick:Portal:UserProfile:Name' => 'User profile~~',
|
||||
'Brick:Portal:UserProfile:Navigation:Dropdown:MyProfil' => 'My profile~~',
|
||||
'Brick:Portal:UserProfile:Navigation:Dropdown:Logout' => 'Logoff~~',
|
||||
@@ -76,15 +77,15 @@ Dict::Add('TR TR', 'Turkish', 'Türkçe', array(
|
||||
'Brick:Portal:UserProfile:Password:CantChangeForUnknownReason' => 'Can\'t change password, please contact your %1$s administrator~~',
|
||||
'Brick:Portal:UserProfile:PersonalInformations:Title' => 'Personal information~~',
|
||||
'Brick:Portal:UserProfile:Photo:Title' => 'Photo~~',
|
||||
));
|
||||
]);
|
||||
|
||||
// AggregatePageBrick
|
||||
Dict::Add('TR TR', 'Turkish', 'Türkçe', array(
|
||||
Dict::Add('TR TR', 'Turkish', 'Türkçe', [
|
||||
'Brick:Portal:AggregatePage:DefaultTitle' => 'Dashboard~~',
|
||||
));
|
||||
]);
|
||||
|
||||
// BrowseBrick brick
|
||||
Dict::Add('TR TR', 'Turkish', 'Türkçe', array(
|
||||
Dict::Add('TR TR', 'Turkish', 'Türkçe', [
|
||||
'Brick:Portal:Browse:Name' => 'Browse throught items~~',
|
||||
'Brick:Portal:Browse:Mode:List' => 'List~~',
|
||||
'Brick:Portal:Browse:Mode:Tree' => 'Tree~~',
|
||||
@@ -98,10 +99,10 @@ Dict::Add('TR TR', 'Turkish', 'Türkçe', array(
|
||||
'Brick:Portal:Browse:Tree:CollapseAll' => 'Collapse all~~',
|
||||
'Brick:Portal:Browse:Filter:NoData' => 'No item~~',
|
||||
'Brick:Portal:Browse:Mosaic:Back' => 'Back~~',
|
||||
));
|
||||
]);
|
||||
|
||||
// ManageBrick brick
|
||||
Dict::Add('TR TR', 'Turkish', 'Türkçe', array(
|
||||
Dict::Add('TR TR', 'Turkish', 'Türkçe', [
|
||||
'Brick:Portal:Manage:Name' => 'Manage items~~',
|
||||
'Brick:Portal:Manage:Table:NoData' => 'No item.~~',
|
||||
'Brick:Portal:Manage:Table:ItemActions' => 'Actions~~',
|
||||
@@ -116,10 +117,10 @@ Dict::Add('TR TR', 'Turkish', 'Türkçe', array(
|
||||
'Brick:Portal:Manage:fct:avg' => 'Average~~',
|
||||
'Brick:Portal:Manage:fct:min' => 'Min~~',
|
||||
'Brick:Portal:Manage:fct:max' => 'Max~~',
|
||||
));
|
||||
]);
|
||||
|
||||
// ObjectBrick brick
|
||||
Dict::Add('TR TR', 'Turkish', 'Türkçe', array(
|
||||
Dict::Add('TR TR', 'Turkish', 'Türkçe', [
|
||||
'Brick:Portal:Object:Name' => 'Object~~',
|
||||
'Brick:Portal:Object:Form:Create:Title' => 'New %1$s~~',
|
||||
'Brick:Portal:Object:Form:Edit:Title' => 'Updating %1$s~~',
|
||||
@@ -131,18 +132,18 @@ Dict::Add('TR TR', 'Turkish', 'Türkçe', array(
|
||||
'Brick:Portal:Object:Search:Hierarchy:Title' => 'Select %1$s~~',
|
||||
'Brick:Portal:Object:Copy:TextToCopy' => '%2$s',
|
||||
'Brick:Portal:Object:Copy:Tooltip' => 'Copy object link~~',
|
||||
'Brick:Portal:Object:Copy:CopiedTooltip' => 'Copied~~'
|
||||
));
|
||||
'Brick:Portal:Object:Copy:CopiedTooltip' => 'Copied~~',
|
||||
]);
|
||||
|
||||
// CreateBrick brick
|
||||
Dict::Add('TR TR', 'Turkish', 'Türkçe', array(
|
||||
Dict::Add('TR TR', 'Turkish', 'Türkçe', [
|
||||
'Brick:Portal:Create:Name' => 'Quick creation~~',
|
||||
'Brick:Portal:Create:ChooseType' => 'Please, choose a type~~',
|
||||
));
|
||||
]);
|
||||
|
||||
// Filter brick
|
||||
Dict::Add('TR TR', 'Turkish', 'Türkçe', array(
|
||||
Dict::Add('TR TR', 'Turkish', 'Türkçe', [
|
||||
'Brick:Portal:Filter:Name' => 'Prefilter a brick~~',
|
||||
'Brick:Portal:Filter:SearchInput:Placeholder' => 'eg. connect wifi~~',
|
||||
'Brick:Portal:Filter:SearchInput:Submit' => 'Search~~',
|
||||
));
|
||||
]);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
@@ -18,7 +19,7 @@
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
*/
|
||||
// Portal
|
||||
Dict::Add('ZH CN', 'Chinese', '简体中文', array(
|
||||
Dict::Add('ZH CN', 'Chinese', '简体中文', [
|
||||
'Page:DefaultTitle' => '%1$s 用户门户',
|
||||
'Page:PleaseWait' => '请稍候...',
|
||||
'Page:Home' => '主页',
|
||||
@@ -62,19 +63,19 @@ Dict::Add('ZH CN', 'Chinese', '简体中文', array(
|
||||
'Portal:File:DisplayInfo' => '<a href="%2$s" class="file_download_link">%1$s</a>',
|
||||
'Portal:File:DisplayInfo+' => '%1$s (%2$s) <a href="%3$s" class="file_open_link" target="_blank">打开</a> / <a href="%4$s" class="file_download_link">下载</a>',
|
||||
'Portal:Calendar-FirstDayOfWeek' => 'zh-cn', //work with moment.js locales
|
||||
));
|
||||
]);
|
||||
|
||||
// Object form
|
||||
Dict::Add('ZH CN', 'Chinese', '简体中文', array(
|
||||
Dict::Add('ZH CN', 'Chinese', '简体中文', [
|
||||
'Portal:Form:Caselog:Entry:Close:Tooltip' => '关闭此条目',
|
||||
'Portal:Form:Close:Warning' => '确定要离开表单吗? 已输入数据会丢失',
|
||||
'Portal:Error:ObjectCannotBeCreated' => '错误: 无法创建对象. 请在再次提交表单前检查相关对象和附件.',
|
||||
'Portal:Error:ObjectCannotBeUpdated' => '错误: 无法更新对象. 请在再次提交表单前检查相关对象和附件.',
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
));
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
]);
|
||||
|
||||
// UserProfile brick
|
||||
Dict::Add('ZH CN', 'Chinese', '简体中文', array(
|
||||
Dict::Add('ZH CN', 'Chinese', '简体中文', [
|
||||
'Brick:Portal:UserProfile:Name' => '用户资料',
|
||||
'Brick:Portal:UserProfile:Navigation:Dropdown:MyProfil' => '我的资料',
|
||||
'Brick:Portal:UserProfile:Navigation:Dropdown:Logout' => '注销',
|
||||
@@ -85,15 +86,15 @@ Dict::Add('ZH CN', 'Chinese', '简体中文', array(
|
||||
'Brick:Portal:UserProfile:Password:CantChangeForUnknownReason' => '无法修改密码, 请联系管理员',
|
||||
'Brick:Portal:UserProfile:PersonalInformations:Title' => '人员信息',
|
||||
'Brick:Portal:UserProfile:Photo:Title' => '头像',
|
||||
));
|
||||
]);
|
||||
|
||||
// AggregatePageBrick
|
||||
Dict::Add('ZH CN', 'Chinese', '简体中文', array(
|
||||
Dict::Add('ZH CN', 'Chinese', '简体中文', [
|
||||
'Brick:Portal:AggregatePage:DefaultTitle' => '仪表盘',
|
||||
));
|
||||
]);
|
||||
|
||||
// BrowseBrick brick
|
||||
Dict::Add('ZH CN', 'Chinese', '简体中文', array(
|
||||
Dict::Add('ZH CN', 'Chinese', '简体中文', [
|
||||
'Brick:Portal:Browse:Name' => '浏览项目',
|
||||
'Brick:Portal:Browse:Mode:List' => '列表',
|
||||
'Brick:Portal:Browse:Mode:Tree' => '树形',
|
||||
@@ -107,10 +108,10 @@ Dict::Add('ZH CN', 'Chinese', '简体中文', array(
|
||||
'Brick:Portal:Browse:Tree:CollapseAll' => '全部收起',
|
||||
'Brick:Portal:Browse:Filter:NoData' => '没有项目',
|
||||
'Brick:Portal:Browse:Mosaic:Back' => '返回',
|
||||
));
|
||||
]);
|
||||
|
||||
// ManageBrick brick
|
||||
Dict::Add('ZH CN', 'Chinese', '简体中文', array(
|
||||
Dict::Add('ZH CN', 'Chinese', '简体中文', [
|
||||
'Brick:Portal:Manage:Name' => '管理项目',
|
||||
'Brick:Portal:Manage:Table:NoData' => '没有项目.',
|
||||
'Brick:Portal:Manage:Table:ItemActions' => '操作',
|
||||
@@ -125,10 +126,10 @@ Dict::Add('ZH CN', 'Chinese', '简体中文', array(
|
||||
'Brick:Portal:Manage:fct:avg' => '平均',
|
||||
'Brick:Portal:Manage:fct:min' => '最小',
|
||||
'Brick:Portal:Manage:fct:max' => '最大',
|
||||
));
|
||||
]);
|
||||
|
||||
// ObjectBrick brick
|
||||
Dict::Add('ZH CN', 'Chinese', '简体中文', array(
|
||||
Dict::Add('ZH CN', 'Chinese', '简体中文', [
|
||||
'Brick:Portal:Object:Name' => '对象',
|
||||
'Brick:Portal:Object:Form:Create:Title' => '新建 %1$s',
|
||||
'Brick:Portal:Object:Form:Edit:Title' => '正在更新 %1$s',
|
||||
@@ -140,18 +141,18 @@ Dict::Add('ZH CN', 'Chinese', '简体中文', array(
|
||||
'Brick:Portal:Object:Search:Hierarchy:Title' => '选择 %1$s',
|
||||
'Brick:Portal:Object:Copy:TextToCopy' => '%2$s',
|
||||
'Brick:Portal:Object:Copy:Tooltip' => '复制对象链接',
|
||||
'Brick:Portal:Object:Copy:CopiedTooltip' => '已复制'
|
||||
));
|
||||
'Brick:Portal:Object:Copy:CopiedTooltip' => '已复制',
|
||||
]);
|
||||
|
||||
// CreateBrick brick
|
||||
Dict::Add('ZH CN', 'Chinese', '简体中文', array(
|
||||
Dict::Add('ZH CN', 'Chinese', '简体中文', [
|
||||
'Brick:Portal:Create:Name' => '快速创建',
|
||||
'Brick:Portal:Create:ChooseType' => '请选择类型',
|
||||
));
|
||||
]);
|
||||
|
||||
// Filter brick
|
||||
Dict::Add('ZH CN', 'Chinese', '简体中文', array(
|
||||
Dict::Add('ZH CN', 'Chinese', '简体中文', [
|
||||
'Brick:Portal:Filter:Name' => '预筛选组件',
|
||||
'Brick:Portal:Filter:SearchInput:Placeholder' => '例如. 连接wifi',
|
||||
'Brick:Portal:Filter:SearchInput:Submit' => '搜索',
|
||||
));
|
||||
]);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Copyright (C) 2013-2024 Combodo SAS
|
||||
*
|
||||
@@ -20,42 +21,42 @@
|
||||
/** @noinspection PhpUnhandledExceptionInspection */
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'itop-portal-base/3.3.0', array(
|
||||
'itop-portal-base/3.3.0',
|
||||
[
|
||||
// Identification
|
||||
'label' => 'Portal Development Library',
|
||||
'category' => 'Portal',
|
||||
// Setup
|
||||
'dependencies' => array(
|
||||
),
|
||||
'dependencies' => [
|
||||
],
|
||||
'mandatory' => true,
|
||||
'visible' => false,
|
||||
// Components
|
||||
'datamodel' => array(
|
||||
'datamodel' => [
|
||||
// Note: The autoloader is there instead of portal/config/bootstrap.php in order to be available for other modules with a dependency on this one.
|
||||
// eg. If a module has a class extending \Combodo\iTop\Portal\Controller\AbstractController, it needs to find it even if the portal kernel is not loaded.
|
||||
'portal/vendor/autoload.php',
|
||||
),
|
||||
'webservice' => array(
|
||||
],
|
||||
'webservice' => [
|
||||
//'webservices.itop-portal-base.php',
|
||||
),
|
||||
'dictionary' => array(
|
||||
),
|
||||
'data.struct' => array(
|
||||
],
|
||||
'dictionary' => [
|
||||
],
|
||||
'data.struct' => [
|
||||
//'data.struct.itop-portal-base.xml',
|
||||
),
|
||||
'data.sample' => array(
|
||||
],
|
||||
'data.sample' => [
|
||||
//'data.sample.itop-portal-base.xml',
|
||||
),
|
||||
],
|
||||
// Documentation
|
||||
'doc.manual_setup' => '',
|
||||
'doc.more_information' => '',
|
||||
// Default settings
|
||||
'settings' => array(
|
||||
),
|
||||
)
|
||||
'settings' => [
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
// ____ _ _ _ __ _ _ _ _ _______
|
||||
// | _ \| | ___ __ _ ___ ___ | |_ __ _| | _____ ___ __ _ _ __ ___ ___ / _| | |_| |__ ___ _ __ ___ _ __| |_ __ _| | / /___ /
|
||||
// | |_) | |/ _ \/ _` / __|/ _ \ | __/ _` | |/ / _ \ / __/ _` | '__/ _ \ / _ \| |_ | __| '_ \ / _ \ | '_ \ / _ \| '__| __/ _` | | / / |_ \
|
||||
|
||||
@@ -28,14 +28,10 @@ use Symfony\Component\Dotenv\Dotenv;
|
||||
require_once APPROOT.'/lib/autoload.php';
|
||||
|
||||
// Load current environment if necessary (typically from CLI as the app is not started yet)
|
||||
if (!defined('MODULESROOT'))
|
||||
{
|
||||
if (file_exists(__DIR__.'/../../../../approot.inc.php'))
|
||||
{
|
||||
if (!defined('MODULESROOT')) {
|
||||
if (file_exists(__DIR__.'/../../../../approot.inc.php')) {
|
||||
require_once __DIR__.'/../../../../approot.inc.php'; // When in env-xxxx folder
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
require_once __DIR__.'/../../../../../approot.inc.php'; // When in datamodels/x.x folder
|
||||
}
|
||||
require_once APPROOT.'/application/startup.inc.php';
|
||||
@@ -62,7 +58,7 @@ if (!class_exists(Dotenv::class)) {
|
||||
}
|
||||
|
||||
if (null === $sEnv = (isset($_SERVER['APP_ENV']) ? $_SERVER['APP_ENV'] : (isset($_ENV['APP_ENV']) ? $_ENV['APP_ENV'] : null))) {
|
||||
$oDotenv->populate(array('APP_ENV' => $sEnv = 'prod'));
|
||||
$oDotenv->populate(['APP_ENV' => $sEnv = 'prod']);
|
||||
}
|
||||
|
||||
if ('test' !== $sEnv && file_exists($sPathDist = "$sPath.local")) {
|
||||
@@ -83,31 +79,27 @@ if (!class_exists(Dotenv::class)) {
|
||||
$_SERVER += $_ENV;
|
||||
$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = (isset($_SERVER['APP_ENV']) ? $_SERVER['APP_ENV'] : (isset($_ENV['APP_ENV']) ? $_ENV['APP_ENV'] : null)) ?: 'prod';
|
||||
$_SERVER['APP_DEBUG'] = isset($_SERVER['APP_DEBUG']) ? $_SERVER['APP_DEBUG'] : (isset($_ENV['APP_DEBUG']) ? $_ENV['APP_DEBUG'] : ('prod' !== $_SERVER['APP_ENV']));
|
||||
$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = (int)$_SERVER['APP_DEBUG'] || filter_var($_SERVER['APP_DEBUG'],
|
||||
FILTER_VALIDATE_BOOLEAN) ? '1' : '0';
|
||||
$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = (int)$_SERVER['APP_DEBUG'] || filter_var(
|
||||
$_SERVER['APP_DEBUG'],
|
||||
FILTER_VALIDATE_BOOLEAN
|
||||
) ? '1' : '0';
|
||||
|
||||
if ($_SERVER['APP_DEBUG'])
|
||||
{
|
||||
if ($_SERVER['APP_DEBUG']) {
|
||||
umask(0000);
|
||||
|
||||
if (class_exists(Debug::class))
|
||||
{
|
||||
if (class_exists(Debug::class)) {
|
||||
Debug::enable();
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_ENV['PORTAL_ID']))
|
||||
{
|
||||
if (isset($_ENV['PORTAL_ID'])) {
|
||||
// Nothing to do
|
||||
}
|
||||
// Note: Default value is set to "false" to differentiate an empty value from a non given parameter
|
||||
elseif ($sPortalId = utils::ReadParam('portal_id', false, true))
|
||||
{
|
||||
elseif ($sPortalId = utils::ReadParam('portal_id', false, true)) {
|
||||
|
||||
$_ENV['PORTAL_ID'] = $sPortalId;
|
||||
}
|
||||
elseif (defined('PORTAL_ID'))
|
||||
{
|
||||
} elseif (defined('PORTAL_ID')) {
|
||||
$_ENV['PORTAL_ID'] = PORTAL_ID;
|
||||
@trigger_error(
|
||||
sprintf(
|
||||
@@ -118,16 +110,14 @@ elseif (defined('PORTAL_ID'))
|
||||
);
|
||||
}
|
||||
|
||||
if (empty($_ENV['PORTAL_ID']))
|
||||
{
|
||||
if (empty($_ENV['PORTAL_ID'])) {
|
||||
echo "Missing argument 'portal_id'";
|
||||
exit;
|
||||
}
|
||||
|
||||
// Make sure that the PORTAL_ID constant is also defined
|
||||
// Note: This is widely used in extensions, snippets and all
|
||||
if (!defined('PORTAL_ID'))
|
||||
{
|
||||
if (!defined('PORTAL_ID')) {
|
||||
define('PORTAL_ID', $_ENV['PORTAL_ID']);
|
||||
}
|
||||
|
||||
@@ -141,4 +131,4 @@ $_ENV['COMBODO_PORTAL_BASE_ABSOLUTE_URL'] = utils::GetAbsoluteUrlModulesRoot().'
|
||||
$_ENV['COMBODO_PORTAL_BASE_ABSOLUTE_PATH'] = MODULESROOT.'/itop-portal-base/portal/public/';
|
||||
$_ENV['COMBODO_PORTAL_INSTANCE_ABSOLUTE_URL'] = utils::GetAbsoluteUrlModulesRoot().$_ENV['PORTAL_ID'].'/';
|
||||
$_ENV['COMBODO_PORTAL_LANGUAGE'] = UserRights::GetUserLanguage();
|
||||
$_ENV['COMBODO_PORTAL_METADATA_LANGUAGE'] = strtolower(substr($_ENV['COMBODO_PORTAL_LANGUAGE'], 0, 2));;
|
||||
$_ENV['COMBODO_PORTAL_METADATA_LANGUAGE'] = strtolower(substr($_ENV['COMBODO_PORTAL_LANGUAGE'], 0, 2));;
|
||||
|
||||
@@ -32,87 +32,87 @@ use ModuleDesign;
|
||||
class ManageBrick extends PortalBrick
|
||||
{
|
||||
/** @var string ENUM_ACTION_VIEW */
|
||||
const ENUM_ACTION_VIEW = 'view';
|
||||
public const ENUM_ACTION_VIEW = 'view';
|
||||
/** @var string ENUM_ACTION_EDIT */
|
||||
const ENUM_ACTION_EDIT = 'edit';
|
||||
public const ENUM_ACTION_EDIT = 'edit';
|
||||
|
||||
/** @var string ENUM_TILE_MODE_TEXT */
|
||||
const ENUM_TILE_MODE_TEXT = 'text';
|
||||
public const ENUM_TILE_MODE_TEXT = 'text';
|
||||
/** @var string ENUM_TILE_MODE_BADGE */
|
||||
const ENUM_TILE_MODE_BADGE = 'badge';
|
||||
public const ENUM_TILE_MODE_BADGE = 'badge';
|
||||
/** @var string ENUM_TILE_MODE_PIE */
|
||||
const ENUM_TILE_MODE_PIE = 'pie-chart';
|
||||
public const ENUM_TILE_MODE_PIE = 'pie-chart';
|
||||
/** @var string ENUM_TILE_MODE_BAR */
|
||||
const ENUM_TILE_MODE_BAR = 'bar-chart';
|
||||
public const ENUM_TILE_MODE_BAR = 'bar-chart';
|
||||
/** @var string ENUM_TILE_MODE_TOP */
|
||||
const ENUM_TILE_MODE_TOP = 'top-list';
|
||||
public const ENUM_TILE_MODE_TOP = 'top-list';
|
||||
|
||||
/** @var string ENUM_DISPLAY_MODE_LIST */
|
||||
const ENUM_DISPLAY_MODE_LIST = 'list';
|
||||
public const ENUM_DISPLAY_MODE_LIST = 'list';
|
||||
/** @var string ENUM_DISPLAY_MODE_PIE */
|
||||
const ENUM_DISPLAY_MODE_PIE = 'pie-chart';
|
||||
public const ENUM_DISPLAY_MODE_PIE = 'pie-chart';
|
||||
/** @var string ENUM_DISPLAY_MODE_BAR */
|
||||
const ENUM_DISPLAY_MODE_BAR = 'bar-chart';
|
||||
public const ENUM_DISPLAY_MODE_BAR = 'bar-chart';
|
||||
|
||||
/** @var string ENUM_PAGE_TEMPLATE_PATH_TABLE
|
||||
* @deprecated since 3.2.1
|
||||
* */
|
||||
const ENUM_PAGE_TEMPLATE_PATH_TABLE = 'itop-portal-base/portal/templates/bricks/manage/layout-table.html.twig';
|
||||
public const ENUM_PAGE_TEMPLATE_PATH_TABLE = 'itop-portal-base/portal/templates/bricks/manage/layout-table.html.twig';
|
||||
/** @var string ENUM_PAGE_TEMPLATE_PATH_CHART
|
||||
* @deprecated since 3.2.1
|
||||
* */
|
||||
const ENUM_PAGE_TEMPLATE_PATH_CHART = 'itop-portal-base/portal/templates/bricks/manage/layout-chart.html.twig';
|
||||
public const ENUM_PAGE_TEMPLATE_PATH_CHART = 'itop-portal-base/portal/templates/bricks/manage/layout-chart.html.twig';
|
||||
|
||||
/** Overloaded constants */
|
||||
const DEFAULT_DECORATION_CLASS_HOME = 'fas fa-tag';
|
||||
const DEFAULT_DECORATION_CLASS_NAVIGATION_MENU = 'fas fa-tag fa-2x';
|
||||
public const DEFAULT_DECORATION_CLASS_HOME = 'fas fa-tag';
|
||||
public const DEFAULT_DECORATION_CLASS_NAVIGATION_MENU = 'fas fa-tag fa-2x';
|
||||
/**
|
||||
* @deprecated 3.2.1
|
||||
*/
|
||||
const DEFAULT_PAGE_TEMPLATE_PATH = self::ENUM_PAGE_TEMPLATE_PATH_TABLE;
|
||||
const DEFAULT_DATA_LOADING = self::ENUM_DATA_LOADING_LAZY;
|
||||
public const DEFAULT_PAGE_TEMPLATE_PATH = self::ENUM_PAGE_TEMPLATE_PATH_TABLE;
|
||||
public const DEFAULT_DATA_LOADING = self::ENUM_DATA_LOADING_LAZY;
|
||||
/**
|
||||
* @deprecated 3.2.1
|
||||
*/
|
||||
const DEFAULT_TILE_TEMPLATE_PATH = 'itop-portal-base/portal/templates/bricks/manage/tile-default.html.twig';
|
||||
const DEFAULT_TILE_CONTROLLER_ACTION = 'Combodo\\iTop\\Portal\\Controller\\ManageBrickController::TileAction';
|
||||
public const DEFAULT_TILE_TEMPLATE_PATH = 'itop-portal-base/portal/templates/bricks/manage/tile-default.html.twig';
|
||||
public const DEFAULT_TILE_CONTROLLER_ACTION = 'Combodo\\iTop\\Portal\\Controller\\ManageBrickController::TileAction';
|
||||
|
||||
/** @var string DEFAULT_OQL */
|
||||
const DEFAULT_OQL = '';
|
||||
public const DEFAULT_OQL = '';
|
||||
/** @var string DEFAULT_OPENING_MODE */
|
||||
const DEFAULT_OPENING_MODE = self::ENUM_ACTION_EDIT;
|
||||
public const DEFAULT_OPENING_MODE = self::ENUM_ACTION_EDIT;
|
||||
/** @var int DEFAULT_LIST_LENGTH */
|
||||
const DEFAULT_LIST_LENGTH = 20;
|
||||
public const DEFAULT_LIST_LENGTH = 20;
|
||||
/** @var string DEFAULT_ZLIST_FIELDS */
|
||||
const DEFAULT_ZLIST_FIELDS = 'list';
|
||||
public const DEFAULT_ZLIST_FIELDS = 'list';
|
||||
/** @var bool DEFAULT_SHOW_TAB_COUNTS */
|
||||
const DEFAULT_SHOW_TAB_COUNTS = false;
|
||||
public const DEFAULT_SHOW_TAB_COUNTS = false;
|
||||
/** @var string DEFAULT_DISPLAY_MODE */
|
||||
const DEFAULT_DISPLAY_MODE = self::ENUM_DISPLAY_MODE_LIST;
|
||||
public const DEFAULT_DISPLAY_MODE = self::ENUM_DISPLAY_MODE_LIST;
|
||||
/** @var string DEFAULT_TILE_MODE */
|
||||
const DEFAULT_TILE_MODE = self::ENUM_TILE_MODE_TEXT;
|
||||
public const DEFAULT_TILE_MODE = self::ENUM_TILE_MODE_TEXT;
|
||||
/** @var int DEFAULT_GROUP_LIMIT */
|
||||
const DEFAULT_GROUP_LIMIT = 0;
|
||||
public const DEFAULT_GROUP_LIMIT = 0;
|
||||
/** @var bool DEFAULT_GROUP_SHOW_OTHERS */
|
||||
const DEFAULT_GROUP_SHOW_OTHERS = true;
|
||||
public const DEFAULT_GROUP_SHOW_OTHERS = true;
|
||||
/** @var int DEFAULT_WIDTH */
|
||||
const DEFAULT_WIDTH = 500;
|
||||
public const DEFAULT_WIDTH = 500;
|
||||
|
||||
/** @var array $aDisplayModes */
|
||||
public static array $aDisplayModes = array(
|
||||
public static array $aDisplayModes = [
|
||||
self::ENUM_DISPLAY_MODE_LIST,
|
||||
self::ENUM_DISPLAY_MODE_PIE,
|
||||
self::ENUM_DISPLAY_MODE_BAR,
|
||||
);
|
||||
];
|
||||
|
||||
/** @var array $aTileModes */
|
||||
public static array $aTileModes = array(
|
||||
public static array $aTileModes = [
|
||||
self::ENUM_TILE_MODE_TEXT,
|
||||
self::ENUM_TILE_MODE_BADGE,
|
||||
self::ENUM_TILE_MODE_PIE,
|
||||
self::ENUM_TILE_MODE_BAR,
|
||||
self::ENUM_TILE_MODE_TOP,
|
||||
);
|
||||
];
|
||||
|
||||
/** @var array $aDefaultTileData */
|
||||
private static array $aDefaultTileData = [
|
||||
@@ -167,7 +167,7 @@ class ManageBrick extends PortalBrick
|
||||
/** @var bool $bShowTabCounts */
|
||||
protected $bShowTabCounts;
|
||||
/** @var array $aAvailableDisplayModes */
|
||||
protected $aAvailableDisplayModes = array();
|
||||
protected $aAvailableDisplayModes = [];
|
||||
/** @var string $sDefaultDisplayMode */
|
||||
protected $sDefaultDisplayMode;
|
||||
/** @var string $sTileMode */
|
||||
@@ -183,16 +183,17 @@ class ManageBrick extends PortalBrick
|
||||
public static function RegisterTemplates(TemplatesRegister $oTemplatesRegister): void
|
||||
{
|
||||
parent::RegisterTemplates($oTemplatesRegister);
|
||||
$oTemplatesRegister->RegisterTemplates(self::class,
|
||||
TemplateDefinitionDto::Create('tile', static::TEMPLATES_BASE_PATH . 'manage/tile-default.html.twig'),
|
||||
TemplateDefinitionDto::Create('tile_badge', static::TEMPLATES_BASE_PATH. 'manage/tile-badge.html.twig'),
|
||||
TemplateDefinitionDto::Create('tile_chart', static::TEMPLATES_BASE_PATH . 'manage/tile-chart.html.twig'),
|
||||
TemplateDefinitionDto::Create('tile_top_list', static::TEMPLATES_BASE_PATH . 'manage/tile-top-list.html.twig'),
|
||||
TemplateDefinitionDto::Create('page', static::TEMPLATES_BASE_PATH . 'manage/layout.html.twig'),
|
||||
TemplateDefinitionDto::Create('page_table', static::TEMPLATES_BASE_PATH . 'manage/layout-table.html.twig'),
|
||||
TemplateDefinitionDto::Create('page_chart', static::TEMPLATES_BASE_PATH . 'manage/layout-chart.html.twig'),
|
||||
TemplateDefinitionDto::Create('mode_chart_bar', static::TEMPLATES_BASE_PATH . 'manage/mode-bar-chart.html.twig', true, self::ENUM_DISPLAY_MODE_BAR),
|
||||
TemplateDefinitionDto::Create('mode_chart_pie', static::TEMPLATES_BASE_PATH . 'manage/mode-pie-chart.html.twig', true,self::ENUM_DISPLAY_MODE_PIE),
|
||||
$oTemplatesRegister->RegisterTemplates(
|
||||
self::class,
|
||||
TemplateDefinitionDto::Create('tile', static::TEMPLATES_BASE_PATH.'manage/tile-default.html.twig'),
|
||||
TemplateDefinitionDto::Create('tile_badge', static::TEMPLATES_BASE_PATH.'manage/tile-badge.html.twig'),
|
||||
TemplateDefinitionDto::Create('tile_chart', static::TEMPLATES_BASE_PATH.'manage/tile-chart.html.twig'),
|
||||
TemplateDefinitionDto::Create('tile_top_list', static::TEMPLATES_BASE_PATH.'manage/tile-top-list.html.twig'),
|
||||
TemplateDefinitionDto::Create('page', static::TEMPLATES_BASE_PATH.'manage/layout.html.twig'),
|
||||
TemplateDefinitionDto::Create('page_table', static::TEMPLATES_BASE_PATH.'manage/layout-table.html.twig'),
|
||||
TemplateDefinitionDto::Create('page_chart', static::TEMPLATES_BASE_PATH.'manage/layout-chart.html.twig'),
|
||||
TemplateDefinitionDto::Create('mode_chart_bar', static::TEMPLATES_BASE_PATH.'manage/mode-bar-chart.html.twig', true, self::ENUM_DISPLAY_MODE_BAR),
|
||||
TemplateDefinitionDto::Create('mode_chart_pie', static::TEMPLATES_BASE_PATH.'manage/mode-pie-chart.html.twig', true, self::ENUM_DISPLAY_MODE_PIE),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -205,9 +206,9 @@ class ManageBrick extends PortalBrick
|
||||
|
||||
$this->sOql = static::DEFAULT_OQL;
|
||||
$this->sOpeningMode = static::DEFAULT_OPENING_MODE;
|
||||
$this->aGrouping = array();
|
||||
$this->aFields = array();
|
||||
$this->aExportFields = array();
|
||||
$this->aGrouping = [];
|
||||
$this->aFields = [];
|
||||
$this->aExportFields = [];
|
||||
$this->bShowTabCounts = static::DEFAULT_SHOW_TAB_COUNTS;
|
||||
$this->sDefaultDisplayMode = static::DEFAULT_DISPLAY_MODE;
|
||||
|
||||
@@ -217,7 +218,7 @@ class ManageBrick extends PortalBrick
|
||||
$this->iDefaultListLength = static::DEFAULT_LIST_LENGTH;
|
||||
|
||||
// This is hardcoded for now, we might allow area grouping on another attribute in the future
|
||||
$this->AddGrouping('areas', array('attribute' => 'finalclass'));
|
||||
$this->AddGrouping('areas', ['attribute' => 'finalclass']);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -488,7 +489,8 @@ class ManageBrick extends PortalBrick
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function SetDefaultListLength($iDefaultListLength) {
|
||||
public function SetDefaultListLength($iDefaultListLength)
|
||||
{
|
||||
$this->iDefaultListLength = $iDefaultListLength;
|
||||
return $this;
|
||||
}
|
||||
@@ -508,8 +510,7 @@ class ManageBrick extends PortalBrick
|
||||
$this->aGrouping[$sName] = $aGrouping;
|
||||
|
||||
// Sorting
|
||||
if (!$this->IsGroupingByDistinctValues($sName))
|
||||
{
|
||||
if (!$this->IsGroupingByDistinctValues($sName)) {
|
||||
usort($this->aGrouping[$sName]['groups'], function ($a, $b) {
|
||||
if ($a['rank'] === $b['rank']) {
|
||||
return 0;
|
||||
@@ -531,8 +532,7 @@ class ManageBrick extends PortalBrick
|
||||
*/
|
||||
public function RemoveGrouping($sName)
|
||||
{
|
||||
if (isset($this->aGrouping[$sName]))
|
||||
{
|
||||
if (isset($this->aGrouping[$sName])) {
|
||||
unset($this->aGrouping[$sName]);
|
||||
}
|
||||
|
||||
@@ -548,8 +548,7 @@ class ManageBrick extends PortalBrick
|
||||
*/
|
||||
public function AddField($sAttCode)
|
||||
{
|
||||
if (!in_array($sAttCode, $this->aFields))
|
||||
{
|
||||
if (!in_array($sAttCode, $this->aFields)) {
|
||||
$this->aFields[] = $sAttCode;
|
||||
}
|
||||
|
||||
@@ -565,8 +564,7 @@ class ManageBrick extends PortalBrick
|
||||
*/
|
||||
public function RemoveField($sAttCode)
|
||||
{
|
||||
if (isset($this->aFields[$sAttCode]))
|
||||
{
|
||||
if (isset($this->aFields[$sAttCode])) {
|
||||
unset($this->aFields[$sAttCode]);
|
||||
}
|
||||
|
||||
@@ -575,8 +573,7 @@ class ManageBrick extends PortalBrick
|
||||
|
||||
public function AddExportField($sAttCode)
|
||||
{
|
||||
if (!in_array($sAttCode, $this->aExportFields))
|
||||
{
|
||||
if (!in_array($sAttCode, $this->aExportFields)) {
|
||||
$this->aExportFields[] = $sAttCode;
|
||||
}
|
||||
|
||||
@@ -585,8 +582,7 @@ class ManageBrick extends PortalBrick
|
||||
|
||||
public function RemoveExportField($sAttCode)
|
||||
{
|
||||
if (isset($this->aExportFields[$sAttCode]))
|
||||
{
|
||||
if (isset($this->aExportFields[$sAttCode])) {
|
||||
unset($this->aExportFields[$sAttCode]);
|
||||
}
|
||||
|
||||
@@ -642,10 +638,11 @@ class ManageBrick extends PortalBrick
|
||||
*/
|
||||
public function AddAvailableDisplayMode($sModeId)
|
||||
{
|
||||
if (!in_array($sModeId, static::$aDisplayModes))
|
||||
{
|
||||
throw new Exception('ManageBrick: Display mode "'.$sModeId.'" must be one of the allowed display modes ('.implode(', ',
|
||||
static::$aDisplayModes).')');
|
||||
if (!in_array($sModeId, static::$aDisplayModes)) {
|
||||
throw new Exception('ManageBrick: Display mode "'.$sModeId.'" must be one of the allowed display modes ('.implode(
|
||||
', ',
|
||||
static::$aDisplayModes
|
||||
).')');
|
||||
}
|
||||
|
||||
$this->aAvailableDisplayModes[] = $sModeId;
|
||||
@@ -662,8 +659,7 @@ class ManageBrick extends PortalBrick
|
||||
*/
|
||||
public function RemoveAvailableDisplayMode($sModeId)
|
||||
{
|
||||
if (isset($this->aAvailableDisplayModes[$sModeId]))
|
||||
{
|
||||
if (isset($this->aAvailableDisplayModes[$sModeId])) {
|
||||
unset($this->aAvailableDisplayModes[$sModeId]);
|
||||
}
|
||||
|
||||
@@ -736,16 +732,17 @@ class ManageBrick extends PortalBrick
|
||||
|
||||
// Checking specific elements
|
||||
/** @var \Combodo\iTop\DesignElement $oBrickSubNode */
|
||||
foreach ($oMDElement->GetNodes('./*') as $oBrickSubNode)
|
||||
{
|
||||
switch ($oBrickSubNode->nodeName)
|
||||
{
|
||||
foreach ($oMDElement->GetNodes('./*') as $oBrickSubNode) {
|
||||
switch ($oBrickSubNode->nodeName) {
|
||||
case 'class':
|
||||
$sClass = $oBrickSubNode->GetText();
|
||||
if ($sClass === '')
|
||||
{
|
||||
throw new DOMFormatException('ManageBrick: class tag is empty. Must contain Classname', null,
|
||||
null, $oBrickSubNode);
|
||||
if ($sClass === '') {
|
||||
throw new DOMFormatException(
|
||||
'ManageBrick: class tag is empty. Must contain Classname',
|
||||
null,
|
||||
null,
|
||||
$oBrickSubNode
|
||||
);
|
||||
}
|
||||
|
||||
$this->SetOql('SELECT '.$sClass);
|
||||
@@ -753,10 +750,13 @@ class ManageBrick extends PortalBrick
|
||||
|
||||
case 'oql':
|
||||
$sOql = $oBrickSubNode->GetText();
|
||||
if ($sOql === '')
|
||||
{
|
||||
throw new DOMFormatException('ManageBrick: oql tag is empty. Must contain OQL statement', null,
|
||||
null, $oBrickSubNode);
|
||||
if ($sOql === '') {
|
||||
throw new DOMFormatException(
|
||||
'ManageBrick: oql tag is empty. Must contain OQL statement',
|
||||
null,
|
||||
null,
|
||||
$oBrickSubNode
|
||||
);
|
||||
}
|
||||
|
||||
$this->SetOql($sOql);
|
||||
@@ -764,10 +764,13 @@ class ManageBrick extends PortalBrick
|
||||
|
||||
case 'opening_mode':
|
||||
$sOpeningMode = $oBrickSubNode->GetText(static::DEFAULT_OPENING_MODE);
|
||||
if (!in_array($sOpeningMode, array(static::ENUM_ACTION_VIEW, static::ENUM_ACTION_EDIT)))
|
||||
{
|
||||
throw new DOMFormatException('ManageBrick: opening_mode tag value must be edit|view ("'.$sOpeningMode.'" given)',
|
||||
null, null, $oBrickSubNode);
|
||||
if (!in_array($sOpeningMode, [static::ENUM_ACTION_VIEW, static::ENUM_ACTION_EDIT])) {
|
||||
throw new DOMFormatException(
|
||||
'ManageBrick: opening_mode tag value must be edit|view ("'.$sOpeningMode.'" given)',
|
||||
null,
|
||||
null,
|
||||
$oBrickSubNode
|
||||
);
|
||||
}
|
||||
|
||||
$this->SetOpeningMode($sOpeningMode);
|
||||
@@ -775,26 +778,31 @@ class ManageBrick extends PortalBrick
|
||||
|
||||
case 'display_modes':
|
||||
/** @var \Combodo\iTop\DesignElement $oDisplayNode */
|
||||
foreach ($oBrickSubNode->GetNodes('./*') as $oDisplayNode)
|
||||
{
|
||||
switch ($oDisplayNode->nodeName)
|
||||
{
|
||||
case 'availables';
|
||||
foreach ($oBrickSubNode->GetNodes('./*') as $oDisplayNode) {
|
||||
switch ($oDisplayNode->nodeName) {
|
||||
case 'availables':
|
||||
/** @var \Combodo\iTop\DesignElement $oModeNode */
|
||||
foreach ($oDisplayNode->GetNodes('*') as $oModeNode)
|
||||
{
|
||||
if (!$oModeNode->hasAttribute('id'))
|
||||
{
|
||||
throw new DOMFormatException('ManageBrick: Display mode must have a unique ID attribute',
|
||||
0, null, $oModeNode);
|
||||
foreach ($oDisplayNode->GetNodes('*') as $oModeNode) {
|
||||
if (!$oModeNode->hasAttribute('id')) {
|
||||
throw new DOMFormatException(
|
||||
'ManageBrick: Display mode must have a unique ID attribute',
|
||||
0,
|
||||
null,
|
||||
$oModeNode
|
||||
);
|
||||
}
|
||||
|
||||
$sModeId = $oModeNode->getAttribute('id');
|
||||
if (!in_array($sModeId, static::$aDisplayModes))
|
||||
{
|
||||
throw new DOMFormatException('ManageBrick: Display mode has an invalid value. Expected '.implode('/',
|
||||
static::$aDisplayModes.', "'.$sModeId.'" given.'),
|
||||
null, null, $oModeNode);
|
||||
if (!in_array($sModeId, static::$aDisplayModes)) {
|
||||
throw new DOMFormatException(
|
||||
'ManageBrick: Display mode has an invalid value. Expected '.implode(
|
||||
'/',
|
||||
static::$aDisplayModes.', "'.$sModeId.'" given.'
|
||||
),
|
||||
null,
|
||||
null,
|
||||
$oModeNode
|
||||
);
|
||||
}
|
||||
|
||||
$this->AddAvailableDisplayMode($sModeId);
|
||||
@@ -805,9 +813,9 @@ class ManageBrick extends PortalBrick
|
||||
$this->SetDefaultDisplayMode($oDisplayNode->GetText(static::DEFAULT_DISPLAY_MODE));
|
||||
break;
|
||||
|
||||
case 'tile';
|
||||
case 'tile':
|
||||
$this->SetTileMode($oDisplayNode->GetText(static::DEFAULT_TILE_MODE));
|
||||
if($this->sDecorationClassHome === static::DEFAULT_DECORATION_CLASS_HOME){
|
||||
if ($this->sDecorationClassHome === static::DEFAULT_DECORATION_CLASS_HOME) {
|
||||
$this->sDecorationClassHome = static::$aDefaultTileData[$this->GetTileMode()]['decorationCssClass'];
|
||||
$this->SetDecorationClassNavigationMenu(static::$aDefaultTileData[$this->GetTileMode()]['decorationCssClass']);
|
||||
$this->SetDecorationClassHome(static::$aDefaultTileData[$this->GetTileMode()]['decorationCssClass']);
|
||||
@@ -820,12 +828,14 @@ class ManageBrick extends PortalBrick
|
||||
|
||||
case 'fields':
|
||||
/** @var \Combodo\iTop\DesignElement $oFieldNode */
|
||||
foreach ($oBrickSubNode->GetNodes('./field') as $oFieldNode)
|
||||
{
|
||||
if (!$oFieldNode->hasAttribute('id'))
|
||||
{
|
||||
throw new DOMFormatException('ManageBrick : Field must have a unique ID attribute', 0,
|
||||
null, $oFieldNode);
|
||||
foreach ($oBrickSubNode->GetNodes('./field') as $oFieldNode) {
|
||||
if (!$oFieldNode->hasAttribute('id')) {
|
||||
throw new DOMFormatException(
|
||||
'ManageBrick : Field must have a unique ID attribute',
|
||||
0,
|
||||
null,
|
||||
$oFieldNode
|
||||
);
|
||||
}
|
||||
$this->AddField($oFieldNode->getAttribute('id'));
|
||||
}
|
||||
@@ -833,19 +843,18 @@ class ManageBrick extends PortalBrick
|
||||
|
||||
case 'export':
|
||||
/** @var \Combodo\iTop\DesignElement $oExportNode */
|
||||
foreach ($oBrickSubNode->GetNodes('./*') as $oExportNode)
|
||||
{
|
||||
switch ($oExportNode->nodeName)
|
||||
{
|
||||
foreach ($oBrickSubNode->GetNodes('./*') as $oExportNode) {
|
||||
switch ($oExportNode->nodeName) {
|
||||
case 'fields':
|
||||
/** @var \Combodo\iTop\DesignElement $oFieldNode */
|
||||
foreach ($oExportNode->GetNodes('./field') as $oFieldNode)
|
||||
{
|
||||
if (!$oFieldNode->hasAttribute('id'))
|
||||
{
|
||||
throw new DOMFormatException('ManageBrick : Field must have a unique ID attribute',
|
||||
foreach ($oExportNode->GetNodes('./field') as $oFieldNode) {
|
||||
if (!$oFieldNode->hasAttribute('id')) {
|
||||
throw new DOMFormatException(
|
||||
'ManageBrick : Field must have a unique ID attribute',
|
||||
0,
|
||||
null, $oFieldNode);
|
||||
null,
|
||||
$oFieldNode
|
||||
);
|
||||
}
|
||||
$this->AddExportField($oFieldNode->getAttribute('id'));
|
||||
}
|
||||
@@ -860,12 +869,12 @@ class ManageBrick extends PortalBrick
|
||||
break;
|
||||
case 'default_list_length':
|
||||
$iNodeDefaultListLength = (int)$oBrickSubNode->GetText(static::DEFAULT_LIST_LENGTH);
|
||||
if(!in_array($iNodeDefaultListLength, array(10, 20, 50, -1),true))
|
||||
{
|
||||
if (!in_array($iNodeDefaultListLength, [10, 20, 50, -1], true)) {
|
||||
throw new DOMFormatException(
|
||||
'ManageBrick : Default list length must be contained in list length options. Expected -1/10/20/50, '.$iNodeDefaultListLength.' given.',
|
||||
null,
|
||||
null, $oBrickSubNode
|
||||
null,
|
||||
$oBrickSubNode
|
||||
);
|
||||
}
|
||||
$this->SetDefaultListLength($iNodeDefaultListLength);
|
||||
@@ -873,25 +882,21 @@ class ManageBrick extends PortalBrick
|
||||
case 'grouping':
|
||||
// Tabs grouping
|
||||
/** @var \Combodo\iTop\DesignElement $oGroupingNode */
|
||||
foreach ($oBrickSubNode->GetNodes('./tabs/*') as $oGroupingNode)
|
||||
{
|
||||
switch ($oGroupingNode->nodeName)
|
||||
{
|
||||
case 'show_tab_counts';
|
||||
foreach ($oBrickSubNode->GetNodes('./tabs/*') as $oGroupingNode) {
|
||||
switch ($oGroupingNode->nodeName) {
|
||||
case 'show_tab_counts':
|
||||
$bShowTabCounts = ($oGroupingNode->GetText(static::DEFAULT_SHOW_TAB_COUNTS) === 'true') ? true : false;
|
||||
$this->SetShowTabCounts($bShowTabCounts);
|
||||
break;
|
||||
case 'attribute':
|
||||
$sAttribute = $oGroupingNode->GetText();
|
||||
if ($sAttribute !== '')
|
||||
{
|
||||
$this->AddGrouping('tabs', array('attribute' => $sAttribute));
|
||||
if ($sAttribute !== '') {
|
||||
$this->AddGrouping('tabs', ['attribute' => $sAttribute]);
|
||||
}
|
||||
break;
|
||||
case 'limit':
|
||||
$iLimit = $oGroupingNode->GetText();
|
||||
if (is_numeric($iLimit))
|
||||
{
|
||||
if (is_numeric($iLimit)) {
|
||||
$this->iGroupLimit = $iLimit;
|
||||
}
|
||||
break;
|
||||
@@ -899,24 +904,24 @@ class ManageBrick extends PortalBrick
|
||||
$this->bGroupShowOthers = ($oGroupingNode->GetText() === 'true') ? true : false;
|
||||
break;
|
||||
case 'groups':
|
||||
$aGroups = array();
|
||||
$aGroups = [];
|
||||
/** @var \Combodo\iTop\DesignElement $oGroupNode */
|
||||
foreach ($oGroupingNode->GetNodes('./group') as $oGroupNode)
|
||||
{
|
||||
if (!$oGroupNode->hasAttribute('id'))
|
||||
{
|
||||
throw new DOMFormatException('ManageBrick : Group must have a unique ID attribute',
|
||||
0, null, $oGroupNode);
|
||||
foreach ($oGroupingNode->GetNodes('./group') as $oGroupNode) {
|
||||
if (!$oGroupNode->hasAttribute('id')) {
|
||||
throw new DOMFormatException(
|
||||
'ManageBrick : Group must have a unique ID attribute',
|
||||
0,
|
||||
null,
|
||||
$oGroupNode
|
||||
);
|
||||
}
|
||||
$sGroupId = $oGroupNode->getAttribute('id');
|
||||
|
||||
$aGroup = array();
|
||||
$aGroup = [];
|
||||
$aGroup['id'] = $sGroupId; // We don't put the group id as the $aGroups key because the array will be sorted later in AddGrouping, which replace array keys by integer ordered keys
|
||||
/** @var \Combodo\iTop\DesignElement $oGroupProperty */
|
||||
foreach ($oGroupNode->GetNodes('*') as $oGroupProperty)
|
||||
{
|
||||
switch ($oGroupProperty->nodeName)
|
||||
{
|
||||
foreach ($oGroupNode->GetNodes('*') as $oGroupProperty) {
|
||||
switch ($oGroupProperty->nodeName) {
|
||||
case 'rank':
|
||||
$aGroup[$oGroupProperty->nodeName] = (int)$oGroupProperty->GetText(0);
|
||||
break;
|
||||
@@ -929,19 +934,25 @@ class ManageBrick extends PortalBrick
|
||||
}
|
||||
|
||||
// Checking constitancy
|
||||
if (!isset($aGroup['title']) || $aGroup['title'] === '')
|
||||
{
|
||||
throw new DOMFormatException('ManageBrick : Group must have a title tag and it must not be empty',
|
||||
0, null, $oGroupNode);
|
||||
if (!isset($aGroup['title']) || $aGroup['title'] === '') {
|
||||
throw new DOMFormatException(
|
||||
'ManageBrick : Group must have a title tag and it must not be empty',
|
||||
0,
|
||||
null,
|
||||
$oGroupNode
|
||||
);
|
||||
}
|
||||
if (!isset($aGroup['condition']) || $aGroup['condition'] === '')
|
||||
{
|
||||
throw new DOMFormatException('ManageBrick : Group must have a condition tag and it must not be empty',
|
||||
0, null, $oGroupNode);
|
||||
if (!isset($aGroup['condition']) || $aGroup['condition'] === '') {
|
||||
throw new DOMFormatException(
|
||||
'ManageBrick : Group must have a condition tag and it must not be empty',
|
||||
0,
|
||||
null,
|
||||
$oGroupNode
|
||||
);
|
||||
}
|
||||
$aGroups[] = $aGroup;
|
||||
}
|
||||
$this->AddGrouping('tabs', array('groups' => $aGroups));
|
||||
$this->AddGrouping('tabs', ['groups' => $aGroups]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -963,62 +974,58 @@ class ManageBrick extends PortalBrick
|
||||
}
|
||||
|
||||
// Checking if has an oql
|
||||
if ($this->GetOql() === '')
|
||||
{
|
||||
if ($this->GetOql() === '') {
|
||||
throw new DOMFormatException('ManageBrick: must have a valid <class|oql> tag', null, null, $oMDElement);
|
||||
}
|
||||
|
||||
// Checking that the brick has at least a display mode
|
||||
if (count($this->GetAvailablesDisplayModes()) === 0)
|
||||
{
|
||||
if (count($this->GetAvailablesDisplayModes()) === 0) {
|
||||
$this->AddAvailableDisplayMode(static::DEFAULT_DISPLAY_MODE);
|
||||
}
|
||||
// Checking that default display mode in among the availables
|
||||
if (!in_array($this->sDefaultDisplayMode, $this->aAvailableDisplayModes))
|
||||
{
|
||||
throw new DOMFormatException('ManageBrick: Default display mode "'.$this->sDefaultDisplayMode.'" must be one of the available display modes ('.implode(', ',
|
||||
$this->aAvailableDisplayModes).')', null, null, $oMDElement);
|
||||
if (!in_array($this->sDefaultDisplayMode, $this->aAvailableDisplayModes)) {
|
||||
throw new DOMFormatException('ManageBrick: Default display mode "'.$this->sDefaultDisplayMode.'" must be one of the available display modes ('.implode(
|
||||
', ',
|
||||
$this->aAvailableDisplayModes
|
||||
).')', null, null, $oMDElement);
|
||||
}
|
||||
// Checking that tile mode in among the availables
|
||||
if (!in_array($this->sTileMode, static::$aTileModes))
|
||||
{
|
||||
throw new DOMFormatException('ManageBrick: Tile mode "'.$this->sTileMode.'" must be one of the allowed tile modes ('.implode(', ',
|
||||
static::$aTileModes).')', null, null, $oMDElement);
|
||||
if (!in_array($this->sTileMode, static::$aTileModes)) {
|
||||
throw new DOMFormatException('ManageBrick: Tile mode "'.$this->sTileMode.'" must be one of the allowed tile modes ('.implode(
|
||||
', ',
|
||||
static::$aTileModes
|
||||
).')', null, null, $oMDElement);
|
||||
}
|
||||
|
||||
// Checking if specified fields, if not we put those from the details zlist
|
||||
if (empty($this->aFields))
|
||||
{
|
||||
if (empty($this->aFields)) {
|
||||
$sClass = DBSearch::FromOQL($this->GetOql());
|
||||
$aFields = MetaModel::FlattenZList(MetaModel::GetZListItems($sClass->GetClass(),
|
||||
static::DEFAULT_ZLIST_FIELDS));
|
||||
$aFields = MetaModel::FlattenZList(MetaModel::GetZListItems(
|
||||
$sClass->GetClass(),
|
||||
static::DEFAULT_ZLIST_FIELDS
|
||||
));
|
||||
$this->SetFields($aFields);
|
||||
}
|
||||
|
||||
// Default Export Fields
|
||||
if ($bUseListFieldsForExport)
|
||||
{
|
||||
foreach ($this->GetFields() as $sAttCode)
|
||||
{
|
||||
if ($bUseListFieldsForExport) {
|
||||
foreach ($this->GetFields() as $sAttCode) {
|
||||
$this->AddExportField($sAttCode);
|
||||
}
|
||||
}
|
||||
|
||||
// Checking the navigation icon
|
||||
$sDecorationClassNavigationMenu = $this->GetDecorationClassNavigationMenu();
|
||||
if (empty($sDecorationClassNavigationMenu) && isset(static::$aDefaultTileData[$this->sTileMode]))
|
||||
{
|
||||
if (empty($sDecorationClassNavigationMenu) && isset(static::$aDefaultTileData[$this->sTileMode])) {
|
||||
/** @var string $sDecorationClassNavigationMenu */
|
||||
$sDecorationClassNavigationMenu = static::$aDefaultTileData[$this->sTileMode]['decorationCssClass'];
|
||||
if (!empty($sDecorationClassNavigationMenu))
|
||||
{
|
||||
if (!empty($sDecorationClassNavigationMenu)) {
|
||||
$this->SetDecorationClassNavigationMenu($sDecorationClassNavigationMenu);
|
||||
}
|
||||
}
|
||||
|
||||
$sTitle = $this->GetTitleHome();
|
||||
if (empty($sTitle))
|
||||
{
|
||||
if (empty($sTitle)) {
|
||||
$sOql = $this->GetOql();
|
||||
$oSearch = DBSearch::FromOQL($sOql);
|
||||
$sClassName = MetaModel::GetName($oSearch->GetClass());
|
||||
|
||||
@@ -38,37 +38,37 @@ use ModuleDesign;
|
||||
abstract class PortalBrick extends AbstractBrick
|
||||
{
|
||||
/** @var string ENUM_OPENING_TARGET_MODAL */
|
||||
const ENUM_OPENING_TARGET_MODAL = 'modal';
|
||||
public const ENUM_OPENING_TARGET_MODAL = 'modal';
|
||||
/** @var string ENUM_OPENING_TARGET_SELF */
|
||||
const ENUM_OPENING_TARGET_SELF = 'self';
|
||||
public const ENUM_OPENING_TARGET_SELF = 'self';
|
||||
/** @var string ENUM_OPENING_TARGET_NEW */
|
||||
const ENUM_OPENING_TARGET_NEW = 'new';
|
||||
public const ENUM_OPENING_TARGET_NEW = 'new';
|
||||
|
||||
/** @var int DEFAULT_WIDTH */
|
||||
const DEFAULT_WIDTH = 400;
|
||||
public const DEFAULT_WIDTH = 400;
|
||||
/** @var int DEFAULT_HEIGHT */
|
||||
const DEFAULT_HEIGHT = null;
|
||||
public const DEFAULT_HEIGHT = null;
|
||||
/** @var bool DEFAULT_MODAL */
|
||||
const DEFAULT_MODAL = false;
|
||||
public const DEFAULT_MODAL = false;
|
||||
/** @var bool DEFAULT_VISIBLE_HOME */
|
||||
const DEFAULT_VISIBLE_HOME = true;
|
||||
public const DEFAULT_VISIBLE_HOME = true;
|
||||
/** @var bool DEFAULT_VISIBLE_NAVIGATION_MENU */
|
||||
const DEFAULT_VISIBLE_NAVIGATION_MENU = true;
|
||||
public const DEFAULT_VISIBLE_NAVIGATION_MENU = true;
|
||||
/** @var string DEFAULT_DECORATION_CLASS_HOME */
|
||||
const DEFAULT_DECORATION_CLASS_HOME = '';
|
||||
public const DEFAULT_DECORATION_CLASS_HOME = '';
|
||||
/** @var string DEFAULT_DECORATION_CLASS_NAVIGATION_MENU */
|
||||
const DEFAULT_DECORATION_CLASS_NAVIGATION_MENU = '';
|
||||
public const DEFAULT_DECORATION_CLASS_NAVIGATION_MENU = '';
|
||||
/** @var string DEFAULT_TILE_TEMPLATE_PATH */
|
||||
const DEFAULT_TILE_TEMPLATE_PATH = 'itop-portal-base/portal/templates/bricks/tile.html.twig';
|
||||
public const DEFAULT_TILE_TEMPLATE_PATH = 'itop-portal-base/portal/templates/bricks/tile.html.twig';
|
||||
/** @var string|null DEFAULT_TILE_CONTROLLER_ACTION */
|
||||
const DEFAULT_TILE_CONTROLLER_ACTION = null;
|
||||
public const DEFAULT_TILE_CONTROLLER_ACTION = null;
|
||||
/** @var string DEFAULT_OPENING_TARGET */
|
||||
const DEFAULT_OPENING_TARGET = self::ENUM_OPENING_TARGET_MODAL;
|
||||
public const DEFAULT_OPENING_TARGET = self::ENUM_OPENING_TARGET_MODAL;
|
||||
|
||||
/** @var string|null $sRouteName */
|
||||
static $sRouteName = null;
|
||||
public static $sRouteName = null;
|
||||
/** @var array $aOpeningTargets */
|
||||
static $aOpeningTargets = array(self::ENUM_OPENING_TARGET_MODAL, self::ENUM_OPENING_TARGET_SELF, self::ENUM_OPENING_TARGET_NEW);
|
||||
public static $aOpeningTargets = [self::ENUM_OPENING_TARGET_MODAL, self::ENUM_OPENING_TARGET_SELF, self::ENUM_OPENING_TARGET_NEW];
|
||||
|
||||
/** @var int $iWidth */
|
||||
protected $iWidth;
|
||||
@@ -101,14 +101,13 @@ abstract class PortalBrick extends AbstractBrick
|
||||
/** @var string $sTitleNavigationMenu */
|
||||
protected $sTitleNavigationMenu;
|
||||
|
||||
|
||||
|
||||
/** @inheritdoc */
|
||||
public static function RegisterTemplates(TemplatesRegister $oTemplatesRegister): void
|
||||
{
|
||||
parent::RegisterTemplates($oTemplatesRegister);
|
||||
$oTemplatesRegister->RegisterTemplates(self::class,
|
||||
TemplateDefinitionDto::Create('tile', static::TEMPLATES_BASE_PATH . 'tile.html.twig'),
|
||||
$oTemplatesRegister->RegisterTemplates(
|
||||
self::class,
|
||||
TemplateDefinitionDto::Create('tile', static::TEMPLATES_BASE_PATH.'tile.html.twig'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -466,10 +465,8 @@ abstract class PortalBrick extends AbstractBrick
|
||||
|
||||
// Checking specific elements
|
||||
/** @var \Combodo\iTop\DesignElement $oBrickSubNode */
|
||||
foreach ($oMDElement->GetNodes('./*') as $oBrickSubNode)
|
||||
{
|
||||
switch ($oBrickSubNode->nodeName)
|
||||
{
|
||||
foreach ($oMDElement->GetNodes('./*') as $oBrickSubNode) {
|
||||
switch ($oBrickSubNode->nodeName) {
|
||||
case 'width':
|
||||
$sWidth = $oBrickSubNode->GetText(static::DEFAULT_WIDTH);
|
||||
$this->bIsWidthPixel = str_contains($sWidth, 'px');
|
||||
@@ -488,23 +485,20 @@ abstract class PortalBrick extends AbstractBrick
|
||||
case 'visible':
|
||||
// Default value
|
||||
$oOptionalNode = $oBrickSubNode->GetOptionalElement('default');
|
||||
if ($oOptionalNode !== null)
|
||||
{
|
||||
if ($oOptionalNode !== null) {
|
||||
$optionalNodeValue = ($oOptionalNode->GetText() === 'false') ? false : true;
|
||||
$this->SetVisibleHome($optionalNodeValue);
|
||||
$this->SetVisibleNavigationMenu($optionalNodeValue);
|
||||
}
|
||||
// Home value
|
||||
$oOptionalNode = $oBrickSubNode->GetOptionalElement('home');
|
||||
if ($oOptionalNode !== null)
|
||||
{
|
||||
if ($oOptionalNode !== null) {
|
||||
$optionalNodeValue = ($oOptionalNode->GetText() === 'false') ? false : true;
|
||||
$this->SetVisibleHome($optionalNodeValue);
|
||||
}
|
||||
// Navigation menu value
|
||||
$oOptionalNode = $oBrickSubNode->GetOptionalElement('navigation_menu');
|
||||
if ($oOptionalNode !== null)
|
||||
{
|
||||
if ($oOptionalNode !== null) {
|
||||
$optionalNodeValue = ($oOptionalNode->GetText() === 'false') ? false : true;
|
||||
$this->SetVisibleNavigationMenu($optionalNodeValue);
|
||||
}
|
||||
@@ -512,8 +506,7 @@ abstract class PortalBrick extends AbstractBrick
|
||||
|
||||
case 'templates':
|
||||
$oTemplateNodeList = $oBrickSubNode->GetNodes('template[@id='.ModuleDesign::XPathQuote('tile').']');
|
||||
if ($oTemplateNodeList->length > 0)
|
||||
{
|
||||
if ($oTemplateNodeList->length > 0) {
|
||||
/** @var \Combodo\iTop\DesignElement $oTemplateNode */
|
||||
$oTemplateNode = $oTemplateNodeList->item(0);
|
||||
$this->SetTemplatePath('tile', $oTemplateNode->GetText(static::DEFAULT_TILE_TEMPLATE_PATH));
|
||||
@@ -526,23 +519,20 @@ abstract class PortalBrick extends AbstractBrick
|
||||
$this->SetRankNavigationMenu($this->fRank);
|
||||
// Default value
|
||||
$oOptionalNode = $oBrickSubNode->GetOptionalElement('default');
|
||||
if ($oOptionalNode !== null)
|
||||
{
|
||||
if ($oOptionalNode !== null) {
|
||||
$optionalNodeValue = $oOptionalNode->GetText(static::DEFAULT_RANK);
|
||||
$this->SetRankHome($optionalNodeValue);
|
||||
$this->SetRankNavigationMenu($optionalNodeValue);
|
||||
}
|
||||
// Home value
|
||||
$oOptionalNode = $oBrickSubNode->GetOptionalElement('home');
|
||||
if ($oOptionalNode !== null)
|
||||
{
|
||||
if ($oOptionalNode !== null) {
|
||||
$optionalNodeValue = $oOptionalNode->GetText(static::DEFAULT_RANK);
|
||||
$this->SetRankHome($optionalNodeValue);
|
||||
}
|
||||
// Navigation menu value
|
||||
$oOptionalNode = $oBrickSubNode->GetOptionalElement('navigation_menu');
|
||||
if ($oOptionalNode !== null)
|
||||
{
|
||||
if ($oOptionalNode !== null) {
|
||||
$optionalNodeValue = $oOptionalNode->GetText(static::DEFAULT_RANK);
|
||||
$this->SetRankNavigationMenu($optionalNodeValue);
|
||||
}
|
||||
@@ -554,23 +544,20 @@ abstract class PortalBrick extends AbstractBrick
|
||||
$this->SetTitleNavigationMenu($this->sTitle);
|
||||
// Default value
|
||||
$oOptionalNode = $oBrickSubNode->GetOptionalElement('default');
|
||||
if ($oOptionalNode !== null)
|
||||
{
|
||||
if ($oOptionalNode !== null) {
|
||||
$optionalNodeValue = $oOptionalNode->GetText(static::DEFAULT_TITLE);
|
||||
$this->SetTitleHome($optionalNodeValue);
|
||||
$this->SetTitleNavigationMenu($optionalNodeValue);
|
||||
}
|
||||
// Home value
|
||||
$oOptionalNode = $oBrickSubNode->GetOptionalElement('home');
|
||||
if ($oOptionalNode !== null)
|
||||
{
|
||||
if ($oOptionalNode !== null) {
|
||||
$optionalNodeValue = $oOptionalNode->GetText(static::DEFAULT_TITLE);
|
||||
$this->SetTitleHome($optionalNodeValue);
|
||||
}
|
||||
// Navigation menu value
|
||||
$oOptionalNode = $oBrickSubNode->GetOptionalElement('navigation_menu');
|
||||
if ($oOptionalNode !== null)
|
||||
{
|
||||
if ($oOptionalNode !== null) {
|
||||
$optionalNodeValue = $oOptionalNode->GetText(static::DEFAULT_TITLE);
|
||||
$this->SetTitleNavigationMenu($optionalNodeValue);
|
||||
$this->SetTitle($optionalNodeValue);
|
||||
@@ -583,23 +570,20 @@ abstract class PortalBrick extends AbstractBrick
|
||||
$this->SetDecorationClassNavigationMenu(static::DEFAULT_DECORATION_CLASS_NAVIGATION_MENU);
|
||||
// Default value
|
||||
$oOptionalNode = $oBrickSubNode->GetOptionalElement('default');
|
||||
if ($oOptionalNode !== null)
|
||||
{
|
||||
if ($oOptionalNode !== null) {
|
||||
$optionalNodeValue = $oOptionalNode->GetText(static::DEFAULT_DECORATION_CLASS_NAVIGATION_MENU);
|
||||
$this->SetDecorationClassHome($optionalNodeValue);
|
||||
$this->SetDecorationClassNavigationMenu($optionalNodeValue);
|
||||
}
|
||||
// Home value
|
||||
$oOptionalNode = $oBrickSubNode->GetOptionalElement('home');
|
||||
if ($oOptionalNode !== null)
|
||||
{
|
||||
if ($oOptionalNode !== null) {
|
||||
$optionalNodeValue = $oOptionalNode->GetText(static::DEFAULT_DECORATION_CLASS_HOME);
|
||||
$this->SetDecorationClassHome($optionalNodeValue);
|
||||
}
|
||||
// Navigation menu value
|
||||
$oOptionalNode = $oBrickSubNode->GetOptionalElement('navigation_menu');
|
||||
if ($oOptionalNode !== null)
|
||||
{
|
||||
if ($oOptionalNode !== null) {
|
||||
$optionalNodeValue = $oOptionalNode->GetText(static::DEFAULT_DECORATION_CLASS_NAVIGATION_MENU);
|
||||
$this->SetDecorationClassNavigationMenu($optionalNodeValue);
|
||||
}
|
||||
@@ -611,11 +595,16 @@ abstract class PortalBrick extends AbstractBrick
|
||||
|
||||
case 'opening_target':
|
||||
$sOpeningTarget = $oBrickSubNode->GetText(static::DEFAULT_OPENING_TARGET);
|
||||
if (!in_array($sOpeningTarget,
|
||||
array(static::ENUM_OPENING_TARGET_MODAL, static::ENUM_OPENING_TARGET_NEW, static::ENUM_OPENING_TARGET_SELF)))
|
||||
{
|
||||
throw new DOMFormatException('PortalBrick : opening_target tag value must be modal|new|self ("'.$sOpeningTarget.'" given)',
|
||||
null, null, $oBrickSubNode);
|
||||
if (!in_array(
|
||||
$sOpeningTarget,
|
||||
[static::ENUM_OPENING_TARGET_MODAL, static::ENUM_OPENING_TARGET_NEW, static::ENUM_OPENING_TARGET_SELF]
|
||||
)) {
|
||||
throw new DOMFormatException(
|
||||
'PortalBrick : opening_target tag value must be modal|new|self ("'.$sOpeningTarget.'" given)',
|
||||
null,
|
||||
null,
|
||||
$oBrickSubNode
|
||||
);
|
||||
}
|
||||
|
||||
$this->SetOpeningTarget($sOpeningTarget);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Copyright (C) 2013-2024 Combodo SAS
|
||||
*
|
||||
@@ -34,20 +35,20 @@ use DOMFormatException;
|
||||
class UserProfileBrick extends PortalBrick
|
||||
{
|
||||
// Overloaded constants
|
||||
const DEFAULT_WIDTH = 200;
|
||||
const DEFAULT_VISIBLE_NAVIGATION_MENU = false;
|
||||
const DEFAULT_VISIBLE_HOME = false;
|
||||
const DEFAULT_DECORATION_CLASS_HOME = 'glyphicon glyphicon-user';
|
||||
const DEFAULT_DECORATION_CLASS_NAVIGATION_MENU = 'glyphicon glyphicon-user';
|
||||
public const DEFAULT_WIDTH = 200;
|
||||
public const DEFAULT_VISIBLE_NAVIGATION_MENU = false;
|
||||
public const DEFAULT_VISIBLE_HOME = false;
|
||||
public const DEFAULT_DECORATION_CLASS_HOME = 'glyphicon glyphicon-user';
|
||||
public const DEFAULT_DECORATION_CLASS_NAVIGATION_MENU = 'glyphicon glyphicon-user';
|
||||
/** @var bool DEFAULT_SHOW_PICTURE_FORM */
|
||||
const DEFAULT_SHOW_PICTURE_FORM = true;
|
||||
public const DEFAULT_SHOW_PICTURE_FORM = true;
|
||||
/** @var bool DEFAULT_SHOW_PREFERENCES_FORM */
|
||||
const DEFAULT_SHOW_PREFERENCES_FORM = true;
|
||||
public const DEFAULT_SHOW_PREFERENCES_FORM = true;
|
||||
/** @var bool DEFAULT_SHOW_PASSWORD_FORM */
|
||||
const DEFAULT_SHOW_PASSWORD_FORM = true;
|
||||
public const DEFAULT_SHOW_PASSWORD_FORM = true;
|
||||
|
||||
// Overloaded variables
|
||||
static $sRouteName = 'p_user_profile_brick';
|
||||
public static $sRouteName = 'p_user_profile_brick';
|
||||
|
||||
/** @var array $aForm */
|
||||
protected $aForm;
|
||||
@@ -62,8 +63,9 @@ class UserProfileBrick extends PortalBrick
|
||||
public static function RegisterTemplates(TemplatesRegister $oTemplatesRegister): void
|
||||
{
|
||||
parent::RegisterTemplates($oTemplatesRegister);
|
||||
$oTemplatesRegister->RegisterTemplates(self::class,
|
||||
TemplateDefinitionDto::Create('page', static::TEMPLATES_BASE_PATH . 'user-profile/layout.html.twig'),
|
||||
$oTemplatesRegister->RegisterTemplates(
|
||||
self::class,
|
||||
TemplateDefinitionDto::Create('page', static::TEMPLATES_BASE_PATH.'user-profile/layout.html.twig'),
|
||||
TemplateDefinitionDto::Create('user_info', static::TEMPLATES_BASE_PATH.'user-profile/user_info.html.twig'),
|
||||
TemplateDefinitionDto::Create('user_info_ready_js', static::TEMPLATES_BASE_PATH.'user-profile/user_info.ready.js.twig'),
|
||||
);
|
||||
@@ -76,12 +78,12 @@ class UserProfileBrick extends PortalBrick
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$this->aForm = array(
|
||||
$this->aForm = [
|
||||
'id' => 'default-user-profile',
|
||||
'type' => 'zlist',
|
||||
'fields' => 'details',
|
||||
'layout' => null,
|
||||
);
|
||||
];
|
||||
$this->bShowPictureForm = static::DEFAULT_SHOW_PICTURE_FORM;
|
||||
$this->bShowPreferencesForm = static::DEFAULT_SHOW_PREFERENCES_FORM;
|
||||
$this->bShowPasswordForm = static::DEFAULT_SHOW_PASSWORD_FORM;
|
||||
@@ -192,13 +194,13 @@ class UserProfileBrick extends PortalBrick
|
||||
// Enumerating fields
|
||||
if ($oBrickSubNode->GetOptionalElement('fields') !== null) {
|
||||
$this->aForm['type'] = 'custom_list';
|
||||
$this->aForm['fields'] = array();
|
||||
$this->aForm['fields'] = [];
|
||||
|
||||
/** @var \Combodo\iTop\DesignElement $oFieldNode */
|
||||
foreach ($oBrickSubNode->GetOptionalElement('fields')->GetNodes('field') as $oFieldNode) {
|
||||
$sFieldId = $oFieldNode->getAttribute('id');
|
||||
if ($sFieldId !== '') {
|
||||
$aField = array();
|
||||
$aField = [];
|
||||
// Parsing field options like read_only, hidden and mandatory
|
||||
if ($oFieldNode->GetOptionalElement('read_only')) {
|
||||
$aField['readonly'] = ($oFieldNode->GetOptionalElement('read_only')->GetText('true') === 'true') ? true : false;
|
||||
@@ -224,10 +226,10 @@ class UserProfileBrick extends PortalBrick
|
||||
$sXml = preg_replace('/^.+\n/', '', $sXml);
|
||||
$sXml = preg_replace('/\n.+$/', '', $sXml);
|
||||
|
||||
$this->aForm['layout'] = array(
|
||||
$this->aForm['layout'] = [
|
||||
'type' => (preg_match('/\{\{|\{\#|\{\%/', $sXml) === 1) ? 'twig' : 'xhtml',
|
||||
'content' => $sXml,
|
||||
);
|
||||
];
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -37,15 +37,16 @@ use Symfony\Contracts\Service\Attribute\Required;
|
||||
*/
|
||||
abstract class AbstractController extends SymfonyAbstractController implements TemplatesProviderInterface
|
||||
{
|
||||
const TEMPLATES_BASE_PATH = 'itop-portal-base/portal/templates/';
|
||||
public const TEMPLATES_BASE_PATH = 'itop-portal-base/portal/templates/';
|
||||
|
||||
/** @inheritdoc */
|
||||
public static function RegisterTemplates(TemplatesRegister $oTemplatesRegister): void
|
||||
{
|
||||
$oTemplatesRegister->RegisterTemplates(self::class,
|
||||
TemplateDefinitionDto::Create('page', static::TEMPLATES_BASE_PATH . 'layout.html.twig'),
|
||||
$oTemplatesRegister->RegisterTemplates(
|
||||
self::class,
|
||||
TemplateDefinitionDto::Create('page', static::TEMPLATES_BASE_PATH.'layout.html.twig'),
|
||||
TemplateDefinitionDto::Create('navigation_menu', static::TEMPLATES_BASE_PATH.'/pages/navigation_menu.html.twig'),
|
||||
TemplateDefinitionDto::Create('modal', static::TEMPLATES_BASE_PATH . 'modal/layout.html.twig'),
|
||||
TemplateDefinitionDto::Create('modal', static::TEMPLATES_BASE_PATH.'modal/layout.html.twig'),
|
||||
TemplateDefinitionDto::Create('loader', static::TEMPLATES_BASE_PATH.'helpers/loader.html.twig'),
|
||||
TemplateDefinitionDto::Create('tagset_clic_handler_js', static::TEMPLATES_BASE_PATH.'helpers/tagset_clic_handler.js.twig'),
|
||||
TemplateDefinitionDto::Create('session_message', static::TEMPLATES_BASE_PATH.'helpers/session_messages/session_message.html.twig'),
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -34,7 +34,6 @@ use Symfony\Component\HttpFoundation\Request;
|
||||
*/
|
||||
class PreferencesController extends SymfonyAbstractController
|
||||
{
|
||||
|
||||
/**
|
||||
* Set a preference for the current user.
|
||||
*
|
||||
@@ -51,10 +50,9 @@ class PreferencesController extends SymfonyAbstractController
|
||||
$sValue = $oRequest->request->get('value');
|
||||
|
||||
// set user preference
|
||||
try{
|
||||
try {
|
||||
appUserPreferences::SetPref($sKey, $sValue);
|
||||
}
|
||||
catch(Exception){
|
||||
} catch (Exception) {
|
||||
$sStatus = 'error';
|
||||
}
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||
use UserRights;
|
||||
use utils;
|
||||
use Dict;
|
||||
|
||||
/**
|
||||
* Class UserProfileBrickController
|
||||
*
|
||||
@@ -60,7 +61,7 @@ class UserProfileBrickController extends BrickController
|
||||
* @param \Combodo\iTop\Portal\Brick\BrickCollection $oBrickCollection
|
||||
* @param \Combodo\iTop\Portal\Routing\UrlGenerator $oUrlGenerator
|
||||
* @param \Combodo\iTop\Portal\Helper\SecurityHelper $oSecurityHelper
|
||||
|
||||
|
||||
*
|
||||
* @since 3.2.0 N°6933
|
||||
*/
|
||||
@@ -70,12 +71,11 @@ class UserProfileBrickController extends BrickController
|
||||
protected BrickCollection $oBrickCollection,
|
||||
protected UrlGenerator $oUrlGenerator,
|
||||
protected SecurityHelper $oSecurityHelper
|
||||
)
|
||||
{
|
||||
) {
|
||||
}
|
||||
|
||||
/** @var string ENUM_FORM_TYPE_PICTURE */
|
||||
const ENUM_FORM_TYPE_PICTURE = 'picture';
|
||||
public const ENUM_FORM_TYPE_PICTURE = 'picture';
|
||||
|
||||
/**
|
||||
* @param \Symfony\Component\HttpFoundation\Request $oRequest
|
||||
@@ -92,26 +92,20 @@ class UserProfileBrickController extends BrickController
|
||||
public function DisplayAction(Request $oRequest, $sBrickId)
|
||||
{
|
||||
// If the brick id was not specified, we get the first one registered that is an instance of UserProfileBrick as default
|
||||
if ($sBrickId === null)
|
||||
{
|
||||
if ($sBrickId === null) {
|
||||
/** @var \Combodo\iTop\Portal\Brick\PortalBrick $oTmpBrick */
|
||||
foreach ($this->oBrickCollection->GetBricks() as $oTmpBrick)
|
||||
{
|
||||
if ($oTmpBrick instanceof UserProfileBrick)
|
||||
{
|
||||
foreach ($this->oBrickCollection->GetBricks() as $oTmpBrick) {
|
||||
if ($oTmpBrick instanceof UserProfileBrick) {
|
||||
$oBrick = $oTmpBrick;
|
||||
}
|
||||
}
|
||||
|
||||
// We make sure a UserProfileBrick was found
|
||||
if (!isset($oBrick) || $oBrick === null)
|
||||
{
|
||||
if (!isset($oBrick) || $oBrick === null) {
|
||||
$oBrick = new UserProfileBrick();
|
||||
//throw new HttpException(Response::HTTP_INTERNAL_SERVER_ERROR, 'UserProfileBrick : Brick could not be loaded as there was no UserProfileBrick loaded in the application.');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$oBrick = $this->oBrickCollection->GetBrickById($sBrickId);
|
||||
}
|
||||
|
||||
@@ -124,11 +118,14 @@ class UserProfileBrickController extends BrickController
|
||||
$sTab = $this->oRequestManipulatorHelper->ReadParam('sTab', 'user-info', FILTER_UNSAFE_RAW, FILTER_FLAG_EMPTY_STRING_NULL);
|
||||
|
||||
// If this is ajax call, we are just submitting preferences or password forms
|
||||
if ($oRequest->isXmlHttpRequest())
|
||||
{
|
||||
if ($oRequest->isXmlHttpRequest()) {
|
||||
if ($sTab === "user-info") {
|
||||
$aCurrentValues = $this->oRequestManipulatorHelper->ReadParam('current_values', array(), FILTER_UNSAFE_RAW,
|
||||
FILTER_REQUIRE_ARRAY);
|
||||
$aCurrentValues = $this->oRequestManipulatorHelper->ReadParam(
|
||||
'current_values',
|
||||
[],
|
||||
FILTER_UNSAFE_RAW,
|
||||
FILTER_REQUIRE_ARRAY
|
||||
);
|
||||
$sFormType = $aCurrentValues['form_type'];
|
||||
if ($sFormType === PreferencesFormManager::FORM_TYPE) {
|
||||
$aData['form'] = $this->HandlePreferencesForm($oRequest, $sFormMode);
|
||||
@@ -143,8 +140,7 @@ class UserProfileBrickController extends BrickController
|
||||
$oResponse = new JsonResponse($aData);
|
||||
}
|
||||
// Else, we are displaying page for first time
|
||||
else
|
||||
{
|
||||
else {
|
||||
if ($sTab === "user-info") {
|
||||
// Retrieving current contact
|
||||
/** @var \DBObject $oCurContact */
|
||||
@@ -175,7 +171,6 @@ class UserProfileBrickController extends BrickController
|
||||
return $oResponse;
|
||||
}
|
||||
|
||||
|
||||
private function ManageUserProfileBrickExtensibility(string $sTab, array &$aData): void
|
||||
{
|
||||
$aData['sTab'] = $sTab;
|
||||
@@ -193,7 +188,7 @@ class UserProfileBrickController extends BrickController
|
||||
|
||||
// Read the current tab content From iPortalTabSectionExtension
|
||||
$aTabSectionExtensions = ExtensibilityHelper::GetInstance()->GetPortalTabContentExtensions(iUserProfileTabContentExtension::class, $sTab);
|
||||
if (count($aTabSectionExtensions) !== 0 && count($_POST) !== 0){
|
||||
if (count($aTabSectionExtensions) !== 0 && count($_POST) !== 0) {
|
||||
$sTransactionId = utils::ReadPostedParam('transaction_id', null, utils::ENUM_SANITIZATION_FILTER_TRANSACTION_ID);
|
||||
IssueLog::Debug(__FUNCTION__.": transaction [$sTransactionId]");
|
||||
if (utils::IsNullOrEmptyString($sTransactionId) || !utils::IsTransactionValid($sTransactionId, false)) {
|
||||
@@ -214,30 +209,28 @@ class UserProfileBrickController extends BrickController
|
||||
}
|
||||
}
|
||||
|
||||
public function EditPerson(Request $oRequest)
|
||||
{
|
||||
$oCurContact = UserRights::GetContactObject();
|
||||
$sObjectClass = get_class($oCurContact);
|
||||
$sObjectId = $oCurContact->GetKey();
|
||||
|
||||
public function EditPerson(Request $oRequest)
|
||||
{
|
||||
$oCurContact = UserRights::GetContactObject();
|
||||
$sObjectClass = get_class($oCurContact);
|
||||
$sObjectId = $oCurContact->GetKey();
|
||||
// Checking security layers
|
||||
// Warning : This is a dirty quick fix to allow editing its own contact information
|
||||
$bAllowWrite = ($sObjectClass === 'Person' && $sObjectId == UserRights::GetContactId());
|
||||
if (!$this->oSecurityHelper->IsActionAllowed(UR_ACTION_MODIFY, $sObjectClass, $sObjectId) && !$bAllowWrite) {
|
||||
IssueLog::Warning(__METHOD__.' at line '.__LINE__.' : User #'.UserRights::GetUserId().' not allowed to modify '.$sObjectClass.'::'.$sObjectId.' object.');
|
||||
throw new HttpException(Response::HTTP_NOT_FOUND, Dict::S('UI:ObjectDoesNotExist'));
|
||||
}
|
||||
|
||||
// Checking security layers
|
||||
// Warning : This is a dirty quick fix to allow editing its own contact information
|
||||
$bAllowWrite = ($sObjectClass === 'Person' && $sObjectId == UserRights::GetContactId());
|
||||
if (!$this->oSecurityHelper->IsActionAllowed(UR_ACTION_MODIFY, $sObjectClass, $sObjectId) && !$bAllowWrite) {
|
||||
IssueLog::Warning(__METHOD__ . ' at line ' . __LINE__ . ' : User #' . UserRights::GetUserId() . ' not allowed to modify ' . $sObjectClass . '::' . $sObjectId . ' object.');
|
||||
throw new HttpException(Response::HTTP_NOT_FOUND, Dict::S('UI:ObjectDoesNotExist'));
|
||||
}
|
||||
$aForm = $this->GetBrick()->GetForm();
|
||||
$aForm['submit_endpoint'] = $this->generateUrl('p_user_profile_brick_edit_person');
|
||||
|
||||
$aForm = $this->GetBrick()->GetForm();
|
||||
$aForm['submit_endpoint'] = $this->generateUrl('p_user_profile_brick_edit_person');
|
||||
|
||||
$aData = ['sMode' => 'edit'];
|
||||
$aData['form'] = $this->ObjectFormHandlerHelper->HandleForm($oRequest, $aData['sMode'], $sObjectClass, $sObjectId, $aForm);
|
||||
|
||||
return new JsonResponse($aData);
|
||||
}
|
||||
$aData = ['sMode' => 'edit'];
|
||||
$aData['form'] = $this->ObjectFormHandlerHelper->HandleForm($oRequest, $aData['sMode'], $sObjectClass, $sObjectId, $aForm);
|
||||
|
||||
return new JsonResponse($aData);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Symfony\Component\HttpFoundation\Request $oRequest
|
||||
@@ -249,13 +242,12 @@ class UserProfileBrickController extends BrickController
|
||||
*/
|
||||
public function HandlePreferencesForm(Request $oRequest, $sFormMode)
|
||||
{
|
||||
$aFormData = array();
|
||||
$aFormData = [];
|
||||
|
||||
// Handling form
|
||||
$sOperation = $this->oRequestManipulatorHelper->ReadParam('operation', null);
|
||||
// - Create
|
||||
if ($sOperation === null)
|
||||
{
|
||||
if ($sOperation === null) {
|
||||
// - Creating renderer
|
||||
$oFormRenderer = new BsFormRenderer();
|
||||
$oFormRenderer->SetEndpoint($this->oUrlGenerator->generate('p_user_profile_brick'));
|
||||
@@ -264,50 +256,47 @@ class UserProfileBrickController extends BrickController
|
||||
$oFormManager->SetRenderer($oFormRenderer)
|
||||
->Build();
|
||||
// - Checking if we have to make the form read only
|
||||
if ($sFormMode === ObjectFormHandlerHelper::ENUM_MODE_VIEW)
|
||||
{
|
||||
if ($sFormMode === ObjectFormHandlerHelper::ENUM_MODE_VIEW) {
|
||||
$oFormManager->GetForm()->MakeReadOnly();
|
||||
}
|
||||
}
|
||||
// - Submit
|
||||
else
|
||||
{
|
||||
if ($sOperation === 'submit')
|
||||
{
|
||||
else {
|
||||
if ($sOperation === 'submit') {
|
||||
$sFormManagerClass = $this->oRequestManipulatorHelper->ReadParam('formmanager_class', null, FILTER_UNSAFE_RAW);
|
||||
$sFormManagerData = $this->oRequestManipulatorHelper->ReadParam('formmanager_data', null, FILTER_UNSAFE_RAW);
|
||||
if ($sFormManagerClass === null || $sFormManagerData === null)
|
||||
{
|
||||
if ($sFormManagerClass === null || $sFormManagerData === null) {
|
||||
IssueLog::Error(__METHOD__.' at line '.__LINE__.' : Parameters formmanager_class and formmanager_data must be defined.');
|
||||
throw new HttpException(Response::HTTP_INTERNAL_SERVER_ERROR,
|
||||
'Parameters formmanager_class and formmanager_data must be defined.');
|
||||
throw new HttpException(
|
||||
Response::HTTP_INTERNAL_SERVER_ERROR,
|
||||
'Parameters formmanager_class and formmanager_data must be defined.'
|
||||
);
|
||||
}
|
||||
|
||||
// Rebuilding manager from json
|
||||
/** @var \Combodo\iTop\Form\FormManager $oFormManager */
|
||||
$oFormManager = $sFormManagerClass::FromJSON($sFormManagerData);
|
||||
// Applying modification to object
|
||||
$aFormData['validation'] = $oFormManager->OnSubmit(array(
|
||||
'currentValues' => $this->oRequestManipulatorHelper->ReadParam('current_values', array(), FILTER_UNSAFE_RAW, FILTER_REQUIRE_ARRAY),
|
||||
));
|
||||
$aFormData['validation'] = $oFormManager->OnSubmit([
|
||||
'currentValues' => $this->oRequestManipulatorHelper->ReadParam('current_values', [], FILTER_UNSAFE_RAW, FILTER_REQUIRE_ARRAY),
|
||||
]);
|
||||
// Reloading page only if preferences were changed
|
||||
if (($aFormData['validation']['valid'] === true) && !empty($aFormData['validation']['messages']['success']))
|
||||
{
|
||||
$aFormData['validation']['redirection'] = array(
|
||||
if (($aFormData['validation']['valid'] === true) && !empty($aFormData['validation']['messages']['success'])) {
|
||||
$aFormData['validation']['redirection'] = [
|
||||
'url' => $this->oUrlGenerator->generate('p_user_profile_brick'),
|
||||
'timeout_duration' => 1000, //since there are several ajax request, we use a longer timeout in hope that they will all be finished in time. A promise would have been more reliable, but since this change is made in a minor version, this approach is less error prone.
|
||||
);
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
// Else, submit from another form
|
||||
|
||||
// Preparing field_set data
|
||||
$aFieldSetData = array(
|
||||
$aFieldSetData = [
|
||||
'fields_list' => $oFormManager->GetRenderer()->Render(),
|
||||
'fields_impacts' => $oFormManager->GetForm()->GetFieldsImpacts(),
|
||||
'form_path' => $oFormManager->GetForm()->GetId(),
|
||||
);
|
||||
];
|
||||
|
||||
// Preparing form data
|
||||
$aFormData['id'] = $oFormManager->GetForm()->GetId();
|
||||
@@ -329,14 +318,13 @@ class UserProfileBrickController extends BrickController
|
||||
*/
|
||||
public function HandlePasswordForm(Request $oRequest, $sFormMode)
|
||||
{
|
||||
$aFormData = array();
|
||||
$aFormData = [];
|
||||
|
||||
// Handling form
|
||||
$sOperation = /** @var \Combodo\iTop\Portal\Helper\RequestManipulatorHelper $oRequestManipulator */
|
||||
$this->oRequestManipulatorHelper->ReadParam('operation', null);
|
||||
// - Create
|
||||
if ($sOperation === null)
|
||||
{
|
||||
if ($sOperation === null) {
|
||||
// - Creating renderer
|
||||
$oFormRenderer = new BsFormRenderer();
|
||||
$oFormRenderer->SetEndpoint($this->oUrlGenerator->generate('p_user_profile_brick'));
|
||||
@@ -345,41 +333,40 @@ class UserProfileBrickController extends BrickController
|
||||
$oFormManager->SetRenderer($oFormRenderer)
|
||||
->Build();
|
||||
// - Checking if we have to make the form read only
|
||||
if ($sFormMode === ObjectFormHandlerHelper::ENUM_MODE_VIEW)
|
||||
{
|
||||
if ($sFormMode === ObjectFormHandlerHelper::ENUM_MODE_VIEW) {
|
||||
$oFormManager->GetForm()->MakeReadOnly();
|
||||
}
|
||||
}
|
||||
// - Submit
|
||||
else
|
||||
{
|
||||
if ($sOperation === 'submit')
|
||||
{
|
||||
else {
|
||||
if ($sOperation === 'submit') {
|
||||
$sFormManagerClass = $this->oRequestManipulatorHelper->ReadParam('formmanager_class', null, FILTER_UNSAFE_RAW);
|
||||
$sFormManagerData = $this->oRequestManipulatorHelper->ReadParam('formmanager_data', null, FILTER_UNSAFE_RAW);
|
||||
if ($sFormManagerClass === null || $sFormManagerData === null) {
|
||||
IssueLog::Error(__METHOD__.' at line '.__LINE__.' : Parameters formmanager_class and formmanager_data must be defined.');
|
||||
throw new HttpException(Response::HTTP_INTERNAL_SERVER_ERROR,
|
||||
'Parameters formmanager_class and formmanager_data must be defined.');
|
||||
throw new HttpException(
|
||||
Response::HTTP_INTERNAL_SERVER_ERROR,
|
||||
'Parameters formmanager_class and formmanager_data must be defined.'
|
||||
);
|
||||
}
|
||||
|
||||
// Rebuilding manager from json
|
||||
/** @var \Combodo\iTop\Form\FormManager $oFormManager */
|
||||
$oFormManager = $sFormManagerClass::FromJSON($sFormManagerData);
|
||||
// Applying modification to object
|
||||
$aFormData['validation'] = $oFormManager->OnSubmit(array(
|
||||
'currentValues' => $this->oRequestManipulatorHelper->ReadParam('current_values', array(), FILTER_UNSAFE_RAW, FILTER_REQUIRE_ARRAY),
|
||||
));
|
||||
$aFormData['validation'] = $oFormManager->OnSubmit([
|
||||
'currentValues' => $this->oRequestManipulatorHelper->ReadParam('current_values', [], FILTER_UNSAFE_RAW, FILTER_REQUIRE_ARRAY),
|
||||
]);
|
||||
}
|
||||
}
|
||||
// Else, submit from another form
|
||||
|
||||
// Preparing field_set data
|
||||
$aFieldSetData = array(
|
||||
$aFieldSetData = [
|
||||
'fields_list' => $oFormManager->GetRenderer()->Render(),
|
||||
'fields_impacts' => $oFormManager->GetForm()->GetFieldsImpacts(),
|
||||
'form_path' => $oFormManager->GetForm()->GetId(),
|
||||
);
|
||||
];
|
||||
|
||||
// Preparing form data
|
||||
$aFormData['id'] = $oFormManager->GetForm()->GetId();
|
||||
@@ -400,32 +387,27 @@ class UserProfileBrickController extends BrickController
|
||||
*/
|
||||
public function HandlePictureForm(Request $oRequest)
|
||||
{
|
||||
$aFormData = array();
|
||||
$aFormData = [];
|
||||
$sPictureAttCode = 'picture';
|
||||
|
||||
// Handling form
|
||||
$sOperation = $this->oRequestManipulatorHelper->ReadParam('operation', null);
|
||||
// - No operation specified
|
||||
if ($sOperation === null)
|
||||
{
|
||||
if ($sOperation === null) {
|
||||
IssueLog::Error(__METHOD__.' at line '.__LINE__.' : Operation parameter must be specified.');
|
||||
throw new HttpException(Response::HTTP_INTERNAL_SERVER_ERROR, 'Operation parameter must be specified.');
|
||||
}
|
||||
// - Submit
|
||||
else
|
||||
{
|
||||
if ($sOperation === 'submit')
|
||||
{
|
||||
else {
|
||||
if ($sOperation === 'submit') {
|
||||
$oRequestFiles = $oRequest->files;
|
||||
$oPictureFile = $oRequestFiles->get($sPictureAttCode);
|
||||
if ($oPictureFile === null)
|
||||
{
|
||||
if ($oPictureFile === null) {
|
||||
IssueLog::Error(__METHOD__.' at line '.__LINE__.' : Parameter picture must be defined.');
|
||||
throw new HttpException(Response::HTTP_INTERNAL_SERVER_ERROR, 'Parameter picture must be defined.');
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
try {
|
||||
// Retrieving image as an ORMDocument
|
||||
$oImage = utils::ReadPostedDocument($sPictureAttCode);
|
||||
// Retrieving current contact
|
||||
@@ -442,9 +424,7 @@ class UserProfileBrickController extends BrickController
|
||||
// Forcing allowed writing on the object if necessary.
|
||||
$oCurContact->AllowWrite(true);
|
||||
$oCurContact->DBUpdate();
|
||||
}
|
||||
catch (FileUploadException $e)
|
||||
{
|
||||
} catch (FileUploadException $e) {
|
||||
$aFormData['error'] = $e->GetMessage();
|
||||
}
|
||||
|
||||
@@ -457,10 +437,10 @@ class UserProfileBrickController extends BrickController
|
||||
'cache' => 86400,
|
||||
's' => $oOrmDoc->GetSignature(),
|
||||
]);
|
||||
$aFormData['validation'] = array(
|
||||
$aFormData['validation'] = [
|
||||
'valid' => true,
|
||||
'messages' => array(),
|
||||
);
|
||||
'messages' => [],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -469,30 +449,30 @@ class UserProfileBrickController extends BrickController
|
||||
return $aFormData;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $sBrickId
|
||||
* @return \Combodo\iTop\Portal\Brick\PortalBrick|UserProfileBrick
|
||||
* @throws \Combodo\iTop\Portal\Brick\BrickNotFoundException
|
||||
*/
|
||||
public function GetBrick($sBrickId = null)
|
||||
{
|
||||
// If the brick id was not specified, we get the first one registered that is an instance of UserProfileBrick as default
|
||||
if ($sBrickId === null) {
|
||||
/** @var \Combodo\iTop\Portal\Brick\PortalBrick $oTmpBrick */
|
||||
foreach ($this->oBrickCollection->GetBricks() as $oTmpBrick) {
|
||||
if ($oTmpBrick instanceof UserProfileBrick) {
|
||||
$oBrick = $oTmpBrick;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param $sBrickId
|
||||
* @return \Combodo\iTop\Portal\Brick\PortalBrick|UserProfileBrick
|
||||
* @throws \Combodo\iTop\Portal\Brick\BrickNotFoundException
|
||||
*/
|
||||
public function GetBrick($sBrickId = null)
|
||||
{
|
||||
// If the brick id was not specified, we get the first one registered that is an instance of UserProfileBrick as default
|
||||
if ($sBrickId === null) {
|
||||
/** @var \Combodo\iTop\Portal\Brick\PortalBrick $oTmpBrick */
|
||||
foreach ($this->oBrickCollection->GetBricks() as $oTmpBrick) {
|
||||
if ($oTmpBrick instanceof UserProfileBrick) {
|
||||
$oBrick = $oTmpBrick;
|
||||
}
|
||||
}
|
||||
|
||||
// We make sure a UserProfileBrick was found
|
||||
if (!isset($oBrick) || $oBrick === null) {
|
||||
$oBrick = new UserProfileBrick();
|
||||
//throw new HttpException(Response::HTTP_INTERNAL_SERVER_ERROR, 'UserProfileBrick : Brick could not be loaded as there was no UserProfileBrick loaded in the application.');
|
||||
}
|
||||
} else {
|
||||
$oBrick = $this->oBrickCollection->GetBrickById($sBrickId);
|
||||
}
|
||||
return $oBrick;
|
||||
}
|
||||
// We make sure a UserProfileBrick was found
|
||||
if (!isset($oBrick) || $oBrick === null) {
|
||||
$oBrick = new UserProfileBrick();
|
||||
//throw new HttpException(Response::HTTP_INTERNAL_SERVER_ERROR, 'UserProfileBrick : Brick could not be loaded as there was no UserProfileBrick loaded in the application.');
|
||||
}
|
||||
} else {
|
||||
$oBrick = $this->oBrickCollection->GetBrickById($sBrickId);
|
||||
}
|
||||
return $oBrick;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Copyright (C) 2013-2024 Combodo SAS
|
||||
*
|
||||
@@ -44,8 +45,7 @@ class Basic extends AbstractConfiguration
|
||||
*/
|
||||
public function Process(Container $oContainer)
|
||||
{
|
||||
try
|
||||
{
|
||||
try {
|
||||
// Parsing file
|
||||
// - Default values
|
||||
$aPortalConf = $this->GetInitialPortalConf();
|
||||
@@ -55,9 +55,7 @@ class Basic extends AbstractConfiguration
|
||||
$aPortalConf = $this->AppendLogoUri($aPortalConf);
|
||||
// - Rectifying portal favicon url
|
||||
$aPortalConf = $this->AppendFavIconUri($aPortalConf);
|
||||
}
|
||||
catch (Exception $oException)
|
||||
{
|
||||
} catch (Exception $oException) {
|
||||
throw new Exception('Error while parsing portal configuration file : '.$oException->getMessage());
|
||||
}
|
||||
|
||||
@@ -72,8 +70,8 @@ class Basic extends AbstractConfiguration
|
||||
*/
|
||||
private function GetInitialPortalConf()
|
||||
{
|
||||
$aPortalConf = array(
|
||||
'properties' => array(
|
||||
$aPortalConf = [
|
||||
'properties' => [
|
||||
'id' => $_ENV['PORTAL_ID'],
|
||||
'ui_version' => 'v3',
|
||||
'ui_settings' => [
|
||||
@@ -82,29 +80,29 @@ class Basic extends AbstractConfiguration
|
||||
'name' => 'Page:DefaultTitle',
|
||||
'logo' => Branding::GetPortalLogoAbsoluteUrl(),
|
||||
'favicon' => Branding::GetPortalFavIconAbsoluteUrl(),
|
||||
'themes' => array(
|
||||
'themes' => [
|
||||
'bootstrap' => 'itop-portal-base/portal/public/css/bootstrap-theme-combodo.scss',
|
||||
'portal' => 'itop-portal-base/portal/public/css/portal.scss',
|
||||
'main' => 'itop-portal-base/portal/public/css/main.scss',
|
||||
'others' => array(),
|
||||
),
|
||||
'templates' => array(
|
||||
'others' => [],
|
||||
],
|
||||
'templates' => [
|
||||
'layout' => 'itop-portal-base/portal/templates/layout.html.twig',
|
||||
'home' => 'itop-portal-base/portal/templates/home/layout.html.twig',
|
||||
),
|
||||
],
|
||||
'urlmaker_class' => null,
|
||||
'triggers_query' => null,
|
||||
'attachments' => array(
|
||||
'attachments' => [
|
||||
'allow_delete' => true,
|
||||
),
|
||||
'allowed_portals' => array(
|
||||
],
|
||||
'allowed_portals' => [
|
||||
'opening_mode' => null,
|
||||
),
|
||||
),
|
||||
'forms' => array(),
|
||||
'bricks' => array(),
|
||||
],
|
||||
],
|
||||
'forms' => [],
|
||||
'bricks' => [],
|
||||
'bricks_total_width' => 0,
|
||||
);
|
||||
];
|
||||
|
||||
return $aPortalConf;
|
||||
}
|
||||
@@ -118,10 +116,8 @@ class Basic extends AbstractConfiguration
|
||||
private function ParseGlobalProperties(array $aPortalConf)
|
||||
{
|
||||
/** @var \MFElement $oPropertyNode */
|
||||
foreach ($this->GetModuleDesign()->GetNodes('/module_design/properties/*') as $oPropertyNode)
|
||||
{
|
||||
switch ($oPropertyNode->nodeName)
|
||||
{
|
||||
foreach ($this->GetModuleDesign()->GetNodes('/module_design/properties/*') as $oPropertyNode) {
|
||||
switch ($oPropertyNode->nodeName) {
|
||||
case 'ui_version':
|
||||
case 'name':
|
||||
case 'urlmaker_class':
|
||||
@@ -131,7 +127,7 @@ class Basic extends AbstractConfiguration
|
||||
$aPortalConf['properties'][$oPropertyNode->nodeName] = $oPropertyNode->GetText(
|
||||
$aPortalConf['properties'][$oPropertyNode->nodeName]
|
||||
);
|
||||
break;
|
||||
break;
|
||||
case 'ui_settings':
|
||||
foreach ($oPropertyNode->GetNodes('*') as $oSubNode) {
|
||||
$aPortalConf['properties'][$oPropertyNode->nodeName][$oSubNode->nodeName] = $oSubNode->GetText();
|
||||
@@ -163,22 +159,20 @@ class Basic extends AbstractConfiguration
|
||||
private function ParseTemplateAndTheme(array $aPortalConf, DesignElement $oPropertyNode)
|
||||
{
|
||||
/** @var \MFElement $oSubNode */
|
||||
foreach ($oPropertyNode->GetNodes('template|theme') as $oSubNode)
|
||||
{
|
||||
if (!$oSubNode->hasAttribute('id') || $oSubNode->GetText(null) === null)
|
||||
{
|
||||
foreach ($oPropertyNode->GetNodes('template|theme') as $oSubNode) {
|
||||
if (!$oSubNode->hasAttribute('id') || $oSubNode->GetText(null) === null) {
|
||||
throw new DOMFormatException(
|
||||
'Tag '.$oSubNode->nodeName.' must have a "id" attribute as well as a value',
|
||||
null, null, $oSubNode
|
||||
null,
|
||||
null,
|
||||
$oSubNode
|
||||
);
|
||||
}
|
||||
|
||||
$sNodeId = $oSubNode->getAttribute('id');
|
||||
switch ($oSubNode->nodeName)
|
||||
{
|
||||
switch ($oSubNode->nodeName) {
|
||||
case 'theme':
|
||||
switch ($sNodeId)
|
||||
{
|
||||
switch ($sNodeId) {
|
||||
case 'bootstrap':
|
||||
case 'portal':
|
||||
case 'custom':
|
||||
@@ -190,8 +184,7 @@ class Basic extends AbstractConfiguration
|
||||
}
|
||||
break;
|
||||
case 'template':
|
||||
switch ($sNodeId)
|
||||
{
|
||||
switch ($sNodeId) {
|
||||
case 'layout':
|
||||
case 'home':
|
||||
$aPortalConf['properties']['templates'][$sNodeId] = $oSubNode->GetText(null);
|
||||
@@ -199,19 +192,21 @@ class Basic extends AbstractConfiguration
|
||||
default:
|
||||
$aMatches = [];
|
||||
// allowed format is: <class implementing TemplatesProviderInterface>:<template_id>
|
||||
if(preg_match('#([\w\\\d_]+):(\w+)#', $sNodeId, $aMatches)){
|
||||
try{
|
||||
if (preg_match('#([\w\\\d_]+):(\w+)#', $sNodeId, $aMatches)) {
|
||||
try {
|
||||
$oClass = new ReflectionClass($aMatches[1]);
|
||||
if($oClass->implementsInterface(TemplatesProviderInterface::class)){
|
||||
if ($oClass->implementsInterface(TemplatesProviderInterface::class)) {
|
||||
$aPortalConf['properties']['templates'][$aMatches[1]][$aMatches[2]] = $oSubNode->GetText(null);
|
||||
break;
|
||||
}
|
||||
} catch (Exception) {
|
||||
}
|
||||
catch(Exception){}
|
||||
}
|
||||
throw new DOMFormatException(
|
||||
'Template ID "'.$sNodeId.'" is not handled in module design templates property',
|
||||
null, null, $oSubNode
|
||||
null,
|
||||
null,
|
||||
$oSubNode
|
||||
);
|
||||
}
|
||||
break;
|
||||
@@ -230,16 +225,13 @@ class Basic extends AbstractConfiguration
|
||||
private function ParseAttachments(array $aPortalConf, DesignElement $oPropertyNode)
|
||||
{
|
||||
/** @var \MFElement $oSubNode */
|
||||
foreach ($oPropertyNode->GetNodes('*') as $oSubNode)
|
||||
{
|
||||
switch ($oSubNode->nodeName)
|
||||
{
|
||||
foreach ($oPropertyNode->GetNodes('*') as $oSubNode) {
|
||||
switch ($oSubNode->nodeName) {
|
||||
case 'allow_delete':
|
||||
$sValue = $oSubNode->GetText();
|
||||
// If the text is null, we keep the default value
|
||||
// Else we set it
|
||||
if ($sValue !== null)
|
||||
{
|
||||
if ($sValue !== null) {
|
||||
$aPortalConf['properties']['attachments'][$oSubNode->nodeName] = ($sValue === 'true') ? true : false;
|
||||
}
|
||||
break;
|
||||
@@ -258,16 +250,13 @@ class Basic extends AbstractConfiguration
|
||||
private function ParseAllowedPortalsOptions(array $aPortalConf, DesignElement $oPropertyNode)
|
||||
{
|
||||
/** @var \MFElement $oSubNode */
|
||||
foreach ($oPropertyNode->GetNodes('*') as $oSubNode)
|
||||
{
|
||||
switch ($oSubNode->nodeName)
|
||||
{
|
||||
foreach ($oPropertyNode->GetNodes('*') as $oSubNode) {
|
||||
switch ($oSubNode->nodeName) {
|
||||
case 'opening_mode':
|
||||
$sValue = $oSubNode->GetText();
|
||||
// If the text is null, we keep the default value
|
||||
// Else we set it
|
||||
if ($sValue !== null)
|
||||
{
|
||||
if ($sValue !== null) {
|
||||
$aPortalConf['properties']['allowed_portals'][$oSubNode->nodeName] = ($sValue === 'self') ? 'self' : 'tab';
|
||||
}
|
||||
break;
|
||||
@@ -313,4 +302,4 @@ class Basic extends AbstractConfiguration
|
||||
|
||||
return $aPortalConf;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,13 +41,13 @@ use utils;
|
||||
class ApplicationHelper
|
||||
{
|
||||
/** @var string FORM_ENUM_DISPLAY_MODE_COSY */
|
||||
const FORM_ENUM_DISPLAY_MODE_COSY = 'cosy';
|
||||
public const FORM_ENUM_DISPLAY_MODE_COSY = 'cosy';
|
||||
/** @var string FORM_ENUM_DISPLAY_MODE_COMPACT */
|
||||
const FORM_ENUM_DISPLAY_MODE_COMPACT = 'compact';
|
||||
public const FORM_ENUM_DISPLAY_MODE_COMPACT = 'compact';
|
||||
/** @var string FORM_DEFAULT_DISPLAY_MODE */
|
||||
const FORM_DEFAULT_DISPLAY_MODE = self::FORM_ENUM_DISPLAY_MODE_COSY;
|
||||
public const FORM_DEFAULT_DISPLAY_MODE = self::FORM_ENUM_DISPLAY_MODE_COSY;
|
||||
/** @var bool FORM_DEFAULT_ALWAYS_SHOW_SUBMIT */
|
||||
const FORM_DEFAULT_ALWAYS_SHOW_SUBMIT = false;
|
||||
public const FORM_DEFAULT_ALWAYS_SHOW_SUBMIT = false;
|
||||
|
||||
/**
|
||||
* Loads the brick's security from the OQL queries to profiles arrays
|
||||
@@ -58,32 +58,25 @@ class ApplicationHelper
|
||||
*/
|
||||
public static function LoadBrickSecurity(AbstractBrick $oBrick)
|
||||
{
|
||||
try
|
||||
{
|
||||
try {
|
||||
// Allowed profiles
|
||||
if (utils::IsNotNullOrEmptyString($oBrick->GetAllowedProfilesOql()))
|
||||
{
|
||||
if (utils::IsNotNullOrEmptyString($oBrick->GetAllowedProfilesOql())) {
|
||||
$oSearch = DBObjectSearch::FromOQL_AllData($oBrick->GetAllowedProfilesOql());
|
||||
$oSet = new DBObjectSet($oSearch);
|
||||
while ($oProfile = $oSet->Fetch())
|
||||
{
|
||||
while ($oProfile = $oSet->Fetch()) {
|
||||
$oBrick->AddAllowedProfile($oProfile->Get('name'));
|
||||
}
|
||||
}
|
||||
|
||||
// Denied profiles
|
||||
if (utils::IsNotNullOrEmptyString($oBrick->GetDeniedProfilesOql()))
|
||||
{
|
||||
if (utils::IsNotNullOrEmptyString($oBrick->GetDeniedProfilesOql())) {
|
||||
$oSearch = DBObjectSearch::FromOQL_AllData($oBrick->GetDeniedProfilesOql());
|
||||
$oSet = new DBObjectSet($oSearch);
|
||||
while ($oProfile = $oSet->Fetch())
|
||||
{
|
||||
while ($oProfile = $oSet->Fetch()) {
|
||||
$oBrick->AddDeniedProfile($oProfile->Get('name'));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
} catch (Exception $e) {
|
||||
throw new Exception('Error while loading security from '.$oBrick->GetId().' brick');
|
||||
}
|
||||
}
|
||||
@@ -108,18 +101,14 @@ class ApplicationHelper
|
||||
$aForm = null;
|
||||
|
||||
// We try to find the form for that class
|
||||
if (isset($aForms[$sClass]) && isset($aForms[$sClass][$sMode]))
|
||||
{
|
||||
if (isset($aForms[$sClass]) && isset($aForms[$sClass][$sMode])) {
|
||||
$aForm = $aForms[$sClass][$sMode];
|
||||
}
|
||||
// If not found, we try find one from the closest parent class
|
||||
else
|
||||
{
|
||||
else {
|
||||
$bFound = false;
|
||||
foreach (MetaModel::EnumParentClasses($sClass, ENUM_PARENT_CLASSES_EXCLUDELEAF, false) as $sParentClass)
|
||||
{
|
||||
if (isset($aForms[$sParentClass]) && isset($aForms[$sParentClass][$sMode]))
|
||||
{
|
||||
foreach (MetaModel::EnumParentClasses($sClass, ENUM_PARENT_CLASSES_EXCLUDELEAF, false) as $sParentClass) {
|
||||
if (isset($aForms[$sParentClass]) && isset($aForms[$sParentClass][$sMode])) {
|
||||
$aForm = $aForms[$sParentClass][$sMode];
|
||||
$bFound = true;
|
||||
break;
|
||||
@@ -127,8 +116,7 @@ class ApplicationHelper
|
||||
}
|
||||
|
||||
// If we have still not found one, we return a default form
|
||||
if (!$bFound)
|
||||
{
|
||||
if (!$bFound) {
|
||||
$aForm = static::GenerateDefaultFormForClass($sClass);
|
||||
}
|
||||
}
|
||||
@@ -153,32 +141,26 @@ class ApplicationHelper
|
||||
public static function GetLoadedListFromClass($aLists, $sClass, $sList = 'default')
|
||||
{
|
||||
$aFoundList = null;
|
||||
$aAttCodes = array();
|
||||
$aAttCodes = [];
|
||||
|
||||
// We try to find the list for that class
|
||||
if (isset($aLists[$sClass]) && isset($aLists[$sClass][$sList]))
|
||||
{
|
||||
if (isset($aLists[$sClass]) && isset($aLists[$sClass][$sList])) {
|
||||
$aFoundList = $aLists[$sClass][$sList];
|
||||
}
|
||||
// Else we try to found the default list for that class
|
||||
elseif (isset($aLists[$sClass]) && isset($aLists[$sClass]['default']))
|
||||
{
|
||||
elseif (isset($aLists[$sClass]) && isset($aLists[$sClass]['default'])) {
|
||||
$aFoundList = $aLists[$sClass]['default'];
|
||||
}
|
||||
// If not found, we try find one from the closest parent class
|
||||
else
|
||||
{
|
||||
foreach (MetaModel::EnumParentClasses($sClass) as $sParentClass)
|
||||
{
|
||||
else {
|
||||
foreach (MetaModel::EnumParentClasses($sClass) as $sParentClass) {
|
||||
// Trying to find the right list
|
||||
if (isset($aLists[$sParentClass]) && isset($aLists[$sParentClass][$sList]))
|
||||
{
|
||||
if (isset($aLists[$sParentClass]) && isset($aLists[$sParentClass][$sList])) {
|
||||
$aFoundList = $aLists[$sParentClass][$sList];
|
||||
break;
|
||||
}
|
||||
// Or the default list
|
||||
elseif (isset($aLists[$sParentClass]) && isset($aLists[$sParentClass]['default']))
|
||||
{
|
||||
elseif (isset($aLists[$sParentClass]) && isset($aLists[$sParentClass]['default'])) {
|
||||
$aFoundList = $aLists[$sParentClass]['default'];
|
||||
break;
|
||||
}
|
||||
@@ -186,15 +168,11 @@ class ApplicationHelper
|
||||
}
|
||||
|
||||
// If found, we flatten the list to keep only the attribute codes (not the rank)
|
||||
if ($aFoundList !== null)
|
||||
{
|
||||
foreach ($aFoundList as $aItem)
|
||||
{
|
||||
if ($aFoundList !== null) {
|
||||
foreach ($aFoundList as $aItem) {
|
||||
$aAttCodes[] = $aItem['att_code'];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$aAttCodes = MetaModel::FlattenZList(MetaModel::GetZListItems($sClass, 'list'));
|
||||
}
|
||||
|
||||
@@ -213,32 +191,31 @@ class ApplicationHelper
|
||||
*/
|
||||
protected static function GenerateDefaultFormForClass($sClass, $bAddLinksets = false)
|
||||
{
|
||||
$aForm = array(
|
||||
$aForm = [
|
||||
'id' => strtolower($sClass)."-default-".uniqid(),
|
||||
'type' => 'custom_list',
|
||||
'properties' => array(
|
||||
'properties' => [
|
||||
'display_mode' => static::FORM_DEFAULT_DISPLAY_MODE,
|
||||
'always_show_submit' => static::FORM_DEFAULT_ALWAYS_SHOW_SUBMIT,
|
||||
'navigation_rules' => array(
|
||||
'navigation_rules' => [
|
||||
'submit' => null,
|
||||
'cancel' => null,
|
||||
),
|
||||
),
|
||||
'fields' => array(),
|
||||
'layout' => array(
|
||||
],
|
||||
],
|
||||
'fields' => [],
|
||||
'layout' => [
|
||||
'type' => 'xhtml',
|
||||
'content' => '',
|
||||
),
|
||||
);
|
||||
],
|
||||
];
|
||||
|
||||
// Generate layout
|
||||
$sContent = "";
|
||||
|
||||
// - Retrieve zlist details
|
||||
$aDetailsList = MetaModel::GetZListItems($sClass, 'details');
|
||||
$aDetailsStruct = cmdbAbstractObject::ProcessZlist($aDetailsList, array(), 'UI:PropertiesTab', 'col1', '');
|
||||
if(!isset($aDetailsStruct['UI:PropertiesTab']))
|
||||
{
|
||||
$aDetailsStruct = cmdbAbstractObject::ProcessZlist($aDetailsList, [], 'UI:PropertiesTab', 'col1', '');
|
||||
if (!isset($aDetailsStruct['UI:PropertiesTab'])) {
|
||||
// For the iTop administrator
|
||||
IssueLog::Error('Could not generate default form for "'.$sClass.'" class. Is the "details" zlist empty?');
|
||||
// For the end-user
|
||||
@@ -248,14 +225,10 @@ class ApplicationHelper
|
||||
|
||||
// Count cols (not linksets)
|
||||
$iColCount = 0;
|
||||
foreach ($aPropertiesStruct as $sColId => $aColFieldsets)
|
||||
{
|
||||
if (substr($sColId, 0, 1) !== '_')
|
||||
{
|
||||
foreach ($aColFieldsets as $sFieldsetName => $aAttCodes)
|
||||
{
|
||||
if (substr($sFieldsetName, 0, 1) !== '_')
|
||||
{
|
||||
foreach ($aPropertiesStruct as $sColId => $aColFieldsets) {
|
||||
if (substr($sColId, 0, 1) !== '_') {
|
||||
foreach ($aColFieldsets as $sFieldsetName => $aAttCodes) {
|
||||
if (substr($sFieldsetName, 0, 1) !== '_') {
|
||||
$iColCount++;
|
||||
break;
|
||||
}
|
||||
@@ -263,28 +236,24 @@ class ApplicationHelper
|
||||
}
|
||||
}
|
||||
// If no cols, return a default form with all fields one after another
|
||||
if ($iColCount === 0)
|
||||
{
|
||||
return array(
|
||||
if ($iColCount === 0) {
|
||||
return [
|
||||
'id' => 'default',
|
||||
'type' => 'zlist',
|
||||
'fields' => 'details',
|
||||
'layout' => null,
|
||||
);
|
||||
];
|
||||
}
|
||||
// Warning, this might not be great when 12 modulo $iColCount is greater than 0.
|
||||
$sColCSSClass = 'col-sm-'.floor(12 / $iColCount);
|
||||
|
||||
$sLinksetsHTML = "";
|
||||
$sRowHTML = "<div class=\"row\">\n";
|
||||
foreach ($aPropertiesStruct as $sColId => $aColFieldsets)
|
||||
{
|
||||
foreach ($aPropertiesStruct as $sColId => $aColFieldsets) {
|
||||
$sColsHTML = "\t<div class=\"".$sColCSSClass."\">\n";
|
||||
foreach ($aColFieldsets as $sFieldsetName => $aAttCodes)
|
||||
{
|
||||
foreach ($aColFieldsets as $sFieldsetName => $aAttCodes) {
|
||||
// Add fieldset, not linkset
|
||||
if (substr($sFieldsetName, 0, 1) !== '_')
|
||||
{
|
||||
if (substr($sFieldsetName, 0, 1) !== '_') {
|
||||
$sFieldsetHTML = "\t\t<fieldset>\n";
|
||||
$sFieldsetHTML .= "\t\t\t<legend>".utils::EscapeHtml(Dict::S($sFieldsetName))."</legend>\n";
|
||||
|
||||
@@ -296,11 +265,8 @@ class ApplicationHelper
|
||||
|
||||
// Add to col
|
||||
$sColsHTML .= $sFieldsetHTML;
|
||||
}
|
||||
elseif ($bAddLinksets)
|
||||
{
|
||||
foreach ($aAttCodes as $sAttCode)
|
||||
{
|
||||
} elseif ($bAddLinksets) {
|
||||
foreach ($aAttCodes as $sAttCode) {
|
||||
$sLinksetsHTML .= "<div class=\"form_field\" data-field-id=\"".$sAttCode."\"></div>\n";
|
||||
}
|
||||
}
|
||||
@@ -329,8 +295,9 @@ class ApplicationHelper
|
||||
* @return array
|
||||
* @since 2.7.0
|
||||
*/
|
||||
public static function GetAttDefClassesToExcludeFromMarkupMetadataRawValue(){
|
||||
return array(
|
||||
public static function GetAttDefClassesToExcludeFromMarkupMetadataRawValue()
|
||||
{
|
||||
return [
|
||||
'AttributeBlob',
|
||||
'AttributeCustomFields',
|
||||
'AttributeDashboard',
|
||||
@@ -338,7 +305,7 @@ class ApplicationHelper
|
||||
'AttributeStopWatch',
|
||||
'AttributeSubItem',
|
||||
'AttributeTable',
|
||||
'AttributeText'
|
||||
);
|
||||
'AttributeText',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user