diff --git a/dev/setup/pre-commit/README.md b/dev/setup/pre-commit/README.md index f6e82b6dcb5..1f3740144c2 100644 --- a/dev/setup/pre-commit/README.md +++ b/dev/setup/pre-commit/README.md @@ -38,8 +38,8 @@ the project: `pre-commit-config.yaml`. ### Tips After installing `pre-commit` onto your local git clone, pre-commit will run -on every commit. The first time, all tools required by pre-commit will be installed -into ~/.cache/pre-commit +on every commit. The first time, all tools required by pre-commit will be installed +into ~/.cache/pre-commit When it finds some issue, the git commit will be aborted, so you can fix it, or verify it. @@ -89,5 +89,5 @@ on github.\ CI also runs pre-commit to help maintain code quality. Note: -Code for precommits are saved into: +Code for precommits are saved into: .cache/pre-commit/repoyXXXXX/py_env-python3/lib/pythonX.Y/site-packages/pre_commit_hooks/no_commit_to_branch.py diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 14fa0eb3565..12ca9e77c2b 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -12,7 +12,7 @@ * Copyright (C) 2017 ATM Consulting * Copyright (C) 2017-2019 Nicolas ZABOURI * Copyright (C) 2017 Rui Strecht - * Copyright (C) 2018-2024 Frédéric France + * Copyright (C) 2018-2024 Frédéric France * Copyright (C) 2018 Josep Lluís Amador * Copyright (C) 2023 Gauthier VERDOL * Copyright (C) 2021 Grégory Blémand @@ -590,7 +590,7 @@ abstract class CommonObject public $lines; /** - * @var string Action code to use to record auto event in agenda. For exemple 'AC_OTH_AUTO' + * @var string Action code to use to record auto event in agenda. By example 'AC_OTH_AUTO' */ public $actiontypecode; diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 963ac582189..a518ec79f9d 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -4,7 +4,7 @@ * Copyright (C) 2012-2016 Juanjo Menent * Copyright (C) 2015 Marcos García * Copyright (C) 2016 Raphaël Doursenaud - * Copyright (C) 2019-2024 Frédéric France + * Copyright (C) 2019-2024 Frédéric France * Copyright (C) 2023 Lenin Rivas * Copyright (C) 2024 MDW * @@ -2620,7 +2620,7 @@ function dol_compress_dir($inputdir, $outputfile, $mode = "zip", $excludefiles = * @param int $mode 0=Return array minimum keys loaded (faster), 1=Force all keys like date and size to be loaded (slower), 2=Force load of date only, 3=Force load of size only * @return array Array with properties (full path, date, ...) of to most recent file */ -function dol_most_recent_file($dir, $regexfilter = '', $excludefilter = array('(\.meta|_preview.*\.png)$', '^\.'), $nohook = false, $mode = '') +function dol_most_recent_file($dir, $regexfilter = '', $excludefilter = array('(\.meta|_preview.*\.png)$', '^\.'), $nohook = 0, $mode = '') { $tmparray = dol_dir_list($dir, 'files', 0, $regexfilter, $excludefilter, 'date', SORT_DESC, $mode, $nohook); return isset($tmparray[0]) ? $tmparray[0] : null; diff --git a/htdocs/core/modules/member/doc/pdf_standard.class.php b/htdocs/core/modules/member/doc/pdf_standard.class.php index 5b2e2ed5703..15e58685878 100644 --- a/htdocs/core/modules/member/doc/pdf_standard.class.php +++ b/htdocs/core/modules/member/doc/pdf_standard.class.php @@ -5,6 +5,7 @@ * Copyright (C) 2002-2003 Jean-Louis Bergamo * Copyright (C) 2006-2013 Laurent Destailleur * Copyright (C) 2015 Francis Appels + * Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -119,7 +120,7 @@ class pdf_standard extends CommonStickerGenerator $member = new Adherent($db); $member->id = $idmember; - $member->ref = $idmember; + $member->ref = (string) $idmember; // Define photo $dir = $conf->adherent->dir_output; diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index dee6d2bcef5..893ced6f27c 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -8,6 +8,7 @@ * Copyright (C) 2019 Juanjo Menent * Copyright (C) 2022 Charlene Benke * Copyright (C) 2023 Gauthier VERDOL + * Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -1495,7 +1496,8 @@ class Project extends CommonObject $this->date_start = $now; $this->date_end = $now + (3600 * 24 * 365); $this->note_public = 'SPECIMEN'; - $this->fk_element = 20000; + $this->note_private = 'Private Note'; + $this->fk_project = 0; $this->opp_amount = 20000; $this->budget_amount = 10000;