diff --git a/.jenkins/configuration/default-environment/unattended_install/unattended_install.php b/.jenkins/configuration/default-environment/unattended_install/unattended_install.php
index a69309364..804d206db 100644
--- a/.jenkins/configuration/default-environment/unattended_install/unattended_install.php
+++ b/.jenkins/configuration/default-environment/unattended_install/unattended_install.php
@@ -101,7 +101,7 @@ if ($sMode == 'install')
$oMysqli = new mysqli($sDBServer, $sDBUser, $sDBPwd);
if ($oMysqli->connect_errno)
{
- die("Cannot connect to the MySQL server (".$mysqli->connect_errno . ") ".$mysqli->connect_error."\nExiting");
+ die("Cannot connect to the MySQL server (".$oMysqli->connect_errno . ") ".$oMysqli->connect_error."\nExiting");
}
else
{
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index dc1d65571..c8d1a454b 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -37,57 +37,68 @@ If you want to use another license, you may [create an extension][wiki new ext].
[wiki new ext]: https://www.itophub.io/wiki/page?id=latest%3Acustomization%3Astart#by_writing_your_own_extension
-## 🔀 Branch model
+## 🔀 iTop branch model
-TL;DR:
-> **create a fork from iTop main repository,
-> create a branch based on the develop branch**
+When we first start with Git, we were using the [GitFlow](https://nvie.com/posts/a-successful-git-branching-model/) branch model. As
+ there was some confusions about branches to use for current developed release and previous maintained release, and also because we were
+ using just a very few of the GitFlow commands, we decided to add just a little modification to this branch model : since april 2020
+ we don't have anymore a `master` branch.
-We are using the [GitFlow](https://nvie.com/posts/a-successful-git-branching-model/) branch model. That means we have in our repo those
-main branches:
+Here are the branches we use and their meaning :
-- develop: ongoing development version
-- release/\*: if present, that means we are working on a beta version
-- master: previous stable version
-- support/\*: maintenance branches for older versions
+- `develop`: ongoing development version
+- `release/*`: if present, that means we are working on a alpha/beta/rc version for shipping
+- `support/*`: maintenance branches for older versions
-For example, if no beta version is currently ongoing we could have:
+For example, if no version is currently prepared for shipping we could have:
-- develop containing future 2.8.0 version
-- master containing 2.7.x maintenance version
-- support/2.6 containing 2.6.x maintenance version
-- support/2.5 containing 2.5.x maintenance version
+- `develop` containing future 2.8.0 version
+- `support/2.7`: 2.7.x maintenance version
+- `support/2.6`: 2.6.x maintenance version
+- `support/2.5`: 2.5.x maintenance version
In this example, when 2.8.0-beta is shipped that will become:
-- develop: future 2.9.0 version
-- release/2.8: 2.8.0-beta
-- master: 2.7.x maintenance version
-- support/2.6 containing 2.6.x maintenance version
-- support/2.5 containing 2.5.x maintenance version
+- `develop`: future 2.9.0 version
+- `release/2.8`: 2.8.0-beta
+- `support/2.7`: 2.7.x maintenance version
+- `support/2.6`: 2.6.x maintenance version
+- `support/2.5`: 2.5.x maintenance version
And when 2.8.0 final will be out:
-- develop: future 2.9.0 version
-- master: 2.8.x maintenance version
-- support/2.7 : 2.7.x maintenance version
-- support/2.6 containing 2.6.x maintenance version
-- support/2.5 containing 2.5.x maintenance version
+- `develop`: future 2.9.0 version
+- `support/2.8`: 2.8.x maintenance version (will host developments for 2.8.1)
+- `support/2.7`: 2.7.x maintenance version
+- `support/2.6`: 2.6.x maintenance version
+- `support/2.5`: 2.5.x maintenance version
-Most of the time you should based your developments on the develop branch.
-That may be different if you want to fix a bug, please use develop anyway and ask in your PR if rebase is possible.
+Also note that we have a "micro-version" concept : each of those versions have a very small amount of modifications. They are made from
+ `support/*` branches as well. For example 2.6.2-1 and 2.6.2-2 were made from the `support/2.6.2` branch.
## Coding
-### 🎨 PHP styleguide
-
-Please follow [our guidelines](https://www.itophub.io/wiki/page?id=latest%3Acustomization%3Acoding_standards).
-
### 🌐 Translations
A [dedicated page](https://www.itophub.io/wiki/page?id=latest%3Acustomization%3Atranslation) is available in the official wiki.
+### Where to start ?
+
+1. Create a fork from our repository (see [Working with forks - GitHub Help](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/working-with-forks))
+2. Create a branch in this fork, based on the develop branch
+3. Code !
+
+Do create a dedicated branch for each modification you want to propose : if you don't it will be very hard to merge back your work !
+
+Most of the time you should based your developments on the develop branch.
+That may be different if you want to fix a bug, please use develop anyway and ask in your PR if rebase is possible.
+
+
+### 🎨 PHP styleguide
+
+Please follow [our guidelines](https://www.itophub.io/wiki/page?id=latest%3Acustomization%3Acoding_standards).
+
### ✅ Tests
Please create tests that covers as much as possible the code you're submitting.
diff --git a/README.md b/README.md
index c095f25c8..06303e70f 100644
--- a/README.md
+++ b/README.md
@@ -128,6 +128,7 @@ We would like to give a special thank you to the people from the community who c
- Schirrmann, Pascal
- Seki, Shoji
- Shilov, Vladimir
+ - Tahri, Ahmed R. (Ousret)
- Tulio, Marco
- Turrubiates, Miguel
diff --git a/application/datatable.class.inc.php b/application/datatable.class.inc.php
index 009937e88..adbeaecae 100644
--- a/application/datatable.class.inc.php
+++ b/application/datatable.class.inc.php
@@ -20,6 +20,8 @@
class DataTable
{
protected $iListId; // Unique ID inside the web page
+ /** @var string */
+ private $sDatatableContainerId;
protected $sTableId; // identifier for saving the settings (combined with the class aliases)
protected $oSet; // The set of objects to display
protected $aClassAliases; // The aliases (alias => class) inside the set
@@ -29,10 +31,10 @@ class DataTable
protected $bShowObsoleteData;
/**
- * @param $iListId mixed Unique ID for this div/table in the page
- * @param $oSet DBObjectSet The set of data to display
- * @param $aClassAliases array The list of classes/aliases to be displayed in this set $sAlias => $sClassName
- * @param $sTableId mixed A string (or null) identifying this table in order to persist its settings
+ * @param string $iListId Unique ID for this div/table in the page
+ * @param DBObjectSet $oSet The set of data to display
+ * @param array$aClassAliases The list of classes/aliases to be displayed in this set $sAlias => $sClassName
+ * @param string $sTableId A string (or null) identifying this table in order to persist its settings
*
* @throws \CoreException
* @throws \MissingQueryArgument
@@ -42,6 +44,7 @@ class DataTable
public function __construct($iListId, $oSet, $aClassAliases, $sTableId = null)
{
$this->iListId = utils::GetSafeId($iListId); // Make a "safe" ID for jQuery
+ $this->sDatatableContainerId = 'datatable_'.utils::GetSafeId($iListId);
$this->oSet = $oSet;
$this->aClassAliases = $aClassAliases;
$this->sTableId = $sTableId;
@@ -165,7 +168,7 @@ class DataTable
$sDataTable = $this->GetHTMLTable($oPage, $aColumns, $sSelectMode, $iPageSize, $bViewLink, $aExtraParams);
$sConfigDlg = $this->GetTableConfigDlg($oPage, $aColumns, $bViewLink, $iDefaultPageSize);
- $sHtml = "