Skip to content

Commit

Permalink
Fix #28071 - New branch to fix bad merge (#28083)
Browse files Browse the repository at this point in the history
* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop

* Qual: Introduce getDataToShowPhoto to prepare generic code

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

* Fix missing trans

* Fix langs

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

* Remove useless files in web templates

* Clean code

* Fix duplicate translation key

* Fix duplicate translation key

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

* Fix duplicate key

* Fix $object

* Debug v19

* WIP SMSing

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

* WIP EMAILINGS_SUPPORT_ALSO_SMS

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

* WIP SMSing

* Debug the "validate" feature

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

* Clean code

* Move rights->x->y into hasRight('x', 'y')

* Move rights->x->y into hasRight('x', 'y')

* Move rights->x->y into hasRight('x', 'y')

* Move rights->x->y into hasRight('x', 'y')

* Move rights->x->y into hasRight('x', 'y')

* Move rights->x->y into hasRight('x', 'y')

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop

* Enhance rector to fix empty($user->rights->modulex->perm1)

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop

* Fix template to use v19 dev rules

* Fix use v19 dev rules

* Fix phpunit

* Debug v19

* Clean code

* Use rector to convert user->rights into user->hasRight

* Clean code

* Use rector to convert user->rights into user->hasRight

* Use rector to convert user->rights into user->hasRight

* Clean code

* Fix phpcs

