mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
8496e8a8ed
|
|
@ -26,3 +26,7 @@ trim_trailing_whitespace = false
|
|||
indent_style = tab
|
||||
trim_trailing_whitespace = true
|
||||
indent_size = 4
|
||||
[*.yml]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
trim_trailing_whitespace = true
|
||||
|
|
|
|||
10
.github/workflows/phpstan.yml
vendored
10
.github/workflows/phpstan.yml
vendored
|
|
@ -37,14 +37,14 @@ jobs:
|
|||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# Get PHP and addons
|
||||
- name: Setup PHP
|
||||
id: setup-php
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-version }}
|
||||
tools: phpstan:1.12, cs2pr
|
||||
coverage: none # disable xdebug, pcov
|
||||
tools: phpstan:2.0, cs2pr
|
||||
extensions: calendar, json, imagick, gd, zip, mbstring, intl, opcache, imap,
|
||||
mysql, pgsql, sqlite3, ldap, xml, mcrypt
|
||||
|
||||
|
|
@ -86,3 +86,9 @@ jobs:
|
|||
name: phpstan-srcrt
|
||||
path: ${{ github.workspace }}/_stan.xml
|
||||
retention-days: 2
|
||||
# Run PHPStan generate baseline
|
||||
# - name: Run PHPStan generate baseline
|
||||
# id: phpstan-baseline
|
||||
# if: ${{ success() }}
|
||||
# run: |
|
||||
# phpstan -vv analyse --memory-limit 7G -a build/phpstan/bootstrap_action.php --generate-baseline build/phpstan/phpstan-baseline.neon
|
||||
|
|
|
|||
73
.github/workflows/phpstan_baseline.yml
vendored
Normal file
73
.github/workflows/phpstan_baseline.yml
vendored
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
name: 'PHPStan'
|
||||
|
||||
on:
|
||||
# Every Monday we want to refresh the baseline
|
||||
schedule:
|
||||
- cron: '0 6 * * 1'
|
||||
|
||||
# We want to be able to manually refresh the baseline too
|
||||
workflow_dispatch:
|
||||
|
||||
workflow_call:
|
||||
inputs:
|
||||
gh_event:
|
||||
required: true
|
||||
type: string
|
||||
# Run PHPStan analyse on pull requests
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
PHP_VERSION: '8.2'
|
||||
gh_event: ${{ inputs.gh_event || github.event_name }}
|
||||
CACHE_KEY_PART: ${{ ( inputs.gh_event == 'pull_request' || github.event_name == 'pull_request' ) && format('{0}-{1}', github.base_ref, github.head_ref) || github.ref_name }}
|
||||
jobs:
|
||||
phpstan:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ env.PHP_VERSION }}
|
||||
coverage: none # disable xdebug, pcov
|
||||
tools: phpstan:2.0, cs2pr
|
||||
extensions: calendar, json, imagick, gd, zip, mbstring, intl, opcache, imap,
|
||||
mysql, pgsql, sqlite3, ldap, xml, mcrypt
|
||||
env:
|
||||
fail-fast: true
|
||||
# Restore old cache
|
||||
- name: Restore phpstan cache
|
||||
id: cache
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: ./.github/tmp
|
||||
key: phpstan-cache-${{ env.PHP_VERSION }}-${{ env.CACHE_KEY_PART }}-${{
|
||||
github.run_id }}
|
||||
restore-keys: |
|
||||
phpstan-cache-${{ env.PHP_VERSION }}-${{ env.CACHE_KEY_PART }}-
|
||||
phpstan-cache-${{ env.PHP_VERSION }}-${{ github.head_ref }}-
|
||||
phpstan-cache-${{ env.PHP_VERSION }}-${{ github.base_ref }}-
|
||||
phpstan-cache-${{ env.PHP_VERSION }}-
|
||||
- uses: ruudk/phpstan-baseline-refresh-create-pr-action@main
|
||||
with:
|
||||
github_token: ${{ secrets.PAT_GITHUB_TOKEN }}
|
||||
phpstan_path: phpstan
|
||||
configuration_path: phpstan.neon.dist
|
||||
phpstan_additional_arguments: --memory-limit 7G -a build/phpstan/bootstrap_action.php
|
||||
baseline_path: build/phpstan/phpstan-baseline.neon
|
||||
commit_name: Dolibot
|
||||
commit_email: dolibarr-bot@users.noreply.github.com
|
||||
commit_message: PHPStan > Update baseline
|
||||
target_branch: develop
|
||||
pr_create: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && 1 || 0 }}
|
||||
pr_title: PHPStan > Update baseline
|
||||
pr_reviewer: eldy
|
||||
pr_body: |
|
||||
This PR is automatically created to cleanup our baseline.
|
||||
|
||||
Since the last refresh of the baseline we have fixed {0} ignored errors.
|
||||
|
||||
Keep it up all! :muscle:
|
||||
|
||||
There are only {1} ignored errors left :sweat_smile:
|
||||
|
|
@ -38,10 +38,11 @@ If you have low technical skills and you're looking to install Dolibarr ERP/CRM
|
|||
- [DoliWamp for Windows](https://wiki.dolibarr.org/index.php/Dolibarr_for_Windows_(DoliWamp))
|
||||
- [DoliDeb for Debian](https://wiki.dolibarr.org/index.php/Dolibarr_for_Ubuntu_or_Debian)
|
||||
- DoliRpm for Red Hat, Fedora, OpenSuse, Mandriva or Mageia
|
||||
- The Docker image (see next chapter)
|
||||
|
||||
Releases can be downloaded from [official website](https://www.dolibarr.org/).
|
||||
|
||||
### Using the generic step by step setup (recommended)
|
||||
### Using the generic step by step setup (recommended for IT users)
|
||||
|
||||
You can use any web server supporting PHP (Apache, Nginx, ...) and a supported database (MariaDB, MySQL or PostgreSQL) to install the standard version:
|
||||
|
||||
|
|
@ -69,7 +70,7 @@ You can use any web server supporting PHP (Apache, Nginx, ...) and a supported d
|
|||
|
||||
`http://yourdolibarrvirtualhost/install/`
|
||||
|
||||
- Follow the installer instructions;;;
|
||||
- Follow the installer instructions
|
||||
|
||||
### Using Docker images
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2005-2022 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -415,12 +415,12 @@ while ($i < $imaxinloop) {
|
|||
$candelete = $permissiontodelete;
|
||||
|
||||
// Title
|
||||
print '<td class="tdoverflowmax200" alt="'.dol_escape_htmltag($title).'">';
|
||||
print '<td class="tdoverflowmax250" alt="'.dol_escape_htmltag($title).'">';
|
||||
print dol_escape_htmltag($title);
|
||||
print "</td>\n";
|
||||
|
||||
// Url
|
||||
print '<td class="tdoverflowmax200">';
|
||||
print '<td class="tdoverflowmax250">';
|
||||
if (empty($linkintern)) {
|
||||
print img_picto('', 'url', 'class="pictofixedwidth"');
|
||||
print '<a class="" href="'.$obj->url.'"'.($obj->target ? ' target="newlink" rel="noopener"' : '').'>';
|
||||
|
|
@ -433,7 +433,7 @@ while ($i < $imaxinloop) {
|
|||
print "</td>\n";
|
||||
|
||||
// Target
|
||||
print '<td class="tdoverflowmax100 center">';
|
||||
print '<td class="tdoverflowmax125 center">';
|
||||
if ($obj->target == 0) {
|
||||
print $langs->trans("BookmarkTargetReplaceWindowShort");
|
||||
}
|
||||
|
|
@ -443,7 +443,7 @@ while ($i < $imaxinloop) {
|
|||
print "</td>\n";
|
||||
|
||||
// Author
|
||||
print '<td class="tdoverflowmax100 center">';
|
||||
print '<td class="tdoverflowmax125 center">';
|
||||
if ($obj->fk_user > 0) {
|
||||
if (empty($conf->cache['users'][$obj->fk_user])) {
|
||||
$tmpuser = new User($db);
|
||||
|
|
|
|||
|
|
@ -495,7 +495,8 @@ class Facture extends CommonInvoice
|
|||
|
||||
$this->note_private = (isset($this->note_private) ? trim($this->note_private) : '');
|
||||
$this->note = (isset($this->note) ? trim($this->note) : $this->note_private); // deprecated
|
||||
$this->note_public = trim($this->note_public);
|
||||
$this->note_public = (isset($this->note_public) ? trim($this->note_public) : '');
|
||||
|
||||
if (!$this->cond_reglement_id) {
|
||||
$this->cond_reglement_id = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2014-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2014-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -29,7 +30,11 @@
|
|||
// $nomessageinsetmoduleoptions can be set to 1
|
||||
// $formSetup may be defined
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var FormSetup $formSetup
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
* @var string $action
|
||||
* @var int $error
|
||||
* @var ?int $nomessageinupdate
|
||||
|
|
|
|||
|
|
@ -27,10 +27,20 @@
|
|||
// $permissionnote must be defined to permission to edit object
|
||||
// $object must be defined (object is loaded in this file with fetch)
|
||||
// $id must be defined (object is loaded in this file with fetch)
|
||||
|
||||
/**
|
||||
* @var CommonObject $object
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*
|
||||
* @var ?string $action
|
||||
* @var int $id
|
||||
* @var int $permissionnote
|
||||
*/
|
||||
// Set public note
|
||||
if ($action == 'setnote_public' && !empty($permissionnote) && !GETPOST('cancel', 'alpha')) {
|
||||
if (empty($action) || !is_object($object) || empty($id)) {
|
||||
if (!is_object($object) || empty($id)) {
|
||||
dol_print_error(null, 'Include of actions_setnotes.inc.php was done but required variable was not set before');
|
||||
}
|
||||
if (empty($object->id)) {
|
||||
|
|
@ -79,7 +89,7 @@ if ($action == 'setnote_public' && !empty($permissionnote) && !GETPOST('cancel',
|
|||
} elseif ($action == 'setnote_private' && !empty($permissionnote) && !GETPOST('cancel', 'alpha')) { // Set public note
|
||||
if (empty($user->socid)) {
|
||||
// Private notes (always hidden to external users)
|
||||
if (empty($action) || !is_object($object) || empty($id)) {
|
||||
if (!is_object($object) || empty($id)) {
|
||||
dol_print_error(null, 'Include of actions_setnotes.inc.php was done but required variable was not set before');
|
||||
}
|
||||
if (empty($object->id)) {
|
||||
|
|
|
|||
|
|
@ -271,8 +271,8 @@ class FormFile
|
|||
$menudolibarrsetupmax = $langs->transnoentitiesnoconv("Home").' - '.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Security");
|
||||
|
||||
$tooltiptext = $langs->trans("ThisLimitIsDefinedInSetupAt", $menudolibarrsetupmax, $max, $maxphptoshowparam, $maxphptoshow);
|
||||
if (getDolGlobalString('MAIN_USE_FULL_TEXT_INDEXATION')) {
|
||||
$tooltiptext .= '<br><br>Option to extract the file content in text to save it in database is ON <span class="opacitymedium">('.getDolGlobalString('MAIN_USE_FULL_TEXT_INDEXATION').')</span>';
|
||||
if (getDolGlobalString('MAIN_SAVE_FILE_CONTENT_AS_TEXT')) {
|
||||
$tooltiptext .= '<br><br>Option to extract the file content in text to save it in database is ON <span class="opacitymedium">('.getDolGlobalString('MAIN_SAVE_FILE_CONTENT_AS_TEXT').')</span>';
|
||||
}
|
||||
|
||||
$out .= ' ';
|
||||
|
|
@ -694,7 +694,7 @@ class FormFile
|
|||
if (is_array($genallowed)) {
|
||||
$modellist = $genallowed;
|
||||
} else {
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/modules/stock/modules_movement.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/modules/movement/modules_movement.php';
|
||||
$modellist = ModelePDFMovement::liste_modeles($this->db);
|
||||
}
|
||||
} elseif ($modulepart == 'export') {
|
||||
|
|
|
|||
|
|
@ -2181,11 +2181,11 @@ function addFileIntoDatabaseIndex($dir, $file, $fullpathorig = '', $mode = 'uplo
|
|||
}
|
||||
|
||||
// Use a convertisser Doc to Text
|
||||
$useFullTextIndexation = getDolGlobalString('MAIN_USE_FULL_TEXT_INDEXATION');
|
||||
$useFullTextIndexation = getDolGlobalString('MAIN_SAVE_FILE_CONTENT_AS_TEXT');
|
||||
if (empty($useFullTextIndexation) && $forceFullTextIndexation == '1') {
|
||||
if (getDolGlobalString('MAIN_USE_FULL_TEXT_INDEXATION_PDFTOTEXT')) {
|
||||
if (getDolGlobalString('MAIN_SAVE_FILE_CONTENT_AS_TEXT_PDFTOTEXT')) {
|
||||
$useFullTextIndexation = 'pdftotext';
|
||||
} elseif (getDolGlobalString('MAIN_USE_FULL_TEXT_INDEXATION_DOCLING')) {
|
||||
} elseif (getDolGlobalString('MAIN_SAVE_FILE_CONTENT_AS_TEXT_DOCLING')) {
|
||||
$useFullTextIndexation = 'docling';
|
||||
}
|
||||
}
|
||||
|
|
@ -2213,7 +2213,7 @@ function addFileIntoDatabaseIndex($dir, $file, $fullpathorig = '', $mode = 'uplo
|
|||
|
||||
// We also exclude '/temp/' dir and 'documents/admin/documents'
|
||||
// We make escapement here and call executeCLI without escapement because we don't want to have the '*.log' escaped.
|
||||
$cmd = getDolGlobalString('MAIN_USE_FULL_TEXT_INDEXATION_PDFTOTEXT', 'pdftotext')." -htmlmeta '".escapeshellcmd($filetoprocess)."' - ";
|
||||
$cmd = getDolGlobalString('MAIN_SAVE_FILE_CONTENT_AS_TEXT_PDFTOTEXT', 'pdftotext')." -htmlmeta '".escapeshellcmd($filetoprocess)."' - ";
|
||||
$resultexec = $utils->executeCLI($cmd, $outputfile, 0, null, 1);
|
||||
|
||||
if (!$resultexec['error']) {
|
||||
|
|
@ -2239,7 +2239,7 @@ function addFileIntoDatabaseIndex($dir, $file, $fullpathorig = '', $mode = 'uplo
|
|||
|
||||
// We also exclude '/temp/' dir and 'documents/admin/documents'
|
||||
// We make escapement here and call executeCLI without escapement because we don't want to have the '*.log' escaped.
|
||||
$cmd = getDolGlobalString('MAIN_USE_FULL_TEXT_INDEXATION_DOCLING', 'docling')." --from pdf --to text '".escapeshellcmd($filetoprocess)."'";
|
||||
$cmd = getDolGlobalString('MAIN_SAVE_FILE_CONTENT_AS_TEXT_DOCLING', 'docling')." --from pdf --to text '".escapeshellcmd($filetoprocess)."'";
|
||||
$resultexec = $utils->executeCLI($cmd, $outputfile, 0, null, 1);
|
||||
|
||||
if (!$resultexec['error']) {
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
* \brief File of class to build ODT documents for assets
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT . '/asset/core/modules/asset/modules_asset.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/modules/asset/modules_asset.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
* \brief File of class to generate document from standard template
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT . '/asset/core/modules/asset/modules_asset.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/modules/asset/modules_asset.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -123,9 +124,9 @@ abstract class ModelePDFFactures extends CommonDocGenerator
|
|||
|
||||
// Load the autoload file generated by composer
|
||||
if (file_exists(DOL_DOCUMENT_ROOT.'/includes/sprain/swiss-qr-bill/autoload.php')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/includes/sprain/swiss-qr-bill/autoload.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/includes/sprain/swiss-qr-bill/autoload.php'; // @phpstan-ignore-line
|
||||
} elseif (file_exists(DOL_DOCUMENT_ROOT.'/includes/autoload.php')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/includes/autoload.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/includes/autoload.php'; // @phpstan-ignore-line
|
||||
} else {
|
||||
$this->error = 'PHP library sprain/swiss-qr-bill was not found. Please install it with:<br>cd '.dirname(DOL_DOCUMENT_ROOT).'; cp composer.json.disabled composer.json; composer require sprain/swiss-qr-bill;';
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
* \brief File of class to build PDF documents for stocks movements
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/modules/stock/modules_movement.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/modules/movement/modules_movement.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
* Copyright (C) 2006-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Francis Appels <francis.appels@yahoo.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ class EcmFiles extends CommonObject
|
|||
'fullpath_orig' => array('type' => 'varchar(750)', 'label' => 'FullPathOrig', 'enabled' => 1, 'position' => 100, 'notnull' => 0, 'visible' => 0, 'searchall' => 0, 'css' => 'minwidth300', 'cssview' => 'wordbreak', 'showoncombobox' => 2, 'validate' => 1,'comment' => "full path of original filename, when file is uploaded from a local computer"),
|
||||
'description' => array('type' => 'text', 'label' => 'Description', 'enabled' => 1, 'visible' => 0, 'position' => 110),
|
||||
'keywords' => array('type' => 'varchar(750)', 'label' => 'Keywords', 'enabled' => 1, 'position' => 120, 'notnull' => 0, 'visible' => 1, 'searchall' => 1, 'css' => 'minwidth300', 'cssview' => 'wordbreak', 'showoncombobox' => 2, 'validate' => 1,'comment' => "list of keywords, separated with comma. Must be limited to most important keywords."),
|
||||
'content' => array('type' => 'html', 'label' => 'Content', 'enabled' => 'getDolGlobalString("MAIN_USE_FULL_TEXT_INDEXATION")', 'position' => 120, 'notnull' => 0, 'visible' => 1, 'searchall' => 1, 'css' => 'minwidth300', 'cssview' => 'wordbreak', 'csslist' => 'tdoverflowmax200', 'help' => "Text content of file", 'showoncombobox' => 2, 'validate' => 1,'comment' => "Text content if option to store txt content was set."),
|
||||
'content' => array('type' => 'html', 'label' => 'Content', 'enabled' => 'getDolGlobalString("MAIN_SAVE_FILE_CONTENT_AS_TEXT")', 'position' => 120, 'notnull' => 0, 'visible' => 1, 'searchall' => 1, 'css' => 'minwidth300', 'cssview' => 'wordbreak', 'csslist' => 'tdoverflowmax200', 'help' => "Text content of file", 'showoncombobox' => 2, 'validate' => 1,'comment' => "Text content if option to store txt content was set."),
|
||||
'cover' => array('type' => 'text', 'label' => 'Cover', 'enabled' => 1, 'visible' => 0, 'position' => 130, 'comment' => "is this file a file to use for a cover"),
|
||||
'position' => array('type' => 'integer', 'label' => 'Position', 'default' => '1', 'enabled' => 1, 'visible' => -2, 'notnull' => 1, 'position' => 140, 'index' => 1, 'comment' => "position of file among others"),
|
||||
'gen_or_uploaded' => array('type' => 'varchar(12)', 'label' => 'GenOrUpload', 'enabled' => 1, 'position' => 150, 'notnull' => 0, 'visible' => -1, 'searchall' => 1, 'css' => 'minwidth300', 'cssview' => 'wordbreak', 'showoncombobox' => 2, 'validate' => 1,'comment' => "'generated' or 'uploaded'"),
|
||||
|
|
@ -317,7 +317,7 @@ class EcmFiles extends CommonObject
|
|||
$sql .= 'fullpath_orig,';
|
||||
$sql .= 'description,';
|
||||
$sql .= 'keywords,';
|
||||
if (getDolGlobalString("MAIN_USE_FULL_TEXT_INDEXATION")) {
|
||||
if (getDolGlobalString("MAIN_SAVE_FILE_CONTENT_AS_TEXT")) {
|
||||
$sql .= 'content,';
|
||||
}
|
||||
$sql .= 'cover,';
|
||||
|
|
@ -341,7 +341,7 @@ class EcmFiles extends CommonObject
|
|||
$sql .= ' '.(!isset($this->fullpath_orig) ? 'NULL' : "'".$this->db->escape($this->fullpath_orig)."'").',';
|
||||
$sql .= ' '.(!isset($this->description) ? 'NULL' : "'".$this->db->escape($this->description)."'").',';
|
||||
$sql .= ' '.(!isset($this->keywords) ? 'NULL' : "'".$this->db->escape($this->keywords)."'").',';
|
||||
if (getDolGlobalString("MAIN_USE_FULL_TEXT_INDEXATION")) {
|
||||
if (getDolGlobalString("MAIN_SAVE_FILE_CONTENT_AS_TEXT")) {
|
||||
$sql .= ' '.(!isset($this->content) ? 'NULL' : "'".$this->db->escape($this->content)."'").',';
|
||||
}
|
||||
$sql .= ' '.(!isset($this->cover) ? 'NULL' : "'".$this->db->escape($this->cover)."'").',';
|
||||
|
|
@ -426,7 +426,7 @@ class EcmFiles extends CommonObject
|
|||
$sql .= " t.fullpath_orig,";
|
||||
$sql .= " t.description,";
|
||||
$sql .= " t.keywords,";
|
||||
if (getDolGlobalString("MAIN_USE_FULL_TEXT_INDEXATION")) {
|
||||
if (getDolGlobalString("MAIN_SAVE_FILE_CONTENT_AS_TEXT")) {
|
||||
$sql .= " t.content,";
|
||||
}
|
||||
$sql .= " t.cover,";
|
||||
|
|
@ -507,7 +507,7 @@ class EcmFiles extends CommonObject
|
|||
$this->fullpath_orig = $obj->fullpath_orig;
|
||||
$this->description = $obj->description;
|
||||
$this->keywords = $obj->keywords;
|
||||
if (getDolGlobalString("MAIN_USE_FULL_TEXT_INDEXATION")) {
|
||||
if (getDolGlobalString("MAIN_SAVE_FILE_CONTENT_AS_TEXT")) {
|
||||
$this->content = $obj->content;
|
||||
}
|
||||
$this->cover = $obj->cover;
|
||||
|
|
@ -571,7 +571,7 @@ class EcmFiles extends CommonObject
|
|||
$sql .= " t.fullpath_orig,";
|
||||
$sql .= " t.description,";
|
||||
$sql .= " t.keywords,";
|
||||
if (getDolGlobalString("MAIN_USE_FULL_TEXT_INDEXATION")) {
|
||||
if (getDolGlobalString("MAIN_SAVE_FILE_CONTENT_AS_TEXT")) {
|
||||
$sql .= " t.content,";
|
||||
}
|
||||
$sql .= " t.cover,";
|
||||
|
|
@ -646,7 +646,7 @@ class EcmFiles extends CommonObject
|
|||
$line->fullpath_orig = $obj->fullpath_orig;
|
||||
$line->description = $obj->description;
|
||||
$line->keywords = $obj->keywords;
|
||||
if (getDolGlobalString("MAIN_USE_FULL_TEXT_INDEXATION")) {
|
||||
if (getDolGlobalString("MAIN_SAVE_FILE_CONTENT_AS_TEXT")) {
|
||||
$line->content = $obj->content;
|
||||
}
|
||||
$line->cover = $obj->cover;
|
||||
|
|
@ -751,7 +751,7 @@ class EcmFiles extends CommonObject
|
|||
$sql .= ' fullpath_orig = '.(isset($this->fullpath_orig) ? "'".$this->db->escape($this->fullpath_orig)."'" : "null").',';
|
||||
$sql .= ' description = '.(isset($this->description) ? "'".$this->db->escape($this->description)."'" : "null").',';
|
||||
$sql .= ' keywords = '.(isset($this->keywords) ? "'".$this->db->escape($this->keywords)."'" : "null").',';
|
||||
if (getDolGlobalString("MAIN_USE_FULL_TEXT_INDEXATION")) {
|
||||
if (getDolGlobalString("MAIN_SAVE_FILE_CONTENT_AS_TEXT")) {
|
||||
$sql .= ' content = '.(isset($this->content) ? "'".$this->db->escape($this->content)."'" : "null").',';
|
||||
}
|
||||
$sql .= ' cover = '.(isset($this->cover) ? "'".$this->db->escape($this->cover)."'" : "null").',';
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
require '../main.inc.php';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT . '/eventorganization/class/conferenceorboothattendee.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/eventorganization/lib/eventorganization_conferenceorboothattendee.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/eventorganization/lib/eventorganization_conferenceorbooth.lib.php';
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
|
|
|
|||
|
|
@ -2482,7 +2482,11 @@ class Expedition extends CommonObject
|
|||
$error++;
|
||||
}
|
||||
|
||||
return $error;
|
||||
if (!$error) {
|
||||
return 1;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -504,7 +504,7 @@ class Export
|
|||
public function build_filterField($TypeField, $NameField, $ValueField)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $langs, $form;
|
||||
global $langs, $form;
|
||||
|
||||
$szFilterField = '';
|
||||
$InfoFieldList = explode(":", $TypeField);
|
||||
|
|
@ -610,7 +610,7 @@ class Export
|
|||
if (!empty($ValueField) && $ValueField == $obj->rowid) {
|
||||
$szFilterField .= '<option value="'.$obj->rowid.'" selected data-html="'.dolPrintHTMLForAttribute($labeltoshow).'">'.dolPrintHTML($labeltoshow).'</option>';
|
||||
} else {
|
||||
$szFilterField .= '<option value="'.$obj->rowid.'" selected data-html="'.dolPrintHTMLForAttribute($labeltoshow).'">'.$labeltoshow.'</option>';
|
||||
$szFilterField .= '<option value="'.$obj->rowid.'" data-html="'.dolPrintHTMLForAttribute($labeltoshow).'">'.$labeltoshow.'</option>';
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,8 @@
|
|||
* Copyright (C) 2006 Andre Cianfarani <andre.cianfarani@acdeveloppement.net>
|
||||
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Bahfir Abbes <bafbes@gmail.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -137,6 +138,7 @@ $conffiletoshow = "htdocs/conf/conf.php";
|
|||
// --- End of part replaced by Dolibarr packager makepack-dolibarr
|
||||
|
||||
// Include configuration
|
||||
// @phpstan-ignore-next-line
|
||||
$result = @include_once $conffile; // Keep @ because with some error reporting mode, this breaks the redirect done when file is not found
|
||||
|
||||
// Disable some not used PHP stream
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
|
||||
* Copyright (C) 2005 Marc Barilley <marc@ocebo.com>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2010-2020 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2023 Juanjo Menent <jmenent@simnandez.es>
|
||||
* Copyright (C) 2013-2019 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014-2016 Marcos García <marcosgdf@gmail.com>
|
||||
|
|
@ -1197,6 +1197,12 @@ class FactureFournisseur extends CommonInvoice
|
|||
if (empty($this->total_tva)) {
|
||||
$this->total_tva = 0;
|
||||
}
|
||||
if (empty($this->total_localtax1)) {
|
||||
$this->total_localtax1 = 0;
|
||||
}
|
||||
if (empty($this->total_localtax2)) {
|
||||
$this->total_localtax2 = 0;
|
||||
}
|
||||
if (isset($this->total_ttc)) {
|
||||
$this->total_ttc = (float) $this->total_ttc;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -796,7 +796,7 @@ if (empty($reshook)) {
|
|||
$special_code = 3;
|
||||
}
|
||||
|
||||
$remise_percent = price2num(GETPOST('remise_percent'), '', 2);
|
||||
$remise_percent = price2num(GETPOST('remise_percent'), '', 2) ?: 0;
|
||||
|
||||
// Check minimum price
|
||||
$productid = GETPOSTINT('productid');
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
|
||||
* Copyright (C) 2005 Marc Barilley <marc@ocebo.fr>
|
||||
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2010-2019 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2023 Juanjo Menent <jmenent@simnandez.es>
|
||||
* Copyright (C) 2013-2022 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014-2016 Marcos García <marcosgdf@gmail.com>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
/* Copyright (C) 2008-2024 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2008-2024 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -91,7 +91,13 @@ if (is_numeric($entity)) {
|
|||
// Load Dolibarr environment
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
$object = new ActionComm($db);
|
||||
|
||||
// Not older than
|
||||
|
|
|
|||
|
|
@ -54,7 +54,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/public.lib.php';
|
|||
if (!isModEnabled('bookcal')) {
|
||||
httponly_accessforbidden('Module Bookcal isn\'t enabled');
|
||||
}
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var Translate $langs
|
||||
*/
|
||||
$langs->loadLangs(array("main", "other", "dict", "agenda", "errors", "companies"));
|
||||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
|
|
|
|||
|
|
@ -989,6 +989,7 @@ class Societe extends CommonObject
|
|||
$this->name = $this->name ? trim($this->name) : trim((string) $this->nom);
|
||||
$this->setUpperOrLowerCase();
|
||||
$this->nom = $this->name; // For backward compatibility
|
||||
|
||||
if (empty($this->client)) {
|
||||
$this->client = 0;
|
||||
}
|
||||
|
|
@ -1459,7 +1460,7 @@ class Societe extends CommonObject
|
|||
$this->address = trim((string) $this->address);
|
||||
$this->zip = trim((string) $this->zip);
|
||||
$this->town = trim((string) $this->town);
|
||||
$this->state_id = (is_numeric($this->state_id)) ? (int) trim((string) $this->state_id) : 0;
|
||||
$this->state_id = (is_numeric($this->state_id)) ? (int) $this->state_id : 0;
|
||||
$this->country_id = ($this->country_id > 0) ? $this->country_id : 0;
|
||||
$this->phone = trim((string) $this->phone);
|
||||
$this->phone = preg_replace("/\s/", "", $this->phone);
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ parameters:
|
|||
# minimumNumberOfJobsPerProcess: 2 # default is 2
|
||||
# buffer: 134217728 # 128 MB # Not documented
|
||||
customRulesetUsed: true
|
||||
level: 9
|
||||
level: 10
|
||||
fileExtensions:
|
||||
- php
|
||||
paths:
|
||||
|
|
@ -28,9 +28,9 @@ parameters:
|
|||
analyse:
|
||||
- htdocs/includes/*
|
||||
- htdocs/core/class/lessc.class.php
|
||||
checkAlwaysTrueCheckTypeFunctionCall: false
|
||||
checkAlwaysTrueInstanceof: false
|
||||
checkAlwaysTrueStrictComparison: false
|
||||
# checkAlwaysTrueCheckTypeFunctionCall: false
|
||||
# checkAlwaysTrueInstanceof: false
|
||||
# checkAlwaysTrueStrictComparison: false
|
||||
checkClassCaseSensitivity: true
|
||||
checkFunctionArgumentTypes: true
|
||||
checkFunctionNameCase: true
|
||||
|
|
@ -52,7 +52,7 @@ parameters:
|
|||
- '#.*phan-var#'
|
||||
internalErrorsCountLimit: 50
|
||||
cache:
|
||||
nodesByFileCountMax: 512
|
||||
# nodesByFileCountMax: 512
|
||||
nodesByStringCountMax: 512
|
||||
reportUnmatchedIgnoredErrors: false
|
||||
universalObjectCratesClasses:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user