Skip to content

Commit

Permalink
Merge branch 'develop' into new-holiday-update-at-the-end-of-month
Browse files Browse the repository at this point in the history
  • Loading branch information
YannisHoareau authored Oct 8, 2024
2 parents f221f16 + e79292c commit 7154441
Show file tree
Hide file tree
Showing 892 changed files with 11,672 additions and 6,116 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/cache-clean-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ jobs:
- name: Cleanup
run: |
gh extension install actions/gh-actions-cache
REPO=${{ github.repository }}
BRANCH=refs/pull/${{ github.event.pull_request.number }}/merge
REPO="${{ github.repository }}"
BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge"
echo "Fetching list of cache key"
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 )
cacheKeysForPR=$(gh actions-cache list -R "$REPO" -B "$BRANCH" | cut -f 1 )
## Setting this to not fail the workflow while deleting cache keys.
## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeysForPR
do
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
gh actions-cache delete "$cacheKey" -R "$REPO" -B "$BRANCH" --confirm
done
echo "Done"
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ jobs:


# Note (not tested, from https://github.com/orgs/community/discussions/38361)
# To cancel jobs if one failes, the following action may help
# To cancel jobs if one fails, the following action may help
# - if: "failure()"
# uses: "andymckay/[email protected]"
5 changes: 2 additions & 3 deletions .github/workflows/exakat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ name: "Exakat analysis"
on:
# execute once a month, the 1st
schedule:
- cron: "0 20 1 * *"
- cron: "0 20 1 * *"
workflow_dispatch:
branches:
- develop

permissions:
contents: read
Expand All @@ -19,6 +17,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 1
ref: develop
- name: Exakat
uses: docker://exakat/exakat-ga
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/phan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ concurrency:
cancel-in-progress: true
env:
gh_event: ${{ inputs.gh_event || github.event_name }}
PHAN_CONFIG: >
${{ 'dev/tools/phan/config.php' }}
PHAN_CONFIG: dev/tools/phan/config.php
PHAN_BASELINE: dev/tools/phan/baseline.txt
PHAN_MIN_PHP: 7.0
PHAN_QUICK: ${{ github.event.schedule && '' || '--quick' }}
Expand All @@ -43,7 +42,8 @@ jobs:
tools: cs2pr,phan
- name: Run Phan analysis
run: |
phan $PHAN_QUICK -k $PHAN_CONFIG -B $PHAN_BASELINE --analyze-twice --minimum-target-php-version $PHAN_MIN_PHP --output-mode=checkstyle -o _phan.xml
# shellcheck disable=2086
phan $PHAN_QUICK -k "$PHAN_CONFIG" -B "$PHAN_BASELINE" --analyze-twice --minimum-target-php-version "$PHAN_MIN_PHP" --output-mode=checkstyle -o _phan.xml
- name: Add results to PR
if: ${{ always() }}
run: |
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
run: |
set -o pipefail
pre-commit gc
pre-commit run --show-diff-on-failure --color=always --all-files | tee ${RAW_LOG}
pre-commit run --show-diff-on-failure --color=always --all-files | tee "${RAW_LOG}"
# The next uses git, which is slow for a bit repo.
# - name: Get all changed php files (if PR)
Expand Down Expand Up @@ -105,7 +105,8 @@ jobs:
ALL_CHANGED_FILES: ${{ steps.changed-php.outputs.all_changed_files }}
run: |
set -o pipefail
pre-commit run php-cs --files ${ALL_CHANGED_FILES} | tee -a ${RAW_LOG}
# shellcheck disable=2086
pre-commit run php-cs --files ${ALL_CHANGED_FILES} | tee -a "${RAW_LOG}"
- name: Run some pre-commit hooks on all files on push to "main" branches
if: |
Expand All @@ -117,8 +118,8 @@ jobs:
run: |
set -o pipefail
ln -sf ~/.cache .cache # Absolute path in .pre-commit-config.yaml
pre-commit run --hook-stage manual -a php-cs-with-cache | tee -a ${RAW_LOG}
pre-commit run --hook-stage manual -a sqlfluff-lint | tee -a ${RAW_LOG}
pre-commit run --hook-stage manual -a php-cs-with-cache | tee -a "${RAW_LOG}"
pre-commit run --hook-stage manual -a sqlfluff-lint | tee -a "${RAW_LOG}"
ls -l ~/.cache/pre-commit/
- name: Convert Raw Log to Annotations
Expand Down
28 changes: 17 additions & 11 deletions .github/workflows/windows-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup MariaDB
uses: ankane/setup-mariadb@v1
with:
# mariadb-version: ${{ matrix.mariadb-version }}
database: travis # Specify your database name
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
Expand All @@ -66,10 +61,11 @@ jobs:
KEY_ROOT: ${{ matrix.os }}-${{ env.ckey }}-${{ matrix.php_version }}
with:
# See https://github.com/actions/cache/issues/1275#issuecomment-1925217178
enableCrossOsArchive: true
enableCrossOsArchive: true
path: |
./db_init.sql
./db_init.sql.md5
./.cache/mariadb
key: ${{ env.KEY_ROOT }}-${{ env.HASH }}-${{ env.CACHE_KEY_PART }}-${{ github.run_id }}
restore-keys: |
${{ env.KEY_ROOT }}-${{ env.HASH }}-${{ env.CACHE_KEY_PART }}-
Expand All @@ -78,6 +74,12 @@ jobs:
${{ env.KEY_ROOT }}-${{ env.HASH }}-
${{ env.KEY_ROOT }}-
- name: Setup MariaDB
uses: frederic34/setup-mariadb@v1
with:
# mariadb-version: ${{ matrix.mariadb-version }}
database: travis # Specify your database name