* add editorconfig for sql files (#27999)

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>

* add model_pdf field in llx_ticket-ticket.sql (#27996)

* add model_pdf field in llx_ticket-ticket.sql

* Update 19.0.0-20.0.0.sql

* Update 19.0.0-20.0.0.sql

* Improve wording in README (#27994)

* fix phpstan (#27989)

* fix phpstan

* Update UserRightsToFunction.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>

* Qual: Fix spelling/working in datapolicy translations (#28006)

# Qual: Fix spelling/wording in datapolicy translations

Fixed some spelling and wording in datapolicy translations.

* qual: phpstan for htdocs/ticket/class/ticketstats.class.php (#27986)

htdocs/ticket/class/ticketstats.class.php	98	Parameter #1 $year (string) of method TicketStats::getNbByMonth() should be compatible with parameter $year (int) of method Stats::getNbByMonth()

* Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop

* Fix user with readonly perm on email template must be able to read.

* Fix doc

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

* Better message

* Add missing fields in merge of thirdparty

* Debug v19 selection of ticket printer per terminal

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

* Use constant

* NEW: Adding a recipient on emails sent, change status to sent partialy.

* fix travis (#28052)

* fix travis

* Update partnership.class.php

* fix php doc (#28047)

* fix undefined array key (#28048)

* Add region and departament for Cuba (#28046)

* Update llx_10_c_regions.sql

Add Cuba Regions (id_country=77)

* Update llx_20_c_departements.sql

Add Provinces Cuba (id country=77)

* Find the typo (#28050)

* Find the typo

* clean code

* add last_main_doc field to product (#28045)

* add las_main_doc field to product

* add field fetch

* NEW Add Categorie filter for ActionComm (#28041)

* New Add Categorie filter for ActionComm

New Add Categorie filter for ActionComm

* Fix space errors

Fix space errors

* Fix space errors 2

Fix space errors 2

* Update cunits.class.php (#28056)

FIX: error SQL when creating a Cunit

* Update codespell-lines-ignore.txt to avoid PR merge conflict

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
Co-authored-by: Frédéric FRANCE <frederic34@users.noreply.github.com>
Co-authored-by: thibdrev <thibault.drevet@gmail.com>
Co-authored-by: sonikf <93765174+sonikf@users.noreply.github.com>
Co-authored-by: Ikarus <44511582+LeKarSol@users.noreply.github.com>
Co-authored-by: Anthony Damhet <73399671+EchoLoGeek@users.noreply.github.com>
Co-authored-by: Quentin-Seekness <72733832+Quentin-Seekness@users.noreply.github.com>
  • Loading branch information
8 people authored Feb 9, 2024
1 parent 275dbca commit 7b54824
Show file tree
Hide file tree
Showing 523 changed files with 2,898 additions and 7,656 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ indent_style = tab
indent_style = tab
[*.md]
trim_trailing_whitespace = false
[*.sql]
indent_style = tab
trim_trailing_whitespace = true
indent_size = 4
145 changes: 73 additions & 72 deletions ChangeLog

Large diffs are not rendered by default.

40 changes: 21 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ 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 Redhat, Fedora, OpenSuse, Mandriva or Mageia
- DoliRpm for Red Hat, Fedora, OpenSuse, Mandriva or Mageia

Releases can be downloaded from [official website](https://www.dolibarr.org/).

Expand All @@ -45,19 +45,19 @@ On GNU/Linux, first check if your distribution has already packaged Dolibarr.

#### Generic install steps

- Check that your installed PHP version is supported [see PHP support](https://wiki.dolibarr.org/index.php/Releases).
- Verify that your installed PHP version is supported [see PHP support](https://wiki.dolibarr.org/index.php/Releases).

- Uncompress the downloaded .zip archive to copy the "dolibarr/htdocs" directory and all its files inside your web server root or get the files directly from GitHub (recommended if you know git as it makes it easier if you want to upgrade later):
- Uncompress the downloaded .zip archive to copy the `dolibarr/htdocs` directory and all its files inside your web server root or get the files directly from GitHub (recommended if you know git as it makes it easier if you want to upgrade later):

`git clone /~https://github.com/dolibarr/dolibarr -b x.y` (where x.y is the main version like 3.6, 9.0, ...)

- Set up your web server to use "*dolibarr/htdocs*" as root if your web server does not have an already defined directory to point to.
- Set up your web server to use `dolibarr/htdocs` as root if your web server does not already define a directory to point to.

- Create an empty `htdocs/conf/conf.php` file and set *write* permissions for your web server user (*write* permission will be removed once install is finished)

- From your browser, go to the dolibarr "install/" page

The URL will depends on how your web setup was set up to point to your dolibarr installation. It may look like:
The URL will depend on how your web configuration directs to your dolibarr installation. It may look like:

`http://localhost/dolibarr/htdocs/install/`

Expand All @@ -71,18 +71,20 @@ On GNU/Linux, first check if your distribution has already packaged Dolibarr.

- Follow the installer instructions

### SaaS/Cloud setup
### SaaS/Cloud Setup

If you don't have time to install it yourself, you can try some commercial 'ready to use' Cloud offers (See [https://saas.dolibarr.org](https://saas.dolibarr.org)). However, this third solution is not free.
If you lack the time to install it yourself, consider exploring commercial 'ready-to-use' Cloud offerings (refer to https://saas.dolibarr.org). Keep in mind that this third option comes with associated costs.

## UPGRADING

Dolibarr supports upgrading, usually without the need for any (commercial) support (depending on if you use any commercial extensions). It supports upgrading all the way from any version after 2.8 without breakage. This is unique in the ERP ecosystem and a benefit our users highly appreciate!

Follow these step-by-step instructions to seamlessly upgrade Dolibarr to the latest version:

- At first make a backup of your Dolibarr files & then [see](https://wiki.dolibarr.org/index.php/Installation_-_Upgrade#Upgrade_Dolibarr)
- Check that your installed PHP version is supported by the new version [see PHP support](https://wiki.dolibarr.org/index.php/Releases).
- Overwrite all old files from the 'dolibarr' directory with files provided into the new version's package.
- At first next access, Dolibarr will redirect you to the "install/" page to follow the upgrade process.
- Verify that your installed PHP version is supported by the new version [see PHP support](https://wiki.dolibarr.org/index.php/Releases).
- Overwrite all old files from the 'dolibarr' directory with files provided in the new version's package.
- At your next access, Dolibarr will redirect you to the "install/" page to follow the upgrade process.
 If an `install.lock` file exists to lock any other upgrade process, the application will ask you to remove the file manually (you should find the `install.lock` file in the directory used to store generated and uploaded documents, in most cases, it is the directory called "*documents*").

## WHAT'S NEW
Expand Down Expand Up @@ -114,7 +116,7 @@ See the [ChangeLog](/~https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
- Customer Orders management
- Contracts/Subscription management
- Interventions management
- Ticket System (+ Knowledge management)
- Ticket System (+ Knowledge management)
- Partnership management
- Shipping management
- Customer Invoices/Credit notes and payment management
Expand All @@ -123,10 +125,10 @@ See the [ChangeLog](/~https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
Supplier/Purchase Management

- Suppliers/Vendors + Contacts
- Supplier (price) requests
- Supplier (pricing) requests
- Purchase Orders management
- Delivery/Reception
- Supplier Invoices/credit notes and payment management
- Supplier Invoices/Credit notes and payment management
- INCOTERMS

Finance/Accounting
Expand All @@ -142,15 +144,15 @@ See the [ChangeLog](/~https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)

Collaboration

- Shared calendar/agenda (with ical and vcal import/export for third-party tools integration)
- Shared calendar/agenda (with `ical` and `vcal` import/export for third-party tools integration)
- Projects & Tasks management
- Event organization
- Ticket System
- Surveys

HR - Human Resources Management

- Employee's leaves management
- Employee leave management
- Expense reports
- Recruitment management
- Employee/staff management
Expand Down Expand Up @@ -178,7 +180,7 @@ See the [ChangeLog](/~https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
- Multi-Language Support (Localization in most major languages)
- Multi-users and groups with finely-grained rights
- Multi-Currency
- Multi-Company (by adding of an external module)
- Multi-Company (by adding an external module)
- Very user-friendly and easy to use
- Customizable dashboards
- Highly customizable: enable only the modules you need, add user personalized fields, choose your skin, several menu managers (can be used by internal users as a back-office with a particular menu, or by external users as a front-office with another one)
Expand All @@ -192,7 +194,7 @@ See the [ChangeLog](/~https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
- Argentina invoice numbering using A,B,C...
- ZATCA e-invoicing QR-Code
- Compatible with [European directives](https://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE)
- Compatible with data privacy rules (Europe GDPR, ...)
- Compatible with data privacy rules (Europe's GDPR, ...)
- ...
- Flexible PDF & ODT generation for invoices, proposals, orders...
- ...
Expand All @@ -215,7 +217,7 @@ These are features that Dolibarr does **not** yet fully support:

- Tasks dependencies in projects
- Payroll module
- No native embedded Webmail, but you can send emails to contacts in Dolibarr with e.g. offers, invoices, etc.
- Native embedded Webmail, but you can send email to contacts in Dolibarr with e.g. offers, invoices, etc.
- Dolibarr can't do coffee (yet)

## DOCUMENTATION
Expand All @@ -225,7 +227,7 @@ Administrator, user, developer and translator's documentation are available alon
## CONTRIBUTING

This project exists thanks to all the people who contribute.
Please read the instructions on how to contribute (report a bug/error, a feature request, send code ...) [[Contribute](/~https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)]
Please read the instructions on how to contribute (report a bug/error, a feature request, send code, ...) [[Contributing](/~https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)]

A View on Contributors:

Expand Down
2 changes: 2 additions & 0 deletions dev/tools/rector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ composer install

##### To make changes (Add --dry-run for test mode only)
```shell
cd dev/tools/rector
./vendor/bin/rector process --dry-run
```

##### To make changes on a given directory

```shell
cd dev/tools/rector
./vendor/bin/rector process [--dry-run] [--clear-cache] ../../../htdocs/core/
```
5 changes: 3 additions & 2 deletions dev/tools/rector/rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,13 @@
$rectorConfig->rule(Rector\CodeQuality\Rector\FuncCall\FloatvalToTypeCastRector::class);
$rectorConfig->rule(Rector\CodeQuality\Rector\FuncCall\BoolvalToTypeCastRector::class);
$rectorConfig->rule(Rector\CodeQuality\Rector\NotEqual\CommonNotEqualRector::class);
//$rectorconfig->rule(Rector\CodeQuality\Rector\If_\CompleteMissingIfElseBracketRector::class);
//Not yet ready: $rectorconfig->rule(Rector\CodeQuality\Rector\If_\CompleteMissingIfElseBracketRector::class);
$rectorConfig->rule(Rector\CodeQuality\Rector\For_\ForRepeatedCountToOwnVariableRector::class);

$rectorConfig->rule(Dolibarr\Rector\Renaming\EmptyGlobalToFunction::class);
$rectorConfig->rule(Dolibarr\Rector\Renaming\EmptyUserRightsToFunction::class);
$rectorConfig->rule(Dolibarr\Rector\Renaming\GlobalToFunction::class);
$rectorConfig->rule(Dolibarr\Rector\Renaming\UserRightsToFunction::class);
$rectorConfig->rule(Dolibarr\Rector\Renaming\EmptyGlobalToFunction::class);

// Add all predefined rules to migrate to up to php 71.
// Warning this break tab spacing of arrays on several lines
Expand Down
22 changes: 11 additions & 11 deletions dev/tools/rector/src/Renaming/EmptyGlobalToFunction.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ public function __construct(BinaryOpManipulator $binaryOpManipulator)
public function getRuleDefinition(): RuleDefinition
{
return new RuleDefinition(
'Change $conf->global to getDolGlobal',
'Change empty($conf->global->...) to getDolGlobal',
[new CodeSample(
'$conf->global->CONSTANT',
'getDolGlobalInt(\'CONSTANT\')'
'empty($conf->global->CONSTANT)',
'!getDolGlobalInt(\'CONSTANT\')'
)]
);
}
Expand All @@ -82,18 +82,18 @@ public function refactor(Node $node)
if (!$node->expr instanceof Node\Expr\Empty_) {
return null;
}
// node is !empty(...) so we set node to ...
$newnode = $node->expr->expr;
// node is !empty(...) so we set newnode to ...
$newnode = $node->expr->expr; // newnode is conf->global->...

$tmpglobal = $newnode->var;
$tmpglobal = $newnode->var; // tmpglobal is global->...
if (is_null($tmpglobal)) {
return null;
}
if (!$this->isName($tmpglobal, 'global')) {
return null;
}

$tmpconf = $tmpglobal->var;
$tmpconf = $tmpglobal->var; // tmpconf is conf->
if (!$this->isName($tmpconf, 'conf')) {
return null;
}
Expand All @@ -113,18 +113,18 @@ public function refactor(Node $node)


if ($node instanceof Node\Expr\Empty_) {
// node is empty(...) so we set node to ...
$newnode = $node->expr;
// node is empty(...) so we set newnode to ...
$newnode = $node->expr; // newnode is conf->global->...

$tmpglobal = $newnode->var;
$tmpglobal = $newnode->var; // tmpglobal is global->...
if (is_null($tmpglobal)) {
return null;
}
if (!$this->isName($tmpglobal, 'global')) {
return null;
}

$tmpconf = $tmpglobal->var;
$tmpconf = $tmpglobal->var; // tmpconf is conf->
if (!$this->isName($tmpconf, 'conf')) {
return null;
}
Expand Down
Loading

0 comments on commit 7b54824

Please sign in to comment.