Merge branch 'support/3.1' into develop

This commit is contained in:
Stephen Abello
2023-09-15 15:45:36 +02:00
5 changed files with 14 additions and 5 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

View File

@@ -161,4 +161,4 @@ We have one sticker per contribution type. You might get multiple stickers with
Here is the design of each stickers for year 2022:
![iTop stickers 2022](.doc/contributing-guide/2022.contributing-stickers-side-by-side.png)
![iTop stickers 2023](.doc/contributing-guide/2023.contributing-stickers-side-by-side.png)

View File

@@ -918,7 +918,7 @@ class RuntimeDashboard extends Dashboard
{
$bCustomized = false;
$sDashboardFileSanitized = utils::RealPath($sDashboardFile, APPROOT);
$sDashboardFileSanitized = utils::RealPath(APPROOT.$sDashboardFile, APPROOT);
if (false === $sDashboardFileSanitized) {
throw new SecurityException('Invalid dashboard file !');
}
@@ -1141,7 +1141,7 @@ JS
$oToolbar->AddSubBlock($oActionButton);
$aActions = array();
$sFile = addslashes($this->sDefinitionFile);
$sFile = addslashes(utils::LocalPath($this->sDefinitionFile));
$sJSExtraParams = json_encode($aExtraParams);
if ($this->HasCustomDashboard()) {
$oEdit = new JSPopupMenuItem('UI:Dashboard:Edit', Dict::S('UI:Dashboard:EditCustom'), "return EditDashboard('{$this->sId}', '$sFile', $sJSExtraParams)");

View File

@@ -332,11 +332,14 @@ $(function()
oParams.dashlet_class = sDashletClass;
oParams.dashlet_id = sDashletId;
oParams.dashlet_type = options.dashlet_type;
oParams.ajax_promise_id = 'ajax_promise_' + sDashletId;
var me = this;
$.post(this.options.render_to, oParams, function (data) {
me.ajax_div.html(data);
me.add_dashlet_finalize(options, sDashletId, sDashletClass);
me.mark_as_modified();
window[oParams.ajax_promise_id].then(function(){
me.add_dashlet_finalize(options, sDashletId, sDashletClass);
me.mark_as_modified();
});
});
},
on_dashlet_moved: function (oDashlet, oReceiver, bRefresh) {

View File

@@ -151,6 +151,12 @@ class DictionariesConsistencyAfterSetupTest extends ItopTestCase
$aMismatchedKeys = [];
foreach ($aKeyArgsCountMap[$sReferenceLangCode] as $sKey => $iExpectedNbOfArgs){
if (0 === $iExpectedNbOfArgs){
//no arg needed in EN.
//let s assume job has been done correctly in EN to simplify
continue;
}
if (in_array($sKey, self::$aLabelCodeNotToCheck)){
//false positive: do not test
continue;