mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Merge branch 'develop' into FIX_order_for_actrioncomm_type_list
This commit is contained in:
commit
04891fc842
42
.github/CONTRIBUTING.md
vendored
42
.github/CONTRIBUTING.md
vendored
|
|
@ -7,18 +7,18 @@ Bug reports and feature requests
|
|||
<a name="not-a-support-forum"></a>*Note*: **GitHub Issues is not a support forum.** If you have questions about Dolibarr / need help using the software, please use [the forums](https://www.dolibarr.org/forum.php). Forums exist in different languages.
|
||||
|
||||
Issues are managed on [GitHub](https://github.com/Dolibarr/dolibarr/issues).
|
||||
Default **language here is english**. So please prepare your contributions in english.
|
||||
Default **language here is English**. So please prepare your contributions in English.
|
||||
|
||||
1. Please [use the search engine](https://help.github.com/articles/searching-issues) to check if nobody's already reported your problem.
|
||||
2. [Create an issue](https://help.github.com/articles/creating-an-issue). Choose an appropriate title. Prepend appropriately with Bug or Feature Request.
|
||||
3. Tell us the version you are using! (look at /htdocs/admin/system/dolibarr.php? and check if you are using the latest version)
|
||||
4. Write a report with as much detail as possible (Use [screenshots](https://help.github.com/articles/issue-attachments) or even screencasts and provide logging and debugging informations whenever possible).
|
||||
4. Write a report with as much detail as possible (Use [screenshots](https://help.github.com/articles/issue-attachments) or even screencasts and provide logging and debugging information whenever possible).
|
||||
5. Delete unnecessary submissions.
|
||||
6. **Check your Message at Preview before sending.**
|
||||
|
||||
|
||||
|
||||
<a name="code"></a>Code
|
||||
<a name="code"></a>Submit code
|
||||
---------------------
|
||||
|
||||
### Basic workflow
|
||||
|
|
@ -35,20 +35,22 @@ Default **language here is english**. So please prepare your contributions in en
|
|||
|
||||
Unless you're fixing a bug, all pull requests should be made against the *develop* branch.
|
||||
|
||||
If you're fixing a bug, it is preferred that you cook your fix and pull request it
|
||||
against the oldest version affected that's still supported.
|
||||
If you're fixing a bug, it is preferred that you cook your fix and pull request it against an oldest version affected.
|
||||
|
||||
We officially support versions N, N − 1 and N − 2 for N the latest version available.
|
||||
We recommend to push it into N - 2 for N the latest version available, if not possible into version N - 1, and finally into develop.
|
||||
This is just a recommendation, currently, if you push a bug fix on a very old version, it is still merged and propagated into
|
||||
higher versions.
|
||||
|
||||
Choose your base branch accordingly.
|
||||
The rule N - 2 is just a tip if you don't know which version to choose to get the best the best compromise between ease of correction
|
||||
and number of potential beneficiaries of the correction.
|
||||
|
||||
### General rules
|
||||
Please don't edit the ChangeLog file. File will be generated from all commit messages during release process by the project manager.
|
||||
Please don't edit the ChangeLog file. This file is generated from all commit messages during release process by the project manager.
|
||||
|
||||
### <a name="commits"></a>Commits
|
||||
Use clear commit messages with the following structure:
|
||||
|
||||
```
|
||||
```plaintext
|
||||
[KEYWORD] [ISSUENUM] DESC
|
||||
|
||||
LONGDESC
|
||||
|
|
@ -66,10 +68,13 @@ where
|
|||
#### Keyword
|
||||
In uppercase if you want to have the log comment appears into the generated ChangeLog file.
|
||||
|
||||
The keyword can be ommitted if your commit does not fit in any of the following categories:
|
||||
The keyword can be omitted if your commit does not fit in any of the following categories:
|
||||
|
||||
- Fix/FIX: for a bug fix
|
||||
- New/NEW: for an unreferenced new feature (Opening a feature request and using close is prefered)
|
||||
- Close/CLOSE: for closing a referenced feature request
|
||||
- New/NEW: for an unreferenced new feature (Opening a feature request and using close is preferred)
|
||||
- Perf/PERF: for a performance enhancement
|
||||
- Qual/QUAL: for quality code enhancement or re-engineering
|
||||
|
||||
#### Issuenum
|
||||
If your commit fixes a referenced bug or feature request.
|
||||
|
|
@ -90,19 +95,19 @@ Feel free to express technical details, use cases or anything relevant to the cu
|
|||
|
||||
This section can span multiple lines.
|
||||
|
||||
Try to keep lines under 120 characters.
|
||||
If your PR is a change on interface, you must also paste a screenshot showing the new screen.
|
||||
|
||||
#### Examples
|
||||
<pre>
|
||||
FIX|Fix #456 Short description (where #456 is number of bug fix, if it exists. In upper case to appear into ChangeLog)
|
||||
or
|
||||
NEW|New Short description (In upper case to appear into ChangeLog, use this if you add a feature not tracked, otherwise use CLOSE #456)
|
||||
or
|
||||
CLOSE|Close #456 Short description (where #456 is number of feature request, if it exists. In upper case to appear into ChangeLog)
|
||||
or
|
||||
NEW|New|QUAL|Qual|PERF|Perf Short description (In upper case to appear into ChangeLog, use this if you add a feature not tracked, otherwise use CLOSE #456)
|
||||
or
|
||||
Short description (when the commit is not introducing feature nor closing a bug)
|
||||
|
||||
Long description (Can span accross multiple lines).
|
||||
Long description (Can span across multiple lines).
|
||||
</pre>
|
||||
|
||||
### Pull Requests
|
||||
|
|
@ -119,7 +124,7 @@ Also, some code changes need a prior approbation:
|
|||
|
||||
* if you want to include a new external library (into htdocs/includes directory), please ask before to the core project manager (mention @dolibarr-jedi in your issue) to see if such a library can be accepted.
|
||||
|
||||
* if you add a new tables or fields, you MUST first submit a standalone PR with the data structure changes you plan to add/modify (and only data structure changes). Start development only once this data structure has been accepted.
|
||||
* if you add new tables or fields, you MUST first submit a standalone PR with the data structure changes you plan to add/modify (and only data structure changes). Start development only once this data structure has been accepted.
|
||||
|
||||
Once a PR has been submitted, you may need to wait for its integration. It is common that the project leader let the PR open for a long delay to allow every developer discuss about the PR (A label is added in such a case).
|
||||
|
||||
|
|
@ -130,7 +135,8 @@ If your PR has errors reported by the Continuous Integration Platform, it means
|
|||
If the PR is valid, and is kept open for a long time, a tag will also be added on the PR to describe the status of your PR and why the PR is kept open. By putting your mouse on the tag, you will get a full explanation of the tag/status that explain why your PR has not been integrated yet.
|
||||
In most cases, it gives you information of things you have to do to have the PR taken into consideration (for example a change is requested, a conflict is expected to be solved, some questions were asked). If you have a yellow, red flag of purple flag, don't expect to have your PR validated. You must first provide the answer the tag ask you. The majority of open PR are waiting an action of the author of the PR.
|
||||
|
||||
Statistics on Dolibarr project shows that 95% of submitted PR are reviewed and tagged. Average answer delay is also one of the best among Open source projects (just few days before having the Answer Tag set). This is one of the most important ratio of answered PR in Open Source world for a major project. Don't expect the core team to reach the 100%. A so high ratio is very rare on a so popular project and with the increasing popularity of Dolibarr, this ratio will probably decrease in future to a more common level.
|
||||
Statistics on Dolibarr project shows that 95% of submitted PR are reviewed and tagged. Average answer delay is also one of the best among Open source projects (just few days before having the Answer Tag set). This is one of the most important ratio of answered PR in Open Source world for a major project. Don't expect the core team to reach the 100%.
|
||||
A so high ratio is very rare on a so popular project and with the increasing popularity of Dolibarr, this ratio will probably decrease in future to a more common level.
|
||||
|
||||
|
||||
### Resources
|
||||
|
|
@ -144,7 +150,7 @@ All other translations are managed online at [Transifex](https://www.transifex.c
|
|||
|
||||
Translations done on transifex are available in the next major release.
|
||||
|
||||
Note: Sometimes, the source text (english) is modified. In such a case, the translation is reset. Transifex assume that if the original source
|
||||
Note: Sometimes, the source text (English) is modified. In such a case, the translation is reset. Transifex assume that if the original source
|
||||
has changed, the translation is surely no more correct so must be done again. But old translation is not lost and you can use the tab "History"
|
||||
to retrieve all old translation of a source text, and restore the translation in one click with no need to retranslate it if there is no need to.
|
||||
|
||||
|
|
|
|||
2
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
2
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
|
|
@ -68,4 +68,4 @@ body:
|
|||
id: files
|
||||
attributes:
|
||||
label: Attached files
|
||||
description: Screenshots, screencasts, dolibarr.log, debugging informations
|
||||
description: Screenshots, screencasts, dolibarr.log, debugging information
|
||||
|
|
|
|||
11
.github/PULL_REQUEST_TEMPLATE.md
vendored
11
.github/PULL_REQUEST_TEMPLATE.md
vendored
|
|
@ -1,7 +1,7 @@
|
|||
# Instructions
|
||||
*This is a template to help you make good pull requests. You may use [Github Markdown](https://help.github.com/articles/getting-started-with-writing-and-formatting-on-github/) syntax to format your issue report.*
|
||||
*Please:*
|
||||
- *only keep the "FIX", "CLOSE" or "NEW" section* (use uppercase to have the PR appears into the ChangeLog, lowercase will not appears)
|
||||
- *only keep the "FIX", "CLOSE", "NEW", "PERF" or "QUAL" section* (use uppercase to have the PR appears into the ChangeLog, lowercase will not appears)
|
||||
- *follow the project [contributing guidelines](/.github/CONTRIBUTING.md)*
|
||||
- *replace the bracket enclosed texts with meaningful information*
|
||||
|
||||
|
|
@ -16,3 +16,12 @@
|
|||
|
||||
# NEW|New [*Short description*]
|
||||
[*Long description*]
|
||||
|
||||
|
||||
# PERF|Perf #[*issue_number Short description*]
|
||||
[*Long description*]
|
||||
|
||||
|
||||
# QUAL|Qual #[*issue_number Short description*]
|
||||
[*Long description*]
|
||||
|
||||
|
|
|
|||
28
.github/workflows/code_quality_qodana.yml.disabled
vendored
Normal file
28
.github/workflows/code_quality_qodana.yml.disabled
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
name: Qodana
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 20 * * 1,3,5"
|
||||
workflow_dispatch:
|
||||
branches:
|
||||
- develop
|
||||
# push:
|
||||
# branches:
|
||||
# - develop
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
qodana:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 1
|
||||
#php-version: '7.1'
|
||||
- name: 'Qodana Scan'
|
||||
uses: JetBrains/qodana-action@v2023.2.1
|
||||
#with:
|
||||
# php-version: '7.1'
|
||||
env:
|
||||
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
|
||||
38
.github/workflows/doxygen-gh-pages.yml.disabled
vendored
Normal file
38
.github/workflows/doxygen-gh-pages.yml.disabled
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
# See syntax file on https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
|
||||
name: Doxygen
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 15 * * *"
|
||||
workflow_dispatch:
|
||||
branches:
|
||||
- develop
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Build
|
||||
uses: DenverCoder1/doxygen-github-pages-action@v1.2.0
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: gh-pages
|
||||
folder: build/html
|
||||
config_file: build/doxygen/dolibarr-doxygen.doxyfile
|
||||
|
||||
# - name: Deploy
|
||||
# uses: JamesIves/github-pages-deploy-action@v4
|
||||
# with:
|
||||
# branch: gh-pages
|
||||
# folder: build/html # The folder the action should deploy.
|
||||
# target-folder: docs/html2
|
||||
|
||||
#jobs:
|
||||
# doxygen:
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - name: 'Doxygen'
|
||||
# uses: mattnotmitt/doxygen-action@1.9.5
|
||||
# with:
|
||||
# doxyfile-path: build/doxygen
|
||||
16
.github/workflows/exakat.yml
vendored
16
.github/workflows/exakat.yml
vendored
|
|
@ -2,8 +2,12 @@
|
|||
name: "Exakat analysis"
|
||||
|
||||
on:
|
||||
# execute once a month, the 1st
|
||||
schedule:
|
||||
- cron: "0 20 * * *"
|
||||
- cron: "0 20 1 * *"
|
||||
workflow_dispatch:
|
||||
branches:
|
||||
- develop
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
|
@ -12,9 +16,13 @@ jobs:
|
|||
exakat:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- name: Exakat
|
||||
uses: docker://exakat/exakat-ga
|
||||
with:
|
||||
ignore_rules: 'Classes/UseInstanceof,Performances/PrePostIncrement,Functions/UndefinedFunctions,Functions/WrongNumberOfArguments,Functions/WrongTypeWithCall,Variables/UndefinedVariable,Classes/DontUnsetProperties,Classes/NonPpp,Classes/StaticMethodsCalledFromObject,Classes/UseClassOperator,Functions/UsesDefaultArguments,Php/NoClassInGlobal,Php/ShouldUseCoalesce,Php/WrongTypeForNativeFunction,Structures/AddZero,Structures/DropElseAfterReturn,Structures/IfWithSameConditions,Structures/MergeIfThen,Structures/ElseIfElseif,Structures/ExitUsage,Structures/RepeatedPrint,Structures/RepeatedRegex,Structures/SameConditions,Structures/SwitchWithoutDefault,Structures/ShouldMakeTernary,Structures/UselessParenthesis,Structures/UseConstant'
|
||||
ignore_dirs: '/htdocs/includes,/build,/dev,/doc,/scripts,/test'
|
||||
ignore_rules: 'Classes/UseInstanceof,Performances/PrePostIncrement,Functions/UndefinedFunctions,Functions/WrongNumberOfArguments,Functions/WrongTypeWithCall,Variables/UndefinedVariable,Classes/DontUnsetProperties,Classes/NonPpp,Classes/StaticMethodsCalledFromObject,Classes/UseClassOperator,Functions/UsesDefaultArguments,Php/NoClassInGlobal,Php/ShouldUseCoalesce,Php/WrongTypeForNativeFunction,Structures/AddZero,Structures/DropElseAfterReturn,Structures/IfWithSameConditions,Structures/MergeIfThen,Structures/NestedTernary,Structures/ElseIfElseif,Structures/ExitUsage,Structures/RepeatedPrint,Structures/RepeatedRegex,Structures/SameConditions,Structures/SwitchWithoutDefault,Structures/ShouldMakeTernary,Structures/UselessParenthesis,Structures/UseConstant'
|
||||
ignore_dirs: '/htdocs/includes/,/htdocs/install/doctemplates/,/build/,/dev/,/doc/,/scripts/,/test/'
|
||||
file_extensions: php
|
||||
project_reports: Perfile
|
||||
365
.github/workflows/github_ci_php71_pgsql.yml.disabled
vendored
Normal file
365
.github/workflows/github_ci_php71_pgsql.yml.disabled
vendored
Normal file
|
|
@ -0,0 +1,365 @@
|
|||
name: GitHub CI PHP 7.1 Postgres
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- develop
|
||||
- 1*
|
||||
- 2*
|
||||
pull_request:
|
||||
types: [opened]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
github_ci_php71_pgsql:
|
||||
runs-on: ubuntu-latest
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:5.7
|
||||
env:
|
||||
MYSQL_ROOT_PASSWORD: password
|
||||
ports:
|
||||
- 32574:3306
|
||||
postgres:
|
||||
image: postgres
|
||||
env:
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_DB: postgres
|
||||
# Set health checks to wait until postgres has started
|
||||
options: >-
|
||||
--health-cmd pg_isready
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
ports:
|
||||
- 5432:5432
|
||||
|
||||
steps:
|
||||
# git clone dolibarr into GITHUB_WORKSPACE = /home/runner/work/dolibarr/dolibarr
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Version PHP
|
||||
run: |
|
||||
php -i | head -
|
||||
|
||||
- name: Install packages for PHP 7.1
|
||||
run: |
|
||||
sudo composer self-update 2.2.18
|
||||
sudo chmod -R a+rwx /home/runner
|
||||
composer -n config -g vendor-dir htdocs/includes
|
||||
|
||||
sudo add-apt-repository -y ppa:ondrej/php
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y pgloader memcached
|
||||
sudo apt install apache2 php7.1 php7.1-cli php7.1-curl php7.1-mysql php7.1-pgsql php7.1-gd php7.1-imap php7.1-intl php7.1-ldap php7.1-xml php7.1-mbstring php7.1-xml php7.1-zip libapache2-mod-php7.1
|
||||
sudo update-alternatives --set php /usr/bin/php7.1
|
||||
php -i | head -
|
||||
|
||||
cd $GITHUB_WORKSPACE
|
||||
ls $GITHUB_WORKSPACE
|
||||
composer -n require --ignore-platform-reqs phpunit/phpunit ^7.5 \
|
||||
php-parallel-lint/php-parallel-lint ^1 \
|
||||
php-parallel-lint/php-console-highlighter ^0 \
|
||||
php-parallel-lint/php-var-dump-check ~0.4 \
|
||||
squizlabs/php_codesniffer ^3
|
||||
#For php7.3
|
||||
#composer -n require phpunit/phpunit ^7.5 \
|
||||
# php-parallel-lint/php-parallel-lint ^1.2 \
|
||||
# php-parallel-lint/php-console-highlighter ^0 \
|
||||
# php-parallel-lint/php-var-dump-check ~0.4 \
|
||||
# squizlabs/php_codesniffer ^3
|
||||
sudo rm -fr htdocs/includes/phpunit/php-code-coverage/src/Report/Html
|
||||
|
||||
- name: Adding path of binaries tools installed by composer to the PATH
|
||||
run: |
|
||||
export PATH="$GITHUB_WORKSPACE/htdocs/includes/bin:$PATH"
|
||||
echo $PATH
|
||||
# We must have a directory bin created by the previous composer call
|
||||
ls $GITHUB_WORKSPACE/htdocs/includes/bin
|
||||
|
||||
- name: Version information
|
||||
run: |
|
||||
composer -V
|
||||
# Check Parallel-lint version
|
||||
echo "Parallel-lint version"
|
||||
htdocs/includes/bin/parallel-lint -V
|
||||
# Check PHP CodeSniffer version
|
||||
echo "PHPCS version"
|
||||
htdocs/includes/bin/phpcs --version | head -
|
||||
htdocs/includes/bin/phpcs -i | head -
|
||||
# Check PHP Vardump check version
|
||||
echo "PHP Vardump check version"
|
||||
htdocs/includes/bin/var-dump-check --version
|
||||
# Check PHPUnit version
|
||||
echo "PHPUnit version"
|
||||
htdocs/includes/bin/phpunit --version | head -
|
||||
# Check Apache version
|
||||
echo "Apache version"
|
||||
apache2 -v | head -
|
||||
# Check Database
|
||||
echo "Database version"
|
||||
mysql --version | head -
|
||||
psql --version
|
||||
echo "Check pgloader version"
|
||||
pgloader --version
|
||||
|
||||
- name: Create database
|
||||
run: |
|
||||
pwd
|
||||
echo GITHUB_WORKSPACE = $GITHUB_WORKSPACE
|
||||
sudo apt-get install -y mysql-client
|
||||
mysql --version | head -
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "SELECT VERSION();" | head -
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "SHOW DATABASES"
|
||||
|
||||
echo "Drop and create database"
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'DROP DATABASE IF EXISTS travis;'
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "CREATE DATABASE IF NOT EXISTS travis CHARACTER SET = 'utf8';"
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "CREATE USER 'travis'@'127.0.0.1' IDENTIFIED BY 'password';"
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;'
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'FLUSH PRIVILEGES;'
|
||||
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
|
||||
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -D travis -e "UPDATE llx_const set value = '0666' WHERE name = 'MAIN_UMASK';"
|
||||
|
||||
echo "Init postgresql database"
|
||||
ps fauxww | grep postgres
|
||||
ls /etc/postgresql/14/main/
|
||||
sudo chmod -R a+rwx /etc/postgresql/14/main/pg_hba.conf
|
||||
|
||||
sudo sed -i -e '/local.*peer/s/postgres/all/' -e 's/peer\|md5/trust/g' /etc/postgresql/14/main/pg_hba.conf
|
||||
sudo cat /etc/postgresql/14/main/pg_hba.conf
|
||||
|
||||
sudo /etc/init.d/postgresql restart
|
||||
|
||||
psql postgresql://postgres:postgres@127.0.0.1:5432 -l -A
|
||||
|
||||
psql postgresql://postgres:postgres@127.0.0.1:5432 -c 'create database travis;'
|
||||
|
||||
sudo mkdir -p /tmp/pgloader
|
||||
sudo chmod -R a+rwx /tmp/pgloader/
|
||||
|
||||
echo sudo pgloader mysql://root:password@127.0.0.1:32574/travis postgresql://postgres:postgres@127.0.0.1:5432/travis
|
||||
sudo pgloader mysql://root:password@127.0.0.1:32574/travis postgresql://postgres:postgres@127.0.0.1:5432/travis
|
||||
echo 'ALTER SEQUENCE llx_accountingaccount_rowid_seq RENAME TO llx_accounting_account_rowid_seq' | psql postgresql://postgres:postgres@127.0.0.1:5432/travis
|
||||
echo 'ALTER SEQUENCE llx_accounting_account_rowid_seq RESTART WITH 1000001;' | psql postgresql://postgres:postgres@127.0.0.1:5432/travis
|
||||
|
||||
# Create pgsql compatibility functions
|
||||
psql postgresql://postgres:postgres@127.0.0.1:5432/travis < htdocs/install/pgsql/functions/functions.sql
|
||||
|
||||
- name: Generate Dolibarr conf file
|
||||
run: |
|
||||
export CONF_FILE=$GITHUB_WORKSPACE/htdocs/conf/conf.php
|
||||
echo "Setting up Dolibarr $CONF_FILE"
|
||||
echo '<?php' > $CONF_FILE
|
||||
echo '$'dolibarr_main_url_root=\'http://127.0.0.1\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_document_root=\'/var/www/html\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_data_root=\'/var/www/html/documents\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_host=\'127.0.0.1\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_name=\'travis\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_user=\'postgres\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_pass=\'postgres\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_instance_unique_id=\'travis1234567890\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_type=\'pgsql\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_port=\'5432\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_authentication=\'dolibarr\'';' >> $CONF_FILE
|
||||
cat $CONF_FILE
|
||||
- name: Generate install.forced.php file to test installation
|
||||
run: |
|
||||
export INSTALL_FORCED_FILE=$GITHUB_WORKSPACE/htdocs/install/install.forced.php
|
||||
echo "Setting up Dolibarr $INSTALL_FORCED_FILE to test installation"
|
||||
# Ensure we catch errors
|
||||
set +e
|
||||
echo '<?php' > $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_noedit=2';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_type=\'pgsql\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_dbserver=\'127.0.0.1\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_database=\'travis\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_databaselogin=\'postgres\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_databasepass=\'postgres\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_port=\'5432\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_prefix=\'llx_\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_createdatabase=false';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_createuser=false';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_mainforcehttps=false';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_main_data_root=\'/var/www/html\'';' >> $INSTALL_FORCED_FILE
|
||||
cat $INSTALL_FORCED_FILE
|
||||
|
||||
- name: Create document directory
|
||||
run: |
|
||||
echo "Create documents directory and set permissions"
|
||||
# and admin/temp subdirectory needed for unit tests
|
||||
sudo mkdir -p /var/www/html/documents/admin/temp
|
||||
sudo chmod -R a+rwx /var/www/html/documents
|
||||
sudo echo "***** First line of dolibarr.log" > /var/www/html/documents/dolibarr.log
|
||||
sudo chmod a+rwx /var/www/html/documents/dolibarr.log
|
||||
|
||||
- name: Copy app into /var/www
|
||||
run: |
|
||||
sudo cp -r $GITHUB_WORKSPACE/htdocs/. /var/www/html
|
||||
sudo mv /var/www/html/index.html /var/www/html/index.disabled.html
|
||||
sudo ln -fs /var/www/html /var/www/htdocs
|
||||
sudo cp -r $GITHUB_WORKSPACE/test/. /var/www/test
|
||||
sudo cp -r $GITHUB_WORKSPACE/dev/. /var/www/dev
|
||||
sudo cp -r $GITHUB_WORKSPACE/scripts/. /var/www/scripts
|
||||
|
||||
- name: Setup Apache
|
||||
run: |
|
||||
pwd
|
||||
whoami
|
||||
# install apache web server
|
||||
a2query -s
|
||||
a2query -m
|
||||
ls /etc/apache2/sites-available
|
||||
#sudo cp -f $GITHUB_WORKSPACE/build/travis-ci/apache-githubaction.conf /etc/apache2/sites-available/000-default.conf
|
||||
#sudo sed -e "s?%GITHUB_WORKSPACE%?$(pwd)?g" --in-place /etc/apache2/sites-available/000-default.conf
|
||||
a2ensite 000-default
|
||||
a2enmod php7.1
|
||||
ls /etc/apache2/sites-enabled
|
||||
sudo adduser $(whoami) www-data
|
||||
sudo adduser $(whoami) root
|
||||
sudo adduser root www-data
|
||||
sudo chown -R www-data:www-data /etc/apache2/sites-available/
|
||||
sudo chmod -R 777 /etc/apache2/sites-available/
|
||||
sudo chown -R www-data:www-data /var/www/html/
|
||||
ls -l /var/www/html
|
||||
#ls -l /var/www/html/conf
|
||||
#ls -l /var/www/html/install/
|
||||
set +e
|
||||
sudo cat /etc/apache2/sites-enabled/000-default.conf
|
||||
sudo service apache2 restart
|
||||
curl -I localhost
|
||||
- name: Check Apache availability
|
||||
run: |
|
||||
echo "Checking webserver availability by a wget -O - --debug http://127.0.0.1"
|
||||
# Ensure we stop on error with set -e
|
||||
set +e
|
||||
ls /var/log/apache2
|
||||
#wget -O - --debug http://127.0.0.1/robots.txt
|
||||
# The wget should return a page with line '<meta name="generator" content="Dolibarr installer">
|
||||
wget -O - --debug http://127.0.0.1 > $GITHUB_WORKSPACE/test.html 2>&1
|
||||
head -n 200 $GITHUB_WORKSPACE/test.html
|
||||
|
||||
echo Logs are...
|
||||
#sudo cat /tmp/install.log
|
||||
sudo cat /var/log/apache2/access.log
|
||||
sudo cat /var/log/apache2/error.log
|
||||
sudo cat /var/log/apache2/other_vhosts_access.log
|
||||
set +e
|
||||
|
||||
- name: Upgrading Dolibarr
|
||||
run: |
|
||||
# Ensure we catch errors. Set this to +e if you want to go to the end to see log files.
|
||||
set -e
|
||||
sudo chmod -R a+rwx $GITHUB_WORKSPACE
|
||||
sudo chmod -R a+rwx /var/www
|
||||
ls -l /var/www
|
||||
cd /var/www/html/install
|
||||
|
||||
echo Execute upgrade, upgrade2 and step5 for each major version
|
||||
php upgrade.php 3.5.0 3.6.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade350360.log
|
||||
php upgrade2.php 3.5.0 3.6.0 > $GITHUB_WORKSPACE/upgrade350360-2.log
|
||||
php step5.php 3.5.0 3.6.0 > $GITHUB_WORKSPACE/upgrade350360-3.log
|
||||
php upgrade.php 3.6.0 3.7.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade360370.log
|
||||
php upgrade2.php 3.6.0 3.7.0 > $GITHUB_WORKSPACE/upgrade360370-2.log
|
||||
php step5.php 3.6.0 3.7.0 > $GITHUB_WORKSPACE/upgrade360370-3.log
|
||||
php upgrade.php 3.7.0 3.8.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade370380.log
|
||||
php upgrade2.php 3.7.0 3.8.0 > $GITHUB_WORKSPACE/upgrade370380-2.log
|
||||
php step5.php 3.7.0 3.8.0 > $GITHUB_WORKSPACE/upgrade370380-3.log
|
||||
php upgrade.php 3.8.0 3.9.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade380390.log
|
||||
php upgrade2.php 3.8.0 3.9.0 > $GITHUB_WORKSPACE/upgrade380390-2.log
|
||||
php step5.php 3.8.0 3.9.0 > $GITHUB_WORKSPACE/upgrade380390-3.log
|
||||
php upgrade.php 3.9.0 4.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade390400.log
|
||||
php upgrade2.php 3.9.0 4.0.0 > $GITHUB_WORKSPACE/upgrade390400-2.log
|
||||
php step5.php 3.9.0 4.0.0 > $GITHUB_WORKSPACE/upgrade390400-3.log
|
||||
php upgrade.php 4.0.0 5.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade400500.log
|
||||
php upgrade2.php 4.0.0 5.0.0 > $GITHUB_WORKSPACE/upgrade400500-2.log
|
||||
php step5.php 4.0.0 5.0.0 > $GITHUB_WORKSPACE/upgrade400500-3.log
|
||||
php upgrade.php 5.0.0 6.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade500600.log
|
||||
php upgrade2.php 5.0.0 6.0.0 > $GITHUB_WORKSPACE/upgrade500600-2.log
|
||||
php step5.php 5.0.0 6.0.0 > $GITHUB_WORKSPACE/upgrade500600-3.log
|
||||
php upgrade.php 6.0.0 7.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade600700.log
|
||||
php upgrade2.php 6.0.0 7.0.0 > $GITHUB_WORKSPACE/upgrade600700-2.log
|
||||
php step5.php 6.0.0 7.0.0 > $GITHUB_WORKSPACE/upgrade600700-3.log
|
||||
|
||||
echo "\dt llx_c_paiement" | psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis'
|
||||
echo "\dt llx_c_payment_term" | psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis'
|
||||
|
||||
php upgrade.php 7.0.0 8.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade700800.log
|
||||
php upgrade2.php 7.0.0 8.0.0 > $GITHUB_WORKSPACE/upgrade700800-2.log
|
||||
php step5.php 7.0.0 8.0.0 > $GITHUB_WORKSPACE/upgrade700800-3.log
|
||||
php upgrade.php 8.0.0 9.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade800900.log
|
||||
php upgrade2.php 8.0.0 9.0.0 > $GITHUB_WORKSPACE/upgrade800900-2.log
|
||||
php step5.php 8.0.0 9.0.0 > $GITHUB_WORKSPACE/upgrade800900-3.log
|
||||
php upgrade.php 9.0.0 10.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade9001000.log
|
||||
php upgrade2.php 9.0.0 10.0.0 > $GITHUB_WORKSPACE/upgrade9001000-2.log
|
||||
php step5.php 9.0.0 10.0.0 > $GITHUB_WORKSPACE/upgrade9001000-3.log
|
||||
php upgrade.php 10.0.0 11.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade10001100.log
|
||||
php upgrade2.php 10.0.0 11.0.0 > $GITHUB_WORKSPACE/upgrade10001100-2.log
|
||||
php step5.php 10.0.0 11.0.0 > $GITHUB_WORKSPACE/upgrade10001100-3.log
|
||||
php upgrade.php 11.0.0 12.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade11001200.log
|
||||
php upgrade2.php 11.0.0 12.0.0 > $GITHUB_WORKSPACE/upgrade11001200-2.log
|
||||
php step5.php 11.0.0 12.0.0 > $GITHUB_WORKSPACE/upgrade11001200-3.log
|
||||
php upgrade.php 12.0.0 13.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade12001300.log
|
||||
php upgrade2.php 12.0.0 13.0.0 > $GITHUB_WORKSPACE/upgrade12001300-2.log
|
||||
php step5.php 12.0.0 13.0.0 > $GITHUB_WORKSPACE/upgrade12001300-3.log
|
||||
php upgrade.php 13.0.0 14.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade13001400.log
|
||||
php upgrade2.php 13.0.0 14.0.0 > $GITHUB_WORKSPACE/upgrade13001400-2.log
|
||||
php step5.php 13.0.0 14.0.0 > $GITHUB_WORKSPACE/upgrade13001400-3.log
|
||||
php upgrade.php 14.0.0 15.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade14001500.log
|
||||
php upgrade2.php 14.0.0 15.0.0 > $GITHUB_WORKSPACE/upgrade14001500-2.log
|
||||
php step5.php 14.0.0 15.0.0 > $GITHUB_WORKSPACE/upgrade14001500-3.log
|
||||
php upgrade.php 15.0.0 16.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade15001600.log
|
||||
php upgrade2.php 15.0.0 16.0.0 > $GITHUB_WORKSPACE/upgrade15001600-2.log
|
||||
php step5.php 15.0.0 16.0.0 > $GITHUB_WORKSPACE/upgrade15001600-3.log
|
||||
php upgrade.php 16.0.0 17.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade16001700.log
|
||||
php upgrade2.php 16.0.0 17.0.0 > $GITHUB_WORKSPACE/upgrade16001700-2.log
|
||||
php step5.php 16.0.0 17.0.0 > $GITHUB_WORKSPACE/upgrade16001700-3.log
|
||||
php upgrade.php 17.0.0 18.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade17001800.log
|
||||
php upgrade2.php 17.0.0 18.0.0 > $GITHUB_WORKSPACE/upgrade17001800-2.log
|
||||
php step5.php 17.0.0 18.0.0 > $GITHUB_WORKSPACE/upgrade17001800-3.log
|
||||
|
||||
- name: Result of migration scripts
|
||||
if: always()
|
||||
run: |
|
||||
ls -alrt $GITHUB_WORKSPACE/
|
||||
|
||||
echo Show content of last file
|
||||
cat "$(ls -rt $GITHUB_WORKSPACE/ | tail -n1)"
|
||||
|
||||
- name: Enabling new modules
|
||||
run: |
|
||||
# Enable modules not enabled into original dump
|
||||
set -e
|
||||
cd /var/www/html/install
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_API,MAIN_MODULE_ProductBatch,MAIN_MODULE_SupplierProposal,MAIN_MODULE_STRIPE,MAIN_MODULE_ExpenseReport > $GITHUB_WORKSPACE/enablemodule.log
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_WEBSITE,MAIN_MODULE_TICKET,MAIN_MODULE_ACCOUNTING,MAIN_MODULE_MRP >> $GITHUB_WORKSPACE/enablemodule.log
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_RECEPTION,MAIN_MODULE_RECRUITMENT >> $GITHUB_WORKSPACE/enablemodule.log
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_KnowledgeManagement,MAIN_MODULE_EventOrganization,MAIN_MODULE_PARTNERSHIP >> $GITHUB_WORKSPACE/enablemodule.log
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_EmailCollector >> $GITHUB_WORKSPACE/enablemodule.log
|
||||
echo $?
|
||||
cd -
|
||||
|
||||
- name: Result of enabling modules scripts
|
||||
if: always()
|
||||
run: |
|
||||
echo Show content of enablemodule.log file
|
||||
cat $GITHUB_WORKSPACE/enablemodule.log
|
||||
|
||||
- name: Unit testing
|
||||
run: |
|
||||
# Ensure we catch errors. Set this to +e instead of -e if you want to go to the end to see dolibarr.log file.
|
||||
set -e
|
||||
cd /var/www/html
|
||||
sudo chmod -R a+rwx /var/www/html/documents
|
||||
includes/bin/phpunit -d memory_limit=-1 -c /var/www/test/phpunit/phpunittest.xml /var/www/test/phpunit/AllTests.php
|
||||
phpunitresult=$?
|
||||
echo "Phpunit return code = $phpunitresult"
|
||||
set +e
|
||||
|
||||
334
.github/workflows/github_ci_php81_mysql.yml.disabled
vendored
Normal file
334
.github/workflows/github_ci_php81_mysql.yml.disabled
vendored
Normal file
|
|
@ -0,0 +1,334 @@
|
|||
name: GitHub CI PHP 8.1 MySQL
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- develop
|
||||
- 1*
|
||||
- 2*
|
||||
pull_request:
|
||||
types: [opened]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
github_ci_php81_mysql:
|
||||
runs-on: ubuntu-latest
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:5.7
|
||||
env:
|
||||
MYSQL_ROOT_PASSWORD: password
|
||||
ports:
|
||||
- 32574:3306
|
||||
|
||||
steps:
|
||||
# git clone dolibarr into GITHUB_WORKSPACE = /home/runner/work/dolibarr/dolibarr
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Version PHP
|
||||
run: |
|
||||
php -i | head -
|
||||
|
||||
- name: Install packages for PHP 8.1
|
||||
run: |
|
||||
sudo composer self-update 2.2.18
|
||||
sudo chmod -R a+rwx /home/runner
|
||||
composer -n config -g vendor-dir htdocs/includes
|
||||
|
||||
sudo add-apt-repository -y ppa:ondrej/php
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y pgloader memcached
|
||||
sudo apt install apache2 php8.1 php8.1-cli php8.1-curl php8.1-mysql php8.1-pgsql php8.1-gd php8.1-imap php8.1-intl php8.1-ldap php8.1-xml php8.1-mbstring php8.1-xml php8.1-zip libapache2-mod-php8.1
|
||||
sudo update-alternatives --set php /usr/bin/php8.1
|
||||
php -i | head -
|
||||
|
||||
cd $GITHUB_WORKSPACE
|
||||
ls $GITHUB_WORKSPACE
|
||||
composer -n require --ignore-platform-reqs phpunit/phpunit ^8 \
|
||||
php-parallel-lint/php-parallel-lint ^1.2 \
|
||||
php-parallel-lint/php-console-highlighter ^0 \
|
||||
php-parallel-lint/php-var-dump-check ~0.4 \
|
||||
squizlabs/php_codesniffer ^3
|
||||
sudo rm -fr htdocs/includes/phpunit/php-code-coverage/src/Report/Html
|
||||
|
||||
- name: Adding path of binaries tools installed by composer to the PATH
|
||||
run: |
|
||||
export PATH="$GITHUB_WORKSPACE/htdocs/includes/bin:$PATH"
|
||||
echo $PATH
|
||||
# We must have a directory bin created by the previous composer call
|
||||
ls $GITHUB_WORKSPACE/htdocs/includes/bin
|
||||
|
||||
- name: Version information
|
||||
run: |
|
||||
composer -V
|
||||
# Check Parallel-lint version
|
||||
echo "Parallel-lint version"
|
||||
htdocs/includes/bin/parallel-lint -V
|
||||
# Check PHP CodeSniffer version
|
||||
echo "PHPCS version"
|
||||
htdocs/includes/bin/phpcs --version | head -
|
||||
htdocs/includes/bin/phpcs -i | head -
|
||||
# Check PHP Vardump check version
|
||||
echo "PHP Vardump check version"
|
||||
htdocs/includes/bin/var-dump-check --version
|
||||
# Check PHPUnit version
|
||||
echo "PHPUnit version"
|
||||
htdocs/includes/bin/phpunit --version | head -
|
||||
# Check Apache version
|
||||
echo "Apache version"
|
||||
apache2 -v | head -
|
||||
# Check Database
|
||||
echo "Database version"
|
||||
mysql --version | head -
|
||||
psql --version
|
||||
echo "Check pgloader version"
|
||||
pgloader --version
|
||||
|
||||
- name: Create database
|
||||
run: |
|
||||
pwd
|
||||
echo GITHUB_WORKSPACE = $GITHUB_WORKSPACE
|
||||
sudo apt-get install -y mysql-client
|
||||
mysql --version | head -
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "SELECT VERSION();" | head -
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "SHOW DATABASES"
|
||||
|
||||
echo "Drop and create database"
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'DROP DATABASE IF EXISTS travis;'
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "CREATE DATABASE IF NOT EXISTS travis CHARACTER SET = 'utf8';"
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "CREATE USER 'travis'@'127.0.0.1' IDENTIFIED BY 'password';"
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;'
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'FLUSH PRIVILEGES;'
|
||||
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
|
||||
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -D travis -e "UPDATE llx_const set value = '0666' WHERE name = 'MAIN_UMASK';"
|
||||
|
||||
- name: Generate Dolibarr conf file
|
||||
run: |
|
||||
export CONF_FILE=$GITHUB_WORKSPACE/htdocs/conf/conf.php
|
||||
echo "Setting up Dolibarr $CONF_FILE"
|
||||
echo '<?php' > $CONF_FILE
|
||||
echo '$'dolibarr_main_url_root=\'http://127.0.0.1\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_document_root=\'/var/www/html\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_data_root=\'/var/www/html/documents\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_host=\'127.0.0.1\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_name=\'travis\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_user=\'root\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_pass=\'password\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_instance_unique_id=\'travis1234567890\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_type=\'mysqli\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_port=\'32574\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_authentication=\'dolibarr\'';' >> $CONF_FILE
|
||||
cat $CONF_FILE
|
||||
- name: Generate install.forced.php file to test installation
|
||||
run: |
|
||||
export INSTALL_FORCED_FILE=$GITHUB_WORKSPACE/htdocs/install/install.forced.php
|
||||
echo "Setting up Dolibarr $INSTALL_FORCED_FILE to test installation"
|
||||
# Ensure we catch errors
|
||||
set +e
|
||||
echo '<?php' > $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_noedit=2';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_type=\'mysqli\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_dbserver=\'127.0.0.1\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_database=\'travis\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_databaselogin=\'root\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_databasepass=\'password\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_port=\'32574\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_prefix=\'llx_\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_createdatabase=false';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_createuser=false';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_mainforcehttps=false';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_main_data_root=\'/var/www/html\'';' >> $INSTALL_FORCED_FILE
|
||||
cat $INSTALL_FORCED_FILE
|
||||
|
||||
- name: Create document directory
|
||||
run: |
|
||||
echo "Create documents directory and set permissions"
|
||||
# and admin/temp subdirectory needed for unit tests
|
||||
sudo mkdir -p /var/www/html/documents/admin/temp
|
||||
sudo chmod -R a+rwx /var/www/html/documents
|
||||
sudo echo "***** First line of dolibarr.log" > /var/www/html/documents/dolibarr.log
|
||||
sudo chmod a+rwx /var/www/html/documents/dolibarr.log
|
||||
|
||||
- name: Copy app into /var/www
|
||||
run: |
|
||||
sudo cp -r $GITHUB_WORKSPACE/htdocs/. /var/www/html
|
||||
sudo mv /var/www/html/index.html /var/www/html/index.disabled.html
|
||||
sudo ln -fs /var/www/html /var/www/htdocs
|
||||
sudo cp -r $GITHUB_WORKSPACE/test/. /var/www/test
|
||||
sudo cp -r $GITHUB_WORKSPACE/dev/. /var/www/dev
|
||||
sudo cp -r $GITHUB_WORKSPACE/scripts/. /var/www/scripts
|
||||
|
||||
- name: Setup Apache
|
||||
run: |
|
||||
pwd
|
||||
whoami
|
||||
# install apache web server
|
||||
a2query -s
|
||||
a2query -m
|
||||
ls /etc/apache2/sites-available
|
||||
#sudo cp -f $GITHUB_WORKSPACE/build/travis-ci/apache-githubaction.conf /etc/apache2/sites-available/000-default.conf
|
||||
#sudo sed -e "s?%GITHUB_WORKSPACE%?$(pwd)?g" --in-place /etc/apache2/sites-available/000-default.conf
|
||||
a2ensite 000-default
|
||||
a2enmod php8.1
|
||||
ls /etc/apache2/sites-enabled
|
||||
sudo adduser $(whoami) www-data
|
||||
sudo adduser $(whoami) root
|
||||
sudo adduser root www-data
|
||||
sudo chown -R www-data:www-data /etc/apache2/sites-available/
|
||||
sudo chmod -R 777 /etc/apache2/sites-available/
|
||||
sudo chown -R www-data:www-data /var/www/html/
|
||||
ls -l /var/www/html
|
||||
#ls -l /var/www/html/conf
|
||||
#ls -l /var/www/html/install/
|
||||
set +e
|
||||
sudo cat /etc/apache2/sites-enabled/000-default.conf
|
||||
sudo service apache2 restart
|
||||
curl -I localhost
|
||||
- name: Check Apache availability
|
||||
run: |
|
||||
echo "Checking webserver availability by a wget -O - --debug http://127.0.0.1"
|
||||
# Ensure we stop on error with set -e
|
||||
set +e
|
||||
ls /var/log/apache2
|
||||
#wget -O - --debug http://127.0.0.1/robots.txt
|
||||
# The wget should return a page with line '<meta name="generator" content="Dolibarr installer">
|
||||
wget -O - --debug http://127.0.0.1 > $GITHUB_WORKSPACE/test.html 2>&1
|
||||
head -n 200 $GITHUB_WORKSPACE/test.html
|
||||
|
||||
echo Logs are...
|
||||
#sudo cat /tmp/install.log
|
||||
sudo cat /var/log/apache2/access.log
|
||||
sudo cat /var/log/apache2/error.log
|
||||
sudo cat /var/log/apache2/other_vhosts_access.log
|
||||
set +e
|
||||
|
||||
- name: Upgrading Dolibarr
|
||||
run: |
|
||||
# Ensure we catch errors. Set this to +e if you want to go to the end to see log files.
|
||||
set -e
|
||||
sudo chmod -R a+rwx $GITHUB_WORKSPACE
|
||||
sudo chmod -R a+rwx /var/www
|
||||
ls -l /var/www
|
||||
cd /var/www/html/install
|
||||
echo Execute upgrade, upgrade2 and step5 for each major version
|
||||
php upgrade.php 3.5.0 3.6.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade350360.log
|
||||
php upgrade2.php 3.5.0 3.6.0 > $GITHUB_WORKSPACE/upgrade350360-2.log
|
||||
php step5.php 3.5.0 3.6.0 > $GITHUB_WORKSPACE/upgrade350360-3.log
|
||||
php upgrade.php 3.6.0 3.7.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade360370.log
|
||||
php upgrade2.php 3.6.0 3.7.0 > $GITHUB_WORKSPACE/upgrade360370-2.log
|
||||
php step5.php 3.6.0 3.7.0 > $GITHUB_WORKSPACE/upgrade360370-3.log
|
||||
php upgrade.php 3.7.0 3.8.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade370380.log
|
||||
php upgrade2.php 3.7.0 3.8.0 > $GITHUB_WORKSPACE/upgrade370380-2.log
|
||||
php step5.php 3.7.0 3.8.0 > $GITHUB_WORKSPACE/upgrade370380-3.log
|
||||
php upgrade.php 3.8.0 3.9.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade380390.log
|
||||
php upgrade2.php 3.8.0 3.9.0 > $GITHUB_WORKSPACE/upgrade380390-2.log
|
||||
php step5.php 3.8.0 3.9.0 > $GITHUB_WORKSPACE/upgrade380390-3.log
|
||||
php upgrade.php 3.9.0 4.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade390400.log
|
||||
php upgrade2.php 3.9.0 4.0.0 > $GITHUB_WORKSPACE/upgrade390400-2.log
|
||||
php step5.php 3.9.0 4.0.0 > $GITHUB_WORKSPACE/upgrade390400-3.log
|
||||
php upgrade.php 4.0.0 5.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade400500.log
|
||||
php upgrade2.php 4.0.0 5.0.0 > $GITHUB_WORKSPACE/upgrade400500-2.log
|
||||
php step5.php 4.0.0 5.0.0 > $GITHUB_WORKSPACE/upgrade400500-3.log
|
||||
php upgrade.php 5.0.0 6.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade500600.log
|
||||
php upgrade2.php 5.0.0 6.0.0 > $GITHUB_WORKSPACE/upgrade500600-2.log
|
||||
php step5.php 5.0.0 6.0.0 > $GITHUB_WORKSPACE/upgrade500600-3.log
|
||||
php upgrade.php 6.0.0 7.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade600700.log
|
||||
php upgrade2.php 6.0.0 7.0.0 > $GITHUB_WORKSPACE/upgrade600700-2.log
|
||||
php step5.php 6.0.0 7.0.0 > $GITHUB_WORKSPACE/upgrade600700-3.log
|
||||
php upgrade.php 7.0.0 8.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade700800.log
|
||||
php upgrade2.php 7.0.0 8.0.0 > $GITHUB_WORKSPACE/upgrade700800-2.log
|
||||
php step5.php 7.0.0 8.0.0 > $GITHUB_WORKSPACE/upgrade700800-3.log
|
||||
php upgrade.php 8.0.0 9.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade800900.log
|
||||
php upgrade2.php 8.0.0 9.0.0 > $GITHUB_WORKSPACE/upgrade800900-2.log
|
||||
php step5.php 8.0.0 9.0.0 > $GITHUB_WORKSPACE/upgrade800900-3.log
|
||||
php upgrade.php 9.0.0 10.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade9001000.log
|
||||
php upgrade2.php 9.0.0 10.0.0 > $GITHUB_WORKSPACE/upgrade9001000-2.log
|
||||
php step5.php 9.0.0 10.0.0 > $GITHUB_WORKSPACE/upgrade9001000-3.log
|
||||
php upgrade.php 10.0.0 11.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade10001100.log
|
||||
php upgrade2.php 10.0.0 11.0.0 > $GITHUB_WORKSPACE/upgrade10001100-2.log
|
||||
php step5.php 10.0.0 11.0.0 > $GITHUB_WORKSPACE/upgrade10001100-3.log
|
||||
php upgrade.php 11.0.0 12.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade11001200.log
|
||||
php upgrade2.php 11.0.0 12.0.0 > $GITHUB_WORKSPACE/upgrade11001200-2.log
|
||||
php step5.php 11.0.0 12.0.0 > $GITHUB_WORKSPACE/upgrade11001200-3.log
|
||||
php upgrade.php 12.0.0 13.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade12001300.log
|
||||
php upgrade2.php 12.0.0 13.0.0 > $GITHUB_WORKSPACE/upgrade12001300-2.log
|
||||
php step5.php 12.0.0 13.0.0 > $GITHUB_WORKSPACE/upgrade12001300-3.log
|
||||
php upgrade.php 13.0.0 14.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade13001400.log
|
||||
php upgrade2.php 13.0.0 14.0.0 > $GITHUB_WORKSPACE/upgrade13001400-2.log
|
||||
php step5.php 13.0.0 14.0.0 > $GITHUB_WORKSPACE/upgrade13001400-3.log
|
||||
php upgrade.php 14.0.0 15.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade14001500.log
|
||||
php upgrade2.php 14.0.0 15.0.0 > $GITHUB_WORKSPACE/upgrade14001500-2.log
|
||||
php step5.php 14.0.0 15.0.0 > $GITHUB_WORKSPACE/upgrade14001500-3.log
|
||||
php upgrade.php 15.0.0 16.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade15001600.log
|
||||
php upgrade2.php 15.0.0 16.0.0 > $GITHUB_WORKSPACE/upgrade15001600-2.log
|
||||
php step5.php 15.0.0 16.0.0 > $GITHUB_WORKSPACE/upgrade15001600-3.log
|
||||
php upgrade.php 16.0.0 17.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade16001700.log
|
||||
php upgrade2.php 16.0.0 17.0.0 > $GITHUB_WORKSPACE/upgrade16001700-2.log
|
||||
php step5.php 16.0.0 17.0.0 > $GITHUB_WORKSPACE/upgrade16001700-3.log
|
||||
php upgrade.php 17.0.0 18.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade17001800.log
|
||||
php upgrade2.php 17.0.0 18.0.0 > $GITHUB_WORKSPACE/upgrade17001800-2.log
|
||||
php step5.php 17.0.0 18.0.0 > $GITHUB_WORKSPACE/upgrade17001800-3.log
|
||||
|
||||
- name: Result of migration scripts
|
||||
if: always()
|
||||
run: |
|
||||
ls -alrt $GITHUB_WORKSPACE/
|
||||
|
||||
echo Show content of last file
|
||||
cat "$(ls -rt $GITHUB_WORKSPACE/ | tail -n1)"
|
||||
|
||||
- name: Enabling new modules
|
||||
run: |
|
||||
# Enable modules not enabled into original dump
|
||||
set -e
|
||||
cd /var/www/html/install
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_API,MAIN_MODULE_ProductBatch,MAIN_MODULE_SupplierProposal,MAIN_MODULE_STRIPE,MAIN_MODULE_ExpenseReport > $GITHUB_WORKSPACE/enablemodule.log
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_WEBSITE,MAIN_MODULE_TICKET,MAIN_MODULE_ACCOUNTING,MAIN_MODULE_MRP >> $GITHUB_WORKSPACE/enablemodule.log
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_RECEPTION,MAIN_MODULE_RECRUITMENT >> $GITHUB_WORKSPACE/enablemodule.log
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_KnowledgeManagement,MAIN_MODULE_EventOrganization,MAIN_MODULE_PARTNERSHIP >> $GITHUB_WORKSPACE/enablemodule.log
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_EmailCollector >> $GITHUB_WORKSPACE/enablemodule.log
|
||||
echo $?
|
||||
cd -
|
||||
|
||||
- name: Result of enabling modules scripts
|
||||
if: always()
|
||||
run: |
|
||||
echo Show content of enablemodule.log file
|
||||
cat $GITHUB_WORKSPACE/enablemodule.log
|
||||
|
||||
- name: Unit testing
|
||||
run: |
|
||||
# Ensure we catch errors. Set this to +e instead of -e if you want to go to the end to see dolibarr.log file.
|
||||
set -e
|
||||
cd /var/www/html
|
||||
sudo chmod -R a+rwx /var/www/html/documents
|
||||
includes/bin/phpunit -d memory_limit=-1 -c /var/www/test/phpunit/phpunittest.xml /var/www/test/phpunit/AllTests.php
|
||||
phpunitresult=$?
|
||||
echo "Phpunit return code = $phpunitresult"
|
||||
set +e
|
||||
|
||||
- name: Code quality check - Lint
|
||||
if: github.event_name == 'push'
|
||||
run: |
|
||||
htdocs/includes/bin/parallel-lint -e php --exclude dev/tools/test/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes \
|
||||
--exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian \
|
||||
--exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/php-parallel-lint --exclude htdocs/includes/symfony \
|
||||
--exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \
|
||||
--exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --exclude htdocs/includes/webklex --blame .
|
||||
|
||||
- name: Code quality check - phpcs
|
||||
if: github.event_name == 'push'
|
||||
run: |
|
||||
htdocs/includes/bin/phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .;
|
||||
|
||||
- name: Code quality check - var-dump-check
|
||||
if: github.event_name == 'push'
|
||||
run: |
|
||||
htdocs/includes/bin/var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php .
|
||||
|
||||
30
.github/workflows/phpcs.yml
vendored
Normal file
30
.github/workflows/phpcs.yml
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
name: "PHPCS"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- "**.php"
|
||||
- "phpcs.xml"
|
||||
- ".github/workflows/phpcs.yml"
|
||||
|
||||
jobs:
|
||||
phpcs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 50 # important!
|
||||
|
||||
# we may use whatever way to install phpcs, just specify the path on the next step
|
||||
# however, curl seems to be the fastest
|
||||
- name: Install PHP_CodeSniffer
|
||||
run: |
|
||||
curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar
|
||||
php phpcs.phar --version
|
||||
|
||||
- uses: thenabeel/action-phpcs@v8
|
||||
with:
|
||||
files: "**.php" # you may customize glob as needed
|
||||
phpcs_path: php phpcs.phar
|
||||
standard: dev/setup/codesniffer/ruleset.xml
|
||||
fail_on_warnings: false
|
||||
63
.github/workflows/phpcsfixer.yml.disabled
vendored
Normal file
63
.github/workflows/phpcsfixer.yml.disabled
vendored
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
name: GitHub CI PHPCS and PHPCBF
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened]
|
||||
#on:
|
||||
# push:
|
||||
# paths:
|
||||
# - '**.php'
|
||||
|
||||
jobs:
|
||||
#filesChanged:
|
||||
# uses: ./.github/workflows/files_changed.yaml
|
||||
# with:
|
||||
# folder_path: .*
|
||||
|
||||
linter_name:
|
||||
name: Run & fix PHP Code Sniffer
|
||||
runs-on: ubuntu-latest
|
||||
#needs: filesChanged
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
ref: ${{ github.event.pull_request.head.ref }}
|
||||
# fetch-depth: 10
|
||||
|
||||
- name: echo Get list of all changed files
|
||||
run: |
|
||||
#echo ${{ needs.filesChanged.outputs.all_changed_files }}
|
||||
#echo boolean_output=${{ needs.filesChanged.outputs.boolean_output }}
|
||||
echo github.head_ref=${{github.head_ref}}
|
||||
echo github.base_ref=${{github.base_ref}}
|
||||
echo github.ref_name=${{github.ref_name}}
|
||||
|
||||
- uses: eldy/phpcsfixer-action@master
|
||||
with:
|
||||
github_token: ${{ secrets.github_token }}
|
||||
use_default_configuration_file: false
|
||||
phpcs_standard: 'dev/setup/codesniffer/ruleset.xml'
|
||||
phpcs_head_ref: ${{github.head_ref}}
|
||||
phpcs_base_ref: ${{github.base_ref}}
|
||||
phpcs_ref_name: ${{github.ref_name}}
|
||||
phpcs_github_event_name: ${{github.event_name}}
|
||||
phpcs_files: ${{ needs.filesChanged.outputs.all_changed_files }}
|
||||
|
||||
#- uses: stefanzweifel/git-auto-commit-action@v4 # auto commit the fixes action for GitHub
|
||||
# with:
|
||||
# commit_message: Fix PHPCS errors by GitHub PHPCSfixer action
|
||||
|
||||
- name: Commit changes
|
||||
uses: EndBug/add-and-commit@v9.1.3
|
||||
with:
|
||||
default_author: github_actions
|
||||
committer_name: GitHub Actions
|
||||
committer_email: actions@github.com
|
||||
#author_name: PHP CS fixer
|
||||
#author_email: eldy@destailleur.fr
|
||||
#committer_name: PHP CS fixer
|
||||
#committer_email: eldy@destailleur.fr
|
||||
message: 'PHP CS fixer github action'
|
||||
add: '*.php'
|
||||
|
||||
7
.github/workflows/stale-issues-safe.yml
vendored
7
.github/workflows/stale-issues-safe.yml
vendored
|
|
@ -6,9 +6,14 @@ on:
|
|||
- cron: "0 21 * * *"
|
||||
issue_comment:
|
||||
types: [created]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: {} # none
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
permissions:
|
||||
issues: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: Dolibarr/stale@staleunstale
|
||||
|
|
@ -21,4 +26,4 @@ jobs:
|
|||
days-before-close: 10
|
||||
operations-per-run: 100
|
||||
dry-run: false
|
||||
|
||||
|
||||
|
|
|
|||
25
.github/workflows/stale-issues.yml.disabled
vendored
25
.github/workflows/stale-issues.yml.disabled
vendored
|
|
@ -1,25 +0,0 @@
|
|||
# See syntax file on https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
|
||||
name: "Close stale issues (bugs and feature requests)"
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 20 * * *"
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: Dolibarr/stale@master
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-issue-message: 'This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue may be closed automatically by stale bot in 15 days (you should still be able to re-open it if required).'
|
||||
stale-issue-label: 'Issue Stale (automatic label)'
|
||||
exempt-issue-label: 'Priority High / Blocking'
|
||||
days-before-stale: 365
|
||||
days-before-close: -1
|
||||
operations-per-run: 100
|
||||
#stale-pr-message: 'This PR is stale because it has been open 1 year with no activity. If this PR is still mergeable (no conflict, nor Continuous Integration errors), please comment to confirm this merge is still expected. Without comment, this issue will be closed automatically by stale bot in 15 days.'
|
||||
stale-pr-label: 'PR Stale (automatic label)'
|
||||
stale-pr-message:
|
||||
exempt-pr-label: 'Priority Top Strategic'
|
||||
|
||||
13
.gitignore
vendored
13
.gitignore
vendored
|
|
@ -14,11 +14,11 @@ default.properties
|
|||
/.pydevproject
|
||||
/.vscode
|
||||
.DS_Store
|
||||
.idea
|
||||
*.iml
|
||||
*.orig
|
||||
Thumbs.db
|
||||
/dolibarr_genesis.mp4
|
||||
.phpunit.result.cache
|
||||
# Log files
|
||||
dolibarr_install.log
|
||||
upgrade.log
|
||||
|
|
@ -57,3 +57,14 @@ yarn.lock
|
|||
package-lock.json
|
||||
|
||||
doc/install.lock
|
||||
/.asciidoctorconfig.adoc
|
||||
|
||||
.idea
|
||||
/composer.json
|
||||
/composer.lock
|
||||
|
||||
/build/phpstan/phpstan
|
||||
/build/phpstan/bootstrap_custom.php
|
||||
phpstan_custom.neon
|
||||
/.php-cs-fixer.cache
|
||||
/.php_cs.cache
|
||||
|
|
|
|||
6
.mailmap
6
.mailmap
|
|
@ -89,3 +89,9 @@ Baffir Abbes <bafbes@users.noreply.github.com> bafbes <bafbes@users.noreply.gith
|
|||
Kevin Guerrier <guerrier.k@gmail.com> GUERRIER Kevin <guerrier.k@gmail.com>
|
||||
Remy Younes <ryounes@gmail.com> remy <ryounes@gmail.com>
|
||||
Estephe Loridan <github@estephe.me> Estephe L. <github@estephe.me>
|
||||
Anthony Berton <anthony.berton@bb2a.fr> Anthony Berton <anthony.berton@bb2a.fr>
|
||||
Anthony Berton <anthony.berton@bb2a.fr> Berton Anthony <anthony.berton@bb2a.fr>
|
||||
Anthony Berton <anthony.berton@bb2a.fr> BB2A-Anthony <anthony.berton@bb2a.fr>
|
||||
Anthony Berton <anthony.berton@bb2a.fr> Anthony Berton <bertonanthony@gmail.com>
|
||||
Anthony Berton <anthony.berton@bb2a.fr> Berton Anthony <bertonanthony@gmail.com>
|
||||
Anthony Berton <anthony.berton@bb2a.fr> BB2A-Anthony <bertonanthony@gmail.com>
|
||||
63
.php-cs-fixer.dist.php
Normal file
63
.php-cs-fixer.dist.php
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
<?php
|
||||
|
||||
/* PHP 7.0 */
|
||||
$finder = (new PhpCsFixer\Finder())
|
||||
->in(__DIR__)
|
||||
->exclude([
|
||||
'core/includes',
|
||||
'custom',
|
||||
'documents',
|
||||
'doctemplates',
|
||||
'vendor',
|
||||
'install/doctemplates',
|
||||
'htdocs/custom',
|
||||
'htdocs/includes',
|
||||
'htdocs/install/doctemplates',
|
||||
])
|
||||
->notPath('vendor');
|
||||
|
||||
|
||||
/* PHP 7.4+ */
|
||||
/*
|
||||
$finder = (new PhpCsFixer\Finder())
|
||||
->in(__DIR__)
|
||||
->exclude([
|
||||
'custom',
|
||||
'documents',
|
||||
'htdocs/custom',
|
||||
'htdocs/includes',
|
||||
])
|
||||
->notPath([
|
||||
'vendor',
|
||||
]);
|
||||
*/
|
||||
|
||||
return (new PhpCsFixer\Config())
|
||||
->setRules([
|
||||
// Apply PSR-12 as per https://wiki.dolibarr.org/index.php?title=Langages_et_normes#PHP:~:text=utiliser%20est%20le-,PSR%2D12,-(https%3A//www
|
||||
'@PSR12' => true, // Disabled for now to limit number of changes
|
||||
|
||||
// Minimum version Dolibarr v18.0.0
|
||||
// Compatibility with min 7.1 is announced with Dolibarr18.0 but
|
||||
// app is still working with 7.0 so no reason to abandon compatiblity with this target for the moment.
|
||||
// So we use target PHP70 for the moment.
|
||||
'@PHP70Migration' => true,
|
||||
//'@PHP71Migration' => true,
|
||||
// Avoid adding public to const (incompatible with PHP 7.0):
|
||||
'visibility_required' => ['elements'=>['property', 'method']],
|
||||
|
||||
//'strict_param' => true,
|
||||
//'array_syntax' => ['syntax' => 'short'],
|
||||
//'list_syntax' => false,
|
||||
//'visibility_required' => false,
|
||||
'array_syntax' => false,
|
||||
'ternary_to_null_coalescing' => false
|
||||
])
|
||||
->setFinder($finder)
|
||||
// TAB Indent violates PSR-12 "must" rule, but used in code
|
||||
// (See https://www.php-fig.org/psr/psr-12/#24-indenting )
|
||||
->setIndent("\t")
|
||||
// All files MUST use the Unix LF line ending only
|
||||
// https://www.php-fig.org/psr/psr-12/#22-files
|
||||
->setLineEnding("\n")
|
||||
;
|
||||
13
.phpcs.xml.dist
Normal file
13
.phpcs.xml.dist
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0"?>
|
||||
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PHP_CodeSniffer" xsi:noNamespaceSchemaLocation="phpcs.xsd">
|
||||
<!--
|
||||
Documentation:
|
||||
https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-Ruleset
|
||||
-->
|
||||
|
||||
<rule ref="dev/setup/codesniffer/ruleset.xml"/>
|
||||
|
||||
<arg value="p"/>
|
||||
<arg name="colors"/>
|
||||
<arg name="extensions" value="php,inc" />
|
||||
</ruleset>
|
||||
222
.scrutinizer.yml
222
.scrutinizer.yml
|
|
@ -1,222 +0,0 @@
|
|||
# .scrutinizer.yml
|
||||
#build:
|
||||
# - php-scrutinizer-run
|
||||
build:
|
||||
nodes:
|
||||
analysis:
|
||||
tests:
|
||||
override:
|
||||
- php-scrutinizer-run
|
||||
|
||||
imports:
|
||||
- javascript
|
||||
- php
|
||||
|
||||
filter:
|
||||
excluded_paths:
|
||||
- build/*
|
||||
- dev/*
|
||||
- doc/*
|
||||
- documents/*
|
||||
- node_modules/*
|
||||
- test/*
|
||||
dependency_paths:
|
||||
- htdocs/includes/*
|
||||
paths:
|
||||
- htdocs/*
|
||||
- scripts/*
|
||||
|
||||
tools:
|
||||
# php_analyzer. Doc on https://scrutinizer-ci.com/docs/tools/php/php-analyzer/
|
||||
php_analyzer:
|
||||
enabled: true
|
||||
extensions:
|
||||
- php
|
||||
dependency_paths:
|
||||
- htdocs/includes/
|
||||
filter:
|
||||
excluded_paths:
|
||||
- build/*
|
||||
- dev/*
|
||||
- doc/*
|
||||
- test/*
|
||||
- htdocs/includes/*
|
||||
- htdocs/core/class/lessc.class.php
|
||||
paths:
|
||||
- htdocs/
|
||||
- scripts/
|
||||
config:
|
||||
parameter_reference_check:
|
||||
enabled: true
|
||||
checkstyle:
|
||||
enabled: false
|
||||
no_trailing_whitespace: true
|
||||
naming:
|
||||
enabled: true
|
||||
local_variable: ^[a-z][a-zA-Z0-9]*$
|
||||
abstract_class_name: ^Abstract|Factory$
|
||||
utility_class_name: Utils?$
|
||||
constant_name: ^[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)*$
|
||||
property_name: ^[a-z][a-zA-Z0-9]*$
|
||||
method_name: ^(?:[a-z]|__)[a-zA-Z0-9]*$
|
||||
parameter_name: ^[a-z][a-zA-Z0-9]*$
|
||||
interface_name: ^[A-Z][a-zA-Z0-9]*Interface$
|
||||
type_name: ^[A-Z][a-zA-Z0-9]*$
|
||||
exception_name: ^[A-Z][a-zA-Z0-9]*Exception$
|
||||
isser_method_name: ^(?:is|has|should|may|supports)
|
||||
unreachable_code:
|
||||
enabled: true
|
||||
check_access_control:
|
||||
enabled: true
|
||||
typo_checks:
|
||||
enabled: true
|
||||
check_variables:
|
||||
enabled: true
|
||||
check_calls:
|
||||
enabled: true
|
||||
too_many_arguments: true
|
||||
missing_argument: true
|
||||
argument_type_checks: lenient # Allowed Values: "disabled", "lenient", "strict"
|
||||
suspicious_code:
|
||||
enabled: true
|
||||
overriding_parameter: false
|
||||
overriding_closure_use: true
|
||||
parameter_closure_use_conflict: true
|
||||
parameter_multiple_times: true
|
||||
non_existent_class_in_instanceof_check: true
|
||||
non_existent_class_in_catch_clause: true
|
||||
assignment_of_null_return: true
|
||||
non_commented_switch_fallthrough: true
|
||||
non_commented_empty_catch_block: true
|
||||
overriding_private_members: true
|
||||
use_statement_alias_conflict: true
|
||||
precedence_in_condition_assignment: true
|
||||
dead_assignments:
|
||||
enabled: true
|
||||
verify_php_doc_comments:
|
||||
enabled: false
|
||||
parameters: true
|
||||
return: true
|
||||
suggest_more_specific_types: true
|
||||
ask_for_return_if_not_inferrable: true
|
||||
ask_for_param_type_annotation: true
|
||||
loops_must_use_braces:
|
||||
enabled: true
|
||||
check_usage_context:
|
||||
enabled: true
|
||||
simplify_boolean_return:
|
||||
enabled: false
|
||||
phpunit_checks:
|
||||
enabled: false
|
||||
reflection_checks:
|
||||
enabled: true
|
||||
|
||||
# Checks Common Precedence Mistakes
|
||||
precedence_checks:
|
||||
enabled: true
|
||||
assignment_in_condition: true
|
||||
comparison_of_bit_result: true
|
||||
basic_semantic_checks:
|
||||
enabled: true
|
||||
# Disabled unused code. In most cases, we want to keep it.
|
||||
unused_code:
|
||||
enabled: false
|
||||
deprecation_checks:
|
||||
enabled: true
|
||||
useless_function_calls:
|
||||
enabled: true
|
||||
metrics_lack_of_cohesion_methods:
|
||||
enabled: true
|
||||
metrics_coupling:
|
||||
enabled: true
|
||||
stable_code:
|
||||
namespace_prefixes: []
|
||||
classes: []
|
||||
doctrine_parameter_binding:
|
||||
enabled: false
|
||||
doctrine_entity_manager_injection:
|
||||
enabled: false
|
||||
symfony_request_injection:
|
||||
enabled: false
|
||||
doc_comment_fixes:
|
||||
enabled: true
|
||||
reflection_fixes:
|
||||
enabled: false
|
||||
use_statement_fixes:
|
||||
enabled: true
|
||||
remove_unused: true
|
||||
# Whether you would like multiple imports in one USE statement to be preserved, e.g. ``use A, B;``.
|
||||
preserve_multiple: false
|
||||
# Whether you would like to preserve blank lines between use statements.
|
||||
preserve_blanklines: false
|
||||
order_alphabetically: false
|
||||
# To use specific config for a specific path, use path_configs: (see example on page https://scrutinizer-ci.com/docs/configuration/tool_config_structure)
|
||||
|
||||
# php_depend
|
||||
php_pdepend:
|
||||
enabled: false
|
||||
configuration_file: null
|
||||
suffixes:
|
||||
- php
|
||||
excluded_dirs: { }
|
||||
filter:
|
||||
excluded_paths:
|
||||
- 'build/*'
|
||||
- 'dev/*'
|
||||
- 'doc/*'
|
||||
- 'test/*'
|
||||
- 'htdocs/includes/*'
|
||||
paths: { }
|
||||
|
||||
# change tracking
|
||||
php_changetracking:
|
||||
enabled: false
|
||||
bug_patterns:
|
||||
- '\bfix(?:es|ed)?\b'
|
||||
feature_patterns:
|
||||
- '\badd(?:s|ed)?\b'
|
||||
- '\bimplement(?:s|ed)?\b'
|
||||
filter:
|
||||
excluded_paths:
|
||||
- 'build/*'
|
||||
- 'dev/*'
|
||||
- 'doc/*'
|
||||
- 'test/*'
|
||||
- 'htdocs/includes/*'
|
||||
paths: { }
|
||||
|
||||
# Similar code detection
|
||||
php_sim:
|
||||
enabled: false
|
||||
min_mass: 30
|
||||
filter:
|
||||
excluded_paths:
|
||||
- 'build/*'
|
||||
- 'dev/*'
|
||||
- 'doc/*'
|
||||
- 'test/*'
|
||||
- 'htdocs/includes/*'
|
||||
paths: { }
|
||||
|
||||
# Coding-Style / Bug Detection
|
||||
js_hint:
|
||||
enabled: false
|
||||
use_native_config: true
|
||||
extensions:
|
||||
- js
|
||||
filter:
|
||||
excluded_paths:
|
||||
- 'build/*'
|
||||
- 'dev/*'
|
||||
- 'doc/*'
|
||||
- 'test/*'
|
||||
- 'htdocs/includes/*'
|
||||
paths: { }
|
||||
config: { }
|
||||
path_configs: { }
|
||||
|
||||
|
||||
before_commands: { }
|
||||
after_commands: { }
|
||||
artifacts: { }
|
||||
build_failure_conditions: { }
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
---
|
||||
linters:
|
||||
phpcs:
|
||||
standard: 'dev/setup/codesniffer/ruleset.xml'
|
||||
extensions: 'php'
|
||||
tab_width: 4
|
||||
fixer: true
|
||||
|
||||
fixers:
|
||||
enable: true
|
||||
|
||||
files:
|
||||
ignore:
|
||||
- 'htdocs/includes/*'
|
||||
729
.travis.yml
729
.travis.yml
|
|
@ -2,12 +2,13 @@
|
|||
# from Dolibarr GitHub repository.
|
||||
# For syntax, see https://docs.travis-ci.com/user/languages/php/
|
||||
|
||||
# We use dist: xenial to have php 5.6+ available
|
||||
# We use dist: bionic = 18.04, focal = 20.04
|
||||
os: linux
|
||||
dist: xenial
|
||||
#dist: bionic
|
||||
dist: focal
|
||||
|
||||
language: php
|
||||
language: generic
|
||||
|
||||
#scan_logs: false
|
||||
|
||||
git:
|
||||
depth: 1
|
||||
|
|
@ -15,51 +16,42 @@ git:
|
|||
# Start on every boot
|
||||
services:
|
||||
- memcached
|
||||
- mysql
|
||||
#- mysql
|
||||
- postgresql
|
||||
|
||||
|
||||
addons:
|
||||
# Force postgresql to 9.4 (the oldest availablable on xenial)
|
||||
postgresql: '9.4'
|
||||
apt:
|
||||
sources:
|
||||
# To use the last version of pgloader, we add repo of postgresql with a name available in http://apt.postgresql.org/pub/repos/apt/
|
||||
- pgdg-xenial
|
||||
packages:
|
||||
# We need a webserver to test the webservices
|
||||
# Let's install Apache with.
|
||||
- apache2
|
||||
# mod_php is not supported by Travis. Add fcgi. We install FPM later on.
|
||||
- libapache2-mod-fastcgi
|
||||
# We need pgloader for import mysql database into pgsql
|
||||
- pgloader
|
||||
mariadb: '10.5'
|
||||
|
||||
|
||||
env:
|
||||
global:
|
||||
# Set to true for very verbose output
|
||||
- DEBUG=false
|
||||
- DEBUG=true
|
||||
|
||||
jobs:
|
||||
fast_finish: true
|
||||
#allow_failures:
|
||||
#- php: nightly
|
||||
allow_failures:
|
||||
- php: '8.3'
|
||||
include:
|
||||
- stage: PHP 5.6-7.4
|
||||
- stage: PHP min and max
|
||||
if: type = push
|
||||
php: '5.6'
|
||||
env: DB=postgresql
|
||||
- stage: PHP 5.6-7.4
|
||||
php: '7.1'
|
||||
env:
|
||||
- DB=postgresql
|
||||
- TRAVIS_PHP_VERSION=7.1
|
||||
- stage: PHP min and max
|
||||
if: type = pull_request OR type = push
|
||||
php: '7.4.22'
|
||||
env: DB=mysql
|
||||
- stage: PHP Dev
|
||||
php: '8.2'
|
||||
env:
|
||||
- DB=mysql
|
||||
- TRAVIS_PHP_VERSION=8.2
|
||||
- stage: PHP 8.3
|
||||
if: type = push AND branch = develop
|
||||
php: nightly
|
||||
env: DB=mysql
|
||||
- stage: PHP Dev
|
||||
if: type = push AND branch = 15.0
|
||||
php: nightly
|
||||
env: DB=mysql
|
||||
php: '8.3'
|
||||
env:
|
||||
- DB=mysql
|
||||
- TRAVIS_PHP_VERSION=8.3
|
||||
|
||||
notifications:
|
||||
email:
|
||||
|
|
@ -72,64 +64,119 @@ notifications:
|
|||
on_failure: always
|
||||
use_notice: true
|
||||
|
||||
|
||||
before_install:
|
||||
- |
|
||||
echo "Disabling Xdebug for composer"
|
||||
export PHP_VERSION_NAME=$(phpenv version-name)
|
||||
cp ~/.phpenv/versions/$PHP_VERSION_NAME/etc/conf.d/xdebug.ini /tmp/xdebug.ini
|
||||
phpenv config-rm xdebug.ini
|
||||
echo
|
||||
echo "Remove awful phpenv and install packages"
|
||||
sudo rm -fr ~/.phpenv
|
||||
sudo rm -fr /root/.phpenv
|
||||
sudo add-apt-repository -y ppa:ondrej/php
|
||||
sudo apt-get update
|
||||
echo TRAVIS_PHP_VERSION=$TRAVIS_PHP_VERSION
|
||||
|
||||
- |
|
||||
echo Install packages for PHP
|
||||
sudo apt-get install -y pgloader memcached
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.1' ]; then
|
||||
sudo apt install unzip apache2 php7.1 php7.1-cli php7.1-curl php7.1-mysql php7.1-pgsql php7.1-gd php7.1-imap php7.1-intl php7.1-ldap php7.1-xml php7.1-mbstring php7.1-xml php7.1-zip libapache2-mod-php7.1
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '8.1' ]; then
|
||||
sudo apt install unzip apache2 php8.1 php8.1-cli php8.1-curl php8.1-mysql php8.1-pgsql php8.1-gd php8.1-imap php8.1-intl php8.1-ldap php8.1-xml php8.1-mbstring php8.1-xml php8.1-zip libapache2-mod-php8.1
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '8.2' ]; then
|
||||
sudo apt install unzip apache2 php8.2 php8.2-cli php8.2-curl php8.2-mysql php8.2-pgsql php8.2-gd php8.2-imap php8.2-intl php8.2-ldap php8.2-xml php8.2-mbstring php8.2-xml php8.2-zip libapache2-mod-php8.2
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '8.3' ]; then
|
||||
sudo apt install unzip apache2 php8.3 php8.3-cli php8.3-curl php8.3-mysql php8.3-pgsql php8.3-gd php8.3-imap php8.3-intl php8.3-ldap php8.3-xml php8.3-mbstring php8.3-xml php8.3-zip libapache2-mod-php8.3
|
||||
fi
|
||||
|
||||
- |
|
||||
echo Install pgsql if run is for pgsql
|
||||
if [ "$DB" = 'postgresql' ]; then
|
||||
echo "Check pgloader version"
|
||||
pgloader --version
|
||||
#ps fauxww | grep postgres
|
||||
ls /etc/postgresql/13/main/
|
||||
|
||||
sudo sed -i -e '/local.*peer/s/postgres/all/' -e 's/peer\|md5/trust/g' /etc/postgresql/13/main/pg_hba.conf
|
||||
sudo cat /etc/postgresql/13/main/pg_hba.conf
|
||||
|
||||
sudo service postgresql restart
|
||||
|
||||
psql postgresql://postgres:postgres@127.0.0.1:5432 -l -A
|
||||
|
||||
psql postgresql://postgres:postgres@127.0.0.1:5432 -c 'create database travis;'
|
||||
psql postgresql://postgres:postgres@127.0.0.1:5432 -c "CREATE USER travis WITH ENCRYPTED PASSWORD 'travis';"
|
||||
psql postgresql://postgres:postgres@127.0.0.1:5432 -c 'GRANT ALL PRIVILEGES ON DATABASE travis TO travis;'
|
||||
|
||||
psql postgresql://postgres:postgres@127.0.0.1:5432 -l -A
|
||||
fi
|
||||
|
||||
install:
|
||||
- |
|
||||
echo "Updating Composer (version 2.5 is bugged and generate phpunit error Exception: Serialization of 'Closure' is not allowed)"
|
||||
#rm $TRAVIS_BUILD_DIR/composer.json
|
||||
#rm $TRAVIS_BUILD_DIR/composer.lock
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.1' ]; then
|
||||
sudo update-alternatives --set php /usr/bin/php7.1
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '8.1' ]; then
|
||||
sudo update-alternatives --set php /usr/bin/php8.1
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '8.2' ]; then
|
||||
sudo update-alternatives --set php /usr/bin/php8.2
|
||||
fi
|
||||
php -i | head -
|
||||
|
||||
- |
|
||||
echo "Updating Composer config"
|
||||
curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php
|
||||
HASH=`curl -sS https://composer.github.io/installer.sig`
|
||||
echo $HASH
|
||||
php -r "if (hash_file('SHA384', '/tmp/composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
|
||||
sudo php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer
|
||||
sudo chmod -R a+rwx /usr/local/bin/composer
|
||||
|
||||
#sudo apt install composer
|
||||
composer -V
|
||||
composer self-update 2.4.4
|
||||
#composer -n init
|
||||
#composer -n config vendor-dir htdocs/includes
|
||||
composer -n config -g vendor-dir htdocs/includes
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Installing Composer dependencies - PHP Unit, Parallel Lint, PHP CodeSniffer, PHP Vardump check - for $TRAVIS_PHP_VERSION"
|
||||
if [ "$TRAVIS_PHP_VERSION" = '5.6' ]; then
|
||||
composer -n require phpunit/phpunit ^5 \
|
||||
echo "Update Composer version and Install tools - PHP Unit, Parallel Lint, PHP CodeSniffer, PHP Vardump check - for $TRAVIS_PHP_VERSION"
|
||||
echo "(composer version 2.5 is bugged and generate phpunit error Exception: Serialization of 'Closure' is not allowed)"
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = '7.2' ]; then
|
||||
sudo composer self-update 2.2.18
|
||||
composer -n require phpunit/phpunit ^7.5 \
|
||||
php-parallel-lint/php-parallel-lint ^1 \
|
||||
php-parallel-lint/php-console-highlighter ^0 \
|
||||
php-parallel-lint/php-var-dump-check ~0.4 \
|
||||
squizlabs/php_codesniffer ^3
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = '7.2' ]; then
|
||||
composer -n require phpunit/phpunit ^6 \
|
||||
php-parallel-lint/php-parallel-lint ^1 \
|
||||
php-parallel-lint/php-console-highlighter ^0 \
|
||||
php-parallel-lint/php-var-dump-check ~0.4 \
|
||||
squizlabs/php_codesniffer ^3
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = '7.4' ] || [ "$TRAVIS_PHP_VERSION" = '7.4.22' ]; then
|
||||
composer -n require phpunit/phpunit ^7 \
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = '7.4' ]; then
|
||||
sudo composer self-update 2.2.18
|
||||
composer -n require phpunit/phpunit ^7.5 \
|
||||
php-parallel-lint/php-parallel-lint ^1.2 \
|
||||
php-parallel-lint/php-console-highlighter ^0 \
|
||||
php-parallel-lint/php-var-dump-check ~0.4 \
|
||||
squizlabs/php_codesniffer ^3
|
||||
fi
|
||||
# phpunit 9 is required for php 8
|
||||
if [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
|
||||
composer -n require --ignore-platform-reqs phpunit/phpunit ^7 \
|
||||
if [ "$TRAVIS_PHP_VERSION" = '8.0' ] || [ "$TRAVIS_PHP_VERSION" = '8.1' ] || [ "$TRAVIS_PHP_VERSION" = '8.2' ] || [ "$TRAVIS_PHP_VERSION" = '8.3' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
|
||||
sudo composer self-update 2.4.4
|
||||
composer -n require --ignore-platform-reqs phpunit/phpunit ^8 \
|
||||
php-parallel-lint/php-parallel-lint ^1.2 \
|
||||
php-parallel-lint/php-console-highlighter ^0 \
|
||||
php-parallel-lint/php-var-dump-check ~0.4 \
|
||||
squizlabs/php_codesniffer ^3
|
||||
fi
|
||||
|
||||
# Remove non expected files
|
||||
rm -fr /home/travis/build/Dolibarr/dolibarr/htdocs/includes/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Adding path of binaries tools installed by composer to the PATH"
|
||||
export PATH="$TRAVIS_BUILD_DIR/htdocs/includes/bin:$PATH"
|
||||
echo $PATH
|
||||
ls $TRAVIS_BUILD_DIR/vendor
|
||||
ls $TRAVIS_BUILD_DIR/htdocs/includes
|
||||
ls $TRAVIS_BUILD_DIR/htdocs/includes/bin
|
||||
echo
|
||||
|
||||
|
|
@ -137,24 +184,11 @@ install:
|
|||
|
||||
before_script:
|
||||
- |
|
||||
echo Start travis
|
||||
echo Start before_script
|
||||
echo Current dir is `pwd`
|
||||
echo Home dir is `echo ~`
|
||||
echo TRAVIS_BUILD_DIR is $TRAVIS_BUILD_DIR
|
||||
|
||||
- |
|
||||
echo "Re-enabling Xdebug for PHP CodeSniffer and PHP Unit"
|
||||
phpenv config-add /tmp/xdebug.ini
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Setting up PHP"
|
||||
echo
|
||||
echo "Set timezone"
|
||||
echo 'date.timezone = "Europe/Paris"' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
|
||||
phpenv rehash
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Versions information"
|
||||
echo
|
||||
|
|
@ -184,53 +218,76 @@ before_script:
|
|||
# Check Database
|
||||
echo "Database version"
|
||||
mysql --version | head -
|
||||
mysql -e "SELECT VERSION();" | head -
|
||||
psql --version
|
||||
if [ "$DB" = 'postgresql' ]; then
|
||||
echo "Check pgloader version"
|
||||
pgloader --version
|
||||
fi
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Setting up database"
|
||||
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ] || [ "$DB" = 'postgresql' ]; then
|
||||
echo "MySQL"
|
||||
mysql -u root -e 'DROP DATABASE IF EXISTS travis;'
|
||||
mysql -u root -e 'CREATE DATABASE IF NOT EXISTS travis;'
|
||||
mysql -u root -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;'
|
||||
mysql -u root -e 'FLUSH PRIVILEGES;'
|
||||
mysql -u root -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
|
||||
echo "MySQL stop"
|
||||
sudo systemctl stop mariadb.service
|
||||
echo "MySQL restart without pass"
|
||||
#sudo mysqld_safe --skip-grant-tables --socket=/tmp/aaa
|
||||
sudo mysqld_safe --skip-grant-tables --socket=/tmp/aaa &
|
||||
sleep 3
|
||||
sudo ps fauxww
|
||||
echo "MySQL set root password"
|
||||
sudo mysql -u root -h 127.0.0.1 -e "FLUSH PRIVILEGES; CREATE DATABASE IF NOT EXISTS travis CHARACTER SET = 'utf8'; ALTER USER 'root'@'localhost' IDENTIFIED BY 'password'; CREATE USER 'root'@'127.0.0.1' IDENTIFIED BY 'password'; CREATE USER 'travis'@'127.0.0.1' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON travis.* TO root@127.0.0.1; GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1; FLUSH PRIVILEGES;"
|
||||
echo "MySQL grant"
|
||||
sudo mysql -u root -h 127.0.0.1 -ppassword -e 'FLUSH PRIVILEGES; GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1; FLUSH PRIVILEGES;'
|
||||
echo "MySQL list current users"
|
||||
sudo mysql -u root -h 127.0.0.1 -ppassword -e 'use mysql; select * from user;'
|
||||
echo "List pid file"
|
||||
sudo mysql -u root -h 127.0.0.1 -ppassword -e "show variables like '%pid%';"
|
||||
|
||||
#sudo kill `cat /var/lib/mysqld/mysqld.pid`
|
||||
#sudo systemctl start mariadb
|
||||
|
||||
echo "MySQL grant"
|
||||
sudo mysql -u root -h 127.0.0.1 -ppassword -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;'
|
||||
echo "MySQL flush"
|
||||
sudo mysql -u root -h 127.0.0.1 -ppassword -e 'FLUSH PRIVILEGES;'
|
||||
|
||||
echo "MySQL load sql"
|
||||
sudo mysql -u root -h 127.0.0.1 -ppassword -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
|
||||
fi
|
||||
if [ "$DB" = 'postgresql' ]; then
|
||||
#psql -c 'create database travis;' -U postgres
|
||||
#psql travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
|
||||
#pgloader mysql://root:pass@127.0.0.1/dolibarr_src postgresql://dolibarrowner:dolibarrownerpass@127.0.0.1/dolibarr_dest
|
||||
echo pgloader mysql://root@127.0.0.1/travis postgresql://postgres@/travis
|
||||
pgloader mysql://root@127.0.0.1/travis postgresql://postgres@/travis
|
||||
echo 'ALTER SEQUENCE llx_accountingaccount_rowid_seq RENAME TO llx_accounting_account_rowid_seq' | psql -U postgres travis
|
||||
echo 'ALTER SEQUENCE llx_accounting_account_rowid_seq RESTART WITH 1000001;' | psql -U postgres travis
|
||||
echo "PGSQL"
|
||||
sudo mkdir -p /tmp/pgloader
|
||||
sudo chmod -R a+rwx /tmp/pgloader/
|
||||
sudo pgloader 'mysql://root:password@127.0.0.1/travis' 'postgresql://postgres:postgres@127.0.0.1:5432/travis'
|
||||
echo 'ALTER SEQUENCE llx_accountingaccount_rowid_seq RENAME TO llx_accounting_account_rowid_seq' | psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis'
|
||||
echo 'ALTER SEQUENCE llx_accounting_account_rowid_seq RESTART WITH 1000001;' | psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis'
|
||||
|
||||
#echo '\d llx_adherent' | psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis'
|
||||
#echo '\d llx_c_country' | psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis'
|
||||
|
||||
# Create pgsql compatibility functions
|
||||
psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis' < htdocs/install/pgsql/functions/functions.sql
|
||||
fi
|
||||
echo
|
||||
|
||||
- |
|
||||
export CONF_FILE=htdocs/conf/conf.php
|
||||
echo "Setting up Dolibarr $CONF_FILE"
|
||||
echo "Setting up Dolibarr '$CONF_FILE'"
|
||||
echo '<?php' > $CONF_FILE
|
||||
echo 'error_reporting(E_ALL);' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_url_root=\'http://127.0.0.1\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_document_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_data_root=\'$TRAVIS_BUILD_DIR/documents\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_host=\'127.0.0.1\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_name=\'travis\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_user=\'travis\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_instance_unique_id=\'travis1234567890\'';' >> $CONF_FILE
|
||||
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then
|
||||
echo '$'dolibarr_main_db_type=\'mysqli\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_port=\'3306\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_port=3306';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_user=\'root\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_pass=\'password\'';' >> $CONF_FILE
|
||||
fi
|
||||
if [ "$DB" = 'postgresql' ]; then
|
||||
echo '$'dolibarr_main_db_type=\'pgsql\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_port=\'5432\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_port=5432';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_user=\'postgres\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_pass=\'postgres\'';' >> $CONF_FILE
|
||||
fi
|
||||
echo '$'dolibarr_main_authentication=\'dolibarr\'';' >> $CONF_FILE
|
||||
cat $CONF_FILE
|
||||
|
|
@ -238,261 +295,271 @@ before_script:
|
|||
|
||||
- |
|
||||
echo "Create documents directory and set permissions"
|
||||
# and admin/temp subdirectory needed for unit tests
|
||||
# Add admin/temp subdirectory needed for unit tests
|
||||
mkdir -p $TRAVIS_BUILD_DIR/documents/admin/temp
|
||||
sudo chmod -R a+rwx $TRAVIS_BUILD_DIR/documents
|
||||
echo "***** First line of dolibarr.log" > $TRAVIS_BUILD_DIR/documents/dolibarr.log
|
||||
echo
|
||||
|
||||
|
||||
- echo "Setting up Apache + FPM"
|
||||
# enable php-fpm
|
||||
- sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
|
||||
- |
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = '7.2' ] || [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = '7.4' ] || [ "$TRAVIS_PHP_VERSION" = '7.4.22' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
|
||||
# Copy the included pool
|
||||
sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf
|
||||
fi
|
||||
- sudo a2enmod rewrite actions fastcgi alias
|
||||
- echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
|
||||
- sudo sed -i -e "s,www-data,travis,g" /etc/apache2/envvars
|
||||
- sudo chown -R travis:travis /var/lib/apache2/fastcgi
|
||||
- ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
|
||||
# configure apache virtual hosts
|
||||
- sudo cp -f build/travis-ci/apache.conf /etc/apache2/sites-available/000-default.conf
|
||||
- sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/000-default.conf
|
||||
- sudo cat /etc/apache2/sites-available/000-default.conf
|
||||
- sudo service apache2 restart
|
||||
|
||||
echo "Setting up Apache"
|
||||
sudo sed -i -e "s,www-data,travis,g" /etc/apache2/envvars
|
||||
sudo cp -f build/travis-ci/apache.conf /etc/apache2/sites-available/000-default.conf
|
||||
sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/000-default.conf
|
||||
sudo cat /etc/apache2/sites-available/000-default.conf
|
||||
sudo service apache2 restart
|
||||
|
||||
|
||||
script:
|
||||
- |
|
||||
echo "Checking webserver availability by a wget -O - http://127.0.0.1"
|
||||
# Ensure we stop on error with set -e
|
||||
set +e
|
||||
# The wget should return a page with line '<meta name="generator" content="Dolibarr installer">
|
||||
wget -O - http://127.0.0.1 > test.html
|
||||
head test.html
|
||||
sudo cat /var/log/apache2/travis_error_log
|
||||
set +e
|
||||
echo
|
||||
- |
|
||||
echo "Checking webserver availability by a wget -O - --debug http://127.0.0.1"
|
||||
# Ensure we stop on error with set -e
|
||||
set +e
|
||||
# The wget should return a page with line '<meta name="generator" content="Dolibarr installer">
|
||||
wget -O - --debug http://127.0.0.1 > test.html
|
||||
head -n 200 test.html
|
||||
sudo cat /var/log/apache2/travis_error_log
|
||||
set +e
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Checking PHP syntax errors (only 1 version to not overload travis and avoid duplicate tests)"
|
||||
# Ensure we catch errors
|
||||
set -e
|
||||
#parallel-lint --exclude htdocs/includes --blame .
|
||||
# Exclusions are defined in the ruleset.xml file
|
||||
if [ "$TRAVIS_PHP_VERSION" = "7.4.22" ]; then
|
||||
parallel-lint -e php --exclude dev/tools/test/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes \
|
||||
--exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian \
|
||||
--exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/php-parallel-lint --exclude htdocs/includes/symfony \
|
||||
--exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \
|
||||
--exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --blame .
|
||||
fi
|
||||
set +e
|
||||
echo
|
||||
- |
|
||||
echo "Checking PHP syntax errors (only 1 version to not overload travis and avoid duplicate tests)"
|
||||
# Ensure we catch errors
|
||||
set -e
|
||||
# Exclusions are defined in the ruleset.xml file
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then
|
||||
parallel-lint -e php --exclude dev/tools/test/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes \
|
||||
--exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian \
|
||||
--exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/php-parallel-lint --exclude htdocs/includes/symfony \
|
||||
--exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \
|
||||
--exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --exclude htdocs/includes/webklex --blame .
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.2" ]; then
|
||||
parallel-lint -e php --exclude dev/tools/test/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes \
|
||||
--exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian \
|
||||
--exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/php-parallel-lint --exclude htdocs/includes/symfony \
|
||||
--exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \
|
||||
--exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --exclude htdocs/includes/webklex --blame .
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.3" ]; then
|
||||
parallel-lint -e php --exclude dev/tools/test/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes \
|
||||
--exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian \
|
||||
--exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/php-parallel-lint --exclude htdocs/includes/symfony \
|
||||
--exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \
|
||||
--exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --exclude htdocs/includes/webklex --blame .
|
||||
fi
|
||||
set +e
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Checking coding style (only for Pull Requests builds and 1 version to not overload travis and avoid duplicate tests)"
|
||||
# Ensure we catch errors
|
||||
set -e
|
||||
# Exclusions are defined in the ruleset.xml file
|
||||
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "7.4.22" ]; then
|
||||
phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .;
|
||||
fi
|
||||
set +e
|
||||
echo
|
||||
- |
|
||||
echo "Checking coding style (only for 1 version to not overload travis and avoid duplicate tests)"
|
||||
# Ensure we catch errors
|
||||
set -e
|
||||
# Exclusions are defined in the ruleset.xml file
|
||||
#if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then
|
||||
phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .;
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.2" ]; then
|
||||
phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .;
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.3" ]; then
|
||||
phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .;
|
||||
fi
|
||||
set +e
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Checking missing debug"
|
||||
# Ensure we catch errors
|
||||
set -e
|
||||
# Exclusions are defined in the ruleset.xml file
|
||||
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "7.4.22" ]; then
|
||||
var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php .
|
||||
fi
|
||||
set +e
|
||||
echo
|
||||
- |
|
||||
echo "Checking missing debug (only for 1 version to not overload travis and avoid duplicate tests)"
|
||||
# Ensure we catch errors
|
||||
set -e
|
||||
# Exclusions are defined in the ruleset.xml file
|
||||
#if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then
|
||||
var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php .
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.2" ]; then
|
||||
var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php .
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.3" ]; then
|
||||
var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php .
|
||||
fi
|
||||
set +e
|
||||
echo
|
||||
|
||||
- |
|
||||
export INSTALL_FORCED_FILE=htdocs/install/install.forced.php
|
||||
echo "Setting up Dolibarr $INSTALL_FORCED_FILE to test installation"
|
||||
# Ensure we catch errors
|
||||
set +e
|
||||
echo '<?php ' > $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_noedit=2';' >> $INSTALL_FORCED_FILE
|
||||
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then
|
||||
echo '$'force_install_type=\'mysqli\'';' >> $INSTALL_FORCED_FILE
|
||||
fi
|
||||
if [ "$DB" = 'postgresql' ]; then
|
||||
echo '$'force_install_type=\'pgsql\'';' >> $INSTALL_FORCED_FILE
|
||||
fi
|
||||
echo '$'force_install_dbserver=\'127.0.0.1\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_database=\'travis\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_databaselogin=\'travis\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_databasepass=\'\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_port=\'5432\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_prefix=\'llx_\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_createdatabase=false';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_createuser=false';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_mainforcehttps=false';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_main_data_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $INSTALL_FORCED_FILE
|
||||
#cat $INSTALL_FORCED_FILE
|
||||
- |
|
||||
export INSTALL_FORCED_FILE=htdocs/install/install.forced.php
|
||||
echo "Setting up Dolibarr $INSTALL_FORCED_FILE to test installation"
|
||||
# Ensure we catch errors
|
||||
set +e
|
||||
echo '<?php ' > $INSTALL_FORCED_FILE
|
||||
echo 'error_reporting(E_ALL);' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_noedit=2';' >> $INSTALL_FORCED_FILE
|
||||
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then
|
||||
echo '$'force_install_type=\'mysqli\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_port=3306';' >> $INSTALL_FORCED_FILE
|
||||
fi
|
||||
if [ "$DB" = 'postgresql' ]; then
|
||||
echo '$'force_install_type=\'pgsql\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_port=5432';' >> $INSTALL_FORCED_FILE
|
||||
fi
|
||||
echo '$'force_install_dbserver=\'127.0.0.1\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_database=\'travis\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_databaselogin=\'travis\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_databasepass=\'\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_prefix=\'llx_\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_createdatabase=false';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_createuser=false';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_mainforcehttps=false';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_main_data_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $INSTALL_FORCED_FILE
|
||||
#cat $INSTALL_FORCED_FILE
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Upgrading Dolibarr"
|
||||
# Ensure we catch errors with -e. Set this to +e if you want to go to the end to see log files.
|
||||
# Note: We keep +e because with pgsql, one of upgrade process fails even if migration seems ok, so
|
||||
# I disable stop on error to be able to continue.
|
||||
set +e
|
||||
cd htdocs/install
|
||||
php upgrade.php 3.5.0 3.6.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade350360.log
|
||||
php upgrade2.php 3.5.0 3.6.0 > $TRAVIS_BUILD_DIR/upgrade350360-2.log
|
||||
php step5.php 3.5.0 3.6.0 > $TRAVIS_BUILD_DIR/upgrade350360-3.log
|
||||
php upgrade.php 3.6.0 3.7.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade360370.log
|
||||
php upgrade2.php 3.6.0 3.7.0 > $TRAVIS_BUILD_DIR/upgrade360370-2.log
|
||||
php step5.php 3.6.0 3.7.0 > $TRAVIS_BUILD_DIR/upgrade360370-3.log
|
||||
php upgrade.php 3.7.0 3.8.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade370380.log
|
||||
php upgrade2.php 3.7.0 3.8.0 > $TRAVIS_BUILD_DIR/upgrade370380-2.log
|
||||
php step5.php 3.7.0 3.8.0 > $TRAVIS_BUILD_DIR/upgrade370380-3.log
|
||||
php upgrade.php 3.8.0 3.9.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade380390.log
|
||||
php upgrade2.php 3.8.0 3.9.0 > $TRAVIS_BUILD_DIR/upgrade380390-2.log
|
||||
php step5.php 3.8.0 3.9.0 > $TRAVIS_BUILD_DIR/upgrade380390-3.log
|
||||
php upgrade.php 3.9.0 4.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade390400.log
|
||||
php upgrade2.php 3.9.0 4.0.0 > $TRAVIS_BUILD_DIR/upgrade390400-2.log
|
||||
php step5.php 3.9.0 4.0.0 > $TRAVIS_BUILD_DIR/upgrade390400-3.log
|
||||
php upgrade.php 4.0.0 5.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade400500.log
|
||||
php upgrade2.php 4.0.0 5.0.0 > $TRAVIS_BUILD_DIR/upgrade400500-2.log
|
||||
php step5.php 4.0.0 5.0.0 > $TRAVIS_BUILD_DIR/upgrade400500-3.log
|
||||
php upgrade.php 5.0.0 6.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade500600.log
|
||||
php upgrade2.php 5.0.0 6.0.0 > $TRAVIS_BUILD_DIR/upgrade500600-2.log
|
||||
php step5.php 5.0.0 6.0.0 > $TRAVIS_BUILD_DIR/upgrade500600-3.log
|
||||
php upgrade.php 6.0.0 7.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade600700.log
|
||||
php upgrade2.php 6.0.0 7.0.0 > $TRAVIS_BUILD_DIR/upgrade600700-2.log
|
||||
php step5.php 6.0.0 7.0.0 > $TRAVIS_BUILD_DIR/upgrade600700-3.log
|
||||
php upgrade.php 7.0.0 8.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade700800.log
|
||||
php upgrade2.php 7.0.0 8.0.0 > $TRAVIS_BUILD_DIR/upgrade700800-2.log
|
||||
php step5.php 7.0.0 8.0.0 > $TRAVIS_BUILD_DIR/upgrade700800-3.log
|
||||
php upgrade.php 8.0.0 9.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade800900.log
|
||||
php upgrade2.php 8.0.0 9.0.0 > $TRAVIS_BUILD_DIR/upgrade800900-2.log
|
||||
php step5.php 8.0.0 9.0.0 > $TRAVIS_BUILD_DIR/upgrade800900-3.log
|
||||
php upgrade.php 9.0.0 10.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade9001000.log
|
||||
php upgrade2.php 9.0.0 10.0.0 > $TRAVIS_BUILD_DIR/upgrade9001000-2.log
|
||||
php step5.php 9.0.0 10.0.0 > $TRAVIS_BUILD_DIR/upgrade9001000-3.log
|
||||
php upgrade.php 10.0.0 11.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade10001100.log
|
||||
php upgrade2.php 10.0.0 11.0.0 > $TRAVIS_BUILD_DIR/upgrade10001100-2.log
|
||||
php step5.php 10.0.0 11.0.0 > $TRAVIS_BUILD_DIR/upgrade10001100-3.log
|
||||
php upgrade.php 11.0.0 12.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade11001200.log
|
||||
php upgrade2.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-2.log
|
||||
php step5.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-3.log
|
||||
php upgrade.php 12.0.0 13.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade12001300.log
|
||||
php upgrade2.php 12.0.0 13.0.0 > $TRAVIS_BUILD_DIR/upgrade12001300-2.log
|
||||
php step5.php 12.0.0 13.0.0 > $TRAVIS_BUILD_DIR/upgrade12001300-3.log
|
||||
php upgrade.php 13.0.0 14.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade13001400.log
|
||||
php upgrade2.php 13.0.0 14.0.0 > $TRAVIS_BUILD_DIR/upgrade13001400-2.log
|
||||
php step5.php 13.0.0 14.0.0 > $TRAVIS_BUILD_DIR/upgrade13001400-3.log
|
||||
php upgrade.php 14.0.0 15.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade14001500.log
|
||||
php upgrade2.php 14.0.0 15.0.0 > $TRAVIS_BUILD_DIR/upgrade14001500-2.log
|
||||
php step5.php 14.0.0 15.0.0 > $TRAVIS_BUILD_DIR/upgrade14001500-3.log
|
||||
php upgrade.php 15.0.0 16.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade15001600.log
|
||||
php upgrade2.php 15.0.0 16.0.0 > $TRAVIS_BUILD_DIR/upgrade15001600-2.log
|
||||
php step5.php 15.0.0 16.0.0 > $TRAVIS_BUILD_DIR/upgrade15001600-3.log
|
||||
php upgrade.php 16.0.0 17.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade16001700.log
|
||||
php upgrade2.php 16.0.0 17.0.0 > $TRAVIS_BUILD_DIR/upgrade16001700-2.log
|
||||
php step5.php 16.0.0 17.0.0 > $TRAVIS_BUILD_DIR/upgrade16001700-3.log
|
||||
php upgrade.php 17.0.0 18.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade17001800.log
|
||||
php upgrade2.php 17.0.0 18.0.0 > $TRAVIS_BUILD_DIR/upgrade17001800-2.log
|
||||
php step5.php 17.0.0 18.0.0 > $TRAVIS_BUILD_DIR/upgrade17001800-3.log
|
||||
php upgrade.php 18.0.0 19.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade18001900.log || cat $TRAVIS_BUILD_DIR/upgrade18001900.log
|
||||
php upgrade2.php 18.0.0 19.0.0 > $TRAVIS_BUILD_DIR/upgrade18001900-2.log || cat $TRAVIS_BUILD_DIR/upgrade18001900-2.log
|
||||
php step5.php 18.0.0 19.0.0 > $TRAVIS_BUILD_DIR/upgrade18001900-3.log || cat $TRAVIS_BUILD_DIR/upgrade18001900-3.log
|
||||
set +e
|
||||
echo
|
||||
|
||||
#- |
|
||||
# echo "Installing Dolibarr"
|
||||
# cd htdocs/install
|
||||
# php step1.php $TRAVIS_BUILD_DIR/htdocs > $TRAVIS_BUILD_DIR/install.log
|
||||
# php step2.php set >> $TRAVIS_BUILD_DIR/install.log
|
||||
# if [ "$?" -ne "0" ]; then
|
||||
# echo "SORRY, AN ERROR OCCURED DURING INSTALLATION PROCESS"
|
||||
# cat $TRAVIS_BUILD_DIR/install.log
|
||||
# exit 1
|
||||
# fi
|
||||
# cd ../..
|
||||
# rm $INSTALL_FORCED_FILE
|
||||
# #cat $TRAVIS_BUILD_DIR/install.log
|
||||
# set +e
|
||||
# echo
|
||||
- |
|
||||
echo Show some debug info like table content or log
|
||||
#echo '\d llx_adherent' | psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis'
|
||||
cat $TRAVIS_BUILD_DIR/upgrade18001900.log
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Setting up database to test migrations"
|
||||
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ] || [ "$DB" = 'postgresql' ]; then
|
||||
echo "MySQL"
|
||||
mysql -e 'DROP DATABASE IF EXISTS travis;'
|
||||
mysql -e 'CREATE DATABASE IF NOT EXISTS travis;'
|
||||
mysql -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;'
|
||||
mysql -e 'FLUSH PRIVILEGES;'
|
||||
mysql -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
|
||||
fi
|
||||
if [ "$DB" = 'postgresql' ]; then
|
||||
#pgsql travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
|
||||
#pgloader mysql://root:pass@127.0.0.1/base postgresql://dolibarrowner@127.0.0.1/dolibarr
|
||||
echo pgloader mysql://root@127.0.0.1/travis postgresql:///travis
|
||||
pgloader mysql://root@127.0.0.1/travis postgresql:///travis
|
||||
echo 'ALTER SEQUENCE llx_accountingaccount_rowid_seq RENAME TO llx_accounting_account_rowid_seq' | psql travis
|
||||
echo 'ALTER SEQUENCE llx_accounting_account_rowid_seq RESTART WITH 1000001;' | psql travis
|
||||
#echo 'select * from INFORMATION_SCHEMA.COLUMNS where table_name = 'llx_accountingaccount' | psql travis
|
||||
#echo 'select * from information_schema.table_constraints;' | psql travis
|
||||
#echo 'ALTER TABLE "llx_accounting_account" DROP CONSTRAINT "idx_16390_primary"' | psql travis
|
||||
fi
|
||||
echo
|
||||
- |
|
||||
echo Result of migration scripts
|
||||
ls -alrt $TRAVIS_BUILD_DIR/
|
||||
|
||||
- |
|
||||
echo "Upgrading Dolibarr"
|
||||
# Ensure we catch errors. Set this to +e if you want to go to the end to see log files.
|
||||
set +e
|
||||
cd htdocs/install
|
||||
php upgrade.php 3.5.0 3.6.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade350360.log
|
||||
php upgrade2.php 3.5.0 3.6.0 > $TRAVIS_BUILD_DIR/upgrade350360-2.log
|
||||
php step5.php 3.5.0 3.6.0 > $TRAVIS_BUILD_DIR/upgrade350360-3.log
|
||||
php upgrade.php 3.6.0 3.7.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade360370.log
|
||||
php upgrade2.php 3.6.0 3.7.0 > $TRAVIS_BUILD_DIR/upgrade360370-2.log
|
||||
php step5.php 3.6.0 3.7.0 > $TRAVIS_BUILD_DIR/upgrade360370-3.log
|
||||
php upgrade.php 3.7.0 3.8.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade370380.log
|
||||
php upgrade2.php 3.7.0 3.8.0 > $TRAVIS_BUILD_DIR/upgrade370380-2.log
|
||||
php step5.php 3.7.0 3.8.0 > $TRAVIS_BUILD_DIR/upgrade370380-3.log
|
||||
php upgrade.php 3.8.0 3.9.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade380390.log
|
||||
php upgrade2.php 3.8.0 3.9.0 > $TRAVIS_BUILD_DIR/upgrade380390-2.log
|
||||
php step5.php 3.8.0 3.9.0 > $TRAVIS_BUILD_DIR/upgrade380390-3.log
|
||||
php upgrade.php 3.9.0 4.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade390400.log
|
||||
php upgrade2.php 3.9.0 4.0.0 > $TRAVIS_BUILD_DIR/upgrade390400-2.log
|
||||
php step5.php 3.9.0 4.0.0 > $TRAVIS_BUILD_DIR/upgrade390400-3.log
|
||||
php upgrade.php 4.0.0 5.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade400500.log
|
||||
php upgrade2.php 4.0.0 5.0.0 > $TRAVIS_BUILD_DIR/upgrade400500-2.log
|
||||
php step5.php 4.0.0 5.0.0 > $TRAVIS_BUILD_DIR/upgrade400500-3.log
|
||||
php upgrade.php 5.0.0 6.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade500600.log
|
||||
php upgrade2.php 5.0.0 6.0.0 > $TRAVIS_BUILD_DIR/upgrade500600-2.log
|
||||
php step5.php 5.0.0 6.0.0 > $TRAVIS_BUILD_DIR/upgrade500600-3.log
|
||||
php upgrade.php 6.0.0 7.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade600700.log
|
||||
php upgrade2.php 6.0.0 7.0.0 > $TRAVIS_BUILD_DIR/upgrade600700-2.log
|
||||
php step5.php 6.0.0 7.0.0 > $TRAVIS_BUILD_DIR/upgrade600700-3.log
|
||||
php upgrade.php 7.0.0 8.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade700800.log
|
||||
php upgrade2.php 7.0.0 8.0.0 > $TRAVIS_BUILD_DIR/upgrade700800-2.log
|
||||
php step5.php 7.0.0 8.0.0 > $TRAVIS_BUILD_DIR/upgrade700800-3.log
|
||||
php upgrade.php 8.0.0 9.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade800900.log
|
||||
php upgrade2.php 8.0.0 9.0.0 > $TRAVIS_BUILD_DIR/upgrade800900-2.log
|
||||
php step5.php 8.0.0 9.0.0 > $TRAVIS_BUILD_DIR/upgrade800900-3.log
|
||||
php upgrade.php 9.0.0 10.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade9001000.log
|
||||
php upgrade2.php 9.0.0 10.0.0 > $TRAVIS_BUILD_DIR/upgrade9001000-2.log
|
||||
php step5.php 9.0.0 10.0.0 > $TRAVIS_BUILD_DIR/upgrade9001000-3.log
|
||||
php upgrade.php 10.0.0 11.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade10001100.log
|
||||
php upgrade2.php 10.0.0 11.0.0 > $TRAVIS_BUILD_DIR/upgrade10001100-2.log
|
||||
php step5.php 10.0.0 11.0.0 > $TRAVIS_BUILD_DIR/upgrade10001100-3.log
|
||||
php upgrade.php 11.0.0 12.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade11001200.log
|
||||
php upgrade2.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-2.log
|
||||
php step5.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-3.log
|
||||
php upgrade.php 12.0.0 13.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade12001300.log
|
||||
php upgrade2.php 12.0.0 13.0.0 > $TRAVIS_BUILD_DIR/upgrade12001300-2.log
|
||||
php step5.php 12.0.0 13.0.0 > $TRAVIS_BUILD_DIR/upgrade12001300-3.log
|
||||
php upgrade.php 13.0.0 14.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade13001400.log
|
||||
php upgrade2.php 13.0.0 14.0.0 > $TRAVIS_BUILD_DIR/upgrade13001400-2.log
|
||||
php step5.php 13.0.0 14.0.0 > $TRAVIS_BUILD_DIR/upgrade13001400-3.log
|
||||
php upgrade.php 14.0.0 15.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade14001500.log
|
||||
php upgrade2.php 14.0.0 15.0.0 > $TRAVIS_BUILD_DIR/upgrade14001500-2.log
|
||||
php step5.php 14.0.0 15.0.0 > $TRAVIS_BUILD_DIR/upgrade14001500-3.log
|
||||
php upgrade.php 15.0.0 16.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade15001600.log
|
||||
php upgrade2.php 15.0.0 16.0.0 > $TRAVIS_BUILD_DIR/upgrade15001600-2.log
|
||||
php step5.php 15.0.0 16.0.0 > $TRAVIS_BUILD_DIR/upgrade15001600-3.log
|
||||
ls -alrt $TRAVIS_BUILD_DIR/
|
||||
echo Show content of last file
|
||||
cat $TRAVIS_BUILD_DIR/"$(ls -rt $TRAVIS_BUILD_DIR/ | tail -n1)"
|
||||
|
||||
- |
|
||||
echo "Enabling new modules"
|
||||
# Enable modules not enabled into original dump
|
||||
set -e
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_API,MAIN_MODULE_PRODUCTBATCH,MAIN_MODULE_SUPPLIERPROPOSAL,MAIN_MODULE_STRIPE,MAIN_MODULE_EXPENSEREPORT > $TRAVIS_BUILD_DIR/enablemodule.log
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_WEBSITE,MAIN_MODULE_TICKET,MAIN_MODULE_ACCOUNTING,MAIN_MODULE_MRP >> $TRAVIS_BUILD_DIR/enablemodule.log
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_RECEPTION,MAIN_MODULE_RECRUITMENT >> $TRAVIS_BUILD_DIR/enablemodule.log
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_KNOWLEDGEMANAGEMENT,MAIN_MODULE_EVENTORGANIZATION,MAIN_MODULE_PARTNERSHIP >> $TRAVIS_BUILD_DIR/enablemodule.log
|
||||
echo $?
|
||||
cd -
|
||||
set +e
|
||||
echo
|
||||
#cat /tmp/dolibarr_install.log
|
||||
cat $TRAVIS_BUILD_DIR/enablemodule.log
|
||||
- |
|
||||
echo "Enabling new modules"
|
||||
# Enable modules not enabled into original dump
|
||||
set -e
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_API,MAIN_MODULE_ProductBatch,MAIN_MODULE_SupplierProposal,MAIN_MODULE_STRIPE,MAIN_MODULE_ExpenseReport > $TRAVIS_BUILD_DIR/enablemodule.log
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_WEBSITE,MAIN_MODULE_TICKET,MAIN_MODULE_ACCOUNTING,MAIN_MODULE_MRP >> $TRAVIS_BUILD_DIR/enablemodule.log
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_RECEPTION,MAIN_MODULE_RECRUITMENT >> $TRAVIS_BUILD_DIR/enablemodule.log
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_KnowledgeManagement,MAIN_MODULE_EventOrganization,MAIN_MODULE_PARTNERSHIP >> $TRAVIS_BUILD_DIR/enablemodule.log
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_EmailCollector >> $TRAVIS_BUILD_DIR/enablemodule.log
|
||||
echo $?
|
||||
cd -
|
||||
set +e
|
||||
echo
|
||||
#cat /tmp/dolibarr_install.log
|
||||
cat $TRAVIS_BUILD_DIR/enablemodule.log
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Unit testing"
|
||||
# Ensure we catch errors. Set this to +e if you want to go to the end to see dolibarr.log file.
|
||||
set -e
|
||||
phpunit -d memory_limit=-1 -c test/phpunit/phpunittest.xml test/phpunit/AllTests.php
|
||||
phpunitresult=$?
|
||||
echo "Phpunit return code = $phpunitresult"
|
||||
set +e
|
||||
- |
|
||||
echo "Unit testing"
|
||||
# Ensure we catch errors with -e. Set this to +e instead of -e if you want to go to the end to see dolibarr.log file.
|
||||
set -e
|
||||
phpunit -d memory_limit=-1 -c test/phpunit/phpunittest.xml test/phpunit/AllTests.php
|
||||
phpunitresult=$?
|
||||
echo "Phpunit return code = $phpunitresult"
|
||||
set +e
|
||||
echo
|
||||
|
||||
after_script:
|
||||
- |
|
||||
echo "After script - Output last lines of dolibarr.log"
|
||||
ls $TRAVIS_BUILD_DIR/documents
|
||||
#cat $TRAVIS_BUILD_DIR/documents/dolibarr.log
|
||||
sudo tail -n 50 $TRAVIS_BUILD_DIR/documents/dolibarr.log
|
||||
- |
|
||||
echo "After script - Output last lines of dolibarr.log"
|
||||
ls $TRAVIS_BUILD_DIR/documents
|
||||
#cat $TRAVIS_BUILD_DIR/documents/dolibarr.log
|
||||
sudo tail -n 50 $TRAVIS_BUILD_DIR/documents/dolibarr.log
|
||||
echo "After script - Output last lines of apache error.log"
|
||||
sudo ls /var/log/apache2
|
||||
sudo tail -n 200 /var/log/apache2/travis_error_log
|
||||
|
||||
after_success:
|
||||
- |
|
||||
echo Success
|
||||
- |
|
||||
echo Success
|
||||
|
||||
after_failure:
|
||||
- |
|
||||
echo Failure detected, so we show samples of log to help diagnose
|
||||
# This part of code is executed only if previous command that fails are enclosed with set +e
|
||||
# Upgrade log files
|
||||
for ficlog in `ls $TRAVIS_BUILD_DIR/*.log`
|
||||
do
|
||||
echo "Debugging informations for file $ficlog"
|
||||
#cat $ficlog
|
||||
done
|
||||
# Apache log file
|
||||
echo "Debugging informations for file apache error.log"
|
||||
sudo cat /var/log/apache2/travis_error_log
|
||||
if [ "$DEBUG" = true ]; then
|
||||
# Dolibarr log file
|
||||
echo "Debugging informations for file dolibarr.log (latest 50 lines)"
|
||||
tail -n 50 $TRAVIS_BUILD_DIR/documents/dolibarr.log
|
||||
# Database log file
|
||||
echo "Debugging informations for file mysql error.log"
|
||||
sudo tail -n 50 /var/log/mysql/error.log
|
||||
# TODO: PostgreSQL log file
|
||||
echo
|
||||
fi
|
||||
- |
|
||||
echo Failure detected, so we show samples of log to help diagnose
|
||||
# This part of code is executed only if the command that fails are enclosed with set +e
|
||||
# Show upgrade log files
|
||||
#for ficlog in `ls $TRAVIS_BUILD_DIR/*.log`
|
||||
#do
|
||||
#echo "Debugging informations for file $ficlog"
|
||||
#cat $ficlog
|
||||
#done
|
||||
# Show Apache log file
|
||||
echo "Debugging informations for file apache error.log"
|
||||
sudo tail -n 200 /var/log/apache2/travis_error_log
|
||||
if [ "$DEBUG" = true ]; then
|
||||
# Dolibarr log file
|
||||
echo "Debugging informations for file dolibarr.log (latest 50 lines)"
|
||||
tail -n 200 $TRAVIS_BUILD_DIR/documents/dolibarr.log
|
||||
# Database log file
|
||||
echo "Debugging informations for file mysql error.log"
|
||||
sudo tail -n 200 /var/log/mysql/error.log
|
||||
# TODO: PostgreSQL log file
|
||||
echo
|
||||
fi
|
||||
|
|
|
|||
298
.tx/config
298
.tx/config
|
|
@ -1,436 +1,436 @@
|
|||
[main]
|
||||
host = https://www.transifex.com
|
||||
host = https://www.transifex.com
|
||||
lang_map = uz: uz_UZ, sw: sw_SW, sr@latin: sr_RS
|
||||
|
||||
[dolibarr.accountancy]
|
||||
[o:dolibarr-association:p:dolibarr:r:accountancy]
|
||||
file_filter = htdocs/langs/<lang>/accountancy.lang
|
||||
source_file = htdocs/langs/en_US/accountancy.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.admin]
|
||||
[o:dolibarr-association:p:dolibarr:r:admin]
|
||||
file_filter = htdocs/langs/<lang>/admin.lang
|
||||
source_file = htdocs/langs/en_US/admin.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.agenda]
|
||||
[o:dolibarr-association:p:dolibarr:r:agenda]
|
||||
file_filter = htdocs/langs/<lang>/agenda.lang
|
||||
source_file = htdocs/langs/en_US/agenda.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.assets]
|
||||
[o:dolibarr-association:p:dolibarr:r:assets]
|
||||
file_filter = htdocs/langs/<lang>/assets.lang
|
||||
source_file = htdocs/langs/en_US/assets.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.banks]
|
||||
[o:dolibarr-association:p:dolibarr:r:banks]
|
||||
file_filter = htdocs/langs/<lang>/banks.lang
|
||||
source_file = htdocs/langs/en_US/banks.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.bills]
|
||||
[o:dolibarr-association:p:dolibarr:r:bills]
|
||||
file_filter = htdocs/langs/<lang>/bills.lang
|
||||
source_file = htdocs/langs/en_US/bills.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.blockedlog]
|
||||
[o:dolibarr-association:p:dolibarr:r:blockedlog]
|
||||
file_filter = htdocs/langs/<lang>/blockedlog.lang
|
||||
source_file = htdocs/langs/en_US/blockedlog.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.bookmarks]
|
||||
[o:dolibarr-association:p:dolibarr:r:bookmarks]
|
||||
file_filter = htdocs/langs/<lang>/bookmarks.lang
|
||||
source_file = htdocs/langs/en_US/bookmarks.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.boxes]
|
||||
[o:dolibarr-association:p:dolibarr:r:boxes]
|
||||
file_filter = htdocs/langs/<lang>/boxes.lang
|
||||
source_file = htdocs/langs/en_US/boxes.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.cashdesk]
|
||||
[o:dolibarr-association:p:dolibarr:r:cashdesk]
|
||||
file_filter = htdocs/langs/<lang>/cashdesk.lang
|
||||
source_file = htdocs/langs/en_US/cashdesk.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.categories]
|
||||
[o:dolibarr-association:p:dolibarr:r:categories]
|
||||
file_filter = htdocs/langs/<lang>/categories.lang
|
||||
source_file = htdocs/langs/en_US/categories.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.commercial]
|
||||
[o:dolibarr-association:p:dolibarr:r:commercial]
|
||||
file_filter = htdocs/langs/<lang>/commercial.lang
|
||||
source_file = htdocs/langs/en_US/commercial.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.companies]
|
||||
[o:dolibarr-association:p:dolibarr:r:companies]
|
||||
file_filter = htdocs/langs/<lang>/companies.lang
|
||||
source_file = htdocs/langs/en_US/companies.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.compta]
|
||||
[o:dolibarr-association:p:dolibarr:r:compta]
|
||||
file_filter = htdocs/langs/<lang>/compta.lang
|
||||
source_file = htdocs/langs/en_US/compta.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.contracts]
|
||||
[o:dolibarr-association:p:dolibarr:r:contracts]
|
||||
file_filter = htdocs/langs/<lang>/contracts.lang
|
||||
source_file = htdocs/langs/en_US/contracts.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.cron]
|
||||
[o:dolibarr-association:p:dolibarr:r:cron]
|
||||
file_filter = htdocs/langs/<lang>/cron.lang
|
||||
source_file = htdocs/langs/en_US/cron.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.deliveries]
|
||||
[o:dolibarr-association:p:dolibarr:r:datapolicy]
|
||||
file_filter = htdocs/langs/<lang>/datapolicy.lang
|
||||
source_file = htdocs/langs/en_US/datapolicy.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:deliveries]
|
||||
file_filter = htdocs/langs/<lang>/deliveries.lang
|
||||
source_file = htdocs/langs/en_US/deliveries.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.dict]
|
||||
[o:dolibarr-association:p:dolibarr:r:dict]
|
||||
file_filter = htdocs/langs/<lang>/dict.lang
|
||||
source_file = htdocs/langs/en_US/dict.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.donations]
|
||||
[o:dolibarr-association:p:dolibarr:r:donations]
|
||||
file_filter = htdocs/langs/<lang>/donations.lang
|
||||
source_file = htdocs/langs/en_US/donations.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.ecm]
|
||||
[o:dolibarr-association:p:dolibarr:r:ecm]
|
||||
file_filter = htdocs/langs/<lang>/ecm.lang
|
||||
source_file = htdocs/langs/en_US/ecm.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.errors]
|
||||
[o:dolibarr-association:p:dolibarr:r:errors]
|
||||
file_filter = htdocs/langs/<lang>/errors.lang
|
||||
source_file = htdocs/langs/en_US/errors.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.eventorganization]
|
||||
[o:dolibarr-association:p:dolibarr:r:eventorganization]
|
||||
file_filter = htdocs/langs/<lang>/eventorganization.lang
|
||||
source_file = htdocs/langs/en_US/eventorganization.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.exports]
|
||||
[o:dolibarr-association:p:dolibarr:r:exports]
|
||||
file_filter = htdocs/langs/<lang>/exports.lang
|
||||
source_file = htdocs/langs/en_US/exports.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.help]
|
||||
[o:dolibarr-association:p:dolibarr:r:help]
|
||||
file_filter = htdocs/langs/<lang>/help.lang
|
||||
source_file = htdocs/langs/en_US/help.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.holiday]
|
||||
[o:dolibarr-association:p:dolibarr:r:holiday]
|
||||
file_filter = htdocs/langs/<lang>/holiday.lang
|
||||
source_file = htdocs/langs/en_US/holiday.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.hrm]
|
||||
[o:dolibarr-association:p:dolibarr:r:hrm]
|
||||
file_filter = htdocs/langs/<lang>/hrm.lang
|
||||
source_file = htdocs/langs/en_US/hrm.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.install]
|
||||
[o:dolibarr-association:p:dolibarr:r:install]
|
||||
file_filter = htdocs/langs/<lang>/install.lang
|
||||
source_file = htdocs/langs/en_US/install.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.interventions]
|
||||
[o:dolibarr-association:p:dolibarr:r:interventions]
|
||||
file_filter = htdocs/langs/<lang>/interventions.lang
|
||||
source_file = htdocs/langs/en_US/interventions.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.intracommreport]
|
||||
[o:dolibarr-association:p:dolibarr:r:intracommreport]
|
||||
file_filter = htdocs/langs/<lang>/intracommreport.lang
|
||||
source_file = htdocs/langs/en_US/intracommreport.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.knowledgemanagement]
|
||||
[o:dolibarr-association:p:dolibarr:r:knowledgemanagement]
|
||||
file_filter = htdocs/langs/<lang>/knowledgemanagement.lang
|
||||
source_file = htdocs/langs/en_US/knowledgemanagement.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.languages-not-res]
|
||||
[o:dolibarr-association:p:dolibarr:r:languages-not-res]
|
||||
file_filter = htdocs/langs/<lang>/languages.lang
|
||||
source_file = htdocs/langs/en_US/languages.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.ldap]
|
||||
[o:dolibarr-association:p:dolibarr:r:ldap]
|
||||
file_filter = htdocs/langs/<lang>/ldap.lang
|
||||
source_file = htdocs/langs/en_US/ldap.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.link]
|
||||
file_filter = htdocs/langs/<lang>/link.lang
|
||||
source_file = htdocs/langs/en_US/link.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.loan]
|
||||
[o:dolibarr-association:p:dolibarr:r:loan]
|
||||
file_filter = htdocs/langs/<lang>/loan.lang
|
||||
source_file = htdocs/langs/en_US/loan.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.mailmanspip]
|
||||
[o:dolibarr-association:p:dolibarr:r:mailmanspip]
|
||||
file_filter = htdocs/langs/<lang>/mailmanspip.lang
|
||||
source_file = htdocs/langs/en_US/mailmanspip.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.mails]
|
||||
[o:dolibarr-association:p:dolibarr:r:mails]
|
||||
file_filter = htdocs/langs/<lang>/mails.lang
|
||||
source_file = htdocs/langs/en_US/mails.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.main]
|
||||
[o:dolibarr-association:p:dolibarr:r:main]
|
||||
file_filter = htdocs/langs/<lang>/main.lang
|
||||
source_file = htdocs/langs/en_US/main.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.margins]
|
||||
[o:dolibarr-association:p:dolibarr:r:margins]
|
||||
file_filter = htdocs/langs/<lang>/margins.lang
|
||||
source_file = htdocs/langs/en_US/margins.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.members]
|
||||
[o:dolibarr-association:p:dolibarr:r:members]
|
||||
file_filter = htdocs/langs/<lang>/members.lang
|
||||
source_file = htdocs/langs/en_US/members.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.modulebuilder]
|
||||
[o:dolibarr-association:p:dolibarr:r:modulebuilder]
|
||||
file_filter = htdocs/langs/<lang>/modulebuilder.lang
|
||||
source_file = htdocs/langs/en_US/modulebuilder.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.mrp]
|
||||
[o:dolibarr-association:p:dolibarr:r:mrp]
|
||||
file_filter = htdocs/langs/<lang>/mrp.lang
|
||||
source_file = htdocs/langs/en_US/mrp.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.multicurrency]
|
||||
[o:dolibarr-association:p:dolibarr:r:multicurrency]
|
||||
file_filter = htdocs/langs/<lang>/multicurrency.lang
|
||||
source_file = htdocs/langs/en_US/multicurrency.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.oauth]
|
||||
[o:dolibarr-association:p:dolibarr:r:oauth]
|
||||
file_filter = htdocs/langs/<lang>/oauth.lang
|
||||
source_file = htdocs/langs/en_US/oauth.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.opensurvey]
|
||||
[o:dolibarr-association:p:dolibarr:r:opensurvey]
|
||||
file_filter = htdocs/langs/<lang>/opensurvey.lang
|
||||
source_file = htdocs/langs/en_US/opensurvey.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.orders]
|
||||
[o:dolibarr-association:p:dolibarr:r:orders]
|
||||
file_filter = htdocs/langs/<lang>/orders.lang
|
||||
source_file = htdocs/langs/en_US/orders.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.other]
|
||||
[o:dolibarr-association:p:dolibarr:r:other]
|
||||
file_filter = htdocs/langs/<lang>/other.lang
|
||||
source_file = htdocs/langs/en_US/other.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.partnership]
|
||||
[o:dolibarr-association:p:dolibarr:r:partnership]
|
||||
file_filter = htdocs/langs/<lang>/partnership.lang
|
||||
source_file = htdocs/langs/en_US/partnership.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.paybox]
|
||||
[o:dolibarr-association:p:dolibarr:r:paybox]
|
||||
file_filter = htdocs/langs/<lang>/paybox.lang
|
||||
source_file = htdocs/langs/en_US/paybox.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.paypal]
|
||||
[o:dolibarr-association:p:dolibarr:r:paypal]
|
||||
file_filter = htdocs/langs/<lang>/paypal.lang
|
||||
source_file = htdocs/langs/en_US/paypal.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.printing]
|
||||
[o:dolibarr-association:p:dolibarr:r:printing]
|
||||
file_filter = htdocs/langs/<lang>/printing.lang
|
||||
source_file = htdocs/langs/en_US/printing.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.productbatch]
|
||||
[o:dolibarr-association:p:dolibarr:r:productbatch]
|
||||
file_filter = htdocs/langs/<lang>/productbatch.lang
|
||||
source_file = htdocs/langs/en_US/productbatch.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.products]
|
||||
[o:dolibarr-association:p:dolibarr:r:products]
|
||||
file_filter = htdocs/langs/<lang>/products.lang
|
||||
source_file = htdocs/langs/en_US/products.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.projects]
|
||||
[o:dolibarr-association:p:dolibarr:r:projects]
|
||||
file_filter = htdocs/langs/<lang>/projects.lang
|
||||
source_file = htdocs/langs/en_US/projects.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.propal]
|
||||
[o:dolibarr-association:p:dolibarr:r:propal]
|
||||
file_filter = htdocs/langs/<lang>/propal.lang
|
||||
source_file = htdocs/langs/en_US/propal.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.receiptprinter]
|
||||
[o:dolibarr-association:p:dolibarr:r:receiptprinter]
|
||||
file_filter = htdocs/langs/<lang>/receiptprinter.lang
|
||||
source_file = htdocs/langs/en_US/receiptprinter.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.receptions]
|
||||
[o:dolibarr-association:p:dolibarr:r:receptions]
|
||||
file_filter = htdocs/langs/<lang>/receptions.lang
|
||||
source_file = htdocs/langs/en_US/receptions.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.recruitment]
|
||||
[o:dolibarr-association:p:dolibarr:r:recruitment]
|
||||
file_filter = htdocs/langs/<lang>/recruitment.lang
|
||||
source_file = htdocs/langs/en_US/recruitment.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.resource]
|
||||
[o:dolibarr-association:p:dolibarr:r:resource]
|
||||
file_filter = htdocs/langs/<lang>/resource.lang
|
||||
source_file = htdocs/langs/en_US/resource.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.salaries]
|
||||
[o:dolibarr-association:p:dolibarr:r:salaries]
|
||||
file_filter = htdocs/langs/<lang>/salaries.lang
|
||||
source_file = htdocs/langs/en_US/salaries.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.sendings]
|
||||
[o:dolibarr-association:p:dolibarr:r:sendings]
|
||||
file_filter = htdocs/langs/<lang>/sendings.lang
|
||||
source_file = htdocs/langs/en_US/sendings.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.sms]
|
||||
[o:dolibarr-association:p:dolibarr:r:sms]
|
||||
file_filter = htdocs/langs/<lang>/sms.lang
|
||||
source_file = htdocs/langs/en_US/sms.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.stocks]
|
||||
[o:dolibarr-association:p:dolibarr:r:stocks]
|
||||
file_filter = htdocs/langs/<lang>/stocks.lang
|
||||
source_file = htdocs/langs/en_US/stocks.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.stripe]
|
||||
[o:dolibarr-association:p:dolibarr:r:stripe]
|
||||
file_filter = htdocs/langs/<lang>/stripe.lang
|
||||
source_file = htdocs/langs/en_US/stripe.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.supplier_proposal]
|
||||
[o:dolibarr-association:p:dolibarr:r:supplier_proposal]
|
||||
file_filter = htdocs/langs/<lang>/supplier_proposal.lang
|
||||
source_file = htdocs/langs/en_US/supplier_proposal.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.suppliers]
|
||||
[o:dolibarr-association:p:dolibarr:r:suppliers]
|
||||
file_filter = htdocs/langs/<lang>/suppliers.lang
|
||||
source_file = htdocs/langs/en_US/suppliers.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.ticket]
|
||||
[o:dolibarr-association:p:dolibarr:r:ticket]
|
||||
file_filter = htdocs/langs/<lang>/ticket.lang
|
||||
source_file = htdocs/langs/en_US/ticket.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.trips]
|
||||
[o:dolibarr-association:p:dolibarr:r:trips]
|
||||
file_filter = htdocs/langs/<lang>/trips.lang
|
||||
source_file = htdocs/langs/en_US/trips.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.users]
|
||||
[o:dolibarr-association:p:dolibarr:r:users]
|
||||
file_filter = htdocs/langs/<lang>/users.lang
|
||||
source_file = htdocs/langs/en_US/users.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.website]
|
||||
[o:dolibarr-association:p:dolibarr:r:website]
|
||||
file_filter = htdocs/langs/<lang>/website.lang
|
||||
source_file = htdocs/langs/en_US/website.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.withdrawals]
|
||||
[o:dolibarr-association:p:dolibarr:r:withdrawals]
|
||||
file_filter = htdocs/langs/<lang>/withdrawals.lang
|
||||
source_file = htdocs/langs/en_US/withdrawals.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.workflow]
|
||||
[o:dolibarr-association:p:dolibarr:r:workflow]
|
||||
file_filter = htdocs/langs/<lang>/workflow.lang
|
||||
source_file = htdocs/langs/en_US/workflow.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.zapier]
|
||||
[o:dolibarr-association:p:dolibarr:r:zapier]
|
||||
file_filter = htdocs/langs/<lang>/zapier.lang
|
||||
source_file = htdocs/langs/en_US/zapier.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
|
|
|
|||
36
COPYRIGHT
36
COPYRIGHT
|
|
@ -13,7 +13,7 @@ The Dolibarr images resources (available in the doc directory) is distributed un
|
|||
|
||||
|
||||
The name Dolibarr is a trademark initially registered by Laurent Destailleur and ceased to the Dolibarr foundation. You can use the name Dolibarr
|
||||
for your own need as long as you follow the rules defined on the page https://wiki.dolibarr.org/index.php/Rules_to_use_the_brand_name_%22Dolibarr%22
|
||||
for your own need as long as you follow the rules defined on the page https://wiki.dolibarr.org/index.php/Rules_to_use_the_brand_name_%22Dolibarr%22
|
||||
The use of the name DoliStore is also restricted to the same rules defined on https://wiki.dolibarr.org/index.php/Rules_to_use_the_brand_name_%22Dolibarr%22
|
||||
|
||||
|
||||
|
|
@ -23,36 +23,40 @@ Licence of dependencies of third-party components used by Dolibarr (all compatib
|
|||
Component Version License GPL Compatible Usage
|
||||
-------------------------------------------------------------------------------------
|
||||
PHP libraries:
|
||||
ADOdb-Date 0.36 Modified BSD License Yes Date convertion (not into rpm package)
|
||||
EvalMath 1.0 BSD Yes Safe math expressions evaluation
|
||||
Escpos-php 2.2 MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers
|
||||
EvalMath 1.0 BSD Yes Safe math expressions evaluation. Used by dynamic price only. TODO Replace with dol_eval ?
|
||||
Escpos-php 3.0 MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers
|
||||
GeoIP2 0.2.0 Apache License 2.0 Yes Lib to make geoip convert
|
||||
Mobiledetect 2.8.39 MIT License Yes Detect mobile devices browsers
|
||||
NuSoap 0.9.5 LGPL 2.1+ Yes Library to develop SOAP Web services (not into rpm and deb package)
|
||||
MathPHP 2.8.1 MIT License Yes Modern math library for PHP (only few files)
|
||||
Mobiledetect 2.8.41 MIT License Yes Detect mobile devices browsers
|
||||
NuSoap 0.9.16 LGPL 2.1+ Yes Library to develop SOAP Web services. From https://github.com/f00b4r/nusoap/tree/v0.9.16
|
||||
PEAR Mail_MIME 1.8.9 BSD Yes NuSoap dependency
|
||||
ParseDown 1.6 MIT License Yes Markdown parser
|
||||
PCLZip 2.8.4 LGPL-3+ Yes Library to zip/unzip files
|
||||
PHPDebugBar 1.15.1 MIT License Yes Used only by the module "debugbar" for developers
|
||||
PHPSpreadSheet 1.8.2 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
|
||||
php-iban 4.1 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP
|
||||
ParseDown 1.7.4 MIT License Yes Markdown parser
|
||||
PCLZip 2.8.4 LGPL-3+ Yes Library to zip/unzip files
|
||||
PHPDebugBar 1.18.2 MIT License Yes Used only by the module "debugbar" for developers
|
||||
PHPSpreadSheet 1.12.0 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
|
||||
PHP-Iban 4.1.1 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP
|
||||
PHP-Imap 2.7.2 MIT License Yes Library to use IMAP with OAuth
|
||||
PHPoAuthLib 0.8.2 MIT License Yes Library to provide oauth1 and oauth2 to different service
|
||||
PHPPrintIPP 1.3 GPL-2+ Yes Library to send print IPP requests
|
||||
PrestaShop-WS-Lib 94feb5f OSL-3.0 No Library providing API client for Prestashop.
|
||||
PSR/Logs 1.0 MIT License Yes Library for logs (used by DebugBar)
|
||||
PSR/simple-cache ? MIT License Yes Library for cache (used by PHPSpreadSheet)
|
||||
Restler 3.1.1 LGPL-3+ Yes Library to develop REST Web services (+ swagger-ui js lib into dir explorer)
|
||||
Sabre 3.2.2 BSD Yes DAV support
|
||||
Sabre 4.0.2 BSD Yes DAV support
|
||||
Swift Mailer 5.4.2-DEV MIT License Yes Comprehensive mailing tools for PHP
|
||||
Symfony/var-dumper ??? MIT License Yes Library to make var dump (used by DebugBar)
|
||||
Stripe 7.67.0 MIT Licence Yes Library for Stripe module
|
||||
Stripe 10.7.0 MIT Licence Yes Library for Stripe module
|
||||
TCPDF 6.3.2 LGPL-3+ Yes PDF generation
|
||||
TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes FPDI replacement
|
||||
|
||||
bacon, dasprid, swiss-qr-bill, kmukku, symfony/validator
|
||||
|
||||
JS libraries:
|
||||
Ace 1.4.14 BSD Yes JS library to get code syntaxique coloration in a textarea.
|
||||
ChartJS 3.7.1 MIT License Yes JS library for graph
|
||||
CKEditor 4.18 LGPL-2.1+ Yes Editor WYSIWYG
|
||||
jQuery 3.6.0 MIT License Yes JS library
|
||||
jQuery UI 1.13.1 GPL and MIT License Yes JS library plugin UI
|
||||
CKEditor 4.22.1 LGPL-2.1+ Yes Editor WYSIWYG
|
||||
jQuery 3.6.4 MIT License Yes JS library
|
||||
jQuery UI 1.13.2 GPL and MIT License Yes JS library plugin UI
|
||||
jQuery select2 4.0.13 GPL and Apache License Yes JS library plugin for sexier multiselect. Warning: 4.0.6+ create troubles without patching css
|
||||
jQuery blockUI 2.70.0 GPL and MIT License Yes JS library plugin blockUI (to use ajax popups)
|
||||
jQuery Colorpicker 1.1 MIT License Yes JS library for color picker for a defined list of colors
|
||||
|
|
|
|||
28
README-FR.md
28
README-FR.md
|
|
@ -56,6 +56,10 @@ Vous pouvez aussi utiliser un serveur Web et une base de données prise en charg
|
|||
|
||||
Pour mettre à jour Dolibarr depuis une vieille version vers celle ci:
|
||||
|
||||
- Faites une sauvegarde de votre instance [voir ce tutorial](https://wiki.dolibarr.org/index.php/Installation_-_Upgrade#Upgrade_Dolibarr)
|
||||
|
||||
- Vérifiez que la nouvelle version est compatible avec la version PHP de votre serveur [voir PHP support](https://wiki.dolibarr.org/index.php/Releases).
|
||||
|
||||
- Ecrasez les vieux fichiers dans le vieux répertoire 'dolibarr' par les fichiers
|
||||
fournis dans ce nouveau package.
|
||||
|
||||
|
|
@ -66,7 +70,7 @@ Note: *Le processus de migration peut être lancé manuellement et plusieurs foi
|
|||
|
||||
## CE QUI EST NOUVEAU
|
||||
|
||||
See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) file.
|
||||
Voir le fichier [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog).
|
||||
|
||||
## CE QUE DOLIBARR PEUT FAIRE
|
||||
|
||||
|
|
@ -84,11 +88,11 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
|||
- Gestion de contrats de services
|
||||
- Gestion de stock et inventaires
|
||||
- Gestion des expéditions
|
||||
- Gestion des demandes de congès
|
||||
- Gestion des demandes de congés
|
||||
- Gestion des notes de frais
|
||||
- Gestion de recrutement
|
||||
- GED (Gestion Electronique de Documents)
|
||||
- EMailings de masse
|
||||
- E-Mailings de masse
|
||||
- Réalisation de sondages
|
||||
- Gestion d'adhérents
|
||||
- Point de vente/Caisse enregistreuse
|
||||
|
|
@ -103,17 +107,17 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
|||
- Support des codes barres
|
||||
- Calcul des marges
|
||||
- Connectivité LDAP
|
||||
- Intégratn de ClickToDial
|
||||
- Intégration de ClickToDial
|
||||
- Intégration RSS
|
||||
- Intégation Skype
|
||||
- Intégration de système de paiements (Paypal, Stripe, Paybox...)
|
||||
- Intégration Skype
|
||||
- Intégration de système de paiements (PayPal, Stripe, Paybox...)
|
||||
- …
|
||||
|
||||
### Divers
|
||||
|
||||
- Multi-langue.
|
||||
- Multi-utilisateurs avec différents niveaux de permissions par module.
|
||||
- Multi-devise.
|
||||
- Multidevise.
|
||||
- Peux être multi-société par ajout du module externe multi-société.
|
||||
- Plusieurs thèmes visuels.
|
||||
- Application simple à utiliser.
|
||||
|
|
@ -123,7 +127,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
|||
- Génération PDF et ODT des éléments (factures, propositions commerciales, commandes, bons expéditions, etc...)
|
||||
- Code simple et facilement personnalisable (pas de framework lourd; mécanisme de hook et triggers).
|
||||
- Support natif de nombreuses fonctions spécifiques aux pays comme:
|
||||
- La tax espagnole TE et ISPF
|
||||
- La taxe espagnole TE et ISPF
|
||||
- Gestion de la TVA NPR (non perçue récupérable - pour les utilisateurs français des DOM-TOM)
|
||||
- La loi française Finance 2016 et logiciels de caisse
|
||||
- La double taxe canadienne
|
||||
|
|
@ -135,7 +139,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
|||
|
||||
### Extension
|
||||
|
||||
Dolibarr peut aussi être étendu à volonté avec l'ajout de module/applications externes développées par des développeus tiers, disponible sur [DoliStore](https://www.dolistore.com).
|
||||
Dolibarr peut aussi être étendu à volonté avec l'ajout de modules/applications externes développées par des développeurs tiers, disponible sur [DoliStore](https://www.dolistore.com).
|
||||
|
||||
## CE QUE DOLIBARR NE PEUT PAS (ENCORE) FAIRE
|
||||
|
||||
|
|
@ -164,15 +168,15 @@ Voir le fichier [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/CO
|
|||
|
||||
## ACTUALITES ET RESEAUX SOCIAUX
|
||||
|
||||
Suivez le projet Dolibarr project sur les réseaux francophones
|
||||
Suivez le projet Dolibarr sur les réseaux francophones
|
||||
|
||||
- [Facebook](https://www.facebook.com/dolibarr.fr)
|
||||
- [Twitter](https://www.twitter.com/dolibarr_france)
|
||||
- [X](https://www.twitter.com/dolibarr_france)
|
||||
|
||||
ou sur les réseaux anglophones
|
||||
|
||||
- [Facebook](https://www.facebook.com/dolibarr)
|
||||
- [Twitter](https://www.twitter.com/dolibarr)
|
||||
- [X](https://www.twitter.com/dolibarr)
|
||||
- [LinkedIn](https://www.linkedin.com/company/association-dolibarr)
|
||||
- [YouTube](https://www.youtube.com/user/DolibarrERPCRM)
|
||||
- [GitHub](https://github.com/Dolibarr/dolibarr)
|
||||
|
|
|
|||
52
README.md
52
README.md
|
|
@ -1,8 +1,7 @@
|
|||
# DOLIBARR ERP & CRM
|
||||
|
||||

|
||||

|
||||
[](https://php.net/)
|
||||
[](https://php.net/)
|
||||
[](https://github.com/Dolibarr/dolibarr)
|
||||
[](https://bestpractices.coreinfrastructure.org/projects/5521)
|
||||
|
||||
|
|
@ -10,7 +9,7 @@ Dolibarr ERP & CRM is a modern software package that helps manage your organizat
|
|||
|
||||
It's an Open Source Software suite (written in PHP with optional JavaScript enhancements) designed for small, medium or large companies, foundations and freelancers.
|
||||
|
||||
You can freely use, study, modify or distribute it according to its licence.
|
||||
You can freely use, study, modify or distribute it according to its license.
|
||||
|
||||
You can use it as a standalone application or as a web application to access it from the Internet or a LAN.
|
||||
|
||||
|
|
@ -48,9 +47,9 @@ On GNU/Linux, first check if your distribution has already packaged Dolibarr.
|
|||
|
||||
- Check 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 (recommanded 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 main version like 3.6, 9.0, ...)
|
||||
`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.
|
||||
|
||||
|
|
@ -58,7 +57,7 @@ On GNU/Linux, first check if your distribution has already packaged Dolibarr.
|
|||
|
||||
- From your browser, go to the dolibarr "install/" page
|
||||
|
||||
The URL will depends on how you web setup was setup to point to your dolibarr installation. It may looks like:
|
||||
The URL will depends on how your web setup was set up to point to your dolibarr installation. It may look like:
|
||||
|
||||
`http://localhost/dolibarr/htdocs/install/`
|
||||
|
||||
|
|
@ -72,7 +71,7 @@ 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.
|
||||
|
||||
|
|
@ -82,7 +81,7 @@ Dolibarr supports upgrading, usually without the need for any (commercial) suppo
|
|||
|
||||
- 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 'dolibarr' directory with files provided into the new version's package.
|
||||
- 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.
|
||||
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*").
|
||||
|
||||
|
|
@ -99,13 +98,13 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
|||
|
||||
Product Management
|
||||
|
||||
- Products and/or Services catalog
|
||||
- Products and/or Services catalogue
|
||||
- Stock / Warehouse management + Inventory
|
||||
- Barcodes
|
||||
- Batches / Lots / Serials
|
||||
- Product Variants
|
||||
- Bill of Materials (BOM)
|
||||
- Manufacturing Orders
|
||||
- Manufacturing Orders (MO)
|
||||
|
||||
Customer/Sales Management
|
||||
|
||||
|
|
@ -115,7 +114,8 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
|||
- Customer Orders management
|
||||
- Contracts/Subscription management
|
||||
- Interventions management
|
||||
- Ticket System
|
||||
- Ticket System (+ Knowledge management)
|
||||
- Partnership management
|
||||
- Shipping management
|
||||
- Customer Invoices/Credit notes and payment management
|
||||
- Point of Sale (POS)
|
||||
|
|
@ -125,7 +125,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
|||
- Suppliers/Vendors + Contacts
|
||||
- Supplier (price) requests
|
||||
- Purchase Orders management
|
||||
- Delivery/Receiption
|
||||
- Delivery/Reception
|
||||
- Supplier Invoices/credit notes and payment management
|
||||
- INCOTERMS
|
||||
|
||||
|
|
@ -142,16 +142,18 @@ 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
|
||||
HR - Human Resources Management
|
||||
|
||||
- Employee's leaves management
|
||||
- Expense reports
|
||||
- Recruitment management
|
||||
- Employee/staff management
|
||||
- Timesheets
|
||||
|
||||
### Other application/modules
|
||||
|
|
@ -169,20 +171,20 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
|||
- Payment platforms integration (PayPal, Stripe, Paybox...)
|
||||
- Email-Collector
|
||||
|
||||
(around 100 modules available by default, 1000+ on the addon market place)
|
||||
(around 100 modules available by default, 1000+ addons at the official marketplace Dolistore.com)
|
||||
|
||||
### Other general features
|
||||
|
||||
- Multi-Language Support (Localization in most major languages)
|
||||
- Multi-Users and groups with finely grained rights
|
||||
- Multi-users and groups with finely-grained rights
|
||||
- Multi-Currency
|
||||
- Multi-Company (by adding of an external module)
|
||||
- Very user friendly and easy to use
|
||||
- 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)
|
||||
- APIs (REST, SOAP)
|
||||
- Code that is easy to understand, maintain and develop (PHP with no heavy framework; trigger and hook architecture)
|
||||
- Support a lot of country specific features:
|
||||
- Support a lot of country-specific features:
|
||||
- Spanish Tax RE and ISPF
|
||||
- French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM)
|
||||
- Canadian double taxes (federal/province) and other countries using cumulative VAT
|
||||
|
|
@ -190,7 +192,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 GDPR, ...)
|
||||
- ...
|
||||
- Flexible PDF & ODT generation for invoices, proposals, orders...
|
||||
- ...
|
||||
|
|
@ -205,7 +207,7 @@ See exact requirements on the [Wiki](https://wiki.dolibarr.org/index.php/Prerequ
|
|||
|
||||
### Extending
|
||||
|
||||
Dolibarr can be extended with a lot of other external application or modules from third party developers available at the [DoliStore](https://www.dolistore.com).
|
||||
Dolibarr can be extended with a lot of other external applications or modules from third-party developers available at the [DoliStore](https://www.dolistore.com).
|
||||
|
||||
## WHAT DOLIBARR CAN'T DO YET
|
||||
|
||||
|
|
@ -213,19 +215,19 @@ These are features that Dolibarr does **not** yet fully support:
|
|||
|
||||
- Tasks dependencies in projects
|
||||
- Payroll module
|
||||
- No native embedded Webmail, but you can send email to contacts in Dolibarr with e.g. offers, invoices, etc.
|
||||
- No native embedded Webmail, but you can send emails to contacts in Dolibarr with e.g. offers, invoices, etc.
|
||||
- Dolibarr can't do coffee (yet)
|
||||
|
||||
## DOCUMENTATION
|
||||
|
||||
Administrator, user, developer and translator's documentations are available along with other community resources in the [Wiki](https://wiki.dolibarr.org).
|
||||
Administrator, user, developer and translator's documentation are available along with other community resources in the [Wiki](https://wiki.dolibarr.org).
|
||||
|
||||
## CONTRIBUTING
|
||||
|
||||
This project exists thanks to all the people who contribute.
|
||||
Please read the instructions 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 ...) [[Contribute](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)]
|
||||
|
||||
A view on Contributors:
|
||||
A View on Contributors:
|
||||
|
||||
[](https://github.com/Dolibarr/dolibarr/graphs/contributors)
|
||||
|
||||
|
|
@ -240,7 +242,7 @@ See [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT) fil
|
|||
Follow Dolibarr project on:
|
||||
|
||||
- [Facebook](https://www.facebook.com/dolibarr)
|
||||
- [Twitter](https://www.twitter.com/dolibarr)
|
||||
- [X](https://x.com/dolibarr)
|
||||
- [LinkedIn](https://www.linkedin.com/company/association-dolibarr)
|
||||
- [Reddit](https://www.reddit.com/r/Dolibarr_ERP_CRM/)
|
||||
- [YouTube](https://www.youtube.com/user/DolibarrERPCRM)
|
||||
|
|
|
|||
82
SECURITY.md
82
SECURITY.md
|
|
@ -4,17 +4,15 @@ This file contains some policies about the security reports on Dolibarr ERP CRM
|
|||
|
||||
## Supported Versions for security reports
|
||||
|
||||
| Version | Supported |
|
||||
| ---------- | ---------------------- |
|
||||
| <= 15.0.0 | :x: |
|
||||
| >= 15.0.1+ | :white_check_mark: except CSRF attacks|
|
||||
| >= 16.0.0 | :white_check_mark: |
|
||||
| >= develop | :white_check_mark: |
|
||||
Security report are valid only on current stable version (see https://dolibarr.org web site to get current stable version) or on development version (branch "develop" on https://github.com/Dolibarr/dolibarr).
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
To report a vulnerability, for a private report, please use GitHub security advisory at [https://github.com/Dolibarr/dolibarr/security/advisories/new](https://github.com/Dolibarr/dolibarr/security/advisories/new) (if you have permissions).
|
||||
Alternatively send an email to security@dolibarr.org (for everybody)
|
||||
To report a vulnerability, for a private report, you can:
|
||||
|
||||
- Send your report on [https://app.yogosha.com/cvd/dolibarr/10VxeNx6Ui3rSEhAgX63US](https://app.yogosha.com/cvd/dolibarr/10VxeNx6Ui3rSEhAgX63US) (recommended for everybody)
|
||||
- Or if you have permissions, use GitHub security advisory at [https://github.com/Dolibarr/dolibarr/security/advisories/new](https://github.com/Dolibarr/dolibarr/security/advisories/new)
|
||||
- Or send by email to security@dolibarr.org a clear textual description of the report along with steps to reproduce the issue, include attachments such as screenshots or proof of concept code as necessary
|
||||
|
||||
## Hunting vulnerabilities on Dolibarr
|
||||
|
||||
|
|
@ -22,9 +20,9 @@ We believe that the future of software is online SaaS. This means software are m
|
|||
|
||||
If you believe you've found a security bug in our service, we are happy to work with you to resolve the issue promptly and ensure you are fairly rewarded for your discovery.
|
||||
|
||||
Any type of denial of service attacks is strictly forbidden, as well as any interference with network equipment and Dolibarr infrastructure.
|
||||
Any type of denial-of-service attack is strictly forbidden, as well as any interference with network equipment and Dolibarr infrastructure.
|
||||
|
||||
We recommand to install Dolibarr ERP CRM on your own server (as most Open Source software, download and use is free: [https://www.dolibarr.org/download](https://www.dolibarr.org/download)) to get access on every side of application.
|
||||
We recommend to install Dolibarr ERP CRM on your own server (as most Open Source software, download and use is free: [https://www.dolibarr.org/download](https://www.dolibarr.org/download)) to get access on every side of application.
|
||||
|
||||
### User Agent
|
||||
|
||||
|
|
@ -32,7 +30,7 @@ If you try to find bug on Dolibarr, we recommend to append to your user-agent he
|
|||
|
||||
### Account access
|
||||
|
||||
You can install the web application yourself on your own platform/server so you get full access to application and sources. Download the zip of the files to put into your own web server virtual host from [https://www.dolibarr.org/download](https://www.dolibarr.org/download)
|
||||
You can install the web application yourself on your own platform/server so you get full access to application and sources. Download the zip of the files to put in your own web server virtual host from [https://www.dolibarr.org/download](https://www.dolibarr.org/download)
|
||||
|
||||
## Eligibility and Responsible Disclosure
|
||||
|
||||
|
|
@ -40,59 +38,61 @@ We are happy to thank everyone who submits valid reports which help us improve t
|
|||
|
||||
You must be the first reporter of the vulnerability (duplicate reports are closed).
|
||||
|
||||
You must send a clear textual description of the report along with steps to reproduce the issue, include attachments such as screenshots or proof of concept code as necessary.
|
||||
|
||||
You must avoid tests that could cause degradation or interruption of our service (refrain from using automated tools, and limit yourself about requests per second), that's why we recommand to install software on your own platform.
|
||||
You must avoid tests that could cause degradation or interruption of our service (refrain from using automated tools, and limit yourself about requests per second), that's why we recommend to install software on your own platform.
|
||||
|
||||
You must not leak, manipulate, or destroy any user data of third parties to find your vulnerability.
|
||||
|
||||
Reports are processed around once a month.
|
||||
|
||||
## Scope for qualified vulnerabilities
|
||||
|
||||
ONLY vulnerabilities discovered, when the following setup on test platform is used, are "valid":
|
||||
|
||||
* $dolibarr_main_prod must be set to 1 into conf.php
|
||||
* $dolibarr_nocsrfcheck must be kept to the value 0 into conf.php (this is the default value)
|
||||
* The version to analyze must be the last version available in the "develop" branch or in the last stable "vX.Y" released version. Reports on vulnerabilities already fixed (so already reported) in the develop branch will not be validated.
|
||||
* $dolibarr_main_prod must be set to 1 in conf.php
|
||||
* $dolibarr_nocsrfcheck must be kept to the value 0 in conf.php (this is the default value)
|
||||
* $dolibarr_main_force_https must be set to something else than 0.
|
||||
* The constant MAIN_SECURITY_CSRF_WITH_TOKEN must be set to 3 into backoffice menu Home - Setup - Other (this protection should be set to 3 soon by default)
|
||||
* The module DebugBar and ModuleBuilder must NOT be enabled (by default, these modules are not enabled. They are developer tools)
|
||||
* ONLY security reports on modules provided by default and with the "stable" status are valid (troubles into "experimental", "developement" or external modules are not valid vulnerabilities).
|
||||
* The constant MAIN_SECURITY_CSRF_WITH_TOKEN must be set to 3 in the backoffice menu Home - Setup - Other (this protection should be set to 3 soon by default). CSRF attacks are accepted but
|
||||
double check that you have set MAIN_SECURITY_CSRF_WITH_TOKEN to value 3.
|
||||
* ONLY security reports on modules provided by default and with the "stable" status are valid (troubles in "experimental", "development" or external modules are not valid vulnerabilities).
|
||||
* The root of web server must link to htdocs and the documents directory must be outside of the web server root (this is the default when using the default installer but may differs with external installer).
|
||||
* The web server setup must be done so that only the documents directory is in write mode. The root directory called htdocs must be read-only.
|
||||
* CSRF attacks are accepted but double check that you have set MAIN_SECURITY_CSRF_WITH_TOKEN to value 3.
|
||||
* Ability for a high level user to edit web site pages into the CMS by including HTML or Javascript is an expected feature. Vulnerabilities into the website module are validated only if HTML or Javascript injection can be done by a non allowed user.
|
||||
* The modules DebugBar and ModuleBuilder must NOT be enabled. (by default, these modules are not enabled. They are developer tools)
|
||||
* Ability for a high-level user to edit web site pages in the CMS by including HTML or JavaScript is an expected feature. Vulnerabilities in the website module are validated only if HTML or JavaScript injection can be done by a non-allowed user.
|
||||
* Fail2ban rules for rate limit on the login page, forgotten password page, API calls and all public pages (/public/*) must be installed as recommended in the section "About - Admin tools - Section Access limits and mitigation".
|
||||
|
||||
Scope is the web application (back office) and the APIs.
|
||||
Scope is the web application (backoffice) and the APIs.
|
||||
|
||||
## Qualifying vulnerabilities for reporting
|
||||
## Examples of vulnerabilities that are Qualified for reporting.
|
||||
|
||||
* Remote code execution (RCE)
|
||||
* Local files access and manipulation (LFI, RFI, XXE, SSRF, XSPA)
|
||||
* Code injections (HTML, JS, SQL, PHP, ...)
|
||||
* Cross-Site Scripting (XSS), except from setup page of module "External web site" (allowing any content here, editable by admin user only, is accepted on purpose) and except into module "Web site" when permission to edit website content is allowed (injecting any data in this case is allowed too).
|
||||
* Code injections (JS, SQL, PHP). HTML are covered only for fields that are not description, notes or comments fields (where rich content is allowed on purpose).
|
||||
* Cross-Site Scripting (XSS), except from setup page of module "External web site" (allowing any content here, editable by admin user only, is accepted on purpose) and except in the module "Web site" when permission to edit website content is allowed (injecting any data in this case is allowed too).
|
||||
* Cross-Site Requests Forgery (CSRF) with real security impact (when using GET URLs, CSRF are qualified only for creating, updating or deleting data from pages restricted to admin users)
|
||||
* Open redirect
|
||||
* Broken authentication & session management
|
||||
* Insecure direct object references
|
||||
* CORS with real security impact
|
||||
* Insecure direct object references (IDOR)
|
||||
* Cross-Origin Resource Sharing (CORS) with real security impact
|
||||
* Horizontal and vertical privilege escalation
|
||||
* "HTTP Host Header" XSS
|
||||
* Software version disclosure (for non admin users only)
|
||||
* Stack traces or path disclosure (for non admin users only)
|
||||
* Software version disclosure (for non-admin users only)
|
||||
* Stack traces or path disclosure (for non-admin users only)
|
||||
|
||||
## Non-qualifying vulnerabilities for reporting
|
||||
## Examples of vulnerabilities that are Non-qualified for reporting.
|
||||
|
||||
* "Self" XSS
|
||||
* Clickjacking/UI redressing
|
||||
* Presence of autocomplete attribute on web forms
|
||||
* Logout and other instances of low-severity Cross-Site Request Forgery
|
||||
* Reports from automated web vulnerability scanners (Acunetix, Vega, etc.) that have not been validated
|
||||
* Reports on features on modules flagged as "deprecated", "experimental" or "development" if the module needs to be enabled for that (this is not the case on production).
|
||||
* Software or libraries versions or private IP disclosure when logged-in user is admin
|
||||
* Stack traces or path disclosure when logged-in user is admin
|
||||
* Any vulnerabilities due to a configuration different than the one defined in chapter "Scope for qualified vulnerabilities".
|
||||
* Vulnerabilities affecting outdated browsers or platforms, or vulnerabilities inside browsers themself.
|
||||
* Brute force attacks on login page, password forgotten page or any public pages (/public/*) are not qualified if the recommended fail2ban rules were not installed.
|
||||
* SSL/TLS best practices
|
||||
* Denial of Service attacks
|
||||
* Clickjacking/UI redressing
|
||||
* Physical or social engineering attempts or issues that require physical access to a victim’s computer/device
|
||||
* Presence of autocomplete attribute on web forms
|
||||
* Vulnerabilities affecting outdated browsers or platforms, or vulnerabilities inside browsers themself.
|
||||
* Logout and other instances of low-severity Cross-Site Request Forgery
|
||||
* Missing security-related HTTP headers which do not lead directly to a vulnerability
|
||||
* Reports from automated web vulnerability scanners (Acunetix, Vega, etc.) that have not been validated
|
||||
* Invalid or missing SPF (Sender Policy Framework) records (Incomplete or missing SPF/DKIM/DMARC)
|
||||
* Reports on features flagged as "experimental" or "development"
|
||||
* Software version or private IP disclosure when logged user is admin
|
||||
* Stack traces or path disclosure when logged user is admin
|
||||
* Any vulnerabilities due to a configuration different than the one defined into chapter "Scope for qualified vulnerabilities".
|
||||
* Physical or social engineering attempts or issues that require physical access to a victim’s computer/device
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
7
|
||||
10
|
||||
|
|
@ -19,7 +19,6 @@ Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm |
|
|||
php-pear, php-mail-mime,
|
||||
# php-tcpdf,
|
||||
# libfpdf-tpl-php, php-fpdf,
|
||||
# libphp-adodb,
|
||||
# libnusoap-php,
|
||||
# libphp-pclzip,
|
||||
# Required javascript libraries
|
||||
|
|
|
|||
|
|
@ -61,31 +61,6 @@ License: GPL-3+
|
|||
|
||||
------------------------------------------------------------
|
||||
|
||||
Files: htdocs/includes/adodbtime/*
|
||||
Copyright: 2003-2005, John Lim
|
||||
unknown, jackbbs
|
||||
License: BSD-3-Clause
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
.
|
||||
Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
.
|
||||
Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
.
|
||||
Neither the name of the John Lim nor the names of its contributors may be
|
||||
used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
Comment:
|
||||
Those files are not shipped in the binary package since we use
|
||||
the library as packaged in "libphp-adodb".
|
||||
|
||||
|
||||
------------------------------------------------------------
|
||||
|
||||
Files: htdocs/includes/ckeditor/*
|
||||
Copyright: 2003-2012 CKSource - Frederico Knabben
|
||||
License: GPL-2+
|
||||
|
|
|
|||
|
|
@ -146,7 +146,6 @@ case "$1" in
|
|||
#else
|
||||
# File already exist. We add params not found.
|
||||
#echo Add new params to overwrite path to use shared libraries/fonts
|
||||
#grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
|
||||
##grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ $force_install_distrib='debian';
|
|||
// - not removed from package (see rm in rules file),
|
||||
// - declared into dependencies (see Depends in control file)
|
||||
//$force_dolibarr_lib_TCPDF_PATH='';
|
||||
//$force_dolibarr_lib_ADODB_PATH='/usr/share/php/adodb';
|
||||
//$force_dolibarr_lib_GEOIP_PATH='';
|
||||
//$force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap';
|
||||
//$force_dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip';
|
||||
|
|
|
|||
|
|
@ -33,5 +33,5 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
|||
+$conffile = "/etc/dolibarr/conf.php";
|
||||
+$conffiletoshow = "/etc/dolibarr/conf.php";
|
||||
|
||||
|
||||
// Load conf file if it is already defined
|
||||
$short_options = "c:h";
|
||||
$long_options = array(
|
||||
|
|
|
|||
|
|
@ -19,6 +19,10 @@ override_dh_auto_clean:
|
|||
override_dh_auto_build:
|
||||
# Do nothing. Added to disable launchpad to use bugged dh_auto_build search for ant
|
||||
|
||||
# Force the compression format for control files
|
||||
override_dh_builddeb:
|
||||
dh_builddeb -- -Zxz
|
||||
|
||||
#override_dh_compress:
|
||||
# dh_compress --no-act -X.png
|
||||
|
||||
|
|
@ -89,7 +93,6 @@ override_dh_install:
|
|||
rm -fr build/zip
|
||||
|
||||
# clean from all PHP embedded libraries (we use package dependencies instead)
|
||||
# rm -fr htdocs/includes/adodbtime
|
||||
# rm -fr htdocs/includes/geoip
|
||||
# rm -fr htdocs/includes/nusoap
|
||||
# rm -fr htdocs/includes/odtphp/zip/pclzip
|
||||
|
|
@ -125,4 +128,4 @@ override_dh_fixperms:
|
|||
# Give rights to the webserver on the upload directory
|
||||
chown www-data:www-data debian/dolibarr/var/lib/dolibarr/documents
|
||||
chmod 2775 debian/dolibarr/var/lib/dolibarr/documents
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
htdocs/install/doctemplates/websites/website_template-corporate.zip
|
||||
htdocs/install/doctemplates/websites/website_template-stellar.zip
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
# Force use of gzip compression by dpkg-buildpackage
|
||||
# Force use of gzip compression by dpkg-buildpackage for the tarball *.debian.tar.gz
|
||||
# See also option --compression from command line of dpkg-buildpackage
|
||||
# Format for the control files are defined into the rules file in override_dh_builddeb section
|
||||
compression = "gzip"
|
||||
#compression-level = 9
|
||||
|
|
|
|||
|
|
@ -1,16 +1,17 @@
|
|||
<?php
|
||||
$force_install_message='KeepDefaultValuesMamp';
|
||||
$force_install_main_data_root='/Applications/MAMP/dolibarr_documents';
|
||||
$force_install_type='mysqli';
|
||||
$force_install_dbserver='localhost';
|
||||
$force_install_port='8889';
|
||||
$force_install_database='dolibarr';
|
||||
$force_install_createdatabase='1';
|
||||
$force_install_databaselogin='dolibarrmysql';
|
||||
$force_install_databasepass='root';
|
||||
$force_install_createuser='1';
|
||||
$force_install_databaserootlogin='root';
|
||||
$force_install_databaserootpass='root';
|
||||
$force_install_dolibarrlogin='admin';
|
||||
$force_install_nophpinfo='1';
|
||||
$force_install_lockinstall='444';
|
||||
|
||||
$force_install_message = 'KeepDefaultValuesMamp';
|
||||
$force_install_main_data_root = '/Applications/MAMP/dolibarr_documents';
|
||||
$force_install_type = 'mysqli';
|
||||
$force_install_dbserver = 'localhost';
|
||||
$force_install_port = '8889';
|
||||
$force_install_database = 'dolibarr';
|
||||
$force_install_createdatabase = '1';
|
||||
$force_install_databaselogin = 'dolibarrmysql';
|
||||
$force_install_databasepass = 'root';
|
||||
$force_install_createuser = '1';
|
||||
$force_install_databaserootlogin = 'root';
|
||||
$force_install_databaserootpass = 'root';
|
||||
$force_install_dolibarrlogin = 'admin';
|
||||
$force_install_nophpinfo = '1';
|
||||
$force_install_lockinstall = '444';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM php:7.3-apache
|
||||
FROM php:8.1-apache-bullseye
|
||||
|
||||
ENV PHP_INI_DATE_TIMEZONE 'UTC'
|
||||
ENV PHP_INI_MEMORY_LIMIT 256M
|
||||
|
|
@ -25,7 +25,7 @@ RUN apt-get update -y \
|
|||
mailutils \
|
||||
&& apt-get autoremove -y \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
|
||||
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
||||
&& docker-php-ext-install -j$(nproc) calendar intl mysqli pdo_mysql gd soap zip \
|
||||
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
|
||||
&& docker-php-ext-install -j$(nproc) ldap && \
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# How to use it ?
|
||||
|
||||
The docker-compose.yml file is used to build and run Dolibarr in the current workspace.
|
||||
This docker image intended for developpement usage.
|
||||
The docker-compose.yml file is a sample of a config file to use to build and run Dolibarr in the current workspace with Docker.
|
||||
This docker image is intended for development usage.
|
||||
For production usage you should consider other contributor reference like https://hub.docker.com/r/tuxgasy/dolibarr
|
||||
|
||||
Before build/run, define the variable HOST_USER_ID as following:
|
||||
|
|
@ -25,7 +25,7 @@ The URL to go to the Dolibarr is :
|
|||
The URL to go to PhpMyAdmin is (login/password is root/root) :
|
||||
|
||||
http://0.0.0.0:8080
|
||||
|
||||
|
||||
In Dolibarr configuration Email let PHP mail function, To see all mail send by Dolibarr go to maildev
|
||||
|
||||
http://0.0.0.0:8081
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ services:
|
|||
mariadb:
|
||||
image: mariadb:latest
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
MYSQL_ROOT_PASSWORD: rootpassfordev
|
||||
MYSQL_DATABASE: dolibarr
|
||||
ports:
|
||||
- "3306:3306"
|
||||
|
|
@ -34,6 +34,8 @@ services:
|
|||
build: .
|
||||
environment:
|
||||
HOST_USER_ID: $HOST_USER_ID
|
||||
PHP_INI_DATE_TIMEZONE: $PHP_INI_DATE_TIMEZONE
|
||||
PHP_INI_MEMORY_LIMIT: $PHP_INI_MEMORY_LIMIT
|
||||
volumes:
|
||||
- ../../htdocs:/var/www/html/
|
||||
- ../../documents:/var/documents
|
||||
|
|
|
|||
|
|
@ -10,15 +10,15 @@ chmod g+rwx /var/www/html/conf
|
|||
|
||||
if [ ! -d /var/documents ]; then
|
||||
echo "[docker-run] => create volume directory /var/documents ..."
|
||||
mkdir -p /var/documents
|
||||
mkdir -p /var/documents
|
||||
fi
|
||||
echo "[docker-run] => Set Permission to www-data for /var/documents"
|
||||
chown -R www-data:www-data /var/documents
|
||||
|
||||
if [ ! -f /usr/local/etc/php/php.ini ]; then
|
||||
cat <<EOF > /usr/local/etc/php/php.ini
|
||||
date.timezone = $PHP_INI_DATE_TIMEZONE
|
||||
echo "[docker-run] => update ${PHP_INI_DIR}/conf.d/dolibarr-php.ini"
|
||||
cat <<EOF > ${PHP_INI_DIR}/conf.d/dolibarr-php.ini
|
||||
date.timezone = ${PHP_INI_DATE_TIMEZONE:-UTC}
|
||||
memory_limit = ${PHP_INI_MEMORY_LIMIT:-256M}
|
||||
EOF
|
||||
fi
|
||||
|
||||
exec apache2-foreground
|
||||
|
|
|
|||
|
|
@ -220,7 +220,8 @@ OPTIMIZE_OUTPUT_VHDL = NO
|
|||
# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
|
||||
# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
|
||||
|
||||
EXTENSION_MAPPING =
|
||||
#EXTENSION_MAPPING = example=PHP
|
||||
EXTENSION_MAPPING =
|
||||
|
||||
# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
|
||||
# to include (a tag file for) the STL sources as input, then you should
|
||||
|
|
@ -602,6 +603,7 @@ INPUT_ENCODING = UTF-8
|
|||
# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
|
||||
# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
|
||||
|
||||
#FILE_PATTERNS = *.php *.pl *.sql *.example
|
||||
FILE_PATTERNS = *.php *.pl
|
||||
|
||||
# The RECURSIVE tag can be used to turn specify whether or not subdirectories
|
||||
|
|
|
|||
|
|
@ -43,5 +43,5 @@ DoliWampWillStartApacheMysql=L'instal·lador DoliWamp intentarà iniciar o reini
|
|||
OldVersionFoundAndMoveInNew=S'ha trobat una versió antiga de base de dades i ha estat moguda per a ser utilitzada per la nova versió de Dolibarr
|
||||
OldVersionFoundButFailedToMoveInNew=S'ha trobat una versió antiga de base de dades, però no es pot moure per a ser utilitzada per la nova versió de Dolibarr
|
||||
|
||||
DLLMissing=La teva instal·lació windows no té el component "Microsoft Visual C++ Redistributable for Visual Studio 2012". Instal·la primer la versió de 32-bit (vcredist_x86.exe) (pots trobar-la a https://www.microsoft.com/en-us/download/) i reiniciar després la instal·lació/actualització de DoliWamp.
|
||||
DLLMissing=La teva instal·lació windows no té el component "Microsoft Visual C++ Redistributable for Visual Studio 2015". Instal·la primer la versió de 32-bit (vcredist_x86.exe) (pots trobar-la a https://www.microsoft.com/en-us/download/) i reiniciar després la instal·lació/actualització de DoliWamp.
|
||||
ContinueAnyway=Continua igualment (el procés d'instal·lació podria fallar sense aquest prerequisit)
|
||||
|
|
|
|||
|
|
@ -11,38 +11,38 @@ LaunchProgram=Launch %1
|
|||
AssocFileExtension=&Associate %1 with the %2 file extension
|
||||
AssocingFileExtension=Associating %1 with the %2 file extension...
|
||||
|
||||
YouWillInstallDoliWamp=You will install DoliWamp (so Dolibarr + all required third party software like Apache, Mysql and PHP) on your computer.
|
||||
ThisAssistantInstallOrUpgrade=WARNING: Using an ERP CRM installed on a local computer can be dangerous: if your computer break down, you can lose all your data. Do this if you are ready to manage backup yourself seriously. If not, use an installation in Saas instead (see https://saas.dolibarr.org).
|
||||
IfYouHaveTechnicalKnowledge=Moreover, if you have technical knowledges and want to manage your Apache, Mysql and PHP yourself, you should not use this assistant and make a manual installation of Dolibarr on your existing server with Apache, Mysql and PHP.
|
||||
ButIfYouLook=But if you look for an automatic setup on your local computer, you''re on the good way...
|
||||
DoYouWantToStart=Do you want to start installation process ?
|
||||
YouWillInstallDoliWamp=You will install DoliWamp (so Dolibarr plus all required third-party software like Apache, MySQL and PHP) on your computer.
|
||||
ThisAssistantInstallOrUpgrade=WARNING: Using an ERP CRM installed on a local computer can be dangerous: if your computer breaks down, you can lose all your data. Do this if you are ready to manage backups yourself seriously. If not, use an installation in SaaS instead (see https://saas.dolibarr.org).
|
||||
IfYouHaveTechnicalKnowledge=Moreover, if you have technical knowledge and want to manage Apache, MySQL and PHP yourself, you should not use this assistant and instead make a manual installation of Dolibarr on your existing server with Apache, MySQL and PHP.
|
||||
ButIfYouLook=But if you are looking for an automatic setup on your local computer, you're on the right path...
|
||||
DoYouWantToStart=Do you want to start the installation process?
|
||||
|
||||
TechnicalParameters=Technical parameters
|
||||
IfFirstInstall=If first install, please specify some technical parameters. If you don't understand, are not sure, or are doing an upgrade, just leave the default values.
|
||||
IfFirstInstall=If this is the first install, please specify some technical parameters. If you don't understand, are not sure, or are doing an upgrade, just keep the default values.
|
||||
|
||||
; WARNING !!! STRINGS HERE MUST BE LOWER THAN 60 CHARACTERS
|
||||
SMTPServer=SMTP server (your own or ISP SMTP server, first install only) :
|
||||
ApachePort=Apache port (first install only, common choice is 80) :
|
||||
MySqlPort=MySql port (first install only, common choice is 3306) :
|
||||
MySqlPassword=MySql server and database password you want for root (first install only):
|
||||
SMTPServer=SMTP server (your own or ISP SMTP server, first install only):
|
||||
ApachePort=Apache port (first install only, common choice is 80):
|
||||
MySqlPort=MySQL port (first install only, common choice is 3306):
|
||||
MySqlPassword=MySQL server and database password you want for root (first install only):
|
||||
|
||||
FailedToDeleteLock=Failed to delete the file %1/www/dolibarr/install.lock. You can ignore warning but you may have to remove it manually later when asked. Click OK to continue...
|
||||
FailedToDeleteLock=Failed to delete the file %1/www/dolibarr/install.lock. You can ignore this warning but you may have to remove the file manually later when asked. Click OK to continue...
|
||||
|
||||
PortAlreadyInUse=Port %1 seems to be already in use. You should cancel to go back and choose another value for %2 port. Cancel choice and choose another value ?
|
||||
PortAlreadyInUse=Port %1 seems to already be in use. You should cancel to go back and choose another value for %2 port. Cancel choice and choose another value?
|
||||
|
||||
FirefoxDetected=Firefox has been detected on your computer. Would you like to use it as the default browser for Dolibarr ?
|
||||
ChromeDetected=Chrome has been detected on your computer. Would you like to use it as the default browser for Dolibarr ?
|
||||
MicrosoftEdgeDetected=Microsoft Edge has been detected on your computer. Would you like to use it as the default browser for Dolibarr ?
|
||||
ChooseDefaultBrowser=Please choose your default browser (iexplore.exe, firefox.exe, chrome.exe, MicrosoftEdge.exe...). If you are not sure, just click Open :
|
||||
FirefoxDetected=Firefox has been detected on your computer. Would you like to use it as the default browser for Dolibarr?
|
||||
ChromeDetected=Chrome has been detected on your computer. Would you like to use it as the default browser for Dolibarr?
|
||||
MicrosoftEdgeDetected=Microsoft Edge has been detected on your computer. Would you like to use it as the default browser for Dolibarr?
|
||||
ChooseDefaultBrowser=Please choose your default browser (iexplore.exe, firefox.exe, chrome.exe, MicrosoftEdge.exe...). If you are not sure, just click Open:
|
||||
|
||||
LaunchNow=Launch Dolibarr now
|
||||
|
||||
ProgramHasBeenRemoved=Dolibarr program files have been removed. However, all your data files are still in directory %1. You must remove this directory manually for a complete uninstall.
|
||||
ProgramHasBeenRemoved=Dolibarr's program files have been removed. However, all your data files are still in directory %1. You must remove this directory manually for a complete uninstall.
|
||||
|
||||
DoliWampWillStartApacheMysql=DoliWamp installer will now start or restart Apache and Mysql, this may last from several seconds to one minute after this confirmation. Start to install or upgrade the web and database server required by Dolibarr ?
|
||||
DoliWampWillStartApacheMysql=DoliWamp installer will now start or restart Apache and MySQL. This may take from several seconds to one minute. Start to install or upgrade the web and database server required by Dolibarr?
|
||||
|
||||
OldVersionFoundAndMoveInNew=An old database version has been found and moved to be used by new Dolibarr version
|
||||
OldVersionFoundButFailedToMoveInNew=An old database version has been found but could not be moved to be used with new Dolibarr version
|
||||
OldVersionFoundAndMoveInNew=An old database version has been found and moved to be used by the new Dolibarr version
|
||||
OldVersionFoundButFailedToMoveInNew=An old database version has been found but could not be moved to be used with the new Dolibarr version
|
||||
|
||||
DLLMissing=Your Windows installation is missing The "Micrsoft Visual C++ Redistributable for Visual Studio 2012" component. Please install the 32-bit version (vcredist_x86.exe) first (you can find it at https://www.microsoft.com/en-us/download/) and restart DoliWamp installation/upgrade after.
|
||||
ContinueAnyway=Continue anyway (install process may fails without this prerequisite)
|
||||
DLLMissing=Your Windows installation is missing The "Microsoft Visual C++ Redistributable for Visual Studio 2015" component. Please install the 32-bit version (vcredist_x86.exe) first (you can find it at https://www.microsoft.com/en-us/download/) and restart DoliWamp installation/upgrade after.
|
||||
ContinueAnyway=Continue anyway (install process may fail without this prerequisite)
|
||||
|
|
|
|||
|
|
@ -44,5 +44,5 @@ DoliWampWillStartApacheMysql=L'installeur DoliWamp va maintenant d
|
|||
OldVersionFoundAndMoveInNew=Une ancienne version de base a été trouvée et déplacée pour fonctionner avec la nouvelle version de Dolibarr.
|
||||
OldVersionFoundButFailedToMoveInNew=Une ancienne version de base a été trouvée mais ne peut être déplacée pour être utilisée avec la nouvelle version de Dolibarr.
|
||||
|
||||
DLLMissing=L'installation de votre Windows est incomplète. Il manque le composant "Micrsoft Visual C++ Redistributable for Visual Studio 2012". Installer la version 32-bit (vcredist_x86.exe) d'abord (vous pourrez le trouver à https://www.microsoft.com/fr-fr/download/) puis relancer l'installation de DoliWamp après.
|
||||
DLLMissing=L'installation de votre Windows est incomplète. Il manque le composant "Micrsoft Visual C++ Redistributable for Visual Studio 2015". Installer la version 32-bit (vcredist_x86.exe) d'abord (vous pourrez le trouver à https://www.microsoft.com/fr-fr/download/) puis relancer l'installation de DoliWamp après.
|
||||
ContinueAnyway=Continuer malgré tout (le process d'installaton échouera)
|
||||
|
|
|
|||
|
|
@ -43,5 +43,5 @@ DoliWampWillStartApacheMysql=Die DoliWamp-Installation wird nun starten oder Apa
|
|||
OldVersionFoundAndMoveInNew=Eine alte Datenbankversion wurde gefunden und verschoben, um von der neuen Dolibarr-Version verwendet zu werden.
|
||||
OldVersionFoundButFailedToMoveInNew=Eine alte Datenbankversion wurde gefunden, konnte jedoch nicht verschoben werden, um mit der neuen Dolibarr-Version verwendet zu werden.
|
||||
|
||||
DLLMissing=Your Windows installation is missing The "Micrsoft Visual C++ Redistributable for Visual Studio 2012" component. Please install the 32-bit version (vcredist_x86.exe) first (you can find it at https://www.microsoft.com/en-us/download/) and restart DoliWamp installation/upgrade after.
|
||||
DLLMissing=Your Windows installation is missing The "Micrsoft Visual C++ Redistributable for Visual Studio 2015" component. Please install the 32-bit version (vcredist_x86.exe) first (you can find it at https://www.microsoft.com/en-us/download/) and restart DoliWamp installation/upgrade after.
|
||||
ContinueAnyway=Fahren Sie trotzdem fort (der Installationsvorgang kann ohne diese Voraussetzung fehlschlagen).
|
||||
|
|
|
|||
|
|
@ -43,5 +43,5 @@ DoliWampWillStartApacheMysql=El instalador DoliWamp intentará iniciar o reinici
|
|||
OldVersionFoundAndMoveInNew=Se ha encontrado una versión antigua de base de datos y ha sido movida para ser utilizada por la nueva versión de Dolibarr
|
||||
OldVersionFoundButFailedToMoveInNew=Se ha encontrado una versión antigua de base de datos, pero no se pudo mover para ser utilizada por la nueva versión de Dolibarr
|
||||
|
||||
DLLMissing=Su instalación Windows no tiene el componente "Microsoft Visual C++ Redistributable for Visual Studio 2012". Instale primero la versión de 32-bit (vcredist_x86.exe) (puedes encontrarlo en https://www.microsoft.com/en-us/download/) y reiniciar después la instalación/actualización de DoliWamp.
|
||||
DLLMissing=Su instalación Windows no tiene el componente "Microsoft Visual C++ Redistributable for Visual Studio 2015". Instale primero la versión de 32-bit (vcredist_x86.exe) (puedes encontrarlo en https://www.microsoft.com/en-us/download/) y reiniciar después la instalación/actualización de DoliWamp.
|
||||
ContinueAnyway=Continua igualmente (el proceso de instalación podría fallar sin este prerequisito)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#-------------------------------------------------------------------#
|
||||
# Makefile
|
||||
# Makefile to build UsedPort exe
|
||||
#-------------------------------------------------------------------#
|
||||
# 1.0 Laurent Destailleur Creation
|
||||
#-------------------------------------------------------------------#
|
||||
|
|
|
|||
|
|
@ -9,3 +9,5 @@ The build of .exe files need to have some windows executable files already insta
|
|||
|
||||
If you have technical knowledge in web administration and plan to share your server instance (Apache, Mysql or PHP) with other projects than Dolibarr or want to use Dolibarr other components (PostgreSQL), you should not use this assistant and make a manual installation of Dolibarr on your existing server by downloading the standard package (.tgz or .zip file).
|
||||
|
||||
|
||||
!!! See file ../makepack-howto.txt
|
||||
|
|
|
|||
|
|
@ -253,6 +253,7 @@ int main(int argc, char **argv)
|
|||
//----------------
|
||||
int noarg,curseurarg,help=0,invalide=0;
|
||||
char option;
|
||||
char *endptr;
|
||||
|
||||
for (noarg=1;noarg<argc;noarg++) {
|
||||
if (((argv[noarg][0])=='/') || ((argv[noarg][0])=='-')) {
|
||||
|
|
@ -261,7 +262,7 @@ for (noarg=1;noarg<argc;noarg++) {
|
|||
if (strlen(argv[noarg]) < 3) { ++noarg; curseurarg=0; }
|
||||
switch (option) {
|
||||
case 's': strncpy(Host,argv[noarg]+curseurarg,sizeof(Host)); break;
|
||||
case 'p': Port=atoi(argv[noarg]+curseurarg); break;
|
||||
case 'p': Port=strtol(argv[noarg] + curseurarg, &endptr, 10); break; // Get port from "-p80" (curseurarg = 2) or "-p 80" (curseurarg = 0)
|
||||
case '?': help=-1;break; // Help
|
||||
case 'h': help=-1;break; // Help
|
||||
case 'v': help=-1;break; // Help
|
||||
|
|
@ -270,6 +271,20 @@ for (noarg=1;noarg<argc;noarg++) {
|
|||
}
|
||||
}
|
||||
|
||||
// Check for conversion errors
|
||||
if (*endptr != '\0') {
|
||||
// Handle error: Invalid input format
|
||||
printf("Invalid port number format\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
// Check for overflow
|
||||
if (Port < 0 || Port > INT_MAX) {
|
||||
// Handle error: Port number out of range
|
||||
printf("Port number out of range\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
help=!(Port > 0);
|
||||
|
||||
// Show usage
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
|
||||
/* !!! DO NOT EDIT THIS FILE, EDIT config.inc.php INSTEAD !!! */
|
||||
|
||||
// vim: expandtab sw=4 ts=4 sts=4:
|
||||
|
|
@ -139,7 +138,7 @@ $cfg['UseDbSearch'] = TRUE; // whether to enable the "database sea
|
|||
$cfg['IgnoreMultiSubmitErrors'] = FALSE; // if set to true, PMA continues computing multiple-statement queries
|
||||
// even if one of the queries failed
|
||||
$cfg['VerboseMultiSubmit'] = TRUE; // if set to true, PMA will show the affected rows of EACH statement on
|
||||
// multiple-statement queries. See the libraries/import.php file for
|
||||
// multiple-statement queries. See the libraries/import.php file for
|
||||
// hardcoded defaults on how many queries a statement may contain!
|
||||
$cfg['AllowArbitraryServer'] = FALSE; // allow login to any user entered server in cookie based auth
|
||||
|
||||
|
|
@ -195,7 +194,7 @@ $cfg['CharEditing'] = 'input';
|
|||
// textarea - allows newlines in fields
|
||||
$cfg['InsertRows'] = 2; // How many rows can be inserted at one time
|
||||
|
||||
$cfg['ForeignKeyDropdownOrder'] = // Sort order for items in a foreign-key dropdown box.
|
||||
$cfg['ForeignKeyDropdownOrder'] = // Sort order for items in a foreign-key dropdown box.
|
||||
array( 'content-id', 'id-content'); // 'content' is the referenced data, 'id' is the key value.
|
||||
$cfg['ForeignKeyMaxLimit'] = 100; // A dropdown will be used if fewer items are present
|
||||
|
||||
|
|
@ -488,7 +487,7 @@ $cfg['ShowBrowseComments'] = TRUE; // shows stored relation-comments in
|
|||
$cfg['ShowPropertyComments']= TRUE; // shows stored relation-comments in 'table property' mode.
|
||||
$cfg['RepeatCells'] = 100; // repeat header names every X cells? (0 = deactivate)
|
||||
|
||||
$cfg['EditInWindow'] = TRUE; // Set to TRUE if Edit link should open the query to edit in the query window (assuming Javascript is enabled), and to FALSE if we should edit in the right panel
|
||||
$cfg['EditInWindow'] = TRUE; // Set to TRUE if Edit link should open the query to edit in the query window (assuming Javascript is enabled), and to FALSE if we should edit in the right panel
|
||||
$cfg['QueryWindowWidth'] = 550; // Width of Query window
|
||||
$cfg['QueryWindowHeight'] = 310; // Height of Query window
|
||||
$cfg['QueryHistoryDB'] = FALSE; // Set to TRUE if you want DB-based query history.
|
||||
|
|
@ -561,7 +560,7 @@ $cfg['SQLQuery']['Refresh'] = TRUE; // Refresh the results page
|
|||
*/
|
||||
$cfg['UploadDir'] = ''; // Directory for uploaded files that can be executed by
|
||||
// phpMyAdmin. For example './upload'. Leave empty for
|
||||
// no upload directory support. Use %u for username
|
||||
// no upload directory support. Use %u for username
|
||||
// inclusion.
|
||||
$cfg['SaveDir'] = ''; // Directory where phpMyAdmin can save exported data on
|
||||
// server. For example './save'. Leave empty for no save
|
||||
|
|
@ -645,7 +644,7 @@ $cfg['ColumnTypes'] = array(
|
|||
);
|
||||
|
||||
// Attributes
|
||||
// Note: the "ON UPDATE CURRENT_TIMESTAMP" attribute is added dynamically
|
||||
// Note: the "ON UPDATE CURRENT_TIMESTAMP" attribute is added dynamically
|
||||
// for MySQL >= 4.1.2, in libraries/tbl_properties.inc.php
|
||||
|
||||
$cfg['AttributeTypes'] = array(
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@ safe_mode_protected_env_vars = LD_LIBRARY_PATH
|
|||
; and below. This directive makes most sense if used in a per-directory
|
||||
; or per-virtualhost web server configuration file. This directive is
|
||||
; *NOT* affected by whether Safe Mode is turned On or Off.
|
||||
open_basedir = "WAMPROOT"
|
||||
open_basedir = "WAMPROOT;C:\WINDOWS\TEMP"
|
||||
|
||||
; This directive allows you to disable certain functions for security reasons.
|
||||
; It receives a comma-delimited list of function names. This directive is
|
||||
|
|
|
|||
|
|
@ -22,13 +22,13 @@
|
|||
* \brief This script create a xml checksum file
|
||||
*/
|
||||
|
||||
if (! defined('NOREQUIREDB')) {
|
||||
if (!defined('NOREQUIREDB')) {
|
||||
define('NOREQUIREDB', '1'); // Do not create database handler $db
|
||||
}
|
||||
|
||||
$sapi_type = php_sapi_name();
|
||||
$script_file = basename(__FILE__);
|
||||
$path=dirname(__FILE__).'/';
|
||||
$path = dirname(__FILE__).'/';
|
||||
|
||||
// Test if batch mode
|
||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
|
|
@ -44,8 +44,9 @@ require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php";
|
|||
* Main
|
||||
*/
|
||||
|
||||
$includecustom=0;
|
||||
$includeconstants=array();
|
||||
$includecustom = 0;
|
||||
$includeconstants = array();
|
||||
$buildzip = 0;
|
||||
|
||||
if (empty($argv[1])) {
|
||||
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value] [buildzip=1]\n";
|
||||
|
|
@ -54,15 +55,28 @@ if (empty($argv[1])) {
|
|||
}
|
||||
|
||||
|
||||
$i=0;
|
||||
$i = 0;
|
||||
$result = array();
|
||||
while ($i < $argc) {
|
||||
if (! empty($argv[$i])) {
|
||||
parse_str($argv[$i]); // set all params $release, $includecustom, $includeconstant, $buildzip ...
|
||||
if (!empty($argv[$i])) {
|
||||
parse_str($argv[$i], $result); // set all params $release, $includecustom, $includeconstant, $buildzip ...
|
||||
}
|
||||
if (preg_match('/includeconstant=/', $argv[$i])) {
|
||||
$tmp=explode(':', $includeconstant, 3); // $includeconstant has been set with previous parse_str()
|
||||
if (!empty($result["release"])) {
|
||||
$release = $result["release"];
|
||||
}
|
||||
if (!empty($result["includecustom"])) {
|
||||
$includecustom = $result["includecustom"];
|
||||
}
|
||||
if (!empty($result["includeconstant"])) {
|
||||
$includeconstants[$i] = $result["includeconstant"];
|
||||
}
|
||||
if (!empty($result["buildzip"])) {
|
||||
$buildzip = 1;
|
||||
}
|
||||
if (preg_match('/includeconstant=/', strval($argv[$i]))) {
|
||||
$tmp = explode(':', $result['includeconstant'], 3); // $includeconstant has been set with previous parse_str()
|
||||
if (count($tmp) != 3) {
|
||||
print "Error: Bad parameter includeconstant=".$includeconstant."\n";
|
||||
print "Error: Bad parameter includeconstant=".$result['includeconstant'] ."\n";
|
||||
exit -1;
|
||||
}
|
||||
$includeconstants[$tmp[0]][$tmp[1]] = $tmp[2];
|
||||
|
|
@ -71,7 +85,7 @@ while ($i < $argc) {
|
|||
}
|
||||
|
||||
if (empty($release)) {
|
||||
print "Error: Missing release paramater\n";
|
||||
print "Error: Missing release parameter\n";
|
||||
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
||||
exit -1;
|
||||
}
|
||||
|
|
@ -79,16 +93,16 @@ if (empty($release)) {
|
|||
$savrelease = $release;
|
||||
|
||||
// If release is auto, we take current version
|
||||
$tmpver=explode('-', $release, 2);
|
||||
$tmpver = explode('-', $release, 2);
|
||||
if ($tmpver[0] == 'auto' || $tmpver[0] == 'autostable') {
|
||||
$release=DOL_VERSION;
|
||||
$release = DOL_VERSION;
|
||||
if ($tmpver[1] && $tmpver[0] == 'auto') {
|
||||
$release.='-'.$tmpver[1];
|
||||
$release .= '-'.$tmpver[1];
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($includecustom)) {
|
||||
$tmpverbis=explode('-', $release, 2);
|
||||
$tmpverbis = explode('-', $release, 2);
|
||||
if (empty($tmpverbis[1]) || $tmpver[0] == 'autostable') {
|
||||
if (DOL_VERSION != $tmpverbis[0] && $savrelease != 'auto') {
|
||||
print 'Error: When parameter "includecustom" is not set and there is no suffix in release parameter, version declared into filefunc.in.php ('.DOL_VERSION.') must be exact same value than "release" parameter ('.$tmpverbis[0].')'."\n";
|
||||
|
|
@ -96,7 +110,7 @@ if (empty($includecustom)) {
|
|||
exit -1;
|
||||
}
|
||||
} else {
|
||||
$tmpverter=explode('-', DOL_VERSION, 2);
|
||||
$tmpverter = explode('-', DOL_VERSION, 2);
|
||||
if ($tmpverter[0] != $tmpverbis[0]) {
|
||||
print 'Error: When parameter "includecustom" is not set, version declared into filefunc.in.php ('.DOL_VERSION.') must have value without prefix ('.$tmpverter[0].') that is exact same value than "release" parameter ('.$tmpverbis[0].')'."\n";
|
||||
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
||||
|
|
@ -104,7 +118,7 @@ if (empty($includecustom)) {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if (! preg_match('/'.preg_quote(DOL_VERSION, '/').'-/', $release)) {
|
||||
if (!preg_match('/'.preg_quote(DOL_VERSION, '/').'-/', $release)) {
|
||||
print 'Error: When parameter "includecustom" is set, version declared into filefunc.inc.php ('.DOL_VERSION.') must be used with a suffix into "release" parameter (ex: '.DOL_VERSION.'-mydistrib).'."\n";
|
||||
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
||||
exit -1;
|
||||
|
|
@ -123,13 +137,13 @@ foreach ($includeconstants as $countrycode => $tmp) {
|
|||
print "\n";
|
||||
|
||||
//$outputfile=dirname(__FILE__).'/../htdocs/install/filelist-'.$release.'.xml';
|
||||
$outputdir=dirname(dirname(__FILE__)).'/htdocs/install';
|
||||
$outputdir = dirname(dirname(__FILE__)).'/htdocs/install';
|
||||
print 'Delete current files '.$outputdir.'/filelist*.xml*'."\n";
|
||||
dol_delete_file($outputdir.'/filelist*.xml*', 0, 1, 1);
|
||||
|
||||
$checksumconcat=array();
|
||||
$checksumconcat = array();
|
||||
|
||||
$outputfile=$outputdir.'/filelist-'.$release.'.xml';
|
||||
$outputfile = $outputdir.'/filelist-'.$release.'.xml';
|
||||
$fp = fopen($outputfile, 'w');
|
||||
if (empty($fp)) {
|
||||
print 'Failed to open file '.$outputfile."\n";
|
||||
|
|
@ -142,8 +156,8 @@ fputs($fp, '<checksum_list version="'.$release.'" date="'.dol_print_date(dol_now
|
|||
foreach ($includeconstants as $countrycode => $tmp) {
|
||||
fputs($fp, '<dolibarr_constants country="'.$countrycode.'">'."\n");
|
||||
foreach ($tmp as $constname => $constvalue) {
|
||||
$valueforchecksum=(empty($constvalue)?'0':$constvalue);
|
||||
$checksumconcat[]=$valueforchecksum;
|
||||
$valueforchecksum = (empty($constvalue) ? '0' : $constvalue);
|
||||
$checksumconcat[] = $valueforchecksum;
|
||||
fputs($fp, ' <constant name="'.$constname.'">'.$valueforchecksum.'</constant>'."\n");
|
||||
}
|
||||
fputs($fp, '</dolibarr_constants>'."\n");
|
||||
|
|
@ -158,26 +172,26 @@ $files = new RegexIterator($iterator1, '#^(?:[A-Z]:)?(?:/(?!(?:'.($includecustom
|
|||
*/
|
||||
// Define qualified files (must be same than into generate_filelist_xml.php and in api_setup.class.php)
|
||||
$regextoinclude = '\.(php|php3|php4|php5|phtml|phps|phar|inc|css|scss|html|xml|js|json|tpl|jpg|jpeg|png|gif|ico|sql|lang|txt|yml|bak|md|mp3|mp4|wav|mkv|z|gz|zip|rar|tar|less|svg|eot|woff|woff2|ttf|manifest)$';
|
||||
$regextoexclude = '('.($includecustom?'':'custom|').'documents|conf|install|dejavu-fonts-ttf-.*|public\/test|sabre\/sabre\/.*\/tests|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
|
||||
$regextoexclude = '('.($includecustom ? '' : 'custom|').'documents|conf|install|dejavu-fonts-ttf-.*|public\/test|sabre\/sabre\/.*\/tests|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
|
||||
$files = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude, 'fullname');
|
||||
|
||||
$dir='';
|
||||
$needtoclose=0;
|
||||
$dir = '';
|
||||
$needtoclose = 0;
|
||||
foreach ($files as $filetmp) {
|
||||
$file = $filetmp['fullname'];
|
||||
//$newdir = str_replace(dirname(__FILE__).'/../htdocs', '', dirname($file));
|
||||
$newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file));
|
||||
if ($newdir!=$dir) {
|
||||
if ($newdir != $dir) {
|
||||
if ($needtoclose) {
|
||||
fputs($fp, ' </dir>'."\n");
|
||||
}
|
||||
fputs($fp, ' <dir name="'.$newdir.'">'."\n");
|
||||
$dir = $newdir;
|
||||
$needtoclose=1;
|
||||
$needtoclose = 1;
|
||||
}
|
||||
if (filetype($file)=="file") {
|
||||
$md5=md5_file($file);
|
||||
$checksumconcat[]=$md5;
|
||||
if (filetype($file) == "file") {
|
||||
$md5 = md5_file($file);
|
||||
$checksumconcat[] = $md5;
|
||||
fputs($fp, ' <md5file name="'.basename($file).'" size="'.filesize($file).'">'.$md5.'</md5file>'."\n");
|
||||
}
|
||||
}
|
||||
|
|
@ -191,7 +205,7 @@ fputs($fp, md5(join(',', $checksumconcat))."\n");
|
|||
fputs($fp, '</dolibarr_htdocs_dir_checksum>'."\n");
|
||||
|
||||
|
||||
$checksumconcat=array();
|
||||
$checksumconcat = array();
|
||||
|
||||
fputs($fp, '<dolibarr_script_dir version="'.$release.'">'."\n");
|
||||
|
||||
|
|
@ -201,27 +215,27 @@ $iterator2 = new RecursiveIteratorIterator($dir_iterator2);
|
|||
// Need to ignore document custom etc. Note: this also ignore natively symbolic links.
|
||||
$files = new RegexIterator($iterator2, '#^(?:[A-Z]:)?(?:/(?!(?:custom|documents|conf|install))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i');
|
||||
*/
|
||||
$regextoinclude='\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$';
|
||||
$regextoexclude='(custom|documents|conf|install)$'; // Exclude dirs
|
||||
$regextoinclude = '\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$';
|
||||
$regextoexclude = '(custom|documents|conf|install)$'; // Exclude dirs
|
||||
$files = dol_dir_list(dirname(__FILE__).'/../scripts/', 'files', 1, $regextoinclude, $regextoexclude, 'fullname');
|
||||
$dir='';
|
||||
$needtoclose=0;
|
||||
$dir = '';
|
||||
$needtoclose = 0;
|
||||
foreach ($files as $filetmp) {
|
||||
$file = $filetmp['fullname'];
|
||||
//$newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file));
|
||||
$newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file));
|
||||
$newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file));
|
||||
if ($newdir!=$dir) {
|
||||
if ($newdir != $dir) {
|
||||
if ($needtoclose) {
|
||||
fputs($fp, ' </dir>'."\n");
|
||||
}
|
||||
fputs($fp, ' <dir name="'.$newdir.'" >'."\n");
|
||||
$dir = $newdir;
|
||||
$needtoclose=1;
|
||||
$needtoclose = 1;
|
||||
}
|
||||
if (filetype($file)=="file") {
|
||||
$md5=md5_file($file);
|
||||
$checksumconcat[]=$md5;
|
||||
if (filetype($file) == "file") {
|
||||
$md5 = md5_file($file);
|
||||
$checksumconcat[] = $md5;
|
||||
fputs($fp, ' <md5file name="'.basename($file).'" size="'.filesize($file).'">'.$md5.'</md5file>'."\n");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
#----------------------------------------------------------------------------
|
||||
# \file build/makepack-dolibarr.pl
|
||||
# \brief Dolibarr package builder (tgz, zip, rpm, deb, exe, aps)
|
||||
# \author (c)2004-2020 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
# \author (c)2004-2023 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
#
|
||||
# This is list of constant you can set to have generated packages moved into a specific dir:
|
||||
#DESTIBETARC='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/lastbuild'
|
||||
|
|
@ -369,12 +369,12 @@ if ($nboftargetok) {
|
|||
}
|
||||
if (! $BUILD || $BUILD eq '0-rc') # For a major version
|
||||
{
|
||||
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log `git rev-list --boundary '.$MAJOR.'.'.$MINOR.'..origin/develop | grep ^- | cut -c2- | head -n 1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\|CLOSE\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
|
||||
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log `git rev-list --boundary '.$MAJOR.'.'.$MINOR.'..origin/develop | grep ^- | cut -c2- | head -n 1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\|PERF\|SEC\|QUAL\|CLOSE\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
|
||||
}
|
||||
else # For a maintenance release
|
||||
{
|
||||
#print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\'| sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
|
||||
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. | grep -v "Merge branch" | grep -v "Merge pull" | grep "^ " | sed -e "s/^[0-9a-z]* *//" | grep -e \'^FIX\|NEW\|CLOSE\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
|
||||
#print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\|PERF\|SEC\|QUAL\|CLOSE\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\'| sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
|
||||
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. | grep -v "Merge branch" | grep -v "Merge pull" | grep "^ " | sed -e "s/^[0-9a-z]* *//" | grep -e \'^FIX\|NEW\|PERF\|SEC\|QUAL\|CLOSE\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
|
||||
}
|
||||
print "\n";
|
||||
if (! $ret)
|
||||
|
|
@ -524,12 +524,13 @@ if ($nboftargetok) {
|
|||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/ansible`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/codesniffer`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/codetemplates`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/dbmodel`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/examples/ldap`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/examples/zapier`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/initdata`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/initdemo`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/iso-normes`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/ldap`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/licence`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/resources/dbmodel`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/resources/iso-normes`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/resources/licence`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/mail`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/multitail`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/phpcheckstyle`;
|
||||
|
|
@ -626,11 +627,11 @@ if ($nboftargetok) {
|
|||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/sabre/sabre/*/tests`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/stripe/tests`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/stripe/LICENSE`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/examples`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/freefont-*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/ae_fonts_*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/utils`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/examples`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/tools`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/vendor`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/webmozart`;
|
||||
|
|
@ -894,7 +895,7 @@ if ($nboftargetok) {
|
|||
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build`;
|
||||
|
||||
|
||||
print "Copy $BUILDROOT/$PROJECT to $BUILDROOT/$PROJECT.tmp\n";
|
||||
$cmd="cp -pr \"$BUILDROOT/$PROJECT\" \"$BUILDROOT/$PROJECT.tmp\"";
|
||||
$ret=`$cmd`;
|
||||
|
|
@ -1049,16 +1050,16 @@ if ($nboftargetok) {
|
|||
print "Go into directory $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build\n";
|
||||
chdir("$BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build");
|
||||
#$cmd="dpkg-source -b $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build";
|
||||
$cmd="dpkg-buildpackage -us -uc";
|
||||
$cmd="dpkg-buildpackage -us -uc --compression=gzip";
|
||||
print "Launch DEB build ($cmd)\n";
|
||||
$ret=`$cmd 2>&1 3>&1`;
|
||||
print $ret."\n";
|
||||
|
||||
chdir("$olddir");
|
||||
|
||||
|
||||
print "You can check bin package with lintian --pedantic -E -I \"$NEWDESTI/${FILENAMEDEB}_all.deb\"\n";
|
||||
print "You can check src package with lintian --pedantic -E -I \"$NEWDESTI/${FILENAMEDEB}.dsc\"\n";
|
||||
|
||||
|
||||
# Move to final dir
|
||||
print "Move *_all.deb *.dsc *.orig.tar.gz *.changes to $NEWDESTI\n";
|
||||
$ret=`mv $BUILDROOT/*_all.deb "$NEWDESTI/"`;
|
||||
|
|
|
|||
|
|
@ -293,6 +293,7 @@ foreach my $PROJECT (@PROJECTLIST) {
|
|||
}
|
||||
print "Clean $BUILDROOT\n";
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/.cache`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/.git`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/.project`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/.settings`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/index.php`;
|
||||
|
|
|
|||
|
|
@ -8,13 +8,13 @@ of Dolibarr. There is a chapter for BETA version and a chapter for RELEASE versi
|
|||
Prerequisites to build tgz, debian and rpm packages:
|
||||
> apt-get install perl tar dpkg dpatch p7zip-full rpm zip php-cli
|
||||
|
||||
Prerequisites to build autoexe DoliWamp package:
|
||||
Prerequisites to build autoexe DoliWamp package from Linux (solution seems broken since Ubuntu 20.04):
|
||||
> apt-get install wine q4wine
|
||||
> Launch "wine cmd" to check a drive Z: pointing to / exists.
|
||||
> Install InnoSetup
|
||||
For example by running isetup-5.5.8.exe (https://www.jrsoftware.org) https://files.jrsoftware.org/is/5/
|
||||
> Install WampServer into "C:\wamp64" to have Apache, PHP and MariaDB
|
||||
For example by running wampserver3.2.0_x64.exe (https://www.wampserver.com).
|
||||
For example by running wampserver3.2.6_x64.exe (https://www.wampserver.com).
|
||||
See file build/exe/doliwamp.iss to know the doliwamp version currently setup.
|
||||
> Add path to ISCC into PATH windows var:
|
||||
Launch wine cmd, then regedit and add entry int HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment\PATH
|
||||
|
|
@ -25,12 +25,25 @@ Prerequisites to build autoexe DoliWamp package:
|
|||
|
||||
***** Prerequisites For Windows *****
|
||||
|
||||
Install Perl
|
||||
Install WampServer-3.2.*-64.exe
|
||||
isetup-5.5.8.exe
|
||||
Prerequisites to build autoexe DoliWamp package from Windows:
|
||||
|
||||
> Install Perl for Windows (https://strawberryperl.com/)
|
||||
> Install isetup-5.5.8.exe (https://www.jrsoftware.org)
|
||||
> Install WampServer-3.2.*-64.exe (Apache 2.4.51, PHP 7.3.33, MariaDB 10.6.5 for example. Version must match the values found into doliwamp.iss)
|
||||
> Install GIT for Windows (https://git-scm.com/ => You must choose option "Add Git bash profile", "Git commit as-is")
|
||||
> Install Dolibarr current version:
|
||||
git clone https://github.com/dolibarr/dolibarr or git clone --branch X.Y https://github.com/dolibarr/dolibarr
|
||||
|
||||
> Add the path of PHP (C:\wamp64\bin\php\php7.3.33) and InnoSetup (C:\Program Files (x86)\Inno Setup 5) into the %PATH% of Windows.
|
||||
|
||||
> Create a config file c:\dolibarr\dolibarr\htdocs\conf\conf.php with content
|
||||
<?php
|
||||
$dolibarr_main_document_root="c:\dolibarr\dolibarr\htdocs";
|
||||
$dolibarr_main_url_root='http://localhost';
|
||||
|
||||
|
||||
***** Actions to do a BETA *****
|
||||
|
||||
This files describe steps made by Dolibarr packaging team to make a
|
||||
beta version of Dolibarr, step by step.
|
||||
|
||||
|
|
@ -55,6 +68,7 @@ Recopy the content of the output file into the file ChangeLog.
|
|||
|
||||
|
||||
***** Actions to do a RELEASE *****
|
||||
|
||||
This files describe steps made by Dolibarr packaging team to make a
|
||||
complete release of Dolibarr, step by step.
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,7 @@ README (English)
|
|||
Building a Patch file
|
||||
##################################################
|
||||
|
||||
This directory contains tools to build a patch
|
||||
after a developer has made changes on files in its
|
||||
Dolibarr tree.
|
||||
The output patch file can then be submited on Dolibarr
|
||||
dev mailing-list, with explanation on its goal, for
|
||||
inclusion in main branch.
|
||||
This directory contains tools to build a patch after a developer has made changes on files in its Dolibarr tree.
|
||||
The output patch file can then be submited on Dolibarr dev mailing-list, with explanation on its goal, for inclusion in main branch.
|
||||
|
||||
Using this tool is now deprecated. You must use git pull requests to submit contributions.
|
||||
|
|
|
|||
|
|
@ -1,9 +1,22 @@
|
|||
PHPStan
|
||||
|
||||
https://phpstan.org
|
||||
PHPStan (https://phpstan.org)
|
||||
-----------------------------
|
||||
|
||||
PHPStan requires PHP >= 7.1
|
||||
|
||||
Install: composer require --dev phpstan/phpstan
|
||||
Config File is: ./phpstan.neon
|
||||
|
||||
Config File: phpstan.neon
|
||||
In dolibarr/build/phpstan
|
||||
mkdir phpstan
|
||||
cd phpstan
|
||||
composer require --dev phpstan/phpstan
|
||||
|
||||
Build report from CLI:
|
||||
In dolibarr/
|
||||
mv htdocs/custom /tmp/
|
||||
php build/phpstan/phpstan/vendor/bin/phpstan -v analyze -c ./phpstan.neon -a build/phpstan/bootstrap.php --memory-limit 4G --error-format=table htdocs/commande/class
|
||||
php build/phpstan/phpstan/vendor/bin/phpstan -v analyze -c ./phpstan.neon -a build/phpstan/bootstrap.php --memory-limit 4G --error-format=table htdocs/
|
||||
mv /tmp/custom htdocs
|
||||
|
||||
Build HTML report from Cron:
|
||||
Example of line to add into a cron to generate a HTML report:
|
||||
0 1 5 * * cd /home/dolibarr/preview.dolibarr.org/dolibarr; chmod -R u+w /home/dolibarr/preview.dolibarr.org/dolibarr; git pull; /home/dolibarr/phpstan/vendor/bin/phpstan -v analyze -a build/phpstan/bootstrap.php --memory-limit 4G --error-format=github | awk ' BEGIN{ print "Date "strftime("%Y-%m-%d")"<br>" } { print $0"<br>" } END{ print NR } ' > /home/dolibarr/doxygen.dolibarr.org/phpstan/index.html
|
||||
|
|
|
|||
|
|
@ -1,14 +1,19 @@
|
|||
<?php
|
||||
// Example to use PHPStan
|
||||
// cd git/dolibarr
|
||||
// /usr/bin/php7.2 ../phpstan.phar -l1 analyze htdocs/societe/website.php --memory-limit 2G
|
||||
|
||||
// Defined some constants and load Dolibarr env to reduce PHPStan bootstrap that fails to load a lot of things.
|
||||
define('DOL_DOCUMENT_ROOT', __DIR__ . '/../../htdocs');
|
||||
define('DOL_DATA_ROOT', __DIR__ . '/../../documents');
|
||||
define('DOL_URL_ROOT', '/');
|
||||
//define('DOL_DOCUMENT_ROOT', __DIR__ . '/../../htdocs');
|
||||
//define('DOL_DATA_ROOT', __DIR__ . '/../../documents');
|
||||
//define('DOL_URL_ROOT', '/');
|
||||
|
||||
// Load the main.inc.php file to have functions llx_Header and llx_Footer defined
|
||||
if (! defined("NOLOGIN")) define("NOLOGIN", '1');
|
||||
// Load the main.inc.php file to have functions env defined
|
||||
if (!defined("NOLOGIN")) {
|
||||
define("NOLOGIN", '1');
|
||||
}
|
||||
if (!defined("NOSESSION")) {
|
||||
define("NOSESSION", '1');
|
||||
}
|
||||
if (!defined("NOHTTPSREDIRECT")) {
|
||||
define("NOHTTPSREDIRECT", '1');
|
||||
}
|
||||
global $conf, $langs, $user, $db;
|
||||
include_once __DIR__ . '/../../htdocs/main.inc.php';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
//
|
||||
// Take a look at conf.php.example file for an example of conf.php file
|
||||
// and explanations for all possibles parameters.
|
||||
|
|
|
|||
|
|
@ -24,5 +24,5 @@ diff -up htdocs/install/inc.php.patch htdocs/install/inc.php
|
|||
+$conffile = "/etc/dolibarr/conf.php";
|
||||
+$conffiletoshow = "/etc/dolibarr/conf.php";
|
||||
|
||||
|
||||
// Load conf file if it is already defined
|
||||
$short_options = "c:h";
|
||||
$long_options = array(
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ BuildArch: noarch
|
|||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
Group: Applications/Productivity
|
||||
Requires: httpd, php >= 5.3.0, php-cli, php-gd, php-ldap, php-imap, php-mysqli, php-adodb, php-nusoap, dejavu-sans-fonts
|
||||
Requires: httpd, php >= 5.3.0, php-cli, php-gd, php-ldap, php-imap, php-mysqli, php-nusoap, dejavu-sans-fonts
|
||||
Requires: mysql-server, mysql
|
||||
#BuildRequires: desktop-file-utils
|
||||
|
||||
|
|
@ -104,7 +104,6 @@ cui hai bisogno ed essere facile da usare.
|
|||
%{__cp} -pr htdocs $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
%{__cp} -pr scripts $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/ckeditor/_source
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/adodbtime
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/nusoap
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/fonts
|
||||
|
||||
|
|
@ -165,6 +164,7 @@ done >>%{name}.lang
|
|||
%_datadir/dolibarr/htdocs/barcode
|
||||
%_datadir/dolibarr/htdocs/blockedlog
|
||||
%_datadir/dolibarr/htdocs/bookmarks
|
||||
%_datadir/dolibarr/htdocs/bookcal
|
||||
%_datadir/dolibarr/htdocs/bom
|
||||
%_datadir/dolibarr/htdocs/categories
|
||||
%_datadir/dolibarr/htdocs/collab
|
||||
|
|
@ -274,7 +274,6 @@ if [ -s $config ] && grep -q "File generated by" $config
|
|||
then
|
||||
# File already exist. We add params not found.
|
||||
echo Add new params to overwrite path to use shared libraries/fonts
|
||||
grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|||
|
||||
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version}
|
||||
Group: Applications/Productivity
|
||||
Requires: httpd, php >= 5.3.0, php-cli, php-gd, php-ldap, php-imap, php-mysqli, php-adodb, php-nusoap, dejavu-sans-fonts, php-mbstring, php-xml
|
||||
Requires: httpd, php >= 5.3.0, php-cli, php-gd, php-ldap, php-imap, php-mysqli, php-nusoap, dejavu-sans-fonts, php-mbstring, php-xml
|
||||
Requires: mysql-server, mysql
|
||||
BuildRequires: desktop-file-utils
|
||||
%else
|
||||
|
|
@ -169,7 +169,6 @@ cui hai bisogno ed essere facile da usare.
|
|||
%{__cp} -pr scripts $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/ckeditor/_source
|
||||
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version}
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/adodbtime
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/nusoap
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/fonts
|
||||
%else
|
||||
|
|
@ -246,6 +245,7 @@ done >>%{name}.lang
|
|||
%_datadir/dolibarr/htdocs/barcode
|
||||
%_datadir/dolibarr/htdocs/blockedlog
|
||||
%_datadir/dolibarr/htdocs/bookmarks
|
||||
%_datadir/dolibarr/htdocs/bookcal
|
||||
%_datadir/dolibarr/htdocs/bom
|
||||
%_datadir/dolibarr/htdocs/categories
|
||||
%_datadir/dolibarr/htdocs/collab
|
||||
|
|
@ -425,7 +425,6 @@ if [ -s $config ] && grep -q "File generated by" $config
|
|||
then
|
||||
# File already exist. We add params not found.
|
||||
echo Add new params to overwrite path to use shared libraries/fonts
|
||||
grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
||||
|
|
|
|||
|
|
@ -162,6 +162,7 @@ done >>%{name}.lang
|
|||
%_datadir/dolibarr/htdocs/barcode
|
||||
%_datadir/dolibarr/htdocs/blockedlog
|
||||
%_datadir/dolibarr/htdocs/bookmarks
|
||||
%_datadir/dolibarr/htdocs/bookcal
|
||||
%_datadir/dolibarr/htdocs/bom
|
||||
%_datadir/dolibarr/htdocs/categories
|
||||
%_datadir/dolibarr/htdocs/collab
|
||||
|
|
@ -271,7 +272,6 @@ if [ -s $config ] && grep -q "File generated by" $config
|
|||
then
|
||||
# File already exist. We add params not found.
|
||||
echo Add new params to overwrite path to use shared libraries/fonts
|
||||
grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ Programmo web, progettato per poter fornire solo ciò di
|
|||
cui hai bisogno ed essere facile da usare.
|
||||
|
||||
|
||||
#---- prep
|
||||
#---- prepo
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p0 -b .patch
|
||||
|
|
@ -172,6 +172,7 @@ done >>%{name}.lang
|
|||
%_datadir/dolibarr/htdocs/barcode
|
||||
%_datadir/dolibarr/htdocs/blockedlog
|
||||
%_datadir/dolibarr/htdocs/bookmarks
|
||||
%_datadir/dolibarr/htdocs/bookcal
|
||||
%_datadir/dolibarr/htdocs/bom
|
||||
%_datadir/dolibarr/htdocs/categories
|
||||
%_datadir/dolibarr/htdocs/collab
|
||||
|
|
@ -281,7 +282,6 @@ if [ -s $config ] && grep -q "File generated by" $config
|
|||
then
|
||||
# File already exist. We add params not found.
|
||||
echo Add new params to overwrite path to use shared libraries/fonts
|
||||
grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ $force_install_lockinstall='444';
|
|||
$force_install_distrib='rpmfedora';
|
||||
|
||||
// Value to overwrite path to use shared libraries/fonts instead of embedded one
|
||||
$force_dolibarr_lib_ADODB_PATH='/usr/share/php/adodb';
|
||||
//$force_dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi';
|
||||
//$force_dolibarr_lib_GEOIP_PATH='';
|
||||
$force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap';
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ $force_install_lockinstall='444';
|
|||
$force_install_distrib='rpmmandriva';
|
||||
|
||||
// Value to overwrite path to use shared libraries/fonts instead of embedded one
|
||||
$force_dolibarr_lib_ADODB_PATH='/usr/share/php/adodb';
|
||||
//$force_dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi';
|
||||
//$force_dolibarr_lib_GEOIP_PATH='';
|
||||
$force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap';
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ $force_install_lockinstall='444';
|
|||
$force_install_distrib='rpmopensuse';
|
||||
|
||||
// Value to overwrite path to use shared libraries/fonts instead of embedded one
|
||||
//$force_dolibarr_lib_ADODB_PATH='/usr/share/php/adodb';
|
||||
//$force_dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi';
|
||||
//$force_dolibarr_lib_GEOIP_PATH='';
|
||||
//$force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap';
|
||||
|
|
|
|||
|
|
@ -1,15 +1,17 @@
|
|||
*~
|
||||
.#*
|
||||
.git
|
||||
.gitignore
|
||||
.scrutinizer.yml
|
||||
Thumbs.db
|
||||
build/exe
|
||||
build/html
|
||||
dev/dbmodel
|
||||
dev/fpdf
|
||||
dev/examples/zapier
|
||||
dev/initdemo
|
||||
dev/initdata
|
||||
dev/iso-normes
|
||||
dev/licence
|
||||
dev/load
|
||||
dev/resources/dbmodel
|
||||
dev/resources/iso-normes
|
||||
dev/resources/licence
|
||||
htdocs/conf/conf.php
|
||||
htdocs/conf/conf.php.mysql
|
||||
htdocs/conf/conf.php.old
|
||||
|
|
|
|||
|
|
@ -9,14 +9,14 @@
|
|||
</Directory>
|
||||
|
||||
# Wire up Apache to use Travis CI's php-fpm.
|
||||
<IfModule mod_fastcgi.c>
|
||||
AddHandler php5-fcgi .php
|
||||
Action php5-fcgi /php5-fcgi
|
||||
Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
|
||||
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -pass-header Authorization
|
||||
|
||||
<Directory /usr/lib/cgi-bin>
|
||||
Require all granted
|
||||
</Directory>
|
||||
</IfModule>
|
||||
#<IfModule mod_fastcgi.c>
|
||||
# AddHandler php5-fcgi .php
|
||||
# Action php5-fcgi /php5-fcgi
|
||||
# Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
|
||||
# FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -pass-header Authorization
|
||||
#
|
||||
#<Directory /usr/lib/cgi-bin>
|
||||
# Require all granted
|
||||
#</Directory>
|
||||
#</IfModule>
|
||||
</VirtualHost>
|
||||
|
|
|
|||
|
|
@ -24,32 +24,30 @@
|
|||
"vendor-dir" : "htdocs/includes"
|
||||
},
|
||||
"require" : {
|
||||
"php" : ">=5.6.0",
|
||||
"ext-curl" : "*",
|
||||
"php" : ">=7.1.0",
|
||||
"ckeditor/ckeditor" : "4.12.1",
|
||||
"mike42/escpos-php" : "2.2",
|
||||
"mobiledetect/mobiledetectlib" : "2.8.39",
|
||||
"phpoffice/phpexcel" : "1.8.2",
|
||||
"mike42/escpos-php" : "3.0",
|
||||
"mobiledetect/mobiledetectlib" : "2.8.41",
|
||||
"phpoffice/phpspreadsheet" : ">=1.12",
|
||||
"restler/framework" : "3.0.0-RC6",
|
||||
"tecnickcom/tcpdf" : "6.3.2",
|
||||
"nnnick/chartjs" : "^2.9",
|
||||
"stripe/stripe-php" : "6.43.1",
|
||||
"maximebf/debugbar" : "1.15.1",
|
||||
"symfony/var-dumper" : "3.2"
|
||||
"nnnick/chartjs" : "^3.7.1",
|
||||
"stripe/stripe-php" : "10.7.0",
|
||||
"maximebf/debugbar" : "1.18.2",
|
||||
"symfony/var-dumper" : ">=3.2"
|
||||
},
|
||||
"require-dev" : {
|
||||
"php-parallel-lint/php-parallel-lint" : "^0",
|
||||
"php-parallel-lint/php-console-highlighter" : "^0",
|
||||
"phpunit/phpunit" : "^4",
|
||||
"squizlabs/php_codesniffer" : "^2",
|
||||
"phpunit/phpunit-selenium" : "^2"
|
||||
"phpunit/phpunit-selenium" : "^2",
|
||||
"rector/rector" : "^0.16.0"
|
||||
},
|
||||
"suggest" : {
|
||||
"ext-mysqlnd" : "To use with MySQL or MariaDB",
|
||||
"ext-mysqli" : "To use with MySQL or MariaDB",
|
||||
"ext-pgsql" : "To use with PostgreSQL",
|
||||
"ext-mssql" : "To use with MSSQL (experimental)",
|
||||
"ext-pdo_sqlite" : "To use with SQLite (experimental)",
|
||||
"ext-gd" : "Image manipulation (Required but maybe built-in PHP)",
|
||||
"ext-imagick" : "Generation of thumbs from PDF",
|
||||
"ext-mcrypt" : "(Required but maybe built-in PHP)",
|
||||
|
|
|
|||
1
dev/.gitignore
vendored
1
dev/.gitignore
vendored
|
|
@ -1 +1,2 @@
|
|||
/spec
|
||||
/tools/rector/vendor/
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ With
|
|||
|
||||
|
||||
|
||||
CKEDITOR (4.6.2):
|
||||
CKEDITOR (4.22.1):
|
||||
-----------------
|
||||
* In ckeditor/ckeditor/contents.css
|
||||
Replace:
|
||||
|
|
@ -26,7 +26,12 @@ Replace:
|
|||
With
|
||||
body { ... margin: 5px;
|
||||
|
||||
|
||||
* In ckeditor/ckeditor/ckeditor.js
|
||||
Replace:
|
||||
d.items&&
|
||||
With
|
||||
d&&d.items&&
|
||||
|
||||
|
||||
ESCPOS:
|
||||
-------
|
||||
|
|
@ -39,37 +44,34 @@ With
|
|||
|
||||
NUSOAP:
|
||||
-------
|
||||
* In file nusoap.php, to avoid a warning,
|
||||
Replace
|
||||
if (isset($this->methodreturn) && ((get_class($this->methodreturn) == 'soap_fault') || (get_class($this->methodreturn) == 'nusoap_fault'))) {
|
||||
By
|
||||
if (! is_array($this->methodreturn) && isset($this->methodreturn) && ((get_class($this->methodreturn) == 'soap_fault') || (get_class($this->methodreturn) == 'nusoap_fault'))) {
|
||||
* Line 1257 of file nusoap.php. Add:
|
||||
|
||||
* In file nusoap.php, to avoid a warning,
|
||||
Replace call to serialize_val with no bugged value
|
||||
libxml_disable_entity_loader(true); // Avoid load of external entities (security problem). Required only for libxml < 2.
|
||||
|
||||
|
||||
* Line 4346 of file nusoap.php
|
||||
|
||||
* In all files, replace constructor names into __construct. Replace also parent::constructor_name with parent::__construct
|
||||
$rev = array();
|
||||
preg_match('/\$Revision: ([^ ]+)/', $this->revision, $rev);
|
||||
$this->outgoing_headers[] = "X-SOAP-Server: $this->title/$this->version (".(isset($rev[1]) ? $rev[1] : '').")";
|
||||
|
||||
* Line 4222 of file nusoap.php
|
||||
|
||||
$rev = array();
|
||||
preg_match('/\$Revision: ([^ ]+)/', $this->revision, $rev);
|
||||
$this->outgoing_headers[] = "X-SOAP-Server: $this->title/$this->version (".(isset($rev[1]) ? $rev[1] : '').")";
|
||||
* Line 6566 of file nusoap.php, replace
|
||||
|
||||
if (count($attrs) > 0) {
|
||||
with
|
||||
if (is_array($attrs) && count($attrs) > 0) {
|
||||
|
||||
|
||||
|
||||
TCPDF:
|
||||
------
|
||||
* Replace in tcpdf.php:
|
||||
|
||||
if (isset($this->imagekeys)) {
|
||||
foreach($this->imagekeys as $file) {
|
||||
unlink($file);
|
||||
}
|
||||
}
|
||||
with
|
||||
|
||||
if (isset($this->imagekeys)) {
|
||||
foreach($this->imagekeys as $file) {
|
||||
// DOL CHANGE If we keep this, source image files are physically destroyed
|
||||
|
|
@ -77,8 +79,7 @@ with
|
|||
}
|
||||
}
|
||||
|
||||
* Replace in tcpdf.php
|
||||
|
||||
* Replace in tcpdf.php:
|
||||
$preserve = array(
|
||||
'file_id',
|
||||
'internal_encoding',
|
||||
|
|
@ -86,9 +87,7 @@ with
|
|||
'bufferlen',
|
||||
'buffer',
|
||||
'cached_files',
|
||||
|
||||
with
|
||||
|
||||
$preserve = array(
|
||||
'file_id',
|
||||
'internal_encoding',
|
||||
|
|
@ -99,14 +98,11 @@ with
|
|||
// @CHANGE DOL
|
||||
'imagekeys',
|
||||
|
||||
* Replace in tcpdf.php
|
||||
|
||||
* Replace in tcpdf.php:
|
||||
if (!@TCPDF_STATIC::file_exists($file)) {
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
with
|
||||
|
||||
if (!@TCPDF_STATIC::file_exists($file)) {
|
||||
// DOL CHANGE If we keep this, the image is not visible on pages after the first one.
|
||||
//var_dump($file.' '.(!@TCPDF_STATIC::file_exists($file)));
|
||||
|
|
@ -117,12 +113,9 @@ with
|
|||
}
|
||||
}
|
||||
|
||||
* Replace in tcpdf.php
|
||||
|
||||
* Replace in tcpdf.php:
|
||||
if (($imgsrc[0] === '/') AND !empty($_SERVER['DOCUMENT_ROOT']) AND ($_SERVER['DOCUMENT_ROOT'] != '/')) {
|
||||
|
||||
with
|
||||
|
||||
// @CHANGE LDR Add support for src="file://..." links
|
||||
if (strpos($imgsrc, 'file://') === 0) {
|
||||
$imgsrc = str_replace('file://', '/', $imgsrc);
|
||||
|
|
@ -139,12 +132,9 @@ with
|
|||
elseif (($imgsrc[0] === '/') AND !empty($_SERVER['DOCUMENT_ROOT']) AND ($_SERVER['DOCUMENT_ROOT'] != '/')) {
|
||||
|
||||
|
||||
* In tecnickcom/tcpdf/include/tcpdf_static.php, in function fopenLocal, replace
|
||||
|
||||
* In tecnickcom/tcpdf/include/tcpdf_static.php, in function fopenLocal, replace:
|
||||
if (strpos($filename, '://') === false) {
|
||||
|
||||
with
|
||||
|
||||
if (strpos($filename, '//') === 0) {
|
||||
// Share folder on a (windows) server
|
||||
// e.g.: "//[MyServerName]/[MySharedFolder]/"
|
||||
|
|
@ -153,17 +143,22 @@ with
|
|||
}
|
||||
elseif (strpos($filename, '://') === false)
|
||||
|
||||
* To avoid to have QRcode changed because generated with a random mask, replace
|
||||
define('QR_FIND_FROM_RANDOM', 2);
|
||||
* To avoid to have QRcode changed because generated with a random mask, replace:
|
||||
define('QR_FIND_FROM_RANDOM', 2);
|
||||
with
|
||||
define('QR_FIND_FROM_RANDOM', false);
|
||||
define('QR_FIND_FROM_RANDOM', false);
|
||||
|
||||
* Change line:
|
||||
imagesetpixel($imgalpha, $xpx, $ypx, $alpha);
|
||||
into
|
||||
imagesetpixel($imgalpha, $xpx, $ypx, (int) $alpha);
|
||||
|
||||
* Removed useless directories ("examples", "tools")
|
||||
|
||||
* Optionnaly, removed all fonts except
|
||||
dejavusans* (used by greek, arab, persan, romanian, turkish),
|
||||
freemono* (russian),
|
||||
cid*+msungstdlight+stsongstdlight+uni2cid* (chinese),
|
||||
* Optionnaly, removed all fonts except
|
||||
dejavusans* (used by greek, arab, persan, romanian, turkish),
|
||||
freemono* (russian),
|
||||
cid*+msungstdlight+stsongstdlight+uni2cid* (chinese),
|
||||
helvetica* (all other languages),
|
||||
zapfdingbats.php (for special chars like form checkboxes)
|
||||
|
||||
|
|
@ -175,16 +170,33 @@ In htdocs/includes/tecnickcom/tcpdf/tcpdf.php
|
|||
* In tecnickcom/tcpdf/include/tcpdf_static, in function intToRoman, right at the beginning
|
||||
of the function, replace:
|
||||
|
||||
$roman = '';
|
||||
$roman = '';
|
||||
|
||||
with:
|
||||
with:
|
||||
|
||||
$roman = '';
|
||||
if ($number >= 4000) {
|
||||
// do not represent numbers above 4000 in Roman numerals
|
||||
return strval($number);
|
||||
$roman = '';
|
||||
if ($number >= 4000) {
|
||||
// do not represent numbers above 4000 in Roman numerals
|
||||
return strval($number);
|
||||
}
|
||||
|
||||
* Add this at begin of tcpdf_autoconfig.php
|
||||
|
||||
// @CHANGE LDR DOCUMENT_ROOT fix for IIS Webserver
|
||||
if ((!isset($_SERVER['DOCUMENT_ROOT'])) OR (empty($_SERVER['DOCUMENT_ROOT']))) {
|
||||
if (isset($_SERVER['SCRIPT_FILENAME']) && isset($_SERVER['PHP_SELF'])) {
|
||||
$_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr($_SERVER['SCRIPT_FILENAME'], 0, 0-strlen($_SERVER['PHP_SELF'])));
|
||||
} elseif(isset($_SERVER['PATH_TRANSLATED'])) {
|
||||
$_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr(str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']), 0, 0-strlen($_SERVER['PHP_SELF'])));
|
||||
} else {
|
||||
// define here your DOCUMENT_ROOT path if the previous fails (e.g. '/var/www')
|
||||
$_SERVER['DOCUMENT_ROOT'] = '/';
|
||||
}
|
||||
|
||||
}
|
||||
$_SERVER['DOCUMENT_ROOT'] = str_replace('//', '/', $_SERVER['DOCUMENT_ROOT']);
|
||||
if (substr($_SERVER['DOCUMENT_ROOT'], -1) != '/') {
|
||||
$_SERVER['DOCUMENT_ROOT'] .= '/';
|
||||
}
|
||||
|
||||
|
||||
TCPDI:
|
||||
|
|
@ -201,7 +213,7 @@ with:
|
|||
|
||||
* Fix syntax error by replacing
|
||||
} elseif (($key == '/Index') AND ($v[0] == PDF_TYPE_ARRAY AND count($v[1] >= 2))) {
|
||||
with
|
||||
with
|
||||
} elseif (($key == '/Index') AND ($v[0] == PDF_TYPE_ARRAY AND count($v[1]) >= 2)) {
|
||||
|
||||
* Fix php fatal error on php 8.0 on tcpdi.php
|
||||
|
|
@ -209,6 +221,11 @@ with
|
|||
with
|
||||
foreach ($value[1] as $k => $v) {
|
||||
|
||||
* Fix by replacing
|
||||
if ($res[0] == PDF_TYPE_OBJECT)
|
||||
with
|
||||
if (isset($res[0]) && $res[0] == PDF_TYPE_OBJECT)
|
||||
|
||||
|
||||
|
||||
JSGANTT:
|
||||
|
|
@ -283,6 +300,27 @@ RESTLER:
|
|||
|
||||
elseif (count($value) && isset($value[0]) && is_numeric($value[0]))
|
||||
|
||||
* Add CommentParser.php line 406 & 407 to remove a warning on api request in php 8.1
|
||||
empty($value[0]) ? null :
|
||||
empty($value[1]) ? null :
|
||||
|
||||
* Add a test into AutoLoader.php to complete function loadThisLoader and test if property exists before calling it. For this replace code
|
||||
|
||||
if (false !== $file = $b::$loader[1]($className) && $this->exists($className, $b::$loader[1])) {
|
||||
return $file;
|
||||
}
|
||||
|
||||
with:
|
||||
|
||||
//avoid PHP Fatal error: Uncaught Error: Access to undeclared static property: Composer\\Autoload\\ClassLoader::$loader
|
||||
//in case of multiple autoloader systems
|
||||
if(property_exists($b, $loader[1])) {
|
||||
if (false !== $file = $b::$loader[1]($className)
|
||||
&& $this->exists($className, $b::$loader[1])) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+With swagger 2 provided into /explorer:
|
||||
----------------------------------------
|
||||
|
|
@ -297,16 +335,15 @@ PARSEDOWN
|
|||
* Add support of css by adding in Parsedown.php:
|
||||
|
||||
// @CHANGE LDR
|
||||
'class' => $Link['element']['attributes']['class']
|
||||
'class' => $Link['element']['attributes']['class']
|
||||
|
||||
...
|
||||
|
||||
|
||||
// @CHANGE LDR
|
||||
if (preg_match('/{([^}]+)}/', $remainder, $matches2))
|
||||
{
|
||||
$Element['attributes']['class'] = $matches2[1];
|
||||
$remainder = preg_replace('/{'.preg_quote($matches2[1],'/').'}/', '', $remainder);
|
||||
}
|
||||
if (preg_match('/{([^}]+)}/', $remainder, $matches2)) {
|
||||
$Element['attributes']['class'] = $matches2[1];
|
||||
$remainder = preg_replace('/{'.preg_quote($matches2[1],'/').'}/', '', $remainder);
|
||||
}
|
||||
|
||||
|
||||
// @CHANGE LDR
|
||||
|
|
@ -339,7 +376,7 @@ Add into Class Google of file OAuth2/Service/Google:
|
|||
}
|
||||
$this->approvalPrompt = $prompt;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
JEDITABLE.JS
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
$sapi_type = php_sapi_name();
|
||||
$script_file = basename(__FILE__);
|
||||
$path=dirname(__FILE__).'/';
|
||||
$path = dirname(__FILE__).'/';
|
||||
|
||||
// Test if batch mode
|
||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
|
|
@ -34,13 +34,13 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
|||
}
|
||||
|
||||
// Global variables
|
||||
$version='1.7';
|
||||
$error=0;
|
||||
$version = '1.7';
|
||||
$error = 0;
|
||||
|
||||
|
||||
// -------------------- START OF YOUR CODE HERE --------------------
|
||||
// Include Dolibarr environment
|
||||
require_once $path."../../htdocs/master.inc.php";
|
||||
require_once $path."../../../htdocs/master.inc.php";
|
||||
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
|
||||
|
||||
//$langs->setDefaultLang('en_US'); // To change default language of $langs
|
||||
|
|
@ -48,8 +48,8 @@ $langs->load("main"); // To load language file for default language
|
|||
@set_time_limit(0);
|
||||
|
||||
// Load user and its permissions
|
||||
$result=$user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
|
||||
if (! $result > 0) {
|
||||
$result = $user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
|
||||
if (!$result > 0) {
|
||||
dol_print_error('', $user->error);
|
||||
exit;
|
||||
}
|
||||
|
|
@ -74,20 +74,20 @@ $obj->note_public = 'A public comment';
|
|||
$obj->note_private = 'A private comment';
|
||||
$obj->cond_reglement_id = 1;
|
||||
|
||||
$line1=new FactureLigne($db);
|
||||
$line1->tva_tx=10.0;
|
||||
$line1->remise_percent=0;
|
||||
$line1->qty=1;
|
||||
$line1->total_ht=100;
|
||||
$line1->total_tva=10;
|
||||
$line1->total_ttc=110;
|
||||
$obj->lines[]=$line1;
|
||||
$line1 = new FactureLigne($db);
|
||||
$line1->tva_tx = 10.0;
|
||||
$line1->remise_percent = 0;
|
||||
$line1->qty = 1;
|
||||
$line1->total_ht = 100;
|
||||
$line1->total_tva = 10;
|
||||
$line1->total_ttc = 110;
|
||||
$obj->lines[] = $line1;
|
||||
|
||||
// Create invoice
|
||||
$idobject=$obj->create($user);
|
||||
$idobject = $obj->create($user);
|
||||
if ($idobject > 0) {
|
||||
// Change status to validated
|
||||
$result=$obj->validate($user);
|
||||
$result = $obj->validate($user);
|
||||
if ($result > 0) {
|
||||
print "OK Object created with id ".$idobject."\n";
|
||||
} else {
|
||||
|
|
@ -102,7 +102,7 @@ if ($idobject > 0) {
|
|||
|
||||
// -------------------- END OF YOUR CODE --------------------
|
||||
|
||||
if (! $error) {
|
||||
if (!$error) {
|
||||
$db->commit();
|
||||
print '--- end ok'."\n";
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
$sapi_type = php_sapi_name();
|
||||
$script_file = basename(__FILE__);
|
||||
$path=dirname(__FILE__).'/';
|
||||
$path = dirname(__FILE__).'/';
|
||||
|
||||
// Test if batch mode
|
||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
|
|
@ -34,13 +34,13 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
|||
}
|
||||
|
||||
// Global variables
|
||||
$version='1.11';
|
||||
$error=0;
|
||||
$version = '1.11';
|
||||
$error = 0;
|
||||
|
||||
|
||||
// -------------------- START OF YOUR CODE HERE --------------------
|
||||
// Include Dolibarr environment
|
||||
require_once $path."../../htdocs/master.inc.php";
|
||||
require_once $path."../../../htdocs/master.inc.php";
|
||||
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
|
||||
|
||||
//$langs->setDefaultLang('en_US'); // To change default language of $langs
|
||||
|
|
@ -48,8 +48,8 @@ $langs->load("main"); // To load language file for default language
|
|||
@set_time_limit(0);
|
||||
|
||||
// Load user and its permissions
|
||||
$result=$user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
|
||||
if (! $result > 0) {
|
||||
$result = $user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
|
||||
if (!$result > 0) {
|
||||
dol_print_error('', $user->error);
|
||||
exit;
|
||||
}
|
||||
|
|
@ -75,17 +75,17 @@ $com->note_private = 'A private comment';
|
|||
$com->source = 1;
|
||||
$com->remise_percent = 0;
|
||||
|
||||
$orderline1=new OrderLine($db);
|
||||
$orderline1->tva_tx=10.0;
|
||||
$orderline1->remise_percent=0;
|
||||
$orderline1->qty=1;
|
||||
$com->lines[]=$orderline1;
|
||||
$orderline1 = new OrderLine($db);
|
||||
$orderline1->tva_tx = 10.0;
|
||||
$orderline1->remise_percent = 0;
|
||||
$orderline1->qty = 1;
|
||||
$com->lines[] = $orderline1;
|
||||
|
||||
// Create order
|
||||
$idobject=$com->create($user);
|
||||
$idobject = $com->create($user);
|
||||
if ($idobject > 0) {
|
||||
// Change status to validated
|
||||
$result=$com->valid($user);
|
||||
$result = $com->valid($user);
|
||||
if ($result > 0) {
|
||||
print "OK Object created with id ".$idobject."\n";
|
||||
} else {
|
||||
|
|
@ -100,7 +100,7 @@ if ($idobject > 0) {
|
|||
|
||||
// -------------------- END OF YOUR CODE --------------------
|
||||
|
||||
if (! $error) {
|
||||
if (!$error) {
|
||||
$db->commit();
|
||||
print '--- end ok'."\n";
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
$sapi_type = php_sapi_name();
|
||||
$script_file = basename(__FILE__);
|
||||
$path=dirname(__FILE__).'/';
|
||||
$path = dirname(__FILE__).'/';
|
||||
|
||||
// Test if batch mode
|
||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
|
|
@ -34,13 +34,13 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
|||
}
|
||||
|
||||
// Global variables
|
||||
$version='1.10';
|
||||
$error=0;
|
||||
$version = '1.10';
|
||||
$error = 0;
|
||||
|
||||
|
||||
// -------------------- START OF YOUR CODE HERE --------------------
|
||||
// Include Dolibarr environment
|
||||
require_once $path."../../htdocs/master.inc.php";
|
||||
require_once $path."../../../htdocs/master.inc.php";
|
||||
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
|
||||
|
||||
//$langs->setDefaultLang('en_US'); // To change default language of $langs
|
||||
|
|
@ -48,8 +48,8 @@ $langs->load("main"); // To load language file for default language
|
|||
@set_time_limit(0);
|
||||
|
||||
// Load user and its permissions
|
||||
$result=$user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
|
||||
if (! $result > 0) {
|
||||
$result = $user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
|
||||
if (!$result > 0) {
|
||||
dol_print_error('', $user->error);
|
||||
exit;
|
||||
}
|
||||
|
|
@ -65,7 +65,7 @@ $db->begin();
|
|||
require_once DOL_DOCUMENT_ROOT."/product/class/product.class.php";
|
||||
|
||||
// Create instance of object
|
||||
$myproduct=new Product($db);
|
||||
$myproduct = new Product($db);
|
||||
|
||||
// Definition of product instance properties
|
||||
$myproduct->ref = '1234';
|
||||
|
|
@ -91,7 +91,7 @@ if ($idobject > 0) {
|
|||
|
||||
// -------------------- END OF YOUR CODE --------------------
|
||||
|
||||
if (! $error) {
|
||||
if (!$error) {
|
||||
$db->commit();
|
||||
print '--- end ok'."\n";
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
$sapi_type = php_sapi_name();
|
||||
$script_file = basename(__FILE__);
|
||||
$path=dirname(__FILE__).'/';
|
||||
$path = dirname(__FILE__).'/';
|
||||
|
||||
// Test if batch mode
|
||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
|
|
@ -34,13 +34,13 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
|||
}
|
||||
|
||||
// Global variables
|
||||
$version='1.7';
|
||||
$error=0;
|
||||
$version = '1.7';
|
||||
$error = 0;
|
||||
|
||||
|
||||
// -------------------- START OF YOUR CODE HERE --------------------
|
||||
// Include Dolibarr environment
|
||||
require_once $path."../../htdocs/master.inc.php";
|
||||
require_once $path."../../../htdocs/master.inc.php";
|
||||
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
|
||||
|
||||
//$langs->setDefaultLang('en_US'); // To change default language of $langs
|
||||
|
|
@ -48,8 +48,8 @@ $langs->load("main"); // To load language file for default language
|
|||
@set_time_limit(0);
|
||||
|
||||
// Load user and its permissions
|
||||
$result=$user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
|
||||
if (! $result > 0) {
|
||||
$result = $user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
|
||||
if (!$result > 0) {
|
||||
dol_print_error('', $user->error);
|
||||
exit;
|
||||
}
|
||||
|
|
@ -71,10 +71,10 @@ $obj->login = 'ABCDEF';
|
|||
$obj->nom = 'ABCDEF';
|
||||
|
||||
// Create user
|
||||
$idobject=$obj->create($user);
|
||||
$idobject = $obj->create($user);
|
||||
if ($idobject > 0) {
|
||||
// Change status to validated
|
||||
$result=$obj->setStatut(1);
|
||||
$result = $obj->setStatut(1);
|
||||
if ($result > 0) {
|
||||
print "OK Object created with id ".$idobject."\n";
|
||||
} else {
|
||||
|
|
@ -82,7 +82,7 @@ if ($idobject > 0) {
|
|||
dol_print_error($db, $obj->error);
|
||||
}
|
||||
} elseif ($obj->error == 'ErrorLoginAlreadyExists') {
|
||||
print "User with login ".$obj->login." already exists\n";
|
||||
print "User with login ".$obj->login." already exists\n";
|
||||
} else {
|
||||
$error++;
|
||||
dol_print_error($db, $obj->error);
|
||||
|
|
@ -91,7 +91,7 @@ if ($idobject > 0) {
|
|||
|
||||
// -------------------- END OF YOUR CODE --------------------
|
||||
|
||||
if (! $error) {
|
||||
if (!$error) {
|
||||
$db->commit();
|
||||
print '--- end ok'."\n";
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
$sapi_type = php_sapi_name();
|
||||
$script_file = basename(__FILE__);
|
||||
$path=dirname(__FILE__).'/';
|
||||
$path = dirname(__FILE__).'/';
|
||||
|
||||
// Test if batch mode
|
||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
|
|
@ -34,13 +34,13 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
|||
}
|
||||
|
||||
// Global variables
|
||||
$version='1.7';
|
||||
$error=0;
|
||||
$version = '1.7';
|
||||
$error = 0;
|
||||
|
||||
|
||||
// -------------------- START OF YOUR CODE HERE --------------------
|
||||
// Include Dolibarr environment
|
||||
require_once $path."../../htdocs/master.inc.php";
|
||||
require_once $path."../../../htdocs/master.inc.php";
|
||||
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
|
||||
|
||||
//$langs->setDefaultLang('en_US'); // To change default language of $langs
|
||||
|
|
@ -48,8 +48,8 @@ $langs->load("main"); // To load language file for default language
|
|||
@set_time_limit(0);
|
||||
|
||||
// Load user and its permissions
|
||||
$result=$user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
|
||||
if (! $result > 0) {
|
||||
$result = $user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
|
||||
if (!$result > 0) {
|
||||
dol_print_error('', $user->error);
|
||||
exit;
|
||||
}
|
||||
|
|
@ -57,7 +57,7 @@ $user->getrights();
|
|||
|
||||
|
||||
print "***** ".$script_file." (".$version.") *****\n";
|
||||
if (! isset($argv[1])) { // Check parameters
|
||||
if (!isset($argv[1])) { // Check parameters
|
||||
print "Usage: ".$script_file." id_thirdparty ...\n";
|
||||
exit;
|
||||
}
|
||||
|
|
@ -72,9 +72,9 @@ require_once DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php";
|
|||
|
||||
// Create contract object
|
||||
$obj = new Contrat($db);
|
||||
$obj->socid=$argv[1];
|
||||
$obj->socid = $argv[1];
|
||||
|
||||
$listofcontractsforcompany=$obj->getListOfContracts('all');
|
||||
$listofcontractsforcompany = $obj->getListOfContracts('all');
|
||||
|
||||
print $listofcontractsforcompany;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,28 +1,29 @@
|
|||
# ldapsearch_sample1.txt
|
||||
# ldapsearch is into package ldap-utils on debian.
|
||||
#
|
||||
# Use this sample to search into a ldap
|
||||
# Use this samples to test a ldap_bind or to make a search into a ldap
|
||||
#
|
||||
|
||||
# Anonymous access
|
||||
# ldapsearch -h hostname -p 389
|
||||
# ldapsearch -h hostname -p 389
|
||||
#
|
||||
# Login access (using a Bind DN)
|
||||
# ldapsearch -h hostname -p 389 -z 0 -D "uid=root,cn=users,dc=ldap,dc=test,dc=local" -w password
|
||||
# ldapsearch -H ldap://hostname:389 -z 0 -D "uid=root,cn=users,dc=ldap,dc=test,dc=local" -w password
|
||||
# ldapsearch -d1 -H ldap://hostname:389 -x -z 0 -D "uid=root,cn=users,dc=ldap,dc=test,dc=local" -w password
|
||||
# ldapsearch -H ldap://hostname:389 -z 0 -D "uid=root,cn=users,dc=ldap,dc=test,dc=local" -w password
|
||||
# Such access must succeed to use LDAP as login module.
|
||||
# ldapsearch -h hostname -p 389 -z 0 -D "uid=root,cn=users,dc=ldap,dc=test,dc=local" -w password
|
||||
# ldapsearch -H ldap://hostname:389 -z 0 -D "uid=root,cn=users,dc=ldap,dc=test,dc=local" -w password
|
||||
# ldapsearch -d1 -H ldap://hostname:389 -x -z 0 -D "uid=root,cn=users,dc=ldap,dc=test,dc=local" -w password
|
||||
# ldapsearch -H ldap://hostname:389 -z 0 -D "uid=root,cn=users,dc=ldap,dc=test,dc=local" -w password
|
||||
#
|
||||
# Login access in SSL (using a Bind DN)
|
||||
# ldapsearch -H ldaps://hostnamme:636 -z 0 -D "uid=root,cn=users,dc=ldap,dc=test,dc=local" -w password -b "cn=users,dc=ldap,dc=test,dc=local
|
||||
# ldapsearch -H ldaps://hostnamme:636 -z 0 -D "uid=root,cn=users,dc=ldap,dc=test,dc=local" -w password -b "cn=users,dc=ldap,dc=test,dc=local"
|
||||
# If it fails, you may try to use "hostname" that is real name of certificate.
|
||||
# You must also check that /etc/ldap/ldap.conf contains the line TLS_CACERT /etc/ssl/certs/ca-certificates.crt
|
||||
|
||||
# What to search
|
||||
# ldapsearch -h hostname -p 389 -x -D "uid=root,cn=users,dc=ldap,dc=test,dc=local" -w password -b "cn=users,dc=ldap,dc=test,dc=local"
|
||||
# ldapsearch -h hostname -p 389 -x -D "cn=manager,o=somecompany.com" -w password -b "ou=people,dc=teclib,dc=infra"
|
||||
# ldapsearch -h hostname -p 389 -x -D "cn=manager,o=somecompany.com" -w password -b "o=somecompany.com" "(objectclass=*)"
|
||||
# ldapsearch -h hostname -p 389 -x -D "uid=root,cn=users,dc=ldap,dc=test,dc=local" -w password -b "cn=users,dc=ldap,dc=test,dc=local"
|
||||
# ldapsearch -h hostname -p 389 -x -D "cn=manager,o=somecompany.com" -w password -b "ou=people,dc=teclib,dc=infra"
|
||||
# ldapsearch -h hostname -p 389 -x -D "cn=manager,o=somecompany.com" -w password -b "o=somecompany.com" "(objectclass=*)"
|
||||
#
|
||||
# Example to test a ldap search:
|
||||
# ldapsearch -h hostname -p 389 -x -z 5 -b 'OU=Collaborateurs,OU=Utilisateurs,OU=MyCompany,DC=bocal,DC=lan' -D 'CN=UserAdmin,OU=Informatique,OU=Utilisateurs,OU=MyCompany,DC=bocal,DC=lan' -w password
|
||||
# ldapsearch -h hostname -p 389 -x -z 5 -b 'OU=Collaborateurs,OU=Utilisateurs,OU=MyCompany,DC=bocal,DC=lan' -D 'CN=UserAdmin,OU=Informatique,OU=Utilisateurs,OU=MyCompany,DC=bocal,DC=lan' -w password
|
||||
|
||||
|
|
|
|||
124
dev/examples/stripe/webhook_ipn_paymentintent_failed_sepa.txt
Normal file
124
dev/examples/stripe/webhook_ipn_paymentintent_failed_sepa.txt
Normal file
|
|
@ -0,0 +1,124 @@
|
|||
{
|
||||
"id": "evt_123456789",
|
||||
"object": "event",
|
||||
"api_version": "2023-10-16",
|
||||
"created": 1702053463,
|
||||
"data": {
|
||||
"object": {
|
||||
"id": "pi_123456789",
|
||||
"object": "payment_intent",
|
||||
"amount": 60,
|
||||
"amount_capturable": 0,
|
||||
"amount_details": {
|
||||
"tip": {
|
||||
}
|
||||
},
|
||||
"amount_received": 0,
|
||||
"application": null,
|
||||
"application_fee_amount": null,
|
||||
"automatic_payment_methods": null,
|
||||
"canceled_at": null,
|
||||
"cancellation_reason": null,
|
||||
"capture_method": "automatic",
|
||||
"client_secret": "pi_123456789_secret_123456789",
|
||||
"confirmation_method": "automatic",
|
||||
"created": 1702053448,
|
||||
"currency": "eur",
|
||||
"customer": "cus_123456789",
|
||||
"description": "Stripe payment from makeStripeSepaRequest: DID=31262-INV=123-CUS=123 did=123 ref=FA2312-123",
|
||||
"invoice": null,
|
||||
"last_payment_error": {
|
||||
"code": "",
|
||||
"decline_code": "generic_decline",
|
||||
"message": "The transaction can't be processed because your customer's account information is missing or incorrect. Collect a new mandate and ask your customer to provide their name and address exactly as it appears on their bank account. After this, you can attempt the transaction again.",
|
||||
"payment_method": {
|
||||
"id": "pm_123456789",
|
||||
"object": "payment_method",
|
||||
"billing_details": {
|
||||
"address": {
|
||||
"city": null,
|
||||
"country": "FR",
|
||||
"line1": null,
|
||||
"line2": null,
|
||||
"postal_code": null,
|
||||
"state": null
|
||||
},
|
||||
"email": "email@example.com",
|
||||
"name": "Test example",
|
||||
"phone": null
|
||||
},
|
||||
"created": 1692688898,
|
||||
"customer": "cus_123456789",
|
||||
"livemode": false,
|
||||
"metadata": {
|
||||
"dol_version": "19.0.0-dev",
|
||||
"dol_thirdparty_id": "123",
|
||||
"ipaddress": "1.2.3.4",
|
||||
"dol_id": "123",
|
||||
"dol_type": "companypaymentmode",
|
||||
"dol_entity": "1"
|
||||
},
|
||||
"sepa_debit": {
|
||||
"bank_code": "123",
|
||||
"branch_code": "",
|
||||
"country": "AT",
|
||||
"fingerprint": "123456789",
|
||||
"generated_from": {
|
||||
"charge": null,
|
||||
"setup_attempt": null
|
||||
},
|
||||
"last4": "3202"
|
||||
},
|
||||
"type": "sepa_debit"
|
||||
},
|
||||
"type": "card_error"
|
||||
},
|
||||
"latest_charge": "py_123456789",
|
||||
"livemode": false,
|
||||
"metadata": {
|
||||
"dol_version": "19.0.0-beta",
|
||||
"dol_thirdparty_id": "123",
|
||||
"ipaddress": "1.2.3.4",
|
||||
"dol_id": "123",
|
||||
"dol_type": "facture",
|
||||
"dol_entity": "1"
|
||||
},
|
||||
"next_action": null,
|
||||
"on_behalf_of": null,
|
||||
"payment_method": null,
|
||||
"payment_method_configuration_details": null,
|
||||
"payment_method_options": {
|
||||
"card": {
|
||||
"installments": null,
|
||||
"mandate_options": null,
|
||||
"network": null,
|
||||
"request_three_d_secure": "automatic"
|
||||
},
|
||||
"sepa_debit": {
|
||||
}
|
||||
},
|
||||
"payment_method_types": [
|
||||
"card",
|
||||
"sepa_debit"
|
||||
],
|
||||
"processing": null,
|
||||
"receipt_email": null,
|
||||
"review": null,
|
||||
"setup_future_usage": null,
|
||||
"shipping": null,
|
||||
"source": null,
|
||||
"statement_descriptor": "DID=123-",
|
||||
"statement_descriptor_suffix": "DID=123-",
|
||||
"status": "requires_payment_method",
|
||||
"transfer_data": null,
|
||||
"transfer_group": null
|
||||
}
|
||||
},
|
||||
"livemode": false,
|
||||
"pending_webhooks": 1,
|
||||
"request": {
|
||||
"id": null,
|
||||
"idempotency_key": null
|
||||
},
|
||||
"type": "payment_intent.payment_failed"
|
||||
}
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
"npm": ">=5.6.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"zapier-platform-core": "11.3.1"
|
||||
"zapier-platform-core": "15.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mocha": "^5.2.0",
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ const subscribeHook = (z, bundle) => {
|
|||
action: bundle.inputData.action
|
||||
};
|
||||
|
||||
const url = bundle.authData.url + '/api/index.php/zapierapi/hook';
|
||||
const url = bundle.authData.url + '/api/index.php/zapier/hook';
|
||||
|
||||
// You can build requests and our client will helpfully inject all the variables
|
||||
// you need to complete. You can also register middleware to control this.
|
||||
|
|
@ -32,7 +32,7 @@ const unsubscribeHook = (z, bundle) => {
|
|||
// You can build requests and our client will helpfully inject all the variables
|
||||
// you need to complete. You can also register middleware to control this.
|
||||
const options = {
|
||||
url: bundle.authData.url + '/api/index.php/zapierapi/hook/' + bundle.subscribeData.id,
|
||||
url: bundle.authData.url + '/api/index.php/zapier/hook/' + bundle.subscribeData.id,
|
||||
method: 'DELETE',
|
||||
};
|
||||
|
||||
|
|
@ -84,7 +84,7 @@ const getFallbackRealAction = (z, bundle) => {
|
|||
// // For the test poll, you should get some real data, to aid the setup process.
|
||||
// const module = bundle.inputData.module;
|
||||
// const options = {
|
||||
// url: bundle.authData.url + '/api/index.php/zapierapi/getactionschoices/actions',
|
||||
// url: bundle.authData.url + '/api/index.php/zapier/getactionschoices/actions',
|
||||
// };
|
||||
|
||||
// return z.request(options).then((response) => JSON.parse(response.content));
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ const subscribeHook = (z, bundle) => {
|
|||
action: bundle.inputData.action
|
||||
};
|
||||
|
||||
const url = bundle.authData.url + '/api/index.php/zapierapi/hook';
|
||||
const url = bundle.authData.url + '/api/index.php/zapier/hook';
|
||||
|
||||
// You can build requests and our client will helpfully inject all the variables
|
||||
// you need to complete. You can also register middleware to control this.
|
||||
|
|
@ -32,7 +32,7 @@ const unsubscribeHook = (z, bundle) => {
|
|||
// You can build requests and our client will helpfully inject all the variables
|
||||
// you need to complete. You can also register middleware to control this.
|
||||
const options = {
|
||||
url: bundle.authData.url + '/api/index.php/zapierapi/hook/' + bundle.subscribeData.id,
|
||||
url: bundle.authData.url + '/api/index.php/zapier/hook/' + bundle.subscribeData.id,
|
||||
method: 'DELETE',
|
||||
};
|
||||
|
||||
|
|
@ -76,7 +76,7 @@ const getFallbackRealContact = (z, bundle) => {
|
|||
// const getModulesChoices = (z/*, bundle*/) => {
|
||||
// // For the test poll, you should get some real data, to aid the setup process.
|
||||
// const options = {
|
||||
// url: bundle.authData.url + '/api/index.php/zapierapi/getmoduleschoices',
|
||||
// url: bundle.authData.url + '/api/index.php/zapier/getmoduleschoices',
|
||||
// };
|
||||
|
||||
// return z.request(options).then((response) => JSON.parse(response.content));
|
||||
|
|
@ -94,7 +94,7 @@ const getFallbackRealContact = (z, bundle) => {
|
|||
// // For the test poll, you should get some real data, to aid the setup process.
|
||||
// const module = bundle.inputData.module;
|
||||
// const options = {
|
||||
// url: url: bundle.authData.url + '/api/index.php/zapierapi/getactionschoices/thirparty`,
|
||||
// url: url: bundle.authData.url + '/api/index.php/zapier/getactionschoices/thirparty`,
|
||||
// };
|
||||
|
||||
// return z.request(options).then((response) => JSON.parse(response.content));
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ const subscribeHook = (z, bundle) => {
|
|||
action: bundle.inputData.action
|
||||
};
|
||||
|
||||
const url = bundle.authData.url + '/api/index.php/zapierapi/hook';
|
||||
const url = bundle.authData.url + '/api/index.php/zapier/hook';
|
||||
|
||||
// You can build requests and our client will helpfully inject all the variables
|
||||
// you need to complete. You can also register middleware to control this.
|
||||
|
|
@ -32,7 +32,7 @@ const unsubscribeHook = (z, bundle) => {
|
|||
// You can build requests and our client will helpfully inject all the variables
|
||||
// you need to complete. You can also register middleware to control this.
|
||||
const options = {
|
||||
url: bundle.authData.url + '/api/index.php/zapierapi/hook/' + bundle.subscribeData.id,
|
||||
url: bundle.authData.url + '/api/index.php/zapier/hook/' + bundle.subscribeData.id,
|
||||
method: 'DELETE',
|
||||
};
|
||||
|
||||
|
|
@ -76,7 +76,7 @@ const getFallbackRealMember = (z, bundle) => {
|
|||
// const getModulesChoices = (z/*, bundle*/) => {
|
||||
// // For the test poll, you should get some real data, to aid the setup process.
|
||||
// const options = {
|
||||
// url: bundle.authData.url + '/api/index.php/zapierapi/getmoduleschoices',
|
||||
// url: bundle.authData.url + '/api/index.php/zapier/getmoduleschoices',
|
||||
// };
|
||||
|
||||
// return z.request(options).then((response) => JSON.parse(response.content));
|
||||
|
|
@ -94,7 +94,7 @@ const getFallbackRealMember = (z, bundle) => {
|
|||
// // For the test poll, you should get some real data, to aid the setup process.
|
||||
// const module = bundle.inputData.module;
|
||||
// const options = {
|
||||
// url: url: bundle.authData.url + '/api/index.php/zapierapi/getactionschoices/thirparty`,
|
||||
// url: url: bundle.authData.url + '/api/index.php/zapier/getactionschoices/thirparty`,
|
||||
// };
|
||||
|
||||
// return z.request(options).then((response) => JSON.parse(response.content));
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ const subscribeHook = (z, bundle) => {
|
|||
action: bundle.inputData.action
|
||||
};
|
||||
|
||||
const url = bundle.authData.url + '/api/index.php/zapierapi/hook';
|
||||
const url = bundle.authData.url + '/api/index.php/zapier/hook';
|
||||
|
||||
// You can build requests and our client will helpfully inject all the variables
|
||||
// you need to complete. You can also register middleware to control this.
|
||||
|
|
@ -32,7 +32,7 @@ const unsubscribeHook = (z, bundle) => {
|
|||
// You can build requests and our client will helpfully inject all the variables
|
||||
// you need to complete. You can also register middleware to control this.
|
||||
const options = {
|
||||
url: bundle.authData.url + '/api/index.php/zapierapi/hook/' + bundle.subscribeData.id,
|
||||
url: bundle.authData.url + '/api/index.php/zapier/hook/' + bundle.subscribeData.id,
|
||||
method: 'DELETE',
|
||||
};
|
||||
|
||||
|
|
@ -74,7 +74,7 @@ const getFallbackRealOrder = (z, bundle) => {
|
|||
// // For the test poll, you should get some real data, to aid the setup process.
|
||||
// const module = bundle.inputData.module;
|
||||
// const options = {
|
||||
// url: bundle.authData.url + '/api/index.php/zapierapi/getactionschoices/orders',
|
||||
// url: bundle.authData.url + '/api/index.php/zapier/getactionschoices/orders',
|
||||
// };
|
||||
|
||||
// return z.request(options).then((response) => JSON.parse(response.content));
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ const subscribeHook = (z, bundle) => {
|
|||
action: bundle.inputData.action
|
||||
};
|
||||
|
||||
const url = bundle.authData.url + '/api/index.php/zapierapi/hook';
|
||||
const url = bundle.authData.url + '/api/index.php/zapier/hook';
|
||||
|
||||
// You can build requests and our client will helpfully inject all the variables
|
||||
// you need to complete. You can also register middleware to control this.
|
||||
|
|
@ -32,7 +32,7 @@ const unsubscribeHook = (z, bundle) => {
|
|||
// You can build requests and our client will helpfully inject all the variables
|
||||
// you need to complete. You can also register middleware to control this.
|
||||
const options = {
|
||||
url: bundle.authData.url + '/api/index.php/zapierapi/hook/' + bundle.subscribeData.id,
|
||||
url: bundle.authData.url + '/api/index.php/zapier/hook/' + bundle.subscribeData.id,
|
||||
method: 'DELETE',
|
||||
};
|
||||
|
||||
|
|
@ -83,7 +83,7 @@ const getFallbackRealThirdparty = (z, bundle) => {
|
|||
// const getModulesChoices = (z/*, bundle*/) => {
|
||||
// // For the test poll, you should get some real data, to aid the setup process.
|
||||
// const options = {
|
||||
// url: bundle.authData.url + '/api/index.php/zapierapi/getmoduleschoices',
|
||||
// url: bundle.authData.url + '/api/index.php/zapier/getmoduleschoices',
|
||||
// };
|
||||
|
||||
// return z.request(options).then((response) => JSON.parse(response.content));
|
||||
|
|
@ -102,7 +102,7 @@ const getFallbackRealThirdparty = (z, bundle) => {
|
|||
// // For the test poll, you should get some real data, to aid the setup process.
|
||||
// const module = bundle.inputData.module;
|
||||
// const options = {
|
||||
// url: url: bundle.authData.url + '/api/index.php/zapierapi/getactionschoices/thirparty`,
|
||||
// url: url: bundle.authData.url + '/api/index.php/zapier/getactionschoices/thirparty`,
|
||||
// };
|
||||
|
||||
// return z.request(options).then((response) => JSON.parse(response.content));
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ const subscribeHook = (z, bundle) => {
|
|||
action: bundle.inputData.action
|
||||
};
|
||||
|
||||
const url = bundle.authData.url + '/api/index.php/zapierapi/hook';
|
||||
const url = bundle.authData.url + '/api/index.php/zapier/hook';
|
||||
|
||||
// You can build requests and our client will helpfully inject all the variables
|
||||
// you need to complete. You can also register middleware to control this.
|
||||
|
|
@ -32,7 +32,7 @@ const unsubscribeHook = (z, bundle) => {
|
|||
// You can build requests and our client will helpfully inject all the variables
|
||||
// you need to complete. You can also register middleware to control this.
|
||||
const options = {
|
||||
url: bundle.authData.url + '/api/index.php/zapierapi/hook/' + bundle.subscribeData.id,
|
||||
url: bundle.authData.url + '/api/index.php/zapier/hook/' + bundle.subscribeData.id,
|
||||
method: 'DELETE',
|
||||
};
|
||||
|
||||
|
|
@ -76,7 +76,7 @@ const getFallbackRealTicket = (z, bundle) => {
|
|||
// const getModulesChoices = (z/*, bundle*/) => {
|
||||
// // For the test poll, you should get some real data, to aid the setup process.
|
||||
// const options = {
|
||||
// url: bundle.authData.url + '/api/index.php/zapierapi/getmoduleschoices',
|
||||
// url: bundle.authData.url + '/api/index.php/zapier/getmoduleschoices',
|
||||
// };
|
||||
|
||||
// return z.request(options).then((response) => JSON.parse(response.content));
|
||||
|
|
@ -97,7 +97,7 @@ const getFallbackRealTicket = (z, bundle) => {
|
|||
// // For the test poll, you should get some real data, to aid the setup process.
|
||||
// const module = bundle.inputData.module;
|
||||
// const options = {
|
||||
// url: url: bundle.authData.url + '/api/index.php/zapierapi/getactionschoices/thirparty`,
|
||||
// url: url: bundle.authData.url + '/api/index.php/zapier/getactionschoices/thirparty`,
|
||||
// };
|
||||
|
||||
// return z.request(options).then((response) => JSON.parse(response.content));
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ const subscribeHook = (z, bundle) => {
|
|||
action: bundle.inputData.action
|
||||
};
|
||||
|
||||
const url = bundle.authData.url + '/api/index.php/zapierapi/hook';
|
||||
const url = bundle.authData.url + '/api/index.php/zapier/hook';
|
||||
|
||||
// You can build requests and our client will helpfully inject all the variables
|
||||
// you need to complete. You can also register middleware to control this.
|
||||
|
|
@ -32,7 +32,7 @@ const unsubscribeHook = (z, bundle) => {
|
|||
// You can build requests and our client will helpfully inject all the variables
|
||||
// you need to complete. You can also register middleware to control this.
|
||||
const options = {
|
||||
url: bundle.authData.url + '/api/index.php/zapierapi/hook/' + bundle.subscribeData.id,
|
||||
url: bundle.authData.url + '/api/index.php/zapier/hook/' + bundle.subscribeData.id,
|
||||
method: 'DELETE',
|
||||
};
|
||||
|
||||
|
|
@ -73,7 +73,7 @@ const getFallbackRealUser = (z, bundle) => {
|
|||
// const getModulesChoices = (z/*, bundle*/) => {
|
||||
// // For the test poll, you should get some real data, to aid the setup process.
|
||||
// const options = {
|
||||
// url: bundle.authData.url + '/api/index.php/zapierapi/getmoduleschoices',
|
||||
// url: bundle.authData.url + '/api/index.php/zapier/getmoduleschoices',
|
||||
// };
|
||||
|
||||
// return z.request(options).then((response) => JSON.parse(response.content));
|
||||
|
|
@ -93,7 +93,7 @@ const getFallbackRealUser = (z, bundle) => {
|
|||
// // For the test poll, you should get some real data, to aid the setup process.
|
||||
// const module = bundle.inputData.module;
|
||||
// const options = {
|
||||
// url: url: bundle.authData.url + '/api/index.php/zapierapi/getactionschoices/thirparty`,
|
||||
// url: url: bundle.authData.url + '/api/index.php/zapier/getactionschoices/thirparty`,
|
||||
// };
|
||||
|
||||
// return z.request(options).then((response) => JSON.parse(response.content));
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
README
|
||||
------
|
||||
|
||||
Scripts in this directory can be used to load or purge data of a database instance.
|
||||
Scripts in this directory can be used to load massive data or purge data of a database instance.
|
||||
WARNING: Some of this script may delete definitely data.
|
||||
|
||||
To init data for a demo, use instead the tool into dev/initdemo
|
||||
|
|
|
|||
|
|
@ -45,9 +45,9 @@ require_once DOL_DOCUMENT_ROOT."/societe/class/societe.class.php";
|
|||
* Parameters
|
||||
*/
|
||||
|
||||
define(GEN_NUMBER_FACTURE, 1);
|
||||
define('GEN_NUMBER_FACTURE', $argv[1] ?? 1);
|
||||
$year = 2016;
|
||||
$dates = array (mktime(12, 0, 0, 1, 3, $year),
|
||||
$dates = array(mktime(12, 0, 0, 1, 3, $year),
|
||||
mktime(12, 0, 0, 1, 9, $year),
|
||||
mktime(12, 0, 0, 2, 13, $year),
|
||||
mktime(12, 0, 0, 2, 23, $year),
|
||||
|
|
@ -168,7 +168,8 @@ while ($i < GEN_NUMBER_FACTURE && $result >= 0) {
|
|||
|
||||
$result=$object->validate($fuser);
|
||||
if ($result) {
|
||||
print " OK with ref ".$object->ref."\n";;
|
||||
print " OK with ref ".$object->ref."\n";
|
||||
;
|
||||
} else {
|
||||
dol_print_error($db, $object->error);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,9 +51,9 @@ require_once DOL_DOCUMENT_ROOT."/commande/class/commande.class.php";
|
|||
* Parametre
|
||||
*/
|
||||
|
||||
define(GEN_NUMBER_COMMANDE, 10);
|
||||
define('GEN_NUMBER_COMMANDE', $argv[1] ?? 10);
|
||||
$year = 2016;
|
||||
$dates = array (mktime(12, 0, 0, 1, 3, $year),
|
||||
$dates = array(mktime(12, 0, 0, 1, 3, $year),
|
||||
mktime(12, 0, 0, 1, 9, $year),
|
||||
mktime(12, 0, 0, 2, 13, $year),
|
||||
mktime(12, 0, 0, 2, 23, $year),
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
|||
* Parameters
|
||||
*/
|
||||
|
||||
define(GEN_NUMBER_PRODUIT, 100000);
|
||||
define('GEN_NUMBER_PRODUIT', $argv[1] ?? 100);
|
||||
|
||||
|
||||
$ret=$user->fetch('', 'admin');
|
||||
|
|
@ -64,18 +64,24 @@ $user->getrights();
|
|||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product"; $productsid = array();
|
||||
$resql=$db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql); $i = 0;
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
while ($i < $num) {
|
||||
$row = $db->fetch_row($resql); $productsid[$i] = $row[0]; $i++;
|
||||
$row = $db->fetch_row($resql);
|
||||
$productsid[$i] = $row[0];
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; $societesid = array();
|
||||
$resql=$db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql); $i = 0;
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
while ($i < $num) {
|
||||
$row = $db->fetch_row($resql); $societesid[$i] = $row[0]; $i++;
|
||||
$row = $db->fetch_row($resql);
|
||||
$societesid[$i] = $row[0];
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
print "err";
|
||||
|
|
@ -84,9 +90,12 @@ if ($resql) {
|
|||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande"; $commandesid = array();
|
||||
$resql=$db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql); $i = 0;
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
while ($i < $num) {
|
||||
$row = $db->fetch_row($resql); $commandesid[$i] = $row[0]; $i++;
|
||||
$row = $db->fetch_row($resql);
|
||||
$commandesid[$i] = $row[0];
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
print "err";
|
||||
|
|
@ -99,7 +108,7 @@ for ($s = 0; $s < GEN_NUMBER_PRODUIT; $s++) {
|
|||
$produit = new Product($db);
|
||||
$produit->type = mt_rand(0, 1);
|
||||
$produit->status = 1;
|
||||
$produit->ref = ($produit->type?'S':'P').time().$s;
|
||||
$produit->ref = ($produit->type ? 'S' : 'P').time().$s;
|
||||
$produit->label = 'Label '.time().$s;
|
||||
$produit->description = 'Description '.time().$s;
|
||||
$produit->price = mt_rand(1, 999.99);
|
||||
|
|
|
|||
|
|
@ -47,9 +47,9 @@ require_once DOL_DOCUMENT_ROOT."/societe/class/societe.class.php";
|
|||
* Parameters
|
||||
*/
|
||||
|
||||
define(GEN_NUMBER_PROPAL, 10);
|
||||
define('GEN_NUMBER_PROPAL', $argv[1] ?? 10);
|
||||
$year = 2016;
|
||||
$dates = array (mktime(12, 0, 0, 1, 3, $year),
|
||||
$dates = array(mktime(12, 0, 0, 1, 3, $year),
|
||||
mktime(12, 0, 0, 1, 9, $year),
|
||||
mktime(12, 0, 0, 2, 13, $year),
|
||||
mktime(12, 0, 0, 2, 23, $year),
|
||||
|
|
@ -152,8 +152,8 @@ $user->rights->propal->creer=1;
|
|||
$user->rights->propal->propal_advance->validate=1;
|
||||
|
||||
|
||||
if (! empty($conf->global->PROPALE_ADDON) && is_readable(DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php")) {
|
||||
require_once DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php";
|
||||
if (getDolGlobalString('PROPALE_ADDON') && is_readable(DOL_DOCUMENT_ROOT ."/core/modules/propale/" . getDolGlobalString('PROPALE_ADDON').".php")) {
|
||||
require_once DOL_DOCUMENT_ROOT ."/core/modules/propale/" . getDolGlobalString('PROPALE_ADDON').".php";
|
||||
}
|
||||
|
||||
$i=0;
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ $listoflastname = array("Joe","Marc","Steve","Laurent","Nico","Isabelle","Doroth
|
|||
* Parametre
|
||||
*/
|
||||
|
||||
define(GEN_NUMBER_SOCIETE, 10);
|
||||
define('GEN_NUMBER_SOCIETE', $argv[1] ?? 10);
|
||||
|
||||
|
||||
$ret=$user->fetch('', 'admin');
|
||||
|
|
@ -67,7 +67,8 @@ $user->getrights();
|
|||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product"; $productsid = array();
|
||||
$resql=$db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql); $i = 0;
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
while ($i < $num) {
|
||||
$row = $db->fetch_row($resql);
|
||||
$productsid[$i] = $row[0];
|
||||
|
|
@ -78,7 +79,8 @@ if ($resql) {
|
|||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; $societesid = array();
|
||||
$resql=$db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql); $i = 0;
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
while ($i < $num) {
|
||||
$row = $db->fetch_row($resql);
|
||||
$societesid[$i] = $row[0];
|
||||
|
|
@ -91,7 +93,8 @@ if ($resql) {
|
|||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande"; $commandesid = array();
|
||||
$resql=$db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql); $i = 0;
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
while ($i < $num) {
|
||||
$row = $db->fetch_row($resql);
|
||||
$commandesid[$i] = $row[0];
|
||||
|
|
@ -117,12 +120,13 @@ for ($s = 0; $s < GEN_NUMBER_SOCIETE; $s++) {
|
|||
$soc->country_id=1;
|
||||
$soc->country_code='FR';
|
||||
// Un client sur 3 a une remise de 5%
|
||||
$user_remise=mt_rand(1, 3); if ($user_remise==3) {
|
||||
$user_remise=mt_rand(1, 3);
|
||||
if ($user_remise==3) {
|
||||
$soc->remise_percent=5;
|
||||
}
|
||||
print "> client=".$soc->client.", fournisseur=".$soc->fournisseur.", remise=".$soc->remise_percent."\n";
|
||||
$soc->note_private = 'Company created by the script generate-societe.php';
|
||||
$socid = $soc->create();
|
||||
$socid = $soc->create($user);
|
||||
|
||||
if ($socid >= 0) {
|
||||
$rand = mt_rand(1, 4);
|
||||
|
|
|
|||
|
|
@ -62,9 +62,9 @@ dol_syslog($script_file." launched with arg ".implode(',', $argv));
|
|||
$mode = $argv[1];
|
||||
$filepath = $argv[2];
|
||||
$filepatherr = $filepath.'.err';
|
||||
$defaultlang = empty($argv[3])?'en_US':$argv[3];
|
||||
$startlinenb = empty($argv[4])?1:$argv[4];
|
||||
$endlinenb = empty($argv[5])?0:$argv[5];
|
||||
$defaultlang = empty($argv[3]) ? 'en_US' : $argv[3];
|
||||
$startlinenb = empty($argv[4]) ? 1 : $argv[4];
|
||||
$endlinenb = empty($argv[5]) ? 0 : $argv[5];
|
||||
|
||||
if (empty($mode) || ! in_array($mode, array('test','confirm','confirmforced')) || empty($filepath)) {
|
||||
print "Usage: $script_file (test|confirm|confirmforced) filepath.csv [defaultlang] [startlinenb] [endlinenb]\n";
|
||||
|
|
|
|||
|
|
@ -63,8 +63,8 @@ $mode = $argv[1];
|
|||
$filepath = $argv[2];
|
||||
$filepatherr = $filepath.'.err';
|
||||
//$defaultlang = empty($argv[3])?'en_US':$argv[3];
|
||||
$startlinenb = empty($argv[3])?1:$argv[3];
|
||||
$endlinenb = empty($argv[4])?0:$argv[4];
|
||||
$startlinenb = empty($argv[3]) ? 1 : $argv[3];
|
||||
$endlinenb = empty($argv[4]) ? 0 : $argv[4];
|
||||
|
||||
if (empty($mode) || ! in_array($mode, array('test','confirm','confirmforced')) || empty($filepath)) {
|
||||
print "Usage: $script_file (test|confirm|confirmforced) filepath.csv [startlinenb] [endlinenb]\n";
|
||||
|
|
@ -128,8 +128,8 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
|
|||
$object->client = $fields[7];
|
||||
$object->fournisseur = $fields[8];
|
||||
|
||||
$object->name = $fields[13]?trim($fields[13]):$fields[0];
|
||||
$object->name_alias = $fields[0]!=$fields[13]?trim($fields[0]):'';
|
||||
$object->name = $fields[13] ? trim($fields[13]) : $fields[0];
|
||||
$object->name_alias = $fields[0] != $fields[13] ? trim($fields[0]) : '';
|
||||
|
||||
$object->address = trim($fields[14]);
|
||||
$object->zip = trim($fields[15]);
|
||||
|
|
|
|||
|
|
@ -63,8 +63,8 @@ $mode = $argv[1];
|
|||
$filepath = $argv[2];
|
||||
$filepatherr = $filepath.'.err';
|
||||
//$defaultlang = empty($argv[3])?'en_US':$argv[3];
|
||||
$startlinenb = empty($argv[3])?1:$argv[3];
|
||||
$endlinenb = empty($argv[4])?0:$argv[4];
|
||||
$startlinenb = empty($argv[3]) ? 1 : $argv[3];
|
||||
$endlinenb = empty($argv[4]) ? 0 : $argv[4];
|
||||
|
||||
if (empty($mode) || ! in_array($mode, array('test','confirm','confirmforced')) || empty($filepath)) {
|
||||
print "Usage: $script_file (test|confirm|confirmforced) filepath.csv [startlinenb] [endlinenb]\n";
|
||||
|
|
|
|||
|
|
@ -148,8 +148,8 @@ $sqls=array(
|
|||
"DELETE FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__'",
|
||||
),
|
||||
'project'=>array(
|
||||
// TODO set fk_project to null on object that refer to project
|
||||
"DELETE FROM ".MAIN_DB_PREFIX."projet_task_time WHERE fk_task IN (select rowid FROM ".MAIN_DB_PREFIX."projet_task WHERE fk_projet IN (select rowid FROM ".MAIN_DB_PREFIX."projet where datec < '__DATE__'))",
|
||||
// TODO set fk_project to null on all objects/tables that refer to project
|
||||
"DELETE FROM ".MAIN_DB_PREFIX."element_time WHERE elementtype = 'task' AND fk_element IN (select rowid FROM ".MAIN_DB_PREFIX."projet_task WHERE fk_projet IN (select rowid FROM ".MAIN_DB_PREFIX."projet where datec < '__DATE__'))",
|
||||
"DELETE FROM ".MAIN_DB_PREFIX."projet_task WHERE fk_projet IN (select rowid FROM ".MAIN_DB_PREFIX."projet where datec < '__DATE__')",
|
||||
"DELETE FROM ".MAIN_DB_PREFIX."projet where datec < '__DATE__'",
|
||||
),
|
||||
|
|
@ -218,7 +218,7 @@ if ($date == 'all') {
|
|||
}
|
||||
|
||||
// Replace database handler
|
||||
if (! empty($argv[4])) {
|
||||
if (!empty($argv[4])) {
|
||||
$db->close();
|
||||
unset($db);
|
||||
$db=getDoliDBInstance($argv[4], $argv[5], $argv[6], $argv[7], $argv[8], $argv[9]);
|
||||
|
|
|
|||
|
|
@ -1,28 +0,0 @@
|
|||
README
|
||||
------
|
||||
|
||||
Scripts in this directory can be used to reload or save a demo database.
|
||||
Install of package "dialog" is required.
|
||||
|
||||
|
||||
*** Init demo
|
||||
|
||||
The script initdemo.sh will erase current database with data into mysqldump_dolibarr_x.y.z.sql and copy files into documents_demo into officiel document directory.
|
||||
|
||||
Do a chmod 700 initdemo.sh
|
||||
then run ./initdemo.sh to launch Graphic User Interface.
|
||||
|
||||
After loading the demo files, admin login may be:
|
||||
- admin / admin
|
||||
or
|
||||
- admin / adminadmin
|
||||
|
||||
|
||||
*** Save demo
|
||||
|
||||
The script savedemo.sh will save current database into a database dump file.
|
||||
|
||||
|
||||
*** Update demo
|
||||
|
||||
The goal of script updatedemo.php is to update dates into the demo data so samples are up to date.
|
||||
32
dev/initdemo/README.md
Normal file
32
dev/initdemo/README.md
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
README
|
||||
======
|
||||
|
||||
Scripts in this directory can be used to reload or save a demo database.
|
||||
Install of package "dialog" is required.
|
||||
|
||||
|
||||
Init demo
|
||||
-------------
|
||||
|
||||
The script initdemo.sh will erase current database with data intodev/initdemo/mysqldump_dolibarr_x.y.z.sql and copy files into documents_demo into officiel document directory.
|
||||
|
||||
Do a chmod 700 initdemo.sh
|
||||
then run ./initdemo.sh to launch Graphic User Interface.
|
||||
|
||||
After loading the demo files, admin login may be:
|
||||
- admin / admin
|
||||
or
|
||||
- admin / adminadmin
|
||||
|
||||
|
||||
Update demo
|
||||
-------------
|
||||
|
||||
The goal of script dev/initdemo/updatedemo.php is to update dates into the demo data so samples are up to date.
|
||||
|
||||
|
||||
Save demo
|
||||
-------------
|
||||
|
||||
The script dev/initdemo.savedemo.sh will save current database into a database dump file.
|
||||
|
||||
|
|
@ -152,14 +152,13 @@ fi
|
|||
|
||||
if [ "x${demopasshash}" != "xpassword_hash" ]
|
||||
then
|
||||
echo '<?php echo MD5("$demopass"); ?>' > /tmp/tmp.php
|
||||
echo '<?php echo MD5("'$demopass'"); ?>' > /tmp/tmp.php
|
||||
newpass=`php -f /tmp/tmp.php`
|
||||
rm /tmp/tmp.php
|
||||
else
|
||||
echo '<?php echo password_hash("'$demopass'", PASSWORD_DEFAULT); ?>' > /tmp/tmp.php
|
||||
newpass=`php -f /tmp/tmp.php`
|
||||
rm /tmp/tmp.php
|
||||
fi
|
||||
#rm /tmp/tmp.php
|
||||
|
||||
echo "echo \"UPDATE llx_user SET pass_crypted = '$newpass' WHERE login = '$demologin';\" | mysql -P$port $base"
|
||||
echo "UPDATE llx_user SET pass_crypted = '$newpass' WHERE login = '$demologin';" | mysql -P$port $base
|
||||
|
|
@ -172,6 +171,7 @@ fi
|
|||
|
||||
if [ -s "$mydir/initdemopostsql.sql" ]; then
|
||||
echo A file initdemopostsql.sql was found, we execute it.
|
||||
echo "mysql -P$port $base < \"$mydir/initdemopostsql.sql\""
|
||||
mysql -P$port $base < "$mydir/initdemopostsql.sql"
|
||||
else
|
||||
echo No file initdemopostsql.sql found, so no extra sql action done.
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user