- name: Create local php.ini with open_basedir restrictions
shell: cmd
# Objective: separate step, and before database initialisation to verify open_basedir restrictions
Expand Down Expand Up @@ -114,6 +116,7 @@ jobs:
# Note this is bash (MSYS) on Windows
shell: bash
run: |
# shellcheck disable=SC2129
ECHO "#[group]Directory contents to verify cache files, ..."
ls -l
ECHO "#[endgroup]"
Expand All @@ -128,10 +131,12 @@ jobs:
ls -l
ECHO "#[endgroup]"
# Export some tool paths to reuse the from CMD shell.
echo "TAIL=$(cygpath -w "$(which tail)")" >> "$GITHUB_ENV"
echo "GREP=$(cygpath -w "$(which grep)")" >> "$GITHUB_ENV"
echo "TEE=$(cygpath -w "$(which tee)")" >> "$GITHUB_ENV"
echo "BASEDIR=$(realpath .)" >> "$GITHUB_ENV"
{
echo "TAIL=$(cygpath -w "$(which tail)")"
echo "GREP=$(cygpath -w "$(which grep)")"
echo "TEE=$(cygpath -w "$(which tee)")"
echo "BASEDIR=$(realpath .)"
} >> "$GITHUB_ENV"
- name: Run PHPUnit tests
# continue-on-error: true
Expand Down Expand Up @@ -184,8 +189,9 @@ jobs:
if: ${{ ! cancelled() }}
with:
# See https://github.com/actions/cache/issues/1275#issuecomment-1925217178
enableCrossOsArchive: true
enableCrossOsArchive: true
key: ${{ steps.cache.outputs.cache-primary-key }}
path: |
./db_init.sql
./db_init.sql.md5
./.cache/mariadb
10 changes: 8 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
exclude: (?x)^( htdocs/includes/ckeditor/.*|(\.[^/]*/.*))$
exclude: (?x)^( htdocs/includes/ckeditor/.*|(\.(?!github/workflows)[^/]*/.*))$
repos:
# Several miscellaneous checks and fix (on yaml files, end of files fix)
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand Down Expand Up @@ -64,6 +64,12 @@ repos:
hooks:
- id: gitleaks

