Skip to content

Commit

Permalink
Merge branch 'master' into 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
atm-gauthier committed Feb 10, 2020
2 parents 406876b + f321955 commit eaab05f
Show file tree
Hide file tree
Showing 22 changed files with 2,217 additions and 528 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.project
.settings/*
.buildpath
/nbproject
/nbproject
.idea/
5 changes: 5 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Abricot - Changelog

## [3.0.0] - 2019-03-06
### FIXED
- Dolibarr 9.x compatiblity
10 changes: 9 additions & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
Noyau ATM pour modules spécifiques
====================
Le module doit s'appeler abricot dans votre répertoire custom ou htdocs
Le module doit s'appeler abricot dans votre répertoire `htdocs/custom/` ou `htdocs/`

Forkable sur Github : https://github.com/ATM-Consulting/dolibarr_module_abricot

-----

ATM core for specific modules
====================
The module must be called `abricot` in your `htdocs/custom/` or `htdocs/` directory

Fork on Github: https://github.com/ATM-Consulting/dolibarr_module_abricot
2 changes: 1 addition & 1 deletion admin/abricot_setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
print '<td>'.$langs->trans("MIGRATE_DATETIME_DEFAULT_TO_NULL").'</td>';
print '<td align="center" width="20">&nbsp;</td>';
print '<td align="center" width="100">';
print '<a class="butAction" href="../script/change-datetime-defaul-to-null.php">'.$langs->trans("Migrate").'</a>';
print '<a class="butAction" href="../script/change-datetime-default-to-null.php">' . $langs->trans("Migrate") . '</a>';
print '</form>';
print '</td></tr>';

Expand Down
21 changes: 21 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "atm-consulting/abricot",
"description": "Collection of specific ATM functions and classes",
"type": "dolibarr-module",
"license": "GPL-3.0+",
"authors": [
{
"name": "ATM Consulting",
"email": "[email protected]",
"homepage": "https://www.atm-consulting.fr"
}
],
"support": {
"email": "[email protected]",
"issues": "https://github.com/ATM-Consulting/dolibarr_module_abricot/issues",
"source": "https://github.com/ATM-Consulting/dolibarr_module_abricot"
},
"require": {
"composer/installers": "~1.0"
}
}
4 changes: 3 additions & 1 deletion core/modules/modAbricot.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ public function __construct($db)
// (where XXX is value of numeric property 'numero' of module)
$this->description = "Collection of specific ATM functions and classes";
// Possible values for version are: 'development', 'experimental' or version
$this->version = '3.1';
$this->version = '3.0.5';
$this->editor_name = 'ATM-Consulting';
$this->editor_url = 'https://www.atm-consulting.fr';
// Key used in llx_const table to save module status enabled/disabled
// (where MYMODULE is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_' . strtoupper($this->name);
Expand Down
6 changes: 4 additions & 2 deletions includes/class/class.form.core.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function __construct($pAction=null,$pName=null,$pMethod="POST",$pTransfert=FALSE
}


function begin_form($pAction=null,$pName=null,$pMethod="POST",$pTransfert=FALSE,$plus="") {
function begin_form($pAction=null,$pName=null,$pMethod="POST",$pTransfert=FALSE,$plus="", $addToken = true) {

$r='';
if (!empty($pName)) {
Expand All @@ -64,6 +64,8 @@ function begin_form($pAction=null,$pName=null,$pMethod="POST",$pTransfert=FALSE,
$r.= ' action="'.$pAction.'"';
$r.= ' id="'.$pName.'"';
$r.= ' name="'.$pName.'">';

if($addToken) $r.= '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
}

return $r;
Expand Down Expand Up @@ -1545,7 +1547,7 @@ private function _combo_option($Tab, $pDefault) {
$seleted = false;
if (
(is_array($pDefault) && !in_array($val,$pDefault))
|| (($val!=$pDefault && !$this->strict_string_compare) || ((string)$val!==(string)$pDefault && $this->strict_string_compare))
|| !is_array($pDefault) && (($val!=$pDefault && !$this->strict_string_compare) || ((string)$val!==(string)$pDefault && $this->strict_string_compare))
){
$seleted=false;
}
Expand Down
Loading

0 comments on commit eaab05f

Please sign in to comment.