diff --git a/core/config.class.inc.php b/core/config.class.inc.php index 109f11a2c1..7debcbd806 100644 --- a/core/config.class.inc.php +++ b/core/config.class.inc.php @@ -1116,7 +1116,7 @@ class Config 'svg_sanitizer' => array( 'type' => 'string', 'description' => 'The class to use for SVG sanitization : allow to provide a custom made sanitizer', - 'default' => 'SvgDOMSanitizer', + 'default' => 'SVGDOMSanitizer', 'value' => '', 'source_of_value' => '', 'show_in_conf_sample' => false, diff --git a/core/htmlsanitizer.class.inc.php b/core/htmlsanitizer.class.inc.php index 109c203d71..55de50f627 100644 --- a/core/htmlsanitizer.class.inc.php +++ b/core/htmlsanitizer.class.inc.php @@ -426,7 +426,7 @@ class HTMLDOMSanitizer extends DOMSanitizer /** * @since 2.6.5 2.7.6 3.0.0 N°4360 */ -class SvgDOMSanitizer extends DOMSanitizer +class SVGDOMSanitizer extends DOMSanitizer { public function GetTagsWhiteList() { diff --git a/datamodels/2.x/itop-attachments/module.itop-attachments.php b/datamodels/2.x/itop-attachments/module.itop-attachments.php index 838b57291c..068b3c91e3 100644 --- a/datamodels/2.x/itop-attachments/module.itop-attachments.php +++ b/datamodels/2.x/itop-attachments/module.itop-attachments.php @@ -177,6 +177,12 @@ SQL; SetupPage::log_info("Initializing attachment/item_org_id - zero to the container"); $oSearch = DBObjectSearch::FromOQL("SELECT Attachment WHERE item_org_id = 0"); $oSet = new DBObjectSet($oSearch); + $oSet->OptimizeColumnLoad([ + 'Attachment' => [ + 'item_class', + 'item_id', + ] + ]); $iUpdated = 0; while ($oAttachment = $oSet->Fetch()) { diff --git a/datamodels/2.x/itop-portal-base/portal/public/lib/datatables.net-fixedheader/License.txt b/datamodels/2.x/itop-portal-base/portal/public/lib/datatables.net-fixedheader/License.txt new file mode 100644 index 0000000000..379a7e7c89 --- /dev/null +++ b/datamodels/2.x/itop-portal-base/portal/public/lib/datatables.net-fixedheader/License.txt @@ -0,0 +1,20 @@ +Copyright SpryMedia Limited and other contributors +http://datatables.net + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/datamodels/2.x/itop-portal-base/portal/public/lib/datatables.net-fixedheader/Readme.md b/datamodels/2.x/itop-portal-base/portal/public/lib/datatables.net-fixedheader/Readme.md new file mode 100644 index 0000000000..eb70e845eb --- /dev/null +++ b/datamodels/2.x/itop-portal-base/portal/public/lib/datatables.net-fixedheader/Readme.md @@ -0,0 +1,50 @@ +# FixedHeader for DataTables + +This package contains distribution files for the [FixedHeader extension](https://datatables.net/extensions/fixedheader) for [DataTables](https://datatables.net/). Only the core software for this library is contained in this package - to be correctly styled, a styling package for FixedHeader must also be included. Styling options include DataTable's native styling, [Bootstrap](http://getbootstrap.com) and [Foundation](http://foundation.zurb.com/). + +When displaying large amounts of data in a table, it can often be useful for the end user to have the column titles always visible. This is particularly true if using DataTables with pagination disabled, or the display length is set to a high value. The FixedHeader extension provides this ability. + + +## Installation + +### Browser + +For inclusion of this library using a standard ` {# Datatables #} - + - - - - + + + + {# Export for Datatables #} diff --git a/sources/form/formmanager.class.inc.php b/sources/form/formmanager.class.inc.php index feeb2359ef..4f20d1f4c4 100644 --- a/sources/form/formmanager.class.inc.php +++ b/sources/form/formmanager.class.inc.php @@ -40,7 +40,8 @@ abstract class FormManager * - formrenderer_class : The class of the FormRenderer to use in the FormManager * - formrenderer_endpoint : The endpoint of the renderer * - * @param string $sJson + * @param string|string[] $sJson + * * @return $this */ static function FromJSON($sJson) diff --git a/sources/renderer/bootstrap/fieldrenderer/bslinkedsetfieldrenderer.class.inc.php b/sources/renderer/bootstrap/fieldrenderer/bslinkedsetfieldrenderer.class.inc.php index 54b469c9f7..b6dad7a14d 100644 --- a/sources/renderer/bootstrap/fieldrenderer/bslinkedsetfieldrenderer.class.inc.php +++ b/sources/renderer/bootstrap/fieldrenderer/bslinkedsetfieldrenderer.class.inc.php @@ -161,7 +161,7 @@ EOF "sortable": false, "title": '{$sSelectionInputGlobalHtml}', "type": "html", - "data": "", + "data": "id", "render": function(data, type, row) { var oCheckboxElem = $('{$sSelectionInputHtml}'); @@ -269,7 +269,7 @@ EOF var aData = oTable_{$this->oField->GetGlobalId()}.rows(indexes).data().toArray(); // Checking input - $('#{$sTableId} tbody tr[role="row"].selected td:first-child input').prop('checked', true); + $('#{$sTableId} tbody tr[id].selected td:first-child input').prop('checked', true); // Saving values in temp array for(var i in aData) { @@ -287,7 +287,7 @@ EOF var aData = oTable_{$this->oField->GetGlobalId()}.rows(indexes).data().toArray(); // Checking input - $('#{$sTableId} tbody tr[role="row"]:not(.selected) td:first-child input').prop('checked', false); + $('#{$sTableId} tbody tr[id]:not(.selected) td:first-child input').prop('checked', false); // Saving values in temp array for(var i in aData) { diff --git a/test/core/sanitizer/SvgDOMSanitizerTest.php b/test/core/sanitizer/SvgDOMSanitizerTest.php index b45a95a391..a7e6117938 100644 --- a/test/core/sanitizer/SvgDOMSanitizerTest.php +++ b/test/core/sanitizer/SvgDOMSanitizerTest.php @@ -2,7 +2,7 @@ namespace Combodo\iTop\Test\UnitTest\Core\Sanitizer; -use SvgDOMSanitizer; +use SVGDOMSanitizer; require_once __DIR__.'/AbstractDOMSanitizerTest.php'; @@ -13,7 +13,7 @@ require_once __DIR__.'/AbstractDOMSanitizerTest.php'; * @preserveGlobalState disabled * @backupGlobals disabled */ -class SvgDOMSanitizerTest extends AbstractDOMSanitizerTest +class SVGDOMSanitizerTest extends AbstractDOMSanitizerTest { /** * @dataProvider DoSanitizeProvider @@ -26,7 +26,7 @@ class SvgDOMSanitizerTest extends AbstractDOMSanitizerTest $sOutputHtml = $this->ReadTestFile($sFileToTest, self::OUTPUT_DIRECTORY); $sOutputHtml = $this->RemoveNewLines($sOutputHtml); - $oSanitizer = new SvgDOMSanitizer(); + $oSanitizer = new SVGDOMSanitizer(); $sRes = $oSanitizer->DoSanitize($sInputHtml); // Removing newlines as the parser gives different results depending on the PHP version