# Check github actions
- repo: https://github.com/rhysd/actionlint
rev: v1.7.3
hooks:
- id: actionlint

# Beautify shell scripts
- repo: https://github.com/lovesegfault/beautysh.git
rev: v6.2.1
Expand Down Expand Up @@ -210,7 +216,7 @@ repos:
- -x
- dev/tools/codespell/codespell-lines-ignore.txt
exclude_types: [image]
exclude: (?x)^(.phan/stubs/.*)$
exclude: (?x)^(.phan/stubs/.*|phpstan\.neon.*)$
additional_dependencies: [tomli]
- alias: codespell-lang-en_US
# Only for translations with specialised exceptions
Expand Down
5 changes: 3 additions & 2 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ The following changes may create regressions for some external modules, but were
* The experimental and deprecated module WebserviceClient is completely removed (SOAP technology is deprecated). May be replaced with the stable module Webhook.
* The dynamic properties ->no_button_delete, ->no_button_edit, ->no_button_copy for $object Product that could be set by an external module must no more
be set (not allowed by PHP 8.2). A module can already return an array with key 'no_button_delete', 'no_button_edit', 'no_button_copy' for same purpose.
* The old function dol_bc($var, $moreclass = '') has been removed. If you called it, just stop to call it.


***** ChangeLog for 20.0.0 compared to 19.0 *****
Expand Down Expand Up @@ -164,7 +165,7 @@ NEW: Module Website: Can link/unlink translation between web pages
NEW: Move dir of cache for widgets
NEW: multiselect with checkbox in categories/tags search for thirdparty list (#28335)
NEW: new consts to redirect from massaction createbills (#29436)
NEW: new global string to preselect yes for one bill per thirparty in orderlist massaction (#29359)
NEW: new global string to preselect yes for one bill per third party in orderlist massaction (#29359)
NEW: notification action triggers for cancelling orders and invoices
NEW: now button when editing an event
NEW: online signature of shipments (#29559)
Expand Down Expand Up @@ -3302,7 +3303,7 @@ FIX: fix checkbox displayed according to module project setup parameters - work
FIX: inconsistency in margin recording with option "Force to sale price"
FIX: invoice PDF generation after payment
FIX: mask selector fournisseur if module not activate
FIX: merge thirparty also work for bank URL entry
FIX: merge third party also works for bank URL entry
FIX: Missing extrafields into export of agenda record
FIX: missing parameter in select for POP
FIX: missing return edit if update error
Expand Down
25 changes: 23 additions & 2 deletions dev/tools/codespell/codespell-dict.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ aplhanothtml->alphanohtml
aploha->alpha
aplohanothtml->alphanohtml
aplphanothtml->alphanohtml
centpecent->centpercent
choosed->chosen
cumuled->cumulative
dokument->document
Expand All @@ -18,12 +19,32 @@ dollibarr->dolibarr
extrafeild->extrafield
thoose->those
# fiche->card
nempty->an empty, empty, not empty,
maringbottomonly->marginbottomonly
maxwidthonsmartpone->maxwidthonsmartphone
maxwidthonspartphone->maxwidthonsmartphone
minwith100->minwidth100
minwith200->minwidth200
mot de passe->password
multicurreny->multicurrency
nempty->an empty, empty, not empty,
nocellnopadding->nocellnopadd
nodrap->nodrag, nodrop,
not de passe->password
nothtml->nohtml
notoptoleftroright->notoptoleftnoright
nowraponalls->nowraponall
oddevene->oddeven
oddseven->oddeven
opacitymediuem->opacitymedium
pictofiwedwidth->pictofixedwidth
pictofixedwith->pictofixedwidth
shippin->shipping
tableau de bord->state board
tagret->target
thridparty->thirdparty
tdoverflowmax100aaa->tdoverflowmax100
tdoverlowmax200->tdoverflowmax200
thirparty->thirdparty, third party,
thridparty->thirdparty, third party,
with100->width100
with75->width75
wysiwig->wysiwyg
4 changes: 4 additions & 0 deletions dev/tools/codespell/codespell-ignore.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ espace
methode
datee

# Translation keys
addin
amountin

# other
blacklists
confirmactionxxx
17 changes: 2 additions & 15 deletions dev/tools/codespell/codespell-lines-ignore.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,14 @@
if (empty($objMod->dictionaries) && !empty($objMod->{"dictionnaries"})) {
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&id_entrepot='.$entrepotstatic->id.'&action=transfert&pdluoid='.$pdluo->id.'&token='.newToken().'">';
$object->date_ech = $object->periode;
$object->periode = $object->date_ech;
$reponsesadd = str_split($obj->reponses);
$sql .= " SET reponses = '".$db->escape($reponsesadd)."'";
$sql .= " SET reponses = '0".$db->escape($obj->reponses)."'";
$tmpfiles = dol_dir_list($tmpdir, 'files', 0, '\.od(s|t)$', '', 'name', SORT_ASC, 0);
// $object->periode = dol_get_last_day(year of $object->date_ech - 1m, month or $object->date_ech -1m)
//$pice = '<i class="fas fa-briefcase inline-block"></i>';
//$typea = ($objp->typea == 'birth') ? $picb : $pice;
print '<td class="center"><a href="'.DOL_URL_ROOT.'/product/stock/product.php?dwid='.$object->id.'&id='.$objp->rowid.'&action=transfert&token='.newToken().'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$id).'">';
$dateemail = dol_stringtotime((string) $overview[0]->udate, 'gmt');
$object->periode = $newdateperiod;
$pice = '<i class="fas fa-briefcase inline-block"></i>';
$typea = ($data[$j]->typea == 'birth') ? $picb : $pice;
GETPOSTINT("mouvement"),
Expand All @@ -25,8 +22,6 @@
$date_liv = dol_mktime(GETPOST('rehour'), GETPOST('remin'), GETPOST('resec'), GETPOST("remonth"), GETPOST("reday"), GETPOST("reyear"));
$newfiletmp = preg_replace('/\.od(s|t)/i', '', $newfile);
$newfiletmp = preg_replace('/\.od[ts]/i', '', $newfile);
$object->period = dol_time_plus_duree($object->periode, 1, 'm');
$object->periode = dol_time_plus_duree($object->periode, 1, 'm');
$this->category->childs[] = $this->_cleanObjectDatas($cat);
$this->periode = $this->db->jdate($obj->period);
$tmp = array('id_users' => $obj->id_users, 'nom' => $obj->name, 'reponses' => $obj->reponses);
Expand Down Expand Up @@ -58,12 +53,9 @@
if (empty($reyear) || empty($remonth) || empty($reday)) {
jQuery("#mouvement").change(function() {
preg_match('/:([!<>=\s]+|in|notin|like|notlike):/', $tmpcrit, $reg);
print $form->selectDate($object->periode, 'period', 0, 0, 0, 'charge', 1);
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&action=transfert&token='.newToken().'">'.$langs->trans("TransferStock").'</a>';
print '<span class="opacitymedium">'.$langs->trans("ClinkOnALinkOfColumn", $langs->transnoentitiesnoconv("Referers")).'</span>';
print '<td class="center nowraponall">'.dol_print_date($db->jdate($obj->periode), 'day').'</td>';
print '<tr><td>'.$langs->trans("AddIn").'</td><td>';
print dol_print_date($object->periode, "day");
"sme",
$action = 'transfert';
$cle_rib = strtolower(checkES($rib, $CCC));
Expand Down Expand Up @@ -97,9 +89,7 @@
if ($user->hasRight('stock', 'mouvement', 'creer')) {
if (GETPOSTISSET("reday") && GETPOSTISSET("remonth") && GETPOSTISSET("reyear")) {
if (empty($reyear) || empty($remonth) || empty($reday)) {
print '<input type="hidden" name="action" value="addin">';
print '<tr><td>'.$langs->trans("AddIn").'</td><td>';
* @param float|string $selectedrate Force preselected vat rate. Can be '8.5' or '8.5 (NOO)' for example. Use '' for no forcing.
* @param float|string $selectedrate Force preselected vat rate. Can be '8.5' or '8.5 (NOO)' for example. Use '' for no forcing.
$date = $obj->periode;
$datepaid = dol_mktime(12, 0, 0, GETPOST("remonth"), GETPOST("reday"), GETPOST("reyear"));
$datepaid = dol_mktime(12, 0, 0, GETPOSTINT("remonth"), GETPOSTINT("reday"), GETPOSTINT("reyear"));
Expand Down Expand Up @@ -132,14 +122,12 @@
// ceci afin d'etre compatible avec les cas ou la periode n'etait pas obligatoire
<strong>TaskItem(<em>pID, pName, pStart, pEnd, pColor, pLink, pMile, pRes, pComp, pGroup, pParent, pOpen, pDepend, pCaption, pNotes, pGantt</em>)</strong></p>
if ($action == "transfert") {
if ($object->id > 0 && $action == 'addin') {
if (GETPOST('reday')) {
if (GETPOSTINT("reyear") && GETPOSTINT("remonth") && GETPOSTINT("reday")) {
print '<option value="1"'.(GETPOST('mouvement') ? ' selected="selected"' : '').'>'.$langs->trans("Delete").'</option>';
print '<select name="mouvement" id="mouvement" class="minwidth100 valignmiddle">';
print '<td class="left" width="25%">'.$langs->trans("Referers").'</td>';
print '<td class="right">'.$langs->trans("NbOfMembers").' <span class="opacitymedium">('.$langs->trans("AllTime").')</span></td>';
print '<tr><td>'.$langs->trans("AddIn").'</td><td>';
print '<tr><td>'.$langs->trans("Period")."</td><td>".dol_print_date($charge->periode, 'day')."</td></tr>\n";
print ajax_combobox("mouvement");
print_liste_field_titre("Employee", $_SERVER["PHP_SELF"], "u.lastname,cs.periode", "", $param, 'class="left"', $sortfield, $sortorder);
Expand All @@ -158,7 +146,6 @@
- informations,medias,uptodate,reenable,crypted,developpers
- ned
* Copyright (C) 2019 Cedric Ancelin <[email protected]>
* Copyright (C) 2019 Cedric Ancelin <[email protected]>
$permissiontoadd = $user->hasRight('stock', 'mouvement', 'creer');
$permissiontodelete = $user->hasRight('stock', 'mouvement', 'creer'); // There is no deletion permission for stock movement as we should never delete
$permissiontoread = $user->hasRight('stock', 'mouvement', 'lire');
Expand All @@ -174,10 +161,10 @@ $usercandelete = $user->hasRight('stock', 'mouvement', 'creer');
$usercandelete = (($user->hasRight('stock', 'mouvement', 'supprimer')));
$usercanread = $user->hasRight('stock', 'mouvement', 'lire');
$usercanread = (($user->hasRight('stock', 'mouvement', 'lire')));
$usercanupdatestock = $user->hasRight('stock', 'mouvement', 'creer');
* The private array ->status_short, ->statuts and ->status_long are now array ->labelStatusShort and ->labelStatus everywhere.
- Fix: [ bug #485 ] Configurated amount for public auto-subscription form is not taken into account
- New: Add proposals into referer page of thirdparty.
AmountIn
NEW: ModuleBuilder: Checkin comments begin and end before each actions
Vous pouvez voir la progression du ticket en cliquant sur le lien
for /F "tokens=2 delims=," %%i in ('tasklist /FI "IMAGENAME eq php.exe" /FO CSV /NH') do (
Expand Down
Loading

0 comments on commit 7154441

Please sign in to comment.