Merge branch 'support/3.0' into develop

This commit is contained in:
Stephen Abello
2022-08-08 16:42:24 +02:00
4 changed files with 15 additions and 4 deletions

View File

@@ -46,6 +46,8 @@ $ibo-vendors-datatables--row-highlight--colors:(
'warning': ($ibo-color-orange-200), 'warning': ($ibo-color-orange-200),
'blue': ($ibo-color-blue-200), 'blue': ($ibo-color-blue-200),
'info': ($ibo-color-blue-200), 'info': ($ibo-color-blue-200),
'green': ($ibo-color-green-100),
'success': ($ibo-color-green-200),
) !default; ) !default;
.dataTables_paginate { .dataTables_paginate {

View File

@@ -300,6 +300,7 @@ $ibo-vendors-jqueryui--ui-slider--ui-slider-handle--hover--border-color: $ibo-co
// Date picker // Date picker
.ui-datepicker { .ui-datepicker {
/* Note: We can't put the padding directly here as the jQuery JS code will position it regarding its inner width, not taking the padding here into account, so it is placed in the header/calendar elements */ /* Note: We can't put the padding directly here as the jQuery JS code will position it regarding its inner width, not taking the padding here into account, so it is placed in the header/calendar elements */
display: none;
background-color: $ibo-vendors-jqueryui--ui-datepicker--background-color; background-color: $ibo-vendors-jqueryui--ui-datepicker--background-color;
border-radius: $ibo-vendors-jqueryui--ui-datepicker--border-radius; border-radius: $ibo-vendors-jqueryui--ui-datepicker--border-radius;
box-shadow: $ibo-vendors-jqueryui--ui-datepicker--box-shadow; box-shadow: $ibo-vendors-jqueryui--ui-datepicker--box-shadow;

View File

@@ -807,8 +807,10 @@ const CombodoTooltip = {
oOptions['content'] = sContent; oOptions['content'] = sContent;
// Interaction (selection, click, ...) have to be enabled manually // Interaction (selection, click, ...) have to be enabled manually
// Important: When set to true, if "data-tooltip-append-to" is not specified, tooltip will be append to the parent element instead of the body // Important: When set to true, if "data-tooltip-append-to" is not specified, tooltip will be appended to the parent element instead of the body
const bInteractive = oElem.attr('data-tooltip-interaction-enabled') === 'true'; // Note: Defaults to true if it contains hyperlink
let bDefaultInteractive = (bEnableHTML && sContent.indexOf("<a ") > -1)
const bInteractive = oElem.attr('data-tooltip-interaction-enabled') !== undefined ? oElem.attr('data-tooltip-interaction-enabled') === 'true' : bDefaultInteractive;
oOptions['interactive'] = bInteractive; oOptions['interactive'] = bInteractive;
// Element to append the tooltip to // Element to append the tooltip to

View File

@@ -7,6 +7,7 @@
namespace Combodo\iTop\Controller; namespace Combodo\iTop\Controller;
use appUserPreferences; use appUserPreferences;
use CoreUnexpectedValue;
use Exception; use Exception;
use MetaModel; use MetaModel;
use ormDocument; use ormDocument;
@@ -38,9 +39,14 @@ class PreferencesController
appUserPreferences::SetPref('user_picture_placeholder', $sImageFilename); appUserPreferences::SetPref('user_picture_placeholder', $sImageFilename);
$sUserPicturesFolder = 'images/user-pictures/'; $sUserPicturesFolder = 'images/user-pictures/';
$sImageAbsPath = APPROOT.$sUserPicturesFolder.$sImageFilename; $sImageAbsPath = utils::RealPath(APPROOT.$sUserPicturesFolder.$sImageFilename, APPROOT.$sUserPicturesFolder);
$sImageAbsUrl = utils::GetAbsoluteUrlAppRoot().$sUserPicturesFolder.$sImageFilename; $sImageAbsUrl = utils::GetAbsoluteUrlAppRoot().$sUserPicturesFolder.$sImageFilename;
// Check if we're still in the right folder
if($sImageAbsPath === false){
throw new CoreUnexpectedValue('Error while updating user image, invalid image path "'.$sUserPicturesFolder.$sImageFilename.'"');
}
// Check file can be read // Check file can be read
$sImageData = file_get_contents($sImageAbsPath); $sImageData = file_get_contents($sImageAbsPath);
if (false === $sImageData) { if (false === $sImageData) {