diff --git a/.editorconfig b/.editorconfig
index d095a35cf..b30c0b63e 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -321,7 +321,7 @@ ij_php_call_parameters_right_paren_on_new_line = false
ij_php_call_parameters_wrap = normal
ij_php_catch_on_new_line = true
ij_php_category_weight = 28
-ij_php_class_brace_style = next_line
+ij_php_class_brace_style = end_of_line
ij_php_comma_after_last_array_element = true
ij_php_concat_spaces = false
ij_php_copyright_weight = 28
@@ -372,7 +372,7 @@ ij_php_link_weight = 28
ij_php_lower_case_boolean_const = true
ij_php_lower_case_keywords = true
ij_php_lower_case_null_const = true
-ij_php_method_brace_style = next_line
+ij_php_method_brace_style = end_of_line
ij_php_method_call_chain_wrap = off
ij_php_method_parameters_new_line_after_left_paren = true
ij_php_method_parameters_right_paren_on_new_line = true
diff --git a/.gitignore b/.gitignore
index 94cbfe366..515f4548b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -46,11 +46,6 @@ test/vendor/*
# Jetbrains
/.idea/**
-!/.idea/encodings.xml
-!/.idea/codeStyles
-!/.idea/codeStyles/*
-!/.idea/inspectionProfiles
-!/.idea/inspectionProfiles/*
# doc. generation
/.doc/vendor
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index 6af43b87d..000000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index d68e1e434..000000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
deleted file mode 100644
index c2bae49d7..000000000
--- a/.idea/encodings.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Combodo.xml b/.idea/inspectionProfiles/Combodo.xml
deleted file mode 100644
index f28cfada7..000000000
--- a/.idea/inspectionProfiles/Combodo.xml
+++ /dev/null
@@ -1,209 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index b9013fdbd..000000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml
deleted file mode 100644
index 7f3af8c75..000000000
--- a/.idea/inspectionProfiles/profiles_settings.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/application/cmdbabstract.class.inc.php b/application/cmdbabstract.class.inc.php
index eb3482510..578973d84 100644
--- a/application/cmdbabstract.class.inc.php
+++ b/application/cmdbabstract.class.inc.php
@@ -561,12 +561,6 @@ EOF
$oLinkSet = $oOrmLinkSet->ToDBObjectSet(utils::ShowObsoleteData());
$iCount = $oLinkSet->Count();
- $sCount = '';
- if ($iCount != 0)
- {
- $sCount = " ($iCount)";
- }
- $oPage->SetCurrentTab('Class:'.$sClass.'/Attribute:'.$sAttCode, $oAttDef->GetLabel().$sCount);
if ($this->IsNew())
{
$iFlags = $this->GetInitialStateAttributeFlags($sAttCode);
@@ -612,6 +606,9 @@ EOF
continue;
}
+ $sCount = ($iCount != 0) ? " ($iCount)" : "";
+ $oPage->SetCurrentTab('Class:'.$sClass.'/Attribute:'.$sAttCode, $oAttDef->GetLabel().$sCount);
+
$aArgs = array('this' => $this);
$bReadOnly = ($iFlags & (OPT_ATT_READONLY | OPT_ATT_SLAVE));
if ($bEditMode && (!$bReadOnly))
diff --git a/application/datamodel.application.xml b/application/datamodel.application.xml
index d574c2a2d..310f93a83 100644
--- a/application/datamodel.application.xml
+++ b/application/datamodel.application.xml
@@ -400,4 +400,36 @@
+
+
+
+
+
+
+ ../css/css-variables.scss
+
+
+ ../css/ui-lightness/jqueryui.scss
+ ../css/light-grey.scss
+
+ itop-config-mgmt/precompiled-themes/light-grey/main.css
+
+
+
+ #C53030
+ #F7FAFC
+ "THIS IS A TEST INSTANCE"
+
+
+ ../css/css-variables.scss
+
+
+ ../css/ui-lightness/jqueryui.scss
+ ../css/light-grey.scss
+ ../css/backoffice-environment-banner.scss
+
+ itop-config-mgmt/precompiled-themes/test-red/main.css
+
+
+
diff --git a/application/displayblock.class.inc.php b/application/displayblock.class.inc.php
index 06f2fa3a8..348d53131 100644
--- a/application/displayblock.class.inc.php
+++ b/application/displayblock.class.inc.php
@@ -1614,10 +1614,10 @@ class MenuBlock extends DisplayBlock
$this->AddMenuSeparator($aActions);
foreach ($aRelations as $sRelationCode => $aRelationInfo) {
if (array_key_exists('down', $aRelationInfo)) {
- $aActions[$sRelationCode.'_down'] = array('label' => $aRelationInfo['down'], 'url' => "{$sRootUrl}pages/$sUIPage?operation=swf_navigator&relation=$sRelationCode&direction=down&class=$sClass&id=$id{$sContext}") + $aActionParams;
+ $aActions[$sRelationCode.'_down'] = array('label' => $aRelationInfo['down'], 'url' => "{$sRootUrl}pages/$sUIPage?operation=view_relations&relation=$sRelationCode&direction=down&class=$sClass&id=$id{$sContext}") + $aActionParams;
}
if (array_key_exists('up', $aRelationInfo)) {
- $aActions[$sRelationCode.'_up'] = array('label' => $aRelationInfo['up'], 'url' => "{$sRootUrl}pages/$sUIPage?operation=swf_navigator&relation=$sRelationCode&direction=up&class=$sClass&id=$id{$sContext}") + $aActionParams;
+ $aActions[$sRelationCode.'_up'] = array('label' => $aRelationInfo['up'], 'url' => "{$sRootUrl}pages/$sUIPage?operation=view_relations&relation=$sRelationCode&direction=up&class=$sClass&id=$id{$sContext}") + $aActionParams;
}
}
}
diff --git a/application/loginwebpage.class.inc.php b/application/loginwebpage.class.inc.php
index 02caac304..0d1c6dba6 100644
--- a/application/loginwebpage.class.inc.php
+++ b/application/loginwebpage.class.inc.php
@@ -78,14 +78,16 @@ class LoginWebPage extends NiceWebPage
public function __construct($sTitle = null)
{
- if($sTitle === null)
- {
- $sTitle = Dict::S('UI:Login:Title');
- }
+ if ($sTitle === null) {
+ $sTitle = Dict::S('UI:Login:Title');
+ }
parent::__construct($sTitle);
$this->SetStyleSheet();
- $this->add_header("Cache-control: no-cache");
+ $this->add_header('Cache-control: no-cache, no-store, must-revalidate');
+ $this->add_header('Pragma: no-cache');
+ $this->add_header('Expires: 0');
+ $this->add_header('X-Frame-Options: deny');
}
public function SetStyleSheet()
diff --git a/application/themehandler.class.inc.php b/application/themehandler.class.inc.php
index 6c377fd31..fe85a3440 100644
--- a/application/themehandler.class.inc.php
+++ b/application/themehandler.class.inc.php
@@ -28,6 +28,12 @@ class ThemeHandler
const IMAGE_EXTENSIONS = ['png', 'gif', 'jpg', 'jpeg'];
private static $oCompileCSSService;
+
+ public static function GetAppRootWithSlashes()
+ {
+ return str_replace('\\', '/', APPROOT);
+ }
+
/**
* Return default theme name and parameters
*
@@ -314,9 +320,8 @@ CSS;
}
foreach ($aIncludedImages as $sImage)
{
- if (is_file($sImage))
- {
- $sUri = str_replace(APPROOT, '', $sImage);
+ if (is_file($sImage)) {
+ $sUri = str_replace(self::GetAppRootWithSlashes(), '', $sImage);
$aSignature['images'][$sUri] = md5_file($sImage);
}
}
@@ -329,9 +334,9 @@ CSS;
*
* @param array $aThemeParametersVariables
* @param array $aStylesheetFiles
- * @param string $sThemeId: used only for logging purpose
+ * @param string $sThemeId : used only for logging purpose
*
- * @return array
+ * @return array complete path of the images, but with slashes as dir separator instead of DIRECTORY_SEPARATOR
* @since 2.8.0
*/
public static function GetIncludedImages($aThemeParametersVariables, $aStylesheetFiles, $sThemeId)
@@ -377,17 +382,17 @@ CSS;
&& ! array_key_exists($sImg, $aImages))
{
$sFilePath = realpath($sImg);
- if ($sFilePath!==false)
- {
- $aImages[$sImg]=$sFilePath;
+ if ($sFilePath !== false) {
+ $sFilePathWithSlashes = str_replace('\\', '/', $sFilePath);
+ $aImages[$sImg] = $sFilePathWithSlashes;
continue;
}
- $sCanonicalPath = static::CanonicalizePath($sTargetThemeFolderPath.DIRECTORY_SEPARATOR.$sImg);
- $sFilePath=realpath($sCanonicalPath);
- if ($sFilePath!==false)
- {
- $aImages[$sImg]=$sFilePath;
+ $sCanonicalPath = static::CanonicalizePath($sTargetThemeFolderPath.'/'.$sImg);
+ $sFilePath = realpath($sCanonicalPath);
+ if ($sFilePath !== false) {
+ $sFilePathWithSlashes = str_replace('\\', '/', $sFilePath);
+ $aImages[$sImg] = $sFilePathWithSlashes;
continue;
}
diff --git a/application/utils.inc.php b/application/utils.inc.php
index ec175e7a5..53d0abb11 100644
--- a/application/utils.inc.php
+++ b/application/utils.inc.php
@@ -2407,4 +2407,26 @@ class utils
{
return str_ireplace('