Merge branch 'develop' of github.com:Dolibarr/dolibarr into New_retained_warranty_develop

This commit is contained in:
John BOTELLA 2019-06-04 14:00:18 +02:00
commit d7a393bbd3
7889 changed files with 624138 additions and 262408 deletions

View File

@ -1,14 +1,21 @@
# EditorConfig is awesome: http://EditorConfig.org # EditorConfig is awesome: https://editorconfig.org
# top-most EditorConfig file # top-most EditorConfig file
root = true root = true
# Unix-style newlines with a newline ending every file # Unix-style newlines with a newline ending every file
[*] [*]
charset = utf-8 charset = utf-8
end_of_line = lf end_of_line = lf
insert_final_newline = true insert_final_newline = true
# PHP PSR-2 Coding Standards
# http://www.php-fig.org/psr/psr-2/
[*.php] [*.php]
indent_style = tab indent_style = tab
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
[*.js] [*.js]
indent_style = tab indent_style = tab
[*.css] [*.css]

1
.github/CODEOWNERS vendored Normal file
View File

@ -0,0 +1 @@
htdocs/takepos @andreubisquerra

View File

@ -38,7 +38,7 @@ We officially support versions N, N − 1 and N − 2 for N the latest version a
Choose your base branch accordingly. Choose your base branch accordingly.
### General rules ### General rules
Please don't edit the ChangeLog file. File will be generated from your commit messages during release process by the project manager. Please don't edit the ChangeLog file. File will be generated from all commit messages during release process by the project manager.
### <a name="commits"></a>Commits ### <a name="commits"></a>Commits
Use clear commit messages with the following structure: Use clear commit messages with the following structure:
@ -56,13 +56,15 @@ You can add it to your git configuration using:
git config --local commit.template .gitmessage git config --local commit.template .gitmessage
``` ```
where
#### Keyword #### Keyword
In uppercase if you want to have the log comment appears into the generated ChangeLog file. 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 ommitted if your commit does not fit in any of the following categories:
- Fix: for a bug fix - Fix/FIX: for a bug fix
- Close: for closing a referenced feature request - New/NEW: for an unreferenced new feature (Opening a feature request and using close is prefered)
- New: for an unreferenced new feature (Opening a feature request and using close is prefered) - Close/CLOSE: for closing a referenced feature request
#### Issuenum #### Issuenum
If your commit fixes a referenced bug or feature request. If your commit fixes a referenced bug or feature request.
@ -85,14 +87,14 @@ This section can span multiple lines.
Try to keep lines under 120 characters. Try to keep lines under 120 characters.
#### Samples #### Examples
<pre> <pre>
FIX|Fix #456 Short description (where #456 is number of bug fix, if it exists. In upper case to appear into ChangeLog) FIX|Fix #456 Short description (where #456 is number of bug fix, if it exists. In upper case to appear into ChangeLog)
or 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 Short description (In upper case to appear into ChangeLog, use this if you add a feature not tracked, otherwise use CLOSE #456) 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 or
CLOSE|Close #456 Short description (where #456 is number of feature request, if it exists. In upper case to appear into ChangeLog)
or
Short description (when the commit is not introducing feature nor closing a bug) Short description (when the commit is not introducing feature nor closing a bug)
Long description (Can span accross multiple lines). Long description (Can span accross multiple lines).
@ -104,13 +106,22 @@ When submitting a pull request, use same rule as [Commits](#commits) for the mes
If your pull request only contains one commit, GitHub will be smart enough to fill it for you. If your pull request only contains one commit, GitHub will be smart enough to fill it for you.
Otherwise, please be a bit verbose about what you're providing. Otherwise, please be a bit verbose about what you're providing.
Your Pull Request must pass the Continuous Integration checks. Your Pull Request (PR) must pass the Continuous Integration checks.
Also, some code changes need a prior approbation: 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 project manager (@eldy) to see if such a library can be accepted. * if you want to include a new external library (into htdocs/includes directory), please ask before to the project manager (@eldy) to see if such a library can be accepted.
* if you add a new table, you must first create a page on http://wiki.dolibarr.org/index.php/Category:Table_SQL (copy an existing page changing its name to see it into this index page). Than ask the project manager (@eldy) if the new data model you plan to add can be accepted as you suggest. * if you add a new table, you must first create a page on http://wiki.dolibarr.org/index.php/Category:Table_SQL (copy an existing page changing its name to see it into this index page). Than ask the project manager (@eldy) if the new data model you plan to add can be accepted as you suggest.
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.
If your PR has errors reported by the Continuous Integration Platform, it means your PR is not valid and nothing will be done with it. It will be kept open to allow developers to fix this, or it may be closed several month later.
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.
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.
Around 95% of submitted PR are reviewed and tagged. Even if this is one of the most important ratio in Open Source world, don't expect the core team
to reach the 100%. With the increasing popularity of Dolibarr, this ratio will probably decrease in future.
### Resources ### Resources
[Developer documentation](http://wiki.dolibarr.org/index.php/Developer_documentation) [Developer documentation](http://wiki.dolibarr.org/index.php/Developer_documentation)
@ -120,9 +131,12 @@ The source language (en_US) is maintained in the repository. See the [Code](#cod
All other translations are managed online at [Transifex](https://www.transifex.com/dolibarr-association/dolibarr/). All other translations are managed online at [Transifex](https://www.transifex.com/dolibarr-association/dolibarr/).
Join an existing translation team or create your own and translate into the interface. 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
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 retreive 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.
Your translations will be available in the next major release.
### Resources ### Resources
[Translator documentation](http://wiki.dolibarr.org/index.php/Translator_documentation) [Translator documentation](http://wiki.dolibarr.org/index.php/Translator_documentation)
@ -131,5 +145,5 @@ Documentation
------------- -------------
The project's documentation is maintained on the [Wiki](http://wiki.dolibarr.org/index.php). The project's documentation is maintained on the [Wiki](http://wiki.dolibarr.org/index.php).
*Note*: to help prevent spam, you need to create an account before being able to edit. *Note*: to help prevent spam, you need to create an account before being able to edit. Everybody is welcome to contribute to its content.

1
.gitignore vendored
View File

@ -12,6 +12,7 @@ dolibarr_install.log
upgrade.log upgrade.log
doxygen_warnings.log doxygen_warnings.log
/.project /.project
/.vscode
.DS_Store .DS_Store
.idea .idea
*.iml *.iml

View File

@ -6,8 +6,8 @@ Laurent Destailleur <eldy@destailleur.fr> eldy <eldy@destailleur.fr>
Laurent Destailleur <eldy@destailleur.fr> Laurent Destailleur <ldestailleur@teclib.com> Laurent Destailleur <eldy@destailleur.fr> Laurent Destailleur <ldestailleur@teclib.com>
Laurent Destailleur <eldy@destailleur.fr> eldy10 <eldy10@master8.(none)> Laurent Destailleur <eldy@destailleur.fr> eldy10 <eldy10@master8.(none)>
Laurent Destailleur <eldy@destailleur.fr> Laurent Destailleur <ephpcsdy@destailleur.fr> Laurent Destailleur <eldy@destailleur.fr> Laurent Destailleur <ephpcsdy@destailleur.fr>
Regis Houssin <regis.houssin@capnetworks.com> Regis Houssin <regis@dolibarr.fr> Regis Houssin <regis.houssin@inodbox.com> Regis Houssin <regis@dolibarr.fr>
Regis Houssin <regis.houssin@capnetworks.com> Régis Houssin <regishoussin@device5.home> Regis Houssin <regis.houssin@inodbox.com> Régis Houssin <regishoussin@device5.home>
Juanjo Menent <jmenent@2byte.es> simnandez <jmenent@2byte.es> Juanjo Menent <jmenent@2byte.es> simnandez <jmenent@2byte.es>
Juanjo Menent <jmenent@2byte.es> Juanjo Menent <simnandez@gmail.com> Juanjo Menent <jmenent@2byte.es> Juanjo Menent <simnandez@gmail.com>
Juanjo Menent <jmenent@2byte.es> Simnandez <jmenent@2byte.es> Juanjo Menent <jmenent@2byte.es> Simnandez <jmenent@2byte.es>
@ -21,9 +21,9 @@ Florian Henry <florian.henry@open-concept.pro> FHenry <florian.henry.mail@gmail.
Florian Henry <florian.henry@open-concept.pro> Florian HENRY <florian.henry@open-conept.pro> Florian Henry <florian.henry@open-concept.pro> Florian HENRY <florian.henry@open-conept.pro>
Florian Henry <florian.henry@open-concept.pro> FHenry <florian.henry@open-concept.pro> Florian Henry <florian.henry@open-concept.pro> FHenry <florian.henry@open-concept.pro>
Florian Henry <florian.henry@open-concept.pro> HENRY Florian <florian.henry@open-concept.pro> Florian Henry <florian.henry@open-concept.pro> HENRY Florian <florian.henry@open-concept.pro>
Alexandre Spangaro <aspangaro.dolibarr@gmail.com> aspangaro <aspangaro.dolibarr@gmail.com> Alexandre Spangaro <aspangaro@open-dsi.fr> aspangaro <aspangaro@open-dsi.fr>
Alexandre Spangaro <aspangaro.dolibarr@gmail.com> Spangaro Alexandre <aspangaro.dolibarr@gmail.com> Alexandre Spangaro <aspangaro@open-dsi.fr> Spangaro Alexandre <aspangaro@open-dsi.fr>
Alexandre Spangaro <aspangaro.dolibarr@gmail.com> Alexandre SPANGARO <aspangaro.dolibarr@gmail.com> Alexandre Spangaro <aspangaro@open-dsi.fr> Alexandre SPANGARO <aspangaro@open-dsi.fr>
Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> Raphaël Doursenaud <rdoursenaud@free.fr> Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> Raphaël Doursenaud <rdoursenaud@free.fr>
Philippe Grand <philippe.grand@atoo-net.com> Grand Philippe <contact@atoo-net.com> Philippe Grand <philippe.grand@atoo-net.com> Grand Philippe <contact@atoo-net.com>
Philippe Grand <philippe.grand@atoo-net.com> Philippe GRAND <philippe.grand@atoo-net.com> Philippe Grand <philippe.grand@atoo-net.com> Philippe GRAND <philippe.grand@atoo-net.com>

View File

@ -2,7 +2,7 @@
# from Dolibarr GitHub repository. # from Dolibarr GitHub repository.
# For syntax, see http://about.travis-ci.org/docs/user/languages/php/ # For syntax, see http://about.travis-ci.org/docs/user/languages/php/
# We use dist: precise to have php 5.3 available # We use dist: trusty to have php 5.4+ available
dist: trusty dist: trusty
sudo: required sudo: required
@ -31,13 +31,12 @@ addons:
- pgloader - pgloader
php: php:
- '5.4'
- '5.5' - '5.5'
- '5.6' - '5.6'
- '7.0' - '7.0'
- '7.1' - '7.1'
- '7.2' - '7.2'
#- hhvm only with dist: trusty - '7.3'
- nightly - nightly
env: env:
@ -59,19 +58,24 @@ env:
matrix: matrix:
fast_finish: true fast_finish: true
allow_failures: allow_failures:
- php: hhvm
- php: nightly - php: nightly
# We exclude some combinations not usefull to save Travis CPU # We exclude some combinations not usefull to save Travis CPU
exclude: exclude:
- php: '5.5' - php: '5.6'
env: DB=postgresql env: DB=mariadb
- php: '7.0'
env: DB=mariadb
- php: '7.1'
env: DB=mariadb
- php: '7.2'
env: DB=mariadb
- php: '5.6' - php: '5.6'
env: DB=postgresql env: DB=postgresql
- php: '7.0' - php: '7.0'
env: DB=postgresql env: DB=postgresql
- php: '7.1' - php: '7.1'
env: DB=postgresql env: DB=postgresql
- php: hhvm - php: '7.2'
env: DB=postgresql env: DB=postgresql
- php: nightly - php: nightly
env: DB=postgresql env: DB=postgresql
@ -126,14 +130,14 @@ install:
if [ "$TRAVIS_PHP_VERSION" = '5.6' ] || [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ]; then if [ "$TRAVIS_PHP_VERSION" = '5.6' ] || [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ]; then
composer -n require phpunit/phpunit ^5 composer -n require phpunit/phpunit ^5
fi fi
if [ "$TRAVIS_PHP_VERSION" = '7.2' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then if [ "$TRAVIS_PHP_VERSION" = '7.2' ] || [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
composer -n require phpunit/phpunit ^5 composer -n require phpunit/phpunit ^5
fi fi
echo echo
- | - |
echo "Installing PHP CodeSniffer" echo "Installing PHP CodeSniffer"
composer -n require squizlabs/php_codesniffer ^2 composer -n require squizlabs/php_codesniffer ^3
echo echo
- | - |
@ -161,13 +165,9 @@ before_script:
echo "Set timezone" echo "Set timezone"
echo 'date.timezone = "Europe/Paris"' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini echo 'date.timezone = "Europe/Paris"' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
if [ "$TRAVIS_PHP_VERSION" = '5.4' ]; then if [ "$TRAVIS_PHP_VERSION" = '5.4' ]; then
#echo # Documentation says it should be available for all PHP versions but it's not for 5.5 and 5.6, 7.0, 7.1, 7.2 and nightly!
#echo "Enabling APC for PHP <= 5.4"
# Documentation says it should be available for PHP <= 5.6 but it's not for 5.5 and 5.6!
#echo 'extension = apc.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
echo echo
echo "Enabling Memcached for PHP <= 5.4" echo "Enabling Memcached for PHP <= 5.4"
# Documentation says it should be available for all PHP versions but it's not for 5.5 and 5.6, 7.0, 7.1, 7.2 and nightly!
echo 'extension = memcached.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini echo 'extension = memcached.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
fi fi
phpenv rehash phpenv rehash
@ -207,8 +207,14 @@ before_script:
mysql -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql mysql -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
fi fi
if [ "$DB" = 'postgresql' ]; then if [ "$DB" = 'postgresql' ]; then
#pgloader mysql://root:pass@127.0.0.1/dolibarr_35 postgresql://dolibarrowner:dolibarrownerpass@127.0.0.1/dolibarr_dev #pgloader mysql://root:pass@127.0.0.1/dolibarr_9 postgresql://dolibarrowner:dolibarrownerpass@127.0.0.1/dolibarr_dev
echo pgloader mysql://root@127.0.0.1/travis postgresql:///travis
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 fi
# TODO: SQLite # TODO: SQLite
echo echo
@ -216,7 +222,7 @@ before_script:
- | - |
export CONF_FILE=htdocs/conf/conf.php export CONF_FILE=htdocs/conf/conf.php
echo "Setting up Dolibarr $CONF_FILE" echo "Setting up Dolibarr $CONF_FILE"
echo '<?php ' > $CONF_FILE echo '<?php' > $CONF_FILE
echo '$'dolibarr_main_url_root=\'http://127.0.0.1\'';' >> $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_document_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $CONF_FILE
echo '$'dolibarr_main_data_root=\'$TRAVIS_BUILD_DIR/documents\'';' >> $CONF_FILE echo '$'dolibarr_main_data_root=\'$TRAVIS_BUILD_DIR/documents\'';' >> $CONF_FILE
@ -225,9 +231,11 @@ before_script:
echo '$'dolibarr_main_db_user=\'travis\'';' >> $CONF_FILE echo '$'dolibarr_main_db_user=\'travis\'';' >> $CONF_FILE
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then
echo '$'dolibarr_main_db_type=\'mysqli\'';' >> $CONF_FILE echo '$'dolibarr_main_db_type=\'mysqli\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_port=\'3306\'';' >> $CONF_FILE
fi fi
if [ "$DB" = 'postgresql' ]; then if [ "$DB" = 'postgresql' ]; then
echo '$'dolibarr_main_db_type=\'pgsql\'';' >> $CONF_FILE echo '$'dolibarr_main_db_type=\'pgsql\'';' >> $CONF_FILE
echo '$'dolibarr_main_db_port=\'5432\'';' >> $CONF_FILE
fi fi
# TODO: SQLite # TODO: SQLite
echo '$'dolibarr_main_authentication=\'dolibarr\'';' >> $CONF_FILE echo '$'dolibarr_main_authentication=\'dolibarr\'';' >> $CONF_FILE
@ -249,7 +257,7 @@ before_script:
# enable php-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 - 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" = 'nightly' ]; then if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = '7.2' ] || [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
# Copy the included pool # 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 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 fi
@ -272,11 +280,12 @@ before_script:
script: script:
- | - |
echo "Checking webserver availability by a wget -O - http://127.0.0.1" echo "Checking webserver availability by a wget -O - http://127.0.0.1"
# Ensure we catch errors # Ensure we stop on error with set -e
set -e set +e
# The wget should return a page with line '<meta name="generator" content="Dolibarr installer"> # The wget should return a page with line '<meta name="generator" content="Dolibarr installer">
wget -O - http://127.0.0.1 > test.html wget -O - http://127.0.0.1 > test.html
head test.html head test.html
sudo cat /var/log/apache2/travis_error_log
set +e set +e
echo echo
@ -284,7 +293,8 @@ script:
echo "Checking PHP syntax errors" echo "Checking PHP syntax errors"
# Ensure we catch errors # Ensure we catch errors
set -e set -e
parallel-lint --exclude htdocs/includes --blame . #parallel-lint --exclude htdocs/includes --blame .
parallel-lint --exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/Shared --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian --exclude htdocs/includes/squizlabs/php_codesniffer/tests --exclude htdocs/includes/jakub-onderka/php-parallel-lint/tests --exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/phpunit/php-token-stream/tests --exclude htdocs/includes/composer/autoload_static.php --blame .
set +e set +e
echo echo
@ -294,7 +304,7 @@ script:
set -e set -e
# Exclusions are defined in the ruleset.xml file # Exclusions are defined in the ruleset.xml file
#phpcs -s -n -p -d memory_limit=-1 --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 . #phpcs -s -n -p -d memory_limit=-1 --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 .
phpcs -s -p -d memory_limit=-1 --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true . 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 .
set +e set +e
echo echo
@ -304,7 +314,7 @@ script:
- | - |
echo "Upgrading Dolibarr" echo "Upgrading Dolibarr"
# Ensure we catch errors # Ensure we catch errors. Set this to +e if you want to go to the end to see log files.
set +e set +e
cd htdocs/install cd htdocs/install
php upgrade.php 3.5.0 3.6.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade350360.log php upgrade.php 3.5.0 3.6.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade350360.log
@ -320,7 +330,7 @@ script:
php upgrade2.php 3.8.0 3.9.0 > $TRAVIS_BUILD_DIR/upgrade380390-2.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 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 upgrade.php 3.9.0 4.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade390400.log
php upgrade2.php 3.9.0 4.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL > $TRAVIS_BUILD_DIR/upgrade390400-2.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 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 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 upgrade2.php 4.0.0 5.0.0 > $TRAVIS_BUILD_DIR/upgrade400500-2.log
@ -329,18 +339,25 @@ script:
php upgrade2.php 5.0.0 6.0.0 > $TRAVIS_BUILD_DIR/upgrade500600-2.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 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 upgrade.php 6.0.0 7.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade600700.log
php upgrade2.php 6.0.0 7.0.0 MAIN_MODULE_WEBSITE,MAIN_MODULE_SUPPLIERPROPOSAL > $TRAVIS_BUILD_DIR/upgrade600700-2.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 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 upgrade.php 7.0.0 8.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade700800.log
php upgrade2.php 7.0.0 8.0.0 MAIN_MODULE_TICKETSUP > $TRAVIS_BUILD_DIR/upgrade700800-2.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 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 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 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 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
# Enable modules not enabled into original dump
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL,MAIN_MODULE_WEBSITE,MAIN_MODULE_TICKETSUP,MAIN_MODULE_ACCOUNTING > $TRAVIS_BUILD_DIR/enablemodule.log
echo $?
cd - cd -
set +e set +e
echo echo
#cat /tmp/dolibarr_install.log #cat /tmp/dolibarr_install.log
cat $TRAVIS_BUILD_DIR/enablemodule.log
- | - |
echo "Unit testing" echo "Unit testing"
@ -353,9 +370,10 @@ script:
after_script: after_script:
- | - |
echo "After script - Output 50 latest lines of dolibarr.log" echo "After script - Output lines of dolibarr.log"
ls $TRAVIS_BUILD_DIR/documents ls $TRAVIS_BUILD_DIR/documents
tail -n 50 $TRAVIS_BUILD_DIR/documents/dolibarr.log #cat $TRAVIS_BUILD_DIR/documents/dolibarr.log
sudo tail -n 50 $TRAVIS_BUILD_DIR/documents/dolibarr.log
after_success: after_success:
- | - |
@ -364,7 +382,7 @@ after_success:
after_failure: after_failure:
- | - |
echo Failure detected, so we show samples of log to help diagnose echo Failure detected, so we show samples of log to help diagnose
# This part of code is executed only if previous commande that fails are enclosed with set +e # This part of code is executed only if previous command that fails are enclosed with set +e
# Upgrade log files # Upgrade log files
for ficlog in `ls $TRAVIS_BUILD_DIR/*.log` for ficlog in `ls $TRAVIS_BUILD_DIR/*.log`
do do
@ -373,7 +391,7 @@ after_failure:
done done
# Apache log file # Apache log file
echo "Debugging informations for file apache error.log" echo "Debugging informations for file apache error.log"
sudo cat /var/log/apache2/error.log sudo cat /var/log/apache2/travis_error_log
if [ "$DEBUG" = true ]; then if [ "$DEBUG" = true ]; then
# Dolibarr log file # Dolibarr log file
echo "Debugging informations for file dolibarr.log (latest 50 lines)" echo "Debugging informations for file dolibarr.log (latest 50 lines)"
@ -384,4 +402,3 @@ after_failure:
# TODO: PostgreSQL log file # TODO: PostgreSQL log file
echo echo
fi fi

View File

@ -38,6 +38,12 @@ source_file = htdocs/langs/en_US/bills.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.blockedlog]
file_filter = htdocs/langs/<lang>/blockedlog.lang
source_file = htdocs/langs/en_US/blockedlog.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[dolibarr.bookmarks] [dolibarr.bookmarks]
file_filter = htdocs/langs/<lang>/bookmarks.lang file_filter = htdocs/langs/<lang>/bookmarks.lang
source_file = htdocs/langs/en_US/bookmarks.lang source_file = htdocs/langs/en_US/bookmarks.lang
@ -230,6 +236,12 @@ source_file = htdocs/langs/en_US/modulebuilder.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.mrp]
file_filter = htdocs/langs/<lang>/mrp.lang
source_file = htdocs/langs/en_US/mrp.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[dolibarr.multicurrency] [dolibarr.multicurrency]
file_filter = htdocs/langs/<lang>/multicurrency.lang file_filter = htdocs/langs/<lang>/multicurrency.lang
source_file = htdocs/langs/en_US/multicurrency.lang source_file = htdocs/langs/en_US/multicurrency.lang
@ -308,6 +320,12 @@ source_file = htdocs/langs/en_US/receiptprinter.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.receptions]
file_filter = htdocs/langs/<lang>/receptions.lang
source_file = htdocs/langs/en_US/receptions.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[dolibarr.resource] [dolibarr.resource]
file_filter = htdocs/langs/<lang>/resource.lang file_filter = htdocs/langs/<lang>/resource.lang
source_file = htdocs/langs/en_US/resource.lang source_file = htdocs/langs/en_US/resource.lang
@ -391,3 +409,4 @@ file_filter = htdocs/langs/<lang>/workflow.lang
source_file = htdocs/langs/en_US/workflow.lang source_file = htdocs/langs/en_US/workflow.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES

View File

@ -13,28 +13,32 @@ Component Version License GPL Compatible
------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------
PHP libraries: PHP libraries:
AdoDb-Date 0.36 Modified BSD License Yes Date convertion (not into rpm package) AdoDb-Date 0.36 Modified BSD License Yes Date convertion (not into rpm package)
ChromePHP 4.1.0 Apache Software License 2.0 Yes Return server log to chrome browser console CKEditor 4.11.4 LGPL-2.1+ Yes Editor WYSIWYG
CKEditor 4.6.2 LGPL-2.1+ Yes Editor WYSIWYG PHPDebugBar 1.15.0 MIT License Yes Used only by the module "debugbar" for developers
EvalMath 1.0 BSD Yes Safe math expressions evaluation EvalMath 1.0 BSD Yes Safe math expressions evaluation
Escpos-php MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers Escpos-php ? MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers
GeoIP 1.4 LGPL-2.1+ Yes Sample code to make geoip convert (not into deb package) GeoIP 1.4 LGPL-2.1+ Yes Sample code to make geoip convert (not into deb package)
Mobiledetect 2.8.17 MIT License Yes Detect mobile devices browsers Mobiledetect 2.8.83 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) NuSoap 0.9.5 LGPL 2.1+ Yes Library to develop SOAP Web services (not into rpm and deb package)
PEAR Mail_MIME 1.8.9 BSD Yes NuSoap dependency PEAR Mail_MIME 1.8.9 BSD Yes NuSoap dependency
odtPHP 1.0.1 GPL-2+ Yes Library to build/edit ODT files odtPHP 1.0.1 GPL-2+ Yes Library to build/edit ODT files
ParseDown 1.6 MIT License Yes Markdown parser ParseDown 1.6 MIT License Yes Markdown parser
PHPExcel 1.8.1 LGPL-2.1+ Yes Read/Write XLS files, read ODS files PHPExcel 1.8.1 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
PHPSpreadSheet ? LGPL-2.1+ Yes Read/Write XLS files, read ODS files
php-iban 1.4.7 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP php-iban 1.4.7 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP
PHPoAuthLib 0.8.2 MIT License Yes Library to provide oauth1 and oauth2 to different service 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 PHPPrintIPP 1.3 GPL-2+ Yes Library to send print IPP requests
PSR/Logs 1.0 Library for logs (used by DebugBar)
PSR/simple-cache ? Library for cache (used by PHPSpreadSheet)
Restler 3.0.0RC6 LGPL-3+ Yes Library to develop REST Web services (+ swagger-ui js lib into dir explorer) Restler 3.0.0RC6 LGPL-3+ Yes Library to develop REST Web services (+ swagger-ui js lib into dir explorer)
TCPDF 6.2.12 LGPL-3+ Yes PDF generation Sabre 3.2.2 BSD Yes DAV support
TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes FPDI replacement
Swift Mailer 5.4.2-DEV MIT license Yes Comprehensive mailing tools for PHP Swift Mailer 5.4.2-DEV MIT license Yes Comprehensive mailing tools for PHP
Stripe 4.7.0 MIT licence Yes Library for Stripe module Stripe 6.35 MIT licence Yes Library for Stripe module
TCPDF 6.2.25 LGPL-3+ Yes PDF generation
TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes FPDI replacement
JS libraries: JS libraries:
jQuery 3.1.1 MIT License Yes JS library jQuery 3.3.1 MIT License Yes JS library
jQuery UI 1.12.1 GPL and MIT License Yes JS library plugin UI jQuery UI 1.12.1 GPL and MIT License Yes JS library plugin UI
jQuery select2 4.0.5 GPL and Apache License Yes JS library plugin for sexier multiselect jQuery select2 4.0.5 GPL and Apache License Yes JS library plugin for sexier multiselect
jQuery blockUI 2.70.0 GPL and MIT License Yes JS library plugin blockUI (to use ajax popups) jQuery blockUI 2.70.0 GPL and MIT License Yes JS library plugin blockUI (to use ajax popups)
@ -53,6 +57,13 @@ JsTimezoneDetect 1.0.6 MIT License Yes
SwaggerUI 2.0.24 GPL-2+ Yes JS library to offer the REST API explorer SwaggerUI 2.0.24 GPL-2+ Yes JS library to offer the REST API explorer
Ace 1.2.8 BSD Yes JS library to get code syntaxique coloration in a textarea. Ace 1.2.8 BSD Yes JS library to get code syntaxique coloration in a textarea.
Image libraries:
Octicons 8.1 MIT Yes
Font libraries:
Fontawesome 5.7.2 Font Awesome Free licence Yes
For licenses compatibility informations: For licenses compatibility informations:
http://www.gnu.org/licenses/licenses.en.html http://www.gnu.org/licenses/licenses.en.html

861
ChangeLog
View File

@ -2,19 +2,747 @@
English Dolibarr ChangeLog English Dolibarr ChangeLog
-------------------------------------------------------------- --------------------------------------------------------------
***** ChangeLog for 8.0.0 compared to 7.0.0 *****
***** ChangeLog for 10.0.0 compared to 9.0.0 *****
For Users:
NEW: Module "Ticket" is available as a stable module.
NEW: Module "Email Collector" is available as a stable module.
NEW: Module "TakePOS" is available as a stable module.
NEW: Experimental module "Vendor receptions".
NEW: Experimental module "BOM".
NEW: Accounting - Add default accounting account for member subcriptions.
NEW: Accounting - More comprehensive menu.
NEW: Agenda/event - add description column available in list (hidden by default).
NEW: Add accounting account for result.
NEW: Add accounting code for EEC sales and export sales on products.
NEW: Add a security permission to edit php dynamic content on the WebSite module.
NEW: Attached document on bank account are now visible in automatic ECM.
NEW: Add Autofill Remainder Amount picto on the Expense Report Payment Page.
NEW: Add contact status in category export
NEW: Add Default Warehouse to user record (if module stock is on)
NEW: Add employee/user to subledger account list
NEW: Add gender in member card
NEW: Add getFormatedCustomerRef and getFormatedSupplierRef methods
NEW: Add history to view and print previous sales on TakePos.
NEW: Add import of accounting account for intra/export selling on product card
NEW: Adding code to show update date of supplier price shown
NEW: Add line total on list of payments
NEW: Add LinkedIn field in social network module
NEW: Add more complete error messages in log on stripe payments
NEW: Add no_email field in contact list
NEW: Add notes are show in tooltips
NEW: Add option DONATION_USE_THIRDPARTIES in admin of membership module
NEW: Add option STOCK_SHOW_VIRTUAL_STOCK_IN_PRODUCTS_COMBO
NEW: add page to setup opening hours of the company
NEW: add payments table to pdf of expense report
NEW: add payment terms to invoices list
NEW: Add picto of deletion on mass action combo lists
NEW: add product extrafields available into shipping export
NEW: add ref supplier on supplier invoice
NEW: Add stats on entries & movements by fiscal year
NEW: Add subledger in various payment module
NEW: Add tag for ODT generation for localtax rates
NEW: Add the now link when creating expense report
NEW: Ask date of invoice when using the Clone feature.
NEW: auto event msg
NEW: Automatically binding for intra/export accountancy code in customer list
NEW: automatic / manual selector form
NEW: Better explanation for setup of WebDav module
NEW: Can add more lines on situation invoices at end of project when there is extra to add.
NEW: Can change the customer account of an instance
NEW: Can choose the root category to show products for TakePOS module
NEW: Can edit supplier on draft order supplier
NEW: Can enter price with or without tax when entering expense repor line
NEW: Can filter on the date of period for social contributions
NEW: Can generate invoices from the timespent entered on a project
NEW: Can update product supplier price ref
NEW: Can upload files from the edit page of expense report
NEW: Color for hover and for checked line is on by default
NEW: Column of parent company is available in list of third parties
NEW: conditionnal add member button by statut
NEW: constant KEEP_DISCOUNT_LINES_FROM_ORIGIN
NEW: Contact related items tab
NEW: Can create of supplier invoice from a reception
NEW: Ensure External RSS Links Open in New Window
NEW: Export available for reception module
NEW: Extend import option to Order's card and Propal's card
NEW: filter by thirdparty on report CA by prod/serv
NEW: Save space by moving the meteo on the title line
NEW: Get the list of groups of a user with the REST API.
NEW: Hidden option MAIN_CAN_EDIT_SUPPLIER_ON_SUPPLIER_ORDER to edit supplier on draft supplier order
NEW: Improve Displaying Shortcut Access Keys in Navigation.
NEW: Improve Expensereport, Inverse Receiver.
NEW: Improve pdf description item visibitity.
NEW: Introduce a config parameter $dolibarr_main_instance_unique_id
NEW: Introduce css "nobottomiftotal"
NEW: Introduce PhpSpreadsheet for export (need php5.6+)
NEW: Invoice creation from the timesheet
NEW: Can list remote stripe's payout in a dedicated page.
NEW: Manage account sell_intra & sell_export in page accoutancy admin default product
NEW: Manage loan schedule.
NEW: Manage status of member types.
NEW: Mass action "create bills" for validated reception
NEW: Measuring unit are now defined into an editable dictionary. Add product size/unit into product import.
NEW: Template pdf 'canelle_reception' displays linked reception lines.
NEW: Moral/physic status can be defined at member type level
NEW: Pagination into list of time spent.
NEW: Performance enhancement (Replace dirname(__FILE__) with __DIR__)
NEW: POS support in order (ex: online cart).
NEW: Preview of images into the filemanager component.
NEW: Resource module can be used in products/services (in a dedicated tab)
NEW: Retrieve invoice infos from order when billing shipment
NEW: Save and display type of membership in subscription table for more explicit historic
NEW: Setup default thirdparty type (customer or prospect/customer)
NEW: Add shipping "set draft" button and can update lines.
NEW: show in blod, the invoice amount where we came from, when making payment
NEW: Show product dimensions in product tooltips.
NEW: Show the latest date of subscription in member statistics reports.
NEW: Sort list of templates alphabetically
NEW: Stripe Payment Intent (need option to use this new Stripe api method)
NEW: Can support barcode on supplier price references.
NEW: Support tag {ccc} on payment ref
NEW: The preview of PDF files generates only 1 png file, even if several pages.
NEW: Can select a Thirdparty object in donation module if option ON.
NEW: Tooltip with VAT amount and price incl tax on lines of objects.
NEW: Unsubscribed emails are now stored in a dedicated table.
NEW: Update working chkbxlst filter for lists.
NEW: Use ajax switch into setup of donation.php and multi-currency module.
NEW: use recipient language when generating the fullname for emails.
NEW: When you create product or service, sell accountancy account by default is suggested.
NEW: Widget birthdays of the month.
NEW: Option in workflow module to set a reception billed on validate supplier bill.
NEW: Autocompletion on lists should be available on mobile applications.
NEW: Add mass action to close several members.
NEW: Add hidden option ADD_UNSPLASH_LOGIN_BACKGROUND for random background
For Developers:
NEW: Module "DebugBar" is available as a stable module.
NEW: Add API REST for donations
NEW: Add a script 'purge-data.php' to purge data older than a defined creation date
NEW: Add constant XFRAMEOPTIONS_ALLOWALL
NEW: Add function isValidVATID() to heck syntax of a VAT ID/number.
NEW: Add document's product support in APIs
NEW: Add REST API: get the list of objects in a category.
NEW: Update Stripe library to 6.35
NEW: Upgrade jquery lib to 3.3.1
NEW: Add hook 'addHtmlHeader()'
NEW: Add hook 'createRecurringInvoices()'
NEW: Add hook 'afterSelectContactOptions'
NEW: Add hook support in accountancy index
NEW: Add hook support in list of template invoices
NEW: Add parameter 'replaceambiguouschars' on getRandomPassword function
NEW: Add property 'noteditable' in modulebuilder
NEW: Add the current modulepart into the Conf class object
NEW: Add trigger FICHINTER_UNVALIDATE
NEW: Add visibility with value 4 in framework to define fields to show
NEW: More option to tune initialization of a new module with modulebuilder.
NEW: Add REST API to list currencies
NEW: REST API Proposal, Orders, Invoices: Add contact details
NEW: hidden option to change concat order of description/product label.
NEW: Enhance management of webhooks
NEW: Generation of doc by modulebuilder can include README and CHANGELOG
NEW: massfilesarea feature is possible for external modules
NEW: Show list of enabled modules in dol_print_error().
NEW: Simplification of CSS styles of default themes.
NEW: Clean code of a lot of deprecated code.
NEW: Add hidden option to set a search entry to the top
NEW: add hidden option DISPLAY_DISCOUNTED_SUPPLIER_PRICE
NEW: add hidden option MAIN_DEFAULT_LANGUAGE_FILTER
NEW: add hidden option NO_CONCAT_DESCRIPTION
NEW: Add hidden option ACCOUNTANCY_COMBO_FOR_AUX
NEW: Add Hidden option OVERRIDE_VAT_FOR_EXPENSE_REPORT
NEW: add hidden option MAIN_DOC_UPLOAD_NOT_RENAME_BY_DEFAULT
NEW: Hidden conf to improve pdf desc item visibitity
NEW: Look and feel v10 - Add CSS 'tabBarNoTop'
WARNING:
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
* PHP 5.4 is no more supported. Minimum PHP is now 5.5+.
* The PHP extension php-intl is not mandatory and must be installed to have new features working correctly.
* Method GetUrlTrackingStatus were renamed into getUrlTrackingStatus for consistency with naming rules.
* API getListOfCivility has been renamed into getListOfCivilities for consistency with naming rules.
* Deprecated function img_phone as been removed. You can use img_picto(..., 'call|call_out') instead.;
* Files for variables of themes were renamed from graph-color.php into theme_vars.inc.php to match naming
convention of extension .inc.php for files to be included.
* All methods set_draft() were renamed into setDraft().
* Signatures of methods createFromClone() has been standardized. All methods requires the object User as first parameter.
* Removed deprecated function function test_sql_and_script_inject that was replaced with testSqlAndScriptInject.
* Method load_measuring_units were renamed into selectMeasuringUnits and select_measuring_units was deprecated.
* Hidden option CHANGE_ORDER_CONCAT_DESCRIPTION were renamed into MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION.
* Method dolEscapeXML was moved from functions.lib.php into function2.lib.php (not used enough to be loaded by default).
* Removed deprecated use of string in dol_print_date(). Only date allowed.
* Deprecated property ->fk_departement is now ->state_id everywhere.
* Removed the method 4 of GETPOST (to get $_COOKIE). It was not used and not recommanded to use in Dolibarr.
* Column llx_facture.facnumber change to llx_facture.ref
* Variable $dolibarr_main_cookie_cryptkey is no more created at install (it was not used by Dolibarr). A new variable
called $dolibarr_main_instance_unique_id is now generated at each installation. It will be used by some future features.
***** ChangeLog for 9.0.3 compared to 9.0.2 *****
FIX: #11013
FIX: #11041
FIX: actioncomm: sort events by date after external calendars and hook (into 7.0)
FIX: better test
FIX: Combo list was limited to 20 in stock correction
FIX: Confusion between expired and late
FIX: Cursor pointer in payment screen for autofill
FIX: CVE-2019-11199
FIX: CVE-2019-11200
FIX: CVE-2019-11201
FIX: Default value on form to send email
FIX: error messages not displayed
FIX: Massive debug in lettering function
FIX: missing compatibility with multicompany
FIX: missing global $user
FIX: missing situation invoice in list
FIX: MultiEntity in lettering functionality
FIX: Product accountancey sell intra code must be visible if main feature level 1
FIX: ref for table without ref manager are set to NULL.
FIX: Sending email to mass actions send same email on same customer
FIX: Several fixes on import of services/products
FIX: shipping default warehouse if only one warehouse
FIX: sortfield on lettering function
FIX: Status of opportunity should never be -1
FIX: test to display create invoice button on supplier_order card
FIX: The autocopy feature was ko for suppliers
FIX: Total per day in timespent per week
FIX: Total per day shows 00:00 if the total time spent is equal to 12:00
FIX: Update/delete currency on same languages
FIX: Wrong variable name make contact of supplier order not used on PDF.
FIX: Add hidden option MAIN_PDF_HIDE_SITUATION to hide situation (quick hack to fix output pb).
FIX: attached files list with link file was broked
***** ChangeLog for 9.0.2 compared to 9.0.1 *****
FIX: #10822
FIX: Accountancy - Format EBP import
FIX: A page of a site replaced with another when switching in edit mode
FIX: Autodetect buy price for invoices autogenerated with templates.
FIX: Avoid error 500 when extension php-intl not loaded
FIX: bad check on type of expense report (mandatory status not working)
FIX: Bad label of status for members (must be short version in list)
FIX: Can not create contract with numbering module without autogen rule
FIX: Can't set default value of extrafield of type varchar
FIX: check only if invoice module is enabled (bank is check after)
FIX: counter of permissions in badge was wrong
FIX: default value of language of thirdparty
FIX: Don't show accountingjournal:getNomUrl without data
FIX: Duplicate executeHook function
FIX: Edit of personalized groups
FIX: Error with various & salary payment on project
FIX: extrafields always visible on view mode
FIX: function not found
FIX: If we build one invoice for several orders, we must put the ref of
orders on lines.
FIX: expensereport must be in $check array
FIX: missing entity filter and wrong var name
FIX: Missing field "In sale" in list
FIX: missing hook completeTabsHead in margins module
FIX: missing hook in agenda export
FIX: missing vat_src_code when inserting an expense report line
FIX: More complete auto setup of barcode module
FIX: need to round with 2 decimals to avoid movements not correctly balanced
FIX: no need to test anything to display documents tabs on expense report
FIX: old export models was not visible
FIX: Param keepn must be 1 when dol_escape_htmltag used for textarea
FIX: possibility to set up payment mode when invoice module is disabled
FIX: problem with sign of various payment in project preview
FIX: Remane of project
FIX: setup of module export
FIX: several hooks in shipping/delivery cards
FIX: supplier discount was not retrieved when choosing a product
FIX: The minimum amount filter does not work in the VAT report per customer
FIX: Tooltip on click was ko on smartphone
FIX: translation
FIX: useless join
FIX: Vat src code lost after editing expense report line
FIX: we need to keep originline special_code
FIX: Can't insert if there is extrafields mandatory on another entity.
FIX: error in create object when 2 extra fields are mandatory in 2 different entities
FIX: when we create deposit with multi tva, we mustn't add line if amount = 0 (example when we have a 100% reduc on one of origin invoice line)
FIX: wrong redirect link on holiday refuse
NEW: Add more complete error messages in log on stripe payments
***** ChangeLog for 9.0.1 compared to 9.0.0 *****
FIX: #10381
FIX: #10460 compatibility with MariaDB 10.4
FIX: #10485
FIX: #10638
FIX: Accountancy - Adding transaction with multicompany uses all the time 1st entity
FIX: actioncomm export: ORDER BY clause is in wrong export property + event type filter does not work
FIX: add fk_unit on addline action
FIX: adding css by page if url is externam
FIX: Bad link in menu manager
FIX: better test on fetch
FIX: can't add lines on invoices
FIX: Check for old picture name if the new one was not found
FIX: could not create several superadmin in transversal mode
FIX: creation of menu entry with parent id not int
FIX: creation of new left menu entry
FIX: Default language of company is not set
FIX: error on setup of password if pass generators have a .old file.
FIX: error report not returned
FIX: expedition: reset status on rollback + replace hardcoded status with const
FIX: fetch module / pos source
FIX: fk_default_warehouse missing in group by
FIX: function sendEmailsReminder isn't completely developed, then MAIN_FEATURES_LEVEL must be 2 to "use" it
FIX: if empty error message, we just see "error" displayed
FIX: label of bank account
FIX: line edit template: keep fk_parent_line
FIX: Mark credit note as available for credit note in other currency
FIX: missing access security checking with multicompany
FIX: missing entity filter in function "build_filterField()" (export module)
FIX: missing $ismultientitymanaged for previous/next ref
FIX: Missing province in export of invoice
FIX: must fetch member in current entity
FIX: positive values creating diff on addline rounding
FIX: positive values IN supplier credit notes creating diff on addline rounding
FIX: Price in combo list of service does not use the correct price level
FIX: project_title for display of getNomUrl()
FIX: same thing here
FIX: Show button POS Ticket only if invoice was generated by POS
FIX: supplier invoice payment total doesn't care about deposit or credit
FIX: supplier invoice product stats total ht is line total not invoice total
FIX: The notes was also copied on invoice
FIX: Transaction on leave approval and decrease ko if setup not complete
FIX: Translation not loaded by scheduled jobs
FIX: [URGENT] broken feature, "$usercancreate" is for Dolibarr 9
FIX: we want to be able to reopen fourn credit note
FIX: wrong feature2 when user rights "group_advance" is used
FIX: wrong merged conflict
FIX: wrong tests on fetch
NEW: Add protection to avoid packaging if files non indexed exists
***** ChangeLog for 9.0.0 compared to 8.0.0 *****
For Users:
NEW: Stable module: DAV (WebDAV only for the moment)
NEW: Stable module "Skype" has been replaced with module "Social Networks" to support more services.
NEW: Stable module "Module Builder"
NEW: Stable module: Website
NEW: Experimental module "TakePos"
NEW: Experimental module "Ticket"
NEW: Experimental module "Data Privacy"
NEW: Experimental module "Email Collector"
NEW: Dolibarr can provide information in page title when multicompany is enabled of not, making
Android application like DoliDroid able to provide native features for multicompany module.
NEW: Compatibility with PHP 7.3 =>
NEW: Add admin page for modulebuilder
NEW: Add civility in list of members. Close #9251
NEW: Add configuration to disable "customer/prospect" thirdparty type
NEW: Add CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY and CONTRACT_HIDE_UNSELECTABLES by SELECT_HIDE_UNSELECTABLES
NEW: Add __DAY_TEXT__ and __MONTH_TEXT__ substitutions vars
NEW: Add due date column in payment lists
NEW: Add email in event history, for reminder email of expired subsription
NEW: Add event tab on resource record
NEW: Add FEC Export in accountancy
NEW: Add filter on staff range in list of thirdparties
NEW: Add a first complete template of website
NEW: Add format code into exported filename of ledger
NEW: Add hidden option EXPENSEREPORT_DEFAULT_VALIDATOR_UNCHANGEABLE
NEW: Add hidden option MAIN_DOCUMENTS_DESCRIPTION_FIRST
NEW: Add link to inventory code
NEW: Add more common social networks fields for business
NEW: Add option PDF_DISABLE_MYCOMPANY_LOGO to disable logo on PDF
NEW: add option PROPOSAL_AUTO_ADD_AUTHOR_AS_CONTACT
NEW: Add option to display thirdparty adress in combolist
NEW: Add option to swap sender/recipient address on PDF
NEW: Add option to display thirdparty adress in combolist
NEW: Add project on pament of salaries
NEW: Add SHIPPING_PDF_HIDE_WEIGHT_AND_VOLUME and
NEW: Add somes hooks in bank planned entries
NEW: Add supplier ref in item reception page
NEW: Advanced permission to ignore price min
NEW: Allow to enter a timespent with a numeric value
NEW: Automatic position of scroll when creating an extrafield
NEW: Can add autorefresh=X in any URLs to refresh page after X seconds
NEW: can add project's task to agenda on create event form
NEW: Can delete a website in experimental website module
NEW: Can disable meteo on smartphone only
NEW: Can export/import a website template
NEW: Can filter on EEC, not EEC, etc... in binding step of accountancy
NEW: Can mix offset before and after with rules for due date of invoices
NEW: Can record the supplier product description
NEW: Can select several prospect level in thirdparty filter.
NEW: Can set 2 url in url field of thirdparty
NEW: Can set if a field is mandatory on form level.
NEW: Can set the default focus of each page.
NEW: Add category filter on user list
NEW: Change forgotten password link in general parameters
NEW: Child label of variants change if parent label changes
NEW: Compatibility with new Paybox HMAC requirement
NEW: Each user can set its prefered default calendar page
NEW: Enhancement in process to make manual bank conciliation
NEW: Enhancement in the generic file manager
NEW: Extrafield totalizable
NEW: Hidden conf INVOICE_USE_DEFAULT_DOCUMENT
NEW: hidden conf to search product by supplier ref
NEW: hidden constant to be able to use a thirdparty for donation
NEW: hidden option to define an invoice template for each invoice type
NEW: Highlight lines on lists when they are checked
NEW: Notification module support expense report+holiday validation and approval
NEW: On customer/supplier card, add simple tooltip to amount boxes
NEW: Page to check if the operations/items created between two dates have attached item(s) and possibility to download all attachements
NEW: possibility to add all rights of all modules in one time
NEW: redirect if only one result on global search on card
NEW: Permission to ignore price min
NEW: Can build an archive of full documents directory from backup page
NEW: tag odt line_product_ref_fourn for supplier doc lines
NEW: The binding step in accountancy has a country filter with autocompletion
NEW: Top menu is always on screen with MD theme.
NEW: Withdraw request massaction can include already partially paid invoices
NEW: Option "Simplify interface for blind persons"
NEW: Generic cash fence feature (compatible with several POS modules)
For developers:
NEW: Add lib for multiselect with checkboxes
NEW: Add function isValidMXRecord
NEW: Add hook changeRoundingMode in update_price
NEW: Add hook formconfirm to contractcard
NEW: Add hook for virtual stock
NEW: ADD url to see the last version of a external module
NEW: Can enable a module, even external module, from command line
NEW: Can set a tooltip help text on extrafields
NEW: Add product search from barcode via REST api
NEW: can add documents on agenda events using API REST
NEW: Can set the datestart and dateend of cron job into module descriptor
NEW: Close #9296 Add field ref_ext into llx_categorie
NEW: move ticket dictionary in API /setup
NEW: PHPUnitTest on Loan class #3163
NEW: Code changes to be more compatible with PSR2
NEW: Removed trigger USER_LOGOUT, USER_LOGIN, USER_LOGIN_FAILED (Some hooks are already dedicated for that)
NEW: Add agenda documents in API REST
NEW: Add "checked" field for new list engine compatibility
NEW: REST API improvements
NEW: Save external payment IDs into table of payment
NEW: triggers add commercial and del commercial
NEW: #9236 Allow to import shipment lines via API
NEW: ADD civility list in API
NEW: support selllist in the module builder
NEW: optional param to show a specific extrafield
NEW: hook formConfirm always called if hooked
NEW: hook on dispatch order fourn
WARNING:
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
* If you use some links like viewimages.php?modulepart=mycompany&file=... in your external modules, you must
replace them with links like viewimages.php?modulepart=mycompany&file=logos/... (note that link change only for
modulepart=mycompany that now works like others).
* Hidden option MAIN_PDF_SHIPPING_DISPLAY_AMOUNT_HT has been renamed into SHIPPING_PDF_DISPLAY_AMOUNT_HT
* Remove the no more used and deprecated dol_print_graph function
***** ChangeLog for 8.0.5 compared to 8.0.4 *****
FIX: #10381
FIX: #10460 compatibility with MariaDB 10.4
FIX: #11025
FIX: Accountancy - Add transaction with multicompany use all the time 1st entity
FIX: Accountancy - Format EBP import
FIX: actioncomm export: ORDER BY clause is in wrong export property + event type filter does not work
FIX: actioncomm: sort events by date after external calendars and hook
FIX: action list: add printFieldListSelect and printFieldListWhere hooks
FIX: add fk_unit on addline action
FIX: avoid php warning
FIX: bad sql request
FIX: better method
FIX: better test
FIX: better test on fetch
FIX: broken external authentication module feature and avoid warning
FIX: Can not create contract with numbering module without autogen rule
FIX: can't add lines on invoices
FIX: Can't generate invoice pdf
FIX: Can't insert if there is extrafields mandatory on another entity.
FIX: Can't insert if there is extrafields mandatory on another entity. FIX: Can't set default value of extrafield of type varchar
FIX: Check for old picture name if the new one was not found
FIX: Civility not saved when creating a member.
FIX: $conf->fournisseur->commande->enabled doesn't exist, we must use $conf->fournisseur->enabled
FIX: could not create several superadmin in transversal mode
FIX: credit note can have negative value
FIX: Default value on sales representative on third party creation
FIX: Don't show journal:getNomUrl without data
FIX: Erreur dans le Total
FIX: error messages not displayed
FIX: expedition: reset status on rollback + replace hardcoded status with const
FIX: Fix PHP warning "count(): Parameter must be an array..."
FIX: fk_default_warehouse missing in group by
FIX: function sendEmailsReminder isn't completely developed, then MAIN_FEATURES_LEVEL must be 2 to "use" it
FIX: holidays get natural_search if search params are set only
FIX: if empty error message, we just see "error" displayed
FIX: if(!method_exists(dol_loginfunction))
FIX: If we build one invoice for several orders, we must put the ref of order on the line to not lose information.
FIX: in fact expensereport must be in $check array
FIX: Interface regression for bind people. Fix option MAIN_OPTIMIZEFORTEXTBROWSER
FIX: line edit template: keep fk_parent_line
FIX: Loan impossible to account
FIX: Mark credit note as available for credit note in other currency
FIX: missing access security checking with multicompany
FIX: missing entity filter and wrong var name
FIX: missing entity filter in function "build_filterField()" (export)
FIX: Missing field in import/export of users
FIX: missing hook completeTabsHead in margins module
FIX: missing $ismultientitymanaged for previous/next ref
FIX: Missing province in export of invoice
FIX: multicompany compatibility
FIX: must fetch member in current entity
FIX: need an order by in case we found other invoice with same number but not same date
FIX: need to round with 2 decimals to avoid movements not correctly balanced
FIX: no need to test anything to display documents tabs on expense report
FIX: positive values creating diff on addline rounding
FIX: problem with multicompany transverse mode
FIX: Product accountancey sell intra code must be visible if main feature level 1
FIX: project_title for display of getNomUrl()
FIX: quick search for supplier orders
FIX: Remane of project
FIX: same thing here
FIX: Selection of email recipient with option MAIN_OPTIMIZEFORTEXTBROWSER
FIX: several hooks in shipping/delivery cards
FIX: shipping default warehouse if only one warehouse
FIX: SQL injection on rowid of dict.php
FIX: 'statut' is ignored when updating a user with the REST API.
FIX: supplier invoice payment total dont care about deposit or credit
FIX: supplier invoice product stats total ht is line total not invoice total
FIX: The minimum amount filter does not work in the VAT report per customer
FIX: Total per day shows 00:00 if the total time spent is equal to 12:00
FIX: Update/delete currency on same languages
FIX: [URGENT] broken feature, "$usercancreate" is for Dolibarr 9
FIX: useless join
FIX: we need to keep originline special_code
FIX: we want to be able to reopen fourn credit note
FIX: when 2 extra fields are mandatory in 2 different entities
FIX: when we add a payment on an invoice which already has payments with credit note or deposit amount, and then we get an excess received, discount amount must be $total_paiements + $total_creditnote_and_deposit - $object->total_ttc;
FIX: when we create deposit with multi tva, we mustn't add line if amount = 0 (example when we have a 100% reduc on one of origin invoice line)
FIX: wrong redirect link on holiday refuse
FIX: wrong test enabled
FIX: Wrong variable name
FIX: XSS
***** ChangeLog for 8.0.4 compared to 8.0.3 *****
FIX: #10030 better german chart
FIX: #10036
FIX: #10080 Supplier translations are in english
FIX: #10183 using backport of fix done in 9.0
FIX: #10218 Bad redirection after deleting a user or group
FIX: #3234
FIX: #6580
FIX: #8741
FIX: #9629 #9625
FIX: #9971
FIX: avoid Class 'AdherentType' not found
FIX: Can relaunch install on v8
FIX: Can't create a thirdparty from member if customer code is mandatory.
FIX: Can't delete a line of minimal stock per warehouse
FIX: check if "entity" is already defined in "$param"
FIX: contact/address tab issue when changing company
FIX: contact/adress tab: when changing company ajax combo, the first contact change is not taken into account
FIX: CVE-2018-19799
FIX: CVE-2018-19992
FIX: CVE-2018-19993
FIX: CVE-2018-19994
FIX: CVE-2018-19995 and CVE-2018-19998
FIX: Error reported when creation of thirdparty from member fails
FIX: export only prices of the current entity !
FIX: Extrafields on shipment module
FIX: filter on product category doesn't work
FIX: form actions: select_type_actions could be too small + bad $db init
FIX: form actions: select_type_actions could be too small + bad init
FIX: fourn payment modes musn't be available on customer docs
FIX: Function updatePrice with wrong parameters
FIX: hidden extrafield
FIX: if qty is 0
FIX: If we change customer/supplier rule we can't edit old thirdparty.
FIX: lang not loaded
FIX: Lines are not inserted correctly if VAT have code
FIX: marge sign
FIX: Method setValid not found
FIX: Migration do not create not used table
FIX: missing action "edit" for the hook
FIX: missing field "visible"
FIX: Missing last month on vat report per month
FIX: mode is only customer in stats fichinter
FIX: OppStatusShort doesn't exists
FIX: Remote ip detection was wrong with proxy (example: cloudflare)
FIX: Removed not use table
FIX: Replenishment with option STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE
FIX: responsive
FIX: Same on customer card
FIX: same on lines
FIX: screen size fall
FIX: Select first mail model by default
FIX: slow SQL query on creating a new supplier invoice
FIX: sql query performance on list_qualified_avoir_supplier_invoices.
FIX: supplier order list keep socid
FIX: Same on customer card
FIX: same on lines
FIX: screen size fall
FIX: Select first mail model by default
FIX: slow SQL query on creating a new supplier invoice
FIX: sql query performance on list_qualified_avoir_supplier_invoices.
FIX: supplier order list keep socid
FIX: Vendor translations are in english
FIX: Warning: count()
FIX: We want to be able to send PDF of paid invoices
***** ChangeLog for 8.0.3 compared to 8.0.2 *****
FIX: #9161
FIX: #9432
FIX: #9432 Assign yourself as a commercial when you don't have permission to see all thirds
FIX: #9510
FIX: #9567
FIX: According to french law, if seller is in France and buyer isn't in UE and isn't a company, TVA used = TVA product
FIX: Amount when using mutlicurrency on PDF
FIX: Backup of database without mysqladmin available from cron.
FIX: Bad label on delete button
FIX: bad link in notification
FIX: Bad position of hook formattachOptions call
FIX: Can't create shipping if have shipping line's extrafields
FIX: check !empty exclude select element
FIX: content lost when editing a label with "
FIX: correct migration of old postgresql unique key
FIX: credit note progression
FIX: default accounting accounts on loan creation #9643
FIX: Delete of draft invoice
FIX: deletion on draft is allowed if we are allwoed to create
FIX: Do not show check box if not applicable
FIX: exclude element of the select
FIX: extrafields of taks not visible in creation
FIX: filter on employee
FIX: invoice stats: situation invoices were not counted
FIX: keep external module element when adding resource
FIX: langs fr
FIX: Link template invoice to contract
FIX: Look and feel v8. Missing button "Create category"
FIX: Menu to show/edit Users categories was missing
FIX: missing name alias field in societe import/export #9091
FIX: missing symbol for indian rupies
FIX: Missing transaction around action
FIX: modify parenting before task deletion
FIX: nb of session in title
FIX: need to filter on current entity on replenish
FIX: number mailing for a contact with multicompany
FIX: Option for prof id mandatory not working with custom type of company
FIX: Option MAIN_DISABLE_NOTES_TAB #9611
FIX: Pagination stats
FIX: pdf typhon: order reference duplicate
FIX: position 0 for emails templates
FIX: previous situation invoice selection
FIX: Product marge tabs on product card
FIX: Product margin tab and credit note
FIX: propal pdf: missing parenthesis for customs code
FIX: properties on proposal must not be modified if error
FIX: qty not visible for a lot when making shipment on a dedicated stock
FIX: Quick hack to solve pb of bad definition of public holidays
FIX: remain to pay for credit note was wrong on invoice list
FIX: replenish wasn't caring about supplier price min quantity #9561
FIX: Required extrafield value numeric should accept '0'
FIX: ressource list with extrafields
FIX: restore last seach criteria
FIX: Selection of addmaindocfile is lost on error
FIX: Sending of reminder for expired subscriptions
FIX: shared link ko on proposals
FIX: showOptionals: column mismatches
FIX: situation invoice total with credit note
FIX: situation invoice prev percent
FIX: special code on create supplier invoice from supplier order
FIX: Symbol of currency in substitution variables
FIX: The max size for upload file was not corectly shown
FIX: the member e-mail on resign and validation.
FIX: thirdparty property of object not loaded when only one record
FIX: title
FIX: Title problem on admin RSS module
FIX: Tooltip on invoice widget
FIX: Total of timespent
FIX: trackid into email sent from member module.
FIX: translation in select unit form
FIX: use discount with multicurrency
FIX: Variable name
FIX: When we delete a product, llx_product_association rows are not deleted
FIX: when we're just admin and not super admin, if we create new user with transverse mode, we don't see it then we can't add him in usergroup
FIX: wrong function name
FIX: wrong occurence number of contract on contact card, we must only count externals
FIX: wrong value for module part and return access denied
FIX: Wrong variable name
FIX: XSS vulnerability reported by Mary Princy E
***** ChangeLog for 8.0.2 compared to 8.0.1 *****
FIX: #8452
FIX: #9043
FIX: #9316 Error when listing invoices
FIX: #9317
FIX: #9353 Bug: html error - div inside span on graphs
FIX: #9355
FIX: #9393 inconsistency behaviour. option FACTURE_ENABLE_NEGATIVE_LINES
FIX: #9394
FIX: #9396
FIX: #9403
FIX: #9412
FIX: #9497
FIX: Add paypal error message in alert email when online payment fails.
FIX: better compatibility with multicompany
FIX: capital must be empty and not 0 if undefined
FIX: character making error on bill list
FIX: Entering negative price on order.
FIX: Expedition not showing extrafields on creation.
FIX: Homepage links were using wrong topmenus
FIX: inconsistency behaviour on option FACTURE_ENABLE_NEGATIVE_LINES
FIX: invert mime type and name.
FIX: invoice popup hide localtax2 and 3 if not defined.
FIX: Lose filter on payment type or category after a sort on invoice list.
FIX: Maxi debug to allow to load chart of account with multicompany.
FIX: Missing translation in predefined email to membership renewal.
FIX: Mixing tickets of different thirdparties.
FIX: "Other ..." link so the "Back to" link works.
FIX: PDF address: handle when contact thirdparty is different from thirdparty of document
FIX: Problems with permissions of module to record payment of salaries
FIX: remove debug
FIX: Several fixes on the management of minimal amount for orders
FIX: wrong var name
***** ChangeLog for 8.0.1 compared to 8.0.0 *****
FIX: #9258
FIX: #9328
FIX: #9337
FIX: adding GROUP BY for PostgreSQL
FIX: API template for list pages in module builder
FIX: API template for record page to delete a record
FIX: a removed option was still in setup
FIX: badge on time spent on project and tasks
FIX: Delete file on smartphone
FIX: Fetch function will fetch comments
FIX: Fetch task will now fetch comments
FIX: $fk_account is always empty, must be $soc->fk_account
FIX: Force stripe api version to avoid trouble if we update stripe api
FIX: get_product_vat_for_country functions.lib.php
FIX: Get templates in a forced language
FIX: hook on dispatch order fourn
FIX: Language selection lost if error during creation of email template
FIX: Look and feel v8
FIX: propal.class.php
FIX: Add calls to fetchComments function
FIX: Remove fetchComments from project and task fetch function
FIX: remove internal property isextrafieldmanaged from API returns
FIX: sql error
FIX: table llx_chargessociales doesn't exists
FIX: trans on null object
FIX: vat rate code not returned by get_product_vat_for_country
FIX: warning for late template invoices to remove when suspended
FIX: Add hidden option MAIN_xxx_IN_SOURCE_ADDRESS to solve legal issues on PDF
FIX: Table llx_facture_rec_extrafields missing after migration
***** ChangeLog for 8.0.0 compared to 7.0.0 *****
For Users: For Users:
NEW: Experimental module: Ticket NEW: Experimental module: Ticket
NEW: Experimental module: WebDAV NEW: Experimental module: WebDAV
NEW: Accept anonymous events (no user assigned) NEW: Accept anonymous events (no user assigned)
NEW: Accountancy - Add import on general ledger NEW: Accountancy - Add import on general ledger
NEW: Accountancy - Show journal name on journal page and hide button draft export (Add an option in admin) NEW: Accountancy - Show journal name on journal page and hide button draft export (Add an option in admin)
NEW: Can create event from record card of a company and member NEW: Can create event from record card of a company and/or member
NEW: Add a button to create Stripe customer from the Payment mode tab NEW: Add a button to create Stripe customer from the customer Payment mode tab
NEW: Add accounting account number on product tooltip NEW: Add accounting account number on product tooltip
NEW: add any predefined mail content NEW: Add any predefined mail content
NEW: Add arrows to navigate into containers in website module NEW: Add arrows to navigate into containers in experimental website module
NEW: Add a tab to specify accountant/auditor of the company NEW: Add a tab to specify accountant/auditor of the company
NEW: Add Date delivery and Availability on Propals List NEW: Add Date delivery and Availability on Propals List
NEW: Add date in goods reception supplier order table NEW: Add date in goods reception supplier order table
@ -101,7 +829,7 @@ NEW: Filter export model is now by user
NEW: Finish implementation of option PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES NEW: Finish implementation of option PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES
NEW: generalize use of button to create new element from list NEW: generalize use of button to create new element from list
NEW: hidden conf AGENDA_NB_WEEKS_IN_VIEW_PER_USER to set nb weeks to show into per user view NEW: hidden conf AGENDA_NB_WEEKS_IN_VIEW_PER_USER to set nb weeks to show into per user view
NEW: hidden conf to assign category to thirparty that are neither customer nor prospect or supplier NEW: hidden conf to assign category to thirdparty that are neither customer nor prospect or supplier
NEW: hidden conf to set nb weeks to show into user view NEW: hidden conf to set nb weeks to show into user view
NEW: hidden option MAIN_DISABLE_FREE_LINES NEW: hidden option MAIN_DISABLE_FREE_LINES
NEW: improve way of adding users/sales representative to thirdparty NEW: improve way of adding users/sales representative to thirdparty
@ -189,8 +917,103 @@ Following changes may create regressions for some external modules, but were nec
* Remove method Categorie:get_nb_categories() that was not used. * Remove method Categorie:get_nb_categories() that was not used.
* Hook getnomurltooltip provide a duplicate feature compared to hook getNomUrl so all hooks getnomurltooltip * Hook getnomurltooltip provide a duplicate feature compared to hook getNomUrl so all hooks getnomurltooltip
are now replaced with hook getNomUrl. are now replaced with hook getNomUrl.
* The substitution key __CONTACTCIVNAME__ is no longer present, it has been replaced by __CONTACT_NAME_{TYPE}__
where {TYPE} is contact type code (BILLING, SHIPPING, CUSTOMER, ... see contact type dictionnary).
***** ChangeLog for 7.0.5 compared to 7.0.4 *****
FIX: #3234
FIX: #6580
FIX: #8741
FIX: #9934
FIX: avoid Class 'AdherentType' not found
FIX: Can't create a thirdparty from member if customer code is mandatory.
FIX: Can't generate invoice pdf
FIX: contact/adress tab: when changing company ajax combo, the first contact change is not taken into account
FIX: Error generating ODT when option to use contact on doc on
FIX: Error reported when creation of thirdparty from member fails
FIX: filter on product category doesn't work
FIX: form actions: select_type_actions could be too small + bad init
FIX: fourn payment modes musn't be available on customer docs
FIX: Function updatePrice with wrong parameters
FIX: If we change customer/supplier rule we can't edit old thirdparty.
FIX: Interface regression for bind people. Fix option MAIN_OPTIMIZEFORTEXTBROWSER
FIX: Lines are not inserted correctly if VAT have code
FIX: OppStatusShort doesn't exists
FIX: pdf typhon: order reference duplicate
FIX: propal pdf: missing parenthesis for customs code
FIX: Same on customer card
FIX: same on lines
FIX: Select first mail model by default
FIX: sql query performance on list_qualified_avoir_supplier_invoices.
FIX: task time screen: last fix was overkill
FIX: task time screen: prevent users with access to all project from assigning to tasks they're not allowed to do
FIX: use discount with multicurrency
FIX: Variable name
FIX: We want to be able to send PDF of paid invoices
FIX: When delete a product, llx_product_association rows are not deleted
FIX: wrong occurence number of contract on contact card, we must only count externals
***** ChangeLog for 7.0.4 compared to 7.0.3 *****
FIX: #8984 button create expense report
FIX: #9032
FIX: #9161
FIX: #9328
FIX: According to french law, if seller is in France and buyer isn't in UE and isn't a company, TVA used = TVA product
FIX: Add calls to fetchComments function
FIX: better compatibility with multicompany
FIX: case when we valid form with keyboard
FIX: character making error on bill list
FIX: check !empty exclude select element
FIX: combo into popup become crazy with IE10
FIX: combo of stock in popup are crazy in IE
FIX: Deletion of files in migration
FIX: exclude element of the select
FIX: extrafieldkey
FIX: Fetch function will fetch comments
FIX: Fetch task will now fetch comments
FIX: filter supplier invoice list by societe name.
FIX: $fk_account is always empty, must be $soc->fk_account
FIX: Force stripe api version to avoid trouble if we update stripe api
FIX: getEntity project and not projet
FIX: Get templates in a forced language
FIX: global $mysoc missing (to avoid php notice on lines 279, 280 & 281)
FIX: Injection
FIX: invoice stats: situation invoices were not counted
FIX: keep context filter on contact list on change column displayed
FIX: Keep same project when creating shipping from order
FIX: langs fr
FIX: Lose filter on payment type or category after a sort on invoice list
FIX: Missing behavior
FIX: missing hook to edit sql
FIX: multicompany compatibility !
FIX: need to filter on current entity on replenish
FIX: Option MAIN_DISABLE_NOTES_TAB #9611
FIX: page must always be 0 when we search (to avoid case : when we're on page 3 and we're looking for a precise thirdparty, we stay on page 3 and nothing's displaied)
FIX: Pagination on related item pages
FIX: Pagination on withdraw request list
FIX: PDF address: handle when contact thirdparty different from document thirdparty
FIX: PHP warning, undefined index notnull
FIX: Product marge tabs on product card
FIX: Product margin tab and credit note
FIX: propal: correctly preset project when creating with origin/originid
FIX: remain to pay for credit note was wrong on invoice list
FIX: remove debug
FIX: Remove fetchComments from project and task fetch function
FIX: remove rowid for multicompany compatibility
FIX: Search on Ref project on order list
FIX: search on ref project on propal list
FIX: showOptionals: column mismatches
FIX: SQL Injections reported by mu shcor (ADLab of Venustech)
FIX: stock replenish with multientity
FIX: table llx_chargessociales doesn't exists
FIX: we must see number of all shared projects
FIX: when stock is empty for current entity but > 0 in other entity, until this commit product wasn't displaied on replenishment, it must depends on multientity stock sharing
FIX: when we're just admin and not super admin, if we create new user with transverse mode, we don't see it then we can't add him in usergroup
FIX: wrong function name
FIX: Wrong position of firstname lastname
FIX: wrong value for module part and return access denied
FIX: Wrong variable and trigger name
***** ChangeLog for 7.0.3 compared to 7.0.2 ***** ***** ChangeLog for 7.0.3 compared to 7.0.2 *****
FIX: 7.0 task contact card without withproject parameters FIX: 7.0 task contact card without withproject parameters
@ -674,6 +1497,32 @@ Following changes may create regressions for some external modules, but were nec
multicompany module to a version that support Dolibarr v7, everything should work as expected. multicompany module to a version that support Dolibarr v7, everything should work as expected.
***** ChangeLog for 6.0.8 compared to 6.0.7 *****
FIX: #8762
FIX: #9032
FIX: case when we valid form with keyboard
FIX: clause must not be there
FIX: dol_delete_file must work in a context without db handler loaded
FIX: entity test must be on product_fourn_price table and not product table
FIX: Fetch shipping will now fetch project id
FIX: $fk_account is always empty, must be $soc->fk_account
FIX: getEntity project and not projet
FIX: If we enable 3 steps for supplier order approbation, we must not delete all fourn rights def.
FIX: Keep supplier proposal price for supplier order
FIX: langs fr
FIX: missing filters during reordering
FIX: need to filter on aa.entity for same accounting accounts available in several entities
FIX: page must always be 0 when we search (to avoid case : when we're on page 3 and we're looking for a precise thirdparty, we stay on page 3 and nothing's displaied)
FIX: PDF address: handle when contact thirdparty different from document thirdparty
FIX: propal: correctly preset project when creating with origin/originid
FIX: pu_ht_devise was not converted to numeric so decimals were lost when calculating total_ht_devise
FIX: remain to pay for credit note was wrong on invoice list
FIX: shipment: fk_proje(c)t not handled in fetch() and update() methods
FIX: showOptionals: column mismatches
FIX: sometimes amounts are identical but php find them different.
FIX: test is_erasable() must be done before call function delete() too to avoid delete invoice with &action=delete in url
FIX: we must see number of all shared projects
FIX: wrong var name
***** ChangeLog for 6.0.7 compared to 6.0.6 ***** ***** ChangeLog for 6.0.7 compared to 6.0.6 *****
FIX: #8023 FIX: #8023

View File

@ -15,49 +15,55 @@ Dolibarr est distribué sous les termes de la licence GNU General Public License
## INSTALLER DOLIBARR ## INSTALLER DOLIBARR
Si vous n'avez pas de connaissances techniques, et que vous recherchez ### Configuration simple
un programme d'installation qui install Dolibarr ERP/CRM en quelques clics,
vous devez vous réorienter vers DoliWamp (la version tout-en-un
de Dolibarr pour Windows), DoliDeb (la version tout-en-un pour Debian ou
Ubuntu) ou DoliRpm (la version tout-en-un de Dolibarr pour Fedora, Redhat,
OpenSuse, Mandriva ou Mageia).
Vous pouvez les télécharger depuis la rubrique *download* du portail officiel: Si vous avez peu de compétences techniques et que vous souhaitez installer Dolibarr ERP/CRM en quelques clics, vous pouvez utiliser l'une des versions pré-packagées avec les prérequis:
https://www.dolibarr.org/
Si vous avez déjà installé un serveur Web avec PHP et une base de donnée (MariaDb/MySql/PostgreSql), - DoliWamp pour Windows
vous pouvez installer Dolibarr avec cette version de la manière suivante: - DoliDeb pour Debian ou Ubuntu
- DoliRpm pour Redhat, Fedora, OpenSuse, Mandriva ou Mageia
- Copier le répertoire "dolibarr" et son contenu dans la racine de votre serveur Les packages peuvent être téléchargés à partir de [site web officiel] (https://www.dolibarr.org/).
web, ou bien copier le répertoire sur le serveur et configurer ce serveur pour
utiliser "dolibarr/htdocs" comme racine d'un nouveau virtual host (ce second
choix requiert des compétences et habilitations en administration du serveur
web).
- Créer un fichier vide "htdocs/conf/conf.php" et attribuer les permissions ### Configuration avancée
en lecture et écriture pour le user du serveur web (les permissions en
écriture seront supprimées une fois l'installation terminée).
- Depuis votre navigateur, appeler la page "install/" de dolibarr. L'url dépend Vous pouvez aussi utiliser un serveur Web et une base de données prise en charge (MariaDB, MySQL ou PostgreSQL) pour installer la version standard.
du choix fait à la première etape:
http://localhost/dolibarr/htdocs/install/
ou
http://yourdolibarrvirtualhost/install/
- Suivez les instructions fournies par l'installeur... - Décompressez l'archive .zip téléchargée pour copier le répertoire "dolibarr/htdocs" et tous ses fichiers à la racine du serveur Web ou récupérez-les directement à partir de GitHub (recommandé si vous connaissez git):
  git clone https://github.com/dolibarr/dolibarr -b x.y (où x.y est la version principale comme 3.6, 9.0, ...)
- Configurez votre serveur Web pour qu'il utilise "*dolibarr/htdocs*" en tant que racine si votre serveur Web ne possède pas déjà de répertoire défini vers lequel pointer.
 
- Créez un fichier `htdocs/conf/conf.php` vide et définissez les autorisations d'*écrire* pour l'utilisateur de votre serveur Web (l'autorisation *écrire* sera supprimée une fois l'installation terminée)
- Depuis votre navigateur, allez à la page "install/" de dolibarr
    L’URL dépendra de la façon dont votre configuration Web a été configurée pour pointer vers votre installation de dolibarr. Cela peut ressembler à:
        http://localhost/dolibarr/htdocs/install/
        
    ou
    
        http://localhost/dolibarr/install/
        
    ou
    
    http://yourdolibarrvirtualhost/install/
   
- Suivez les instructions de l'installateur
## METTRE A JOUR DOLIBARR ## METTRE A JOUR DOLIBARR
Pour mettre a jour Dolibarr depuis une vieille version vers celle ci: Pour mettre à jour Dolibarr depuis une vieille version vers celle ci:
- Ecraser les vieux fichiers dans le vieux repertoire 'dolibarr' par les fichiers - Ecrasez les vieux fichiers dans le vieux répertoire 'dolibarr' par les fichiers
fournis dans ce nouveau package. fournis dans ce nouveau package.
- Au prochain accès, Dolibarr proposera la page de "mise a jour" des données (si necessaire). - Au prochain accès, Dolibarr proposera la page de "mise à jour" des données (si nécessaire).
Si un fichier install.lock existe pour vérouiller le processus de mise à jour, il sera demandé de le supprimer manuellement (vous devriez trouver le fichier install.lock dans le répertoire utilisé pour stocker les documents générés ou transféré sur le serveur. Dans la plupart des cas, c'est le répertoire appelé "documents") Si un fichier install.lock existe pour verrouiller le processus de mise à jour, il sera demandé de le supprimer manuellement (vous devriez trouver le fichier install.lock dans le répertoire utilisé pour stocker les documents générés ou transférés sur le serveur. Dans la plupart des cas, c'est le répertoire appelé "documents")
*Note: Le processus de migration peut etre lancé manuellement et plusieurs fois, sans risque, en appelant la page /install/* *Note: Le processus de migration peut être lancé manuellement et plusieurs fois, sans risque, en appelant la page /install/*
## CE QUI EST NOUVEAU ## CE QUI EST NOUVEAU
@ -94,14 +100,15 @@ Voir fichier ChangeLog.
- Gestion de marque-pages - Gestion de marque-pages
- Gestion des promesses de dons - Gestion des promesses de dons
- Gestion de la TVA NPR (non perçue récupérable - pour les utilisateurs français des DOM-TOM)
- Rapports - Rapports
- Imports/Exports des données - Imports/Exports des données
- Support des codes barres
- Calcul des marges
- Connectivité LDAP - Connectivité LDAP
- Intégratn de ClickToDial - Intégratn de ClickToDial
- Intégration RSS - Intégration RSS
- Intégation Skype - Intégation Skype
- Intégration de système de paiements (Paypal, Strip, Paybox...) - Intégration de système de paiements (Paypal, Stripe, Paybox...)
- … - …
### Divers: ### Divers:
@ -114,9 +121,18 @@ Voir fichier ChangeLog.
- Application simple à utiliser. - Application simple à utiliser.
- Requiert PHP et MariaDb, Mysql ou Postgresql (Voir versions exactes sur https://wiki.dolibarr.org/index.php/Prérequis). - Requiert PHP et MariaDb, Mysql ou Postgresql (Voir versions exactes sur https://wiki.dolibarr.org/index.php/Prérequis).
- Compatible avec toutes les offres Cloud du marché respectant les prérequis de base de données et PHP. - Compatible avec toutes les offres Cloud du marché respectant les prérequis de base de données et PHP.
- Code simple et facilement personnalisable (pas de framework lourd; mécanisme de hook et triggers).
- APIs. - APIs.
- Génération PDF et ODT des éléments (factures, propositions commerciales, commandes, bons expéditions, etc...) - 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
- 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
- Le timbre fiscal tunisien
- Numérotation de facture de l'argentines (avec type A,B,C...)
- Compatible avec vos processus RGPD
- ...
- … - …
### Extension ### Extension
@ -126,7 +142,7 @@ Dolibarr peut aussi être étendu à volonté avec l'ajout de module/application
## CE QUE DOLIBARR NE PEUT PAS (ENCORE) FAIRE ## CE QUE DOLIBARR NE PEUT PAS (ENCORE) FAIRE
Voici un liste de fonctionnalites pas encore gérées par Dolibarr: Voici un liste de fonctionnalités pas encore gérées par Dolibarr:
- Dolibarr ne contient pas de module de Gestion de la paie. - Dolibarr ne contient pas de module de Gestion de la paie.
- Les tâches du module de gestion de projets n'ont pas de dépendances entre elle. - Les tâches du module de gestion de projets n'ont pas de dépendances entre elle.
- Dolibarr n'embarque pas de Webmail intégré nativement. - Dolibarr n'embarque pas de Webmail intégré nativement.
@ -135,7 +151,7 @@ Voici un liste de fonctionnalites pas encore gérées par Dolibarr:
## DOCUMENTATION ## DOCUMENTATION
Les documentations utilisateur, développeur et traducteur sont disponible sous forme de ressources de la communautés via la site [Wiki](https://wiki.dolibarr.org). La documentation utilisateur, développeur et traducteur est disponible sous forme de ressources de la communauté via le site [Wiki](https://wiki.dolibarr.org).
## CONTRIBUER ## CONTRIBUER

View File

@ -1,6 +1,11 @@
# DOLIBARR ERP & CRM # DOLIBARR ERP & CRM
![Build status](https://img.shields.io/travis/Dolibarr/dolibarr/develop.svg) ![Downloads per day](https://img.shields.io/sourceforge/dm/dolibarr.svg) ![Downloads per day](https://img.shields.io/sourceforge/dw/dolibarr.svg)
[![Reviewed by Hound](https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg)](https://houndci.com)
|6|7|8|9|develop|
|----------|----------|----------|----------|----------|
|![Build status](https://img.shields.io/travis/Dolibarr/dolibarr/6.0.svg)|![Build status](https://img.shields.io/travis/Dolibarr/dolibarr/7.0.svg)|![Build status](https://img.shields.io/travis/Dolibarr/dolibarr/8.0.svg)|![Build status](https://img.shields.io/travis/Dolibarr/dolibarr/9.0.svg)|![Build status](https://img.shields.io/travis/Dolibarr/dolibarr/develop.svg)|
Dolibarr ERP & CRM is a modern software package to manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda…). Dolibarr ERP & CRM is a modern software package to manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda…).
@ -24,27 +29,6 @@ Other licenses apply for some included dependencies. See [COPYRIGHT](https://git
## INSTALLING ## INSTALLING
### Download
Releases can be downloaded from [official website](https://www.dolibarr.org/).
### Install from composer
If you do not already have Composer installed, you may do so by following the instructions at [getcomposer.org](https://getcomposer.org/). On Linux and macOS, you may run the following commands:
```bash
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
```
On Windows, you can download and run https://getcomposer.org/Composer-Setup.exe
You can then create a new project
```bash
composer create-project dolibarr/dolibarr erp
```
### Simple setup ### Simple setup
If you have low technical skills and you're looking to install Dolibarr ERP/CRM in just a few clicks, you can use one of the packaged versions: If you have low technical skills and you're looking to install Dolibarr ERP/CRM in just a few clicks, you can use one of the packaged versions:
@ -53,16 +37,23 @@ If you have low technical skills and you're looking to install Dolibarr ERP/CRM
- DoliDeb for Debian or Ubuntu - DoliDeb for Debian or Ubuntu
- DoliRpm for Redhat, Fedora, OpenSuse, Mandriva or Mageia - DoliRpm for Redhat, Fedora, OpenSuse, Mandriva or Mageia
Releases can be downloaded from [official website](https://www.dolibarr.org/).
### Advanced setup ### Advanced setup
You can use a Web server and a supported database (MariaDB, MySQL or PostgreSQL) to install the standard version. You can use a Web server and a supported database (MariaDB, MySQL or PostgreSQL) to install the standard version.
- Uncompress the downloaded archive - 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 known git):
- Copy the "dolibarr" directory and all its files inside your web server root or anywhere you'd like and set up your web server to use "*dolibarr/htdocs*" as root for a new web server virtual host (second choice need to be server administrator)
- Create an empty `htdocs/conf/conf.php` file and set permissions for your web server user (*write* permissions will be removed once install is finished) git clone https://github.com/dolibarr/dolibarr -b x.y (where x.y is 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.
- Create an empty `htdocs/conf/conf.php` file and set *write* permissions for your web server user (*write* permission will be removed once install is finished)
- From your browser, go to the dolibarr "install/" page - From your browser, go to the dolibarr "install/" page
The URL will depends on choices made in the first step: The URL will depends on how you web setup was setup to point to your dolibarr installation. It may looks like:
http://localhost/dolibarr/htdocs/install/ http://localhost/dolibarr/htdocs/install/
@ -76,6 +67,11 @@ You can use a Web server and a supported database (MariaDB, MySQL or PostgreSQL)
- Follow the installer instructions - Follow the installer instructions
### 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). However, this third solution is not free.
## UPGRADING ## UPGRADING
@ -125,7 +121,6 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
- Donations management - Donations management
- Reporting - Reporting
- Data export/import - Data export/import
- Thirdparties and/or products categories
- Barcodes support - Barcodes support
- Margin calculations - Margin calculations
- LDAP connectivity - LDAP connectivity
@ -147,13 +142,15 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
- Compatible with all Cloud solutions that match MySQL, PHP or PostgreSQL prerequisites. - Compatible with all Cloud solutions that match MySQL, PHP or PostgreSQL prerequisites.
- APIs. - APIs.
- An easy to understand, maintain and develop code (PHP with no heavy framework; trigger and hook architecture) - An easy to understand, maintain and develop code (PHP with no heavy framework; trigger and hook architecture)
- Support for country specific features: - Support a lot of country specific features:
- Spanish Tax RE and ISPF - Spanish Tax RE and ISPF
- French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM) - 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 - Canadian double taxes (federal/province) and other countries using cumulative VAT
- Tunisian tax stamp - Tunisian tax stamp
- Argentina invoice numbering using A,B,C... - Argentina invoice numbering using A,B,C...
- Compatible with [European directives](http://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE) - Compatible with [European directives](http://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE)
- Compatible with European GDPR rules
- ...
- PDF or ODT generation for invoice, proposals, orders... - PDF or ODT generation for invoice, proposals, orders...
- … - …

View File

@ -16,17 +16,19 @@ Note: Prerequisites to build tgz, debian, rpm package
> apt-get install tar dpkg dpatch p7zip-full rpm zip > apt-get install tar dpkg dpatch p7zip-full rpm zip
Note: Prerequisites to build autoexe DoliWamp package: Note: Prerequisites to build autoexe DoliWamp package:
> apt-get install wine q4wine
> Launch "wine cmd" to check a drive Z: pointing to / exists.
> Install InnoSetup > Install InnoSetup
For example by running isetup-5.3.9.exe (http://www.jrsoftware.org) For example by running isetup-5.3.9.exe (http://www.jrsoftware.org)
> Install WampServer into "C:\Program Files\Wamp" > Install WampServer into "C:\Program Files\Wamp"
For example by running wampserver2.2e-php5.4.3-httpd-2.4.2-mysql5.5.24-x64.exe (http://www.wampserver.com) For example by running wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b.exe (http://www.wampserver.com)
> Install WampServer addon to have versions: Apache2.2.11, Mysql5.0.45, Php5.3.0 > Install WampServer addon to have versions: Mysql5.0.45
For example by running WampServer2-APACHE2211.exe (http://www.wampserver.com)
For example by running WampServer2-MYSQL5045.exe (http://www.wampserver.com) For example by running WampServer2-MYSQL5045.exe (http://www.wampserver.com)
For example by running WampServer2-PHP530.exe (http://www.wampserver.com)
> To build from Windows (running from makepack-dolibarr.pl script is however > To build from Windows (running from makepack-dolibarr.pl script is however
recommanded), open file build/exe/doliwamp.iss and click on button "Compile". recommanded), open file build/exe/doliwamp.iss and click on button "Compile".
The .exe file will be build into directory build. The .exe file will be build into directory build.
> 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
- To build a theme package, launch the script - To build a theme package, launch the script
> perl makepack-dolibarrtheme.pl > perl makepack-dolibarrtheme.pl
@ -46,9 +48,6 @@ generated packages will not contains this "build" directory.
We can find in "build", following sub-directories: We can find in "build", following sub-directories:
* aps:
To build APS package.
* debian: * debian:
To build Debian package. To build Debian package.

View File

@ -1,123 +0,0 @@
<!-- Application namespaces and APS version (step 9) -->
<application xmlns="http://apstandard.com/ns/1" version="1.1">
<!-- Application common properties (step 9) -->
<name>Dolibarr ERP-CRM</name>
<version>__VERSION__</version>
<release>__RELEASE__</release>
<homepage>http://www.dolibarr.org/</homepage>
<vendor>
<name>Dolibarr</name>
<homepage>http://www.dolibarr.org/</homepage>
<icon path="images/appicon_64.png" />
</vendor>
<packager>
<name>Laurent Destailleur</name>
<homepage>http://www.nltechno.com</homepage>
<uri>uuid:e743ee30-9fe8-11e0-a32e-0025115d642c</uri>
</packager>
<presentation>
<summary>Dolibarr ERP-CRM, the easy to use software to manage small or medium companies, freelancers or foundations</summary>
<description>
Dolibarr is a free modular software (you see only
features you need) to manage small and medium companies, freelancers
or foundations.
This OpenSource software is designed to provide all features you need to
manage information on many aspects of your business
into an intuitive and user-friendly graphical interface
It's an OpenSource software you can install on a web server or as a
standalone software. Dolibarr is designed to provide simplicity to end-user.
</description>
<icon path="images/appicon_64.png" />
<screenshot path="images/dolibarr_screenshot1_640x480.png">
<description>Screenshot 1</description>
</screenshot>
<changelog>
<version version="3.1.0" release="0">
<entry>See http://www.dolibarr.org/files/ChangeLog</entry>
</version>
</changelog>
<categories>
<category>Back office/Billing</category>
<category>Back office/Accounting and Financial</category>
<category>Back office/Customer Relationship Management</category>
<category>Back office/Enterprise Resource Planning</category>
</categories>
<languages>
<language>en</language>
<language>fr</language>
<language>es</language>
<language>de</language>
<language>pt</language>
</languages>
</presentation>
<upgrade match="/application/version = '3.0'" />
<!-- Application service (step 4) -->
<service id="dolibarr">
<!-- Service presentation properties (step 7) -->
<license must-accept="false">
<text>
<name>GPL-3.0+</name>
<file>COPYING</file>
</text>
</license>
<presentation>
<name>Dolibarr instance</name>
<summary>Dolibarr services</summary>
<entry-points>
<entry class="frontpage" dst="/">
<label>Application entry point</label>
</entry>
</entry-points>
</presentation>
<!-- Service settings (step 7) -->
<settings>
<!--
<group>
<name>Administrator's preferences</name>
<setting id="admin_name" type="string" default-value="admin"
min-length="1" max-length="32" regex="^[a-zA-Z][0-9a-zA-Z_\-]*">
<name>Administrator's login</name>
<error-message>
Please make sure the text you entered starts with a letter and continues with either numbers, letters, underscores or hyphens.
</error-message>
</setting>
<setting id="admin_password" type="password" min-length="1">
<name>Password</name>
</setting>
</group>
-->
</settings>
<!-- Service used technologies (step 6) -->
<requirements xmlns:php="http://apstandard.com/ns/1/php"
xmlns:db="http://apstandard.com/ns/1/db">
<php:version min="4.2.0" />
<php:extension>mysql</php:extension>
<php:extension>mbstring</php:extension>
<php:safe-mode>false</php:safe-mode>
<db:db>
<db:id>main</db:id>
<db:default-name>dolibarr</db:default-name>
<db:can-use-tables-prefix>false</db:can-use-tables-prefix>
<db:server-type>mysql</db:server-type>
<db:server-min-version>4.3.1</db:server-min-version>
</db:db>
</requirements>
<!-- Content delivery settings (step 8) -->
<provision>
<url-mapping>
<default-prefix>dolibarr</default-prefix>
<installed-size>35000000</installed-size>
<mapping url="/" path="htdocs" xmlns:php="http://apstandard.com/ns/1/php">
<php:handler>
<php:extension>php</php:extension>
</php:handler>
</mapping>
</url-mapping>
<!-- Service configuration script declaration (step 10) -->
<configuration-script name="configure.php">
<configuration-script-language>php</configuration-script-language>
<status-control/>
</configuration-script>
</provision>
</service>
</application>

View File

@ -1,121 +0,0 @@
<!-- Application namespaces and APS version (step 9) -->
<application xmlns="http://apstandard.com/ns/1" version="1.2">
<!-- Application common properties (step 9) -->
<id>dolibarr</id>
<name>Dolibarr</name>
<version>__VERSION__</version>
<release>__RELEASE__</release>
<homepage>http://www.dolibarr.org/</homepage>
<vendor>
<name>Dolibarr</name>
<homepage>http://www.dolibarr.org/</homepage>
<icon path="images/appicon_64.png" />
</vendor>
<packager>
<name>Laurent Destailleur</name>
<homepage>http://www.nltechno.com</homepage>
<uri>uuid:e743ee30-9fe8-11e0-a32e-0025115d642c</uri>
</packager>
<presentation>
<summary>Dolibarr ERP - CRM, the easy to use software to manage small or medium companies, freelancers or foundations</summary>
<description>
Dolibarr is a free modular software (you see only
features you need) to manage small and medium companies, freelancers
or foundations.
This OpenSource software is designed to provide all features you need to
manage information on many aspects of your business
into an intuitive and user-friendly graphical interface
It's an OpenSource software you can install on a web server or as a
standalone software. Dolibarr is designed to provide simplicity to end-user.
</description>
<icon path="images/appicon_64.png" />
<screenshot path="images/dolibarr_screenshot1_640x480.png">
<description>Screenshot 1</description>
</screenshot>
<changelog>
<version version="3.1.0" release="0">
<entry>See http://www.dolibarr.org/files/ChangeLog</entry>
</version>
</changelog>
<categories>
<category>Back office/Billing</category>
<category>Back office/Accounting and Financial</category>
<category>Back office/Customer Relationship Management</category>
<category>Back office/Enterprise Resource Planning</category>
</categories>
<languages>
<language>en</language>
<language>fr</language>
<language>es</language>
<language>de</language>
<language>pt</language>
</languages>
</presentation>
<upgrade match="/application/version = '3.0'" />
<!-- Application service (step 4) -->
<service id="dolibarr">
<!-- Service presentation properties (step 7) -->
<license must-accept="false">
<text xml:lang="">
<name>GPL-3.0+</name>
<file>COPYING</file>
</text>
</license>
<presentation>
<name>Dolibarr instance</name>
<entry-points>
<entry class="frontpage" dst="/">
<label>Application entry point</label>
</entry>
</entry-points>
</presentation>
<!-- Service settings (step 7) -->
<settings>
<group>
<name>Administrator's preferences</name>
<setting id="admin_name" type="string" default-value="admin"
min-length="1" max-length="32" regex="^[a-zA-Z][0-9a-zA-Z_\-]*">
<name>Administrator's login</name>
<error-message>
Please make sure the text you entered starts with a letter and continues with either numbers, letters, underscores or hyphens.
</error-message>
</setting>
<setting id="admin_password" type="password" min-length="1">
<name>Password</name>
</setting>
</group>
</settings>
<!-- Service used technologies (step 6) -->
<requirements xmlns:php="http://apstandard.com/ns/1/php"
xmlns:db="http://apstandard.com/ns/1/db">
<php:version min="4.2.0" />
<php:extension>mysql</php:extension>
<php:extension>mbstring</php:extension>
<php:safe-mode>false</php:safe-mode>
<db:db>
<db:id>main</db:id>
<db:default-name>dolibarr</db:default-name>
<db:can-use-tables-prefix>false</db:can-use-tables-prefix>
<db:server-type>mysql</db:server-type>
<db:server-min-version>4.3.1</db:server-min-version>
</db:db>
</requirements>
<!-- Content delivery settings (step 8) -->
<provision>
<url-mapping>
<default-prefix>dolibarr</default-prefix>
<installed-size>35000000</installed-size>
<mapping url="/" path="htdocs" xmlns:php="http://apstandard.com/ns/1/php">
<php:handler>
<php:extension>php</php:extension>
</php:handler>
</mapping>
</url-mapping>
<!-- Service configuration script declaration (step 10) -->
<configuration-script name="configure.php">
<script-language>php</script-language>
<status-control/>
</configuration-script>
</provision>
</service>
</application>

View File

@ -1,89 +0,0 @@
<html><head>
<title> Limitations of APS Support in the Panel </title>
<meta name="Keywords" content="">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="Limitations%20of%20APS%20Support%20in%20the%20Panel_fichiers/stylesheet.css">
<link href="Limitations%20of%20APS%20Support%20in%20the%20Panel_fichiers/prettify.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="Limitations%20of%20APS%20Support%20in%20the%20Panel_fichiers/prettify.js"></script>
<script src="Limitations%20of%20APS%20Support%20in%20the%20Panel_fichiers/highlight.js"></script></head>
<body onload="prettyPrint()" link="#0000A0" text="#000000" vlink="#FF0000" alink="#008000" bgcolor="#FFFFFF">
<h1 class="heading1">Limitations of APS Support in the Panel</h1>
<h2 class="heading2">About This Document</h2>
<p class="bodytext">This document is addressed to independent software
vendors who plan to distribute web applications among the Panel users.
The aim of the document is to help vendors find out whether they can
package their applications to APS to make them available through the
Panel.</p>
<p class="bodytext">The document does not contain information about
Application Packaging Standard itself or give application packaging
instructions. It focuses on how the Panel implements APS and what APS
packages are not supported by this implementation.</p>
<p class="bodytext"></p>
<h2 class="heading2">APS Support in the Panel</h2>
<p class="bodytext"><em class="emphasis"><em class="emphasis">Application Packaging Standard</em></em> (<em class="emphasis">APS</em>)
is a set of rules that defines a web application packaging format. This
standard is designed to ease the integration of applications in a
service provider's infrastructure. It covers provisioning, management,
and integration of cloud-based services and applications.</p>
<p class="bodytext">The Panel uses APS to offer third-party applications to hosting customers. These applications are presented in <em class="emphasis">APS catalog</em>, where the customers can buy or download them.</p>
<p class="bodytext">Currently, the Panel does not support all aspects of
APS. Therefore, customers may have problems trying to install certain
applications. To find out whether your application is compatible with
the Panel, see section <strong class="specialbold"><strong class="specialbold">Plesk Panel Restrictions.</strong></strong></p>
<p class="bodytext">You can find more information about APS at http://www.apsstandard.org/.</p>
<p class="bodytext">APS specification and supporting documents are available at http://www.apsstandard.org/isv/documentation/.</p>
<p class="bodytext"></p>
<h2 class="heading2">Restrictions on Packages Processing</h2>
<p class="bodytext">The current Panel version has restrictions on APS
applications processing. If an application requires performing
restricted actions, the Panel will not install it. Particularly, these
actions are the following:</p>
<ul class="listbullet"><li class="listbullet">Sending e-mails or processing incoming mail.<p class="listcontinue">See <strong class="specialbold">Mail aspect</strong> of APS in <strong class="specialbold">APS Format Specification v1.2</strong>, section <strong class="specialbold">8.8. Mail </strong>at http://www.apsstandard.org/r/doc/package-format-specification-1.2/index.html#s.aspects.mail</p>
</li><li class="listbullet">Changing the DNS resource records of an environment where the application works.<p class="listcontinue">See <strong class="specialbold">DNS aspect</strong> in <strong class="specialbold">APS Format Specification v1.2</strong>, section <strong class="specialbold">8.10. DNS Zone </strong>at http://www.apsstandard.org/r/doc/package-format-specification-1.2/index.html#s.aspects.dns</p>
</li><li class="listbullet">Installing third-party dynamic libraries (*.dll, *.so).<p class="listcontinue">See<strong class="specialbold"> DLL aspect</strong> in <strong class="specialbold">APS Format Specification v1.2</strong>, section <strong class="specialbold">8.11. DLL Content Processing Method </strong>at http://www.apsstandard.org/r/doc/package-format-specification-1.2/index.html#s.aspects.dll</p>
</li><li class="listbullet">Updating older version of application with
complex changes in application settings or deployment logic. According
to APS, such updates are called <em class="emphasis">upgrades. </em>For more information on the application updates, see the <strong class="specialbold">APS Format Specification v1.2</strong>, section <strong class="specialbold">5.1.15 Updates </strong>at http://www.apsstandard.org/r/doc/package-format-specification-1.2/index.html#s.metadata.common.update</li></ul><p class="bodytext">If
you need you application to perform these actions, consider other ways
of integration with the Panel: API RPC, modules or Panel Notifications.</p>
<p class="bodytext">Also, the Panel does not support the following actions defined in the application package: </p>
<ul class="listbullet"><li class="listbullet">Checking application settings for consistency via <strong class="specialbold">verification script. </strong>For more information on verification scripts, see the <strong class="specialbold">APS Format Specification v1.2</strong>, section <strong class="specialbold">5.3.3 Verification Script </strong>at http://www.apsstandard.org/r/doc/package-format-specification-1.2/index.html#s.metadata.provision.verification-script</li><li class="listbullet">Processing application resource usage reports defined by <strong class="specialbold">resource counters</strong> and passed by <strong class="specialbold">resource script</strong> . For more information on resource counters and resource scripts, see the <strong class="specialbold">APS Format Specification v1.2</strong>, section <strong class="specialbold">5.2.6. Resources</strong> at http://www.apsstandard.org/r/doc/package-format-specification-1.2/index.html#s.metadata.service.resources and <strong class="specialbold">5.3.3 Resources Script </strong>at http://www.apsstandard.org/r/doc/package-format-specification-1.2/index.html#s.metadata.provision.resource-script</li>
<h1 class="heading1">Copyright Notice</h1>
<p class="copyright">Parallels Holdings, Ltd.</p>
<p class="copyright">c/o Parallels International GmbH</p>
<p class="copyright">Vordergasse 59</p>
<p class="copyright">CH-Schaffhausen</p>
<p class="copyright">Switzerland</p>
<p class="copyright">Phone:&nbsp;+41-526320-411</p>
<p class="copyright">Fax: +41-52672-2010</p>
<p class="copyright">&nbsp;</p>
<p class="copyright">Copyright © 1999-2011 Parallels Holdings, Ltd. and its affiliates.&nbsp;All rights reserved.&nbsp;</p>
<p class="copyright">&nbsp;</p>
<p class="copyright">This product is protected by United States and
international copyright laws. The product's underlying technology,
patents, and trademarks are listed at
http://www.parallels.com/trademarks.&nbsp;</p>
<p class="copyright">&nbsp;</p>
<p class="copyright">Microsoft, Windows, Windows Server, Windows NT, Windows Vista, and MS-DOS are registered trademarks of Microsoft Corporation.</p>
<p class="copyright">Linux is a registered trademark of Linus Torvalds.</p>
<p class="copyright">Mac is a registered trademark of Apple, Inc.</p>
<p class="copyright">All other marks and names mentioned herein may be trademarks of their respective owners.</p>
<p class="bodytext">
<a target="_blank" title="Send feedback through a web form" href="http://www.parallels.com/en/support/usersdoc/?problemSubject=Feedback+on+Help+Page+" onclick="var u = parent.BODY.location.href;
u = u.replace(/.+\/([^/]+).htm$/,'$1');
u+= '+of+the+'+parent.document.title.replace(/ /g,'+');
this.href+=u;
window.location.reload(false);">Please send us your feedback on this help page.</a></p>
</ul></body></html>
<!-- Edited by post-publisher -->

View File

@ -1,64 +0,0 @@
function last(href)
{
var ret = href.split("/");
return ret[ret.length-1];
}
function StopProcess()
{
LeftFrame = parent.TOC.document.location.href;
LeftFrame = last(LeftFrame);
if (LeftFrame == "dhtml_search.htm") return 1
else return 0;
}
function highlightTOC(str) {
if (StopProcess()) return;
try {
str = str || parent.BODY.document.location.href;
uri = last(str);
list = parent.TOC.document.getElementsByTagName("a");
for(i=0; i<list.length; i++)
{
if (last(list[i].href) == uri)
{
list[i].style.backgroundColor = "#6697cc";
list[i].style.padding = "2px";
list[i].style.color = "#ffffff";
} else {
list[i].style.backgroundColor = "#ffffff";
list[i].style.color = "#003380";
}
}
} catch (e) {}
}
function FindCorrectTOCPage()
{
if (StopProcess()) return;
//Updated on 30.04.2008
list = parent.BODY.document.getElementsByTagName("a") || document.getElementsByTagName("a");
for(i=0; i<list.length; i++)
{
if (list[i].target == "TOC")
{
if (last(list[i].href) != last(parent.TOC.document.location.href))
{
parent.TOC.document.location.href = list[i].href;
return;
}
}
}
}

View File

@ -1,60 +0,0 @@
/* Pretty printing styles. Used with prettify.js. */
.str { color: #FF0000; }
.vr { color: #0000FF; }
.kwd { color: #000080; font-weight: bold}
.com { color: #EA8110; }
.typ { color: #606; }
.lit { color: #066; }
.pun { color: #660; }
.pln { color: #000; }
.tag { color: #008; }
.atn { color: #606; }
.atv { color: #080; }
.dec { color: #606; }
pre.preformatted {
display: block;
font-family: "Courier New", verdana, arial, helvetica, sans-serif;
font-style: normal;
font-variant: normal;
font-weight: normal;
font-size: 10pt;
color: #000000;
background-color: #f4f4f4;
word-spacing: normal;
letter-spacing: normal;
vertical-align: baseline;
text-decoration: none;
text-transform: none;
line-height: normal;
margin-top: 0pt;
margin-bottom: 0pt;
margin-left: 0pt;
margin-right: 6pt;
padding-top: 1pt;
padding-bottom: 1pt;
padding-left: 5pt;
padding-right: 5pt;
float: none;
clear: none;
text-align: left;
text-indent: 0cm;
width: auto;
height: auto;
}
@media print {
.vr { color: #f0f; }
.str { color: #060; }
.kwd { color: #006; font-weight: bold; }
.com { color: #600; font-style: italic; }
.typ { color: #404; font-weight: bold; }
.lit { color: #044; }
.pun { color: #440; }
.pln { color: #000; }
.tag { color: #006; font-weight: bold; }
.atn { color: #404; }
.atv { color: #060; }
}

View File

@ -1,20 +0,0 @@
README (English)
##################################################
This directory is dedicated to APS package building
##################################################
Docs for APS format 1.1:
http://www.apsstandard.org/r/doc/aps-format-1.1-packaging-guide/index.htm
Docs for APS format 1.2 (need APP-LIST.xml):
http://www.apsstandard.org/r/doc/aps-format-1.2-packaging-guide/index.htm
To check an APS package on Debian:
* Install libgdiplus with
apt-get install libgdiplus
* Install apslint.exe (http://www.apsstandard.org/r/doc/aps-format-1.2-packaging-guide/57414.htm)
tar -xvf xxxx.tgz
* Go into directory of apslint and run command
mono ./apslint.exe '/media/DATA/Mes Developpements/dolibarr/build/dolibarr-3.1.0-dev.app.zip'

View File

@ -1,151 +0,0 @@
#!/usr/bin/env php
<?php
/*-----------------------------------------------------
*
*----------------------------------------------------- */
// This is list of predefined variables when script is ran
// We have to set them manually to run script outside context.
/*putenv('SETTINGS_admin_name=admin');
putenv('SETTINGS_admin_password=admin-ad');
putenv('BASE_URL_SCHEME=http');
putenv('BASE_URL_HOST=localhost');
putenv('BASE_URL_PORT=0');
putenv('BASE_URL_PATH=/');
//putenv('WEB___DIR=/var/wwww/dolibarr/htdocs'); // WEB___DIR is dir to htdocs
putenv('WEB___DIR=../htdocs'); // WEB___DIR is dir to htdocs
putenv('DB_main_NAME=dolibarr');
putenv('DB_main_HOST=localhost');
putenv('DB_main_PORT=3306');
putenv('DB_main_LOGIN=root');
putenv('DB_main_PASSWORD=root');
*/
// Check parameters
if(count($_SERVER['argv']) < 2)
{
print "Usage: configure.php (install | upgrade <version> | configure | remove)\n";
exit(1);
}
$command = $_SERVER['argv'][1]; //$command stores the argument with which the script was invoked.
if($command == "install")
{
$db_id = 'main';
$rootdir = getenv("WEB___DIR");
if ($rootdir != '/') $rootdir = preg_replace('/\/$/','',$rootdir); // Remove last /
$datadir = $rootdir.'/dolibarr_documents';
//List of database-related variables that are passed to the configuration
//script. See the 6.3.1.1.1. Environment variables section of the
//Specification for details.
$db_address = getenv("DB_${db_id}_HOST");
$db_port = getenv("DB_${db_id}_PORT");
$dblogin = getenv("DB_${db_id}_LOGIN");
$dbpassword = getenv("DB_${db_id}_PASSWORD");
$dbname = getenv("DB_${db_id}_NAME");
//PHP functions for connecting to the mysql server and
//executing SQL queries.
//mysql_connect($dbaddress, $dblogin, $dbpassword);
//mysql_select_db($dbname);
/*
$sql_queries = file($query_file);
foreach ($sql_queries as $query) mysql_query($query);
*/
//Other code to be executed on invoking configure with
//the install argument.
// Create empty config file
$file=$rootdir.'/conf/conf.php';
print "Create conf file ".$file."\n";
$fp = fopen($file, 'wb');
if ($fp)
{
fclose($fp);
chmod($file,0775);
}
else
{
print "configure.php install: Unable to write file $file.\n";
exit(1);
}
// Create empty directory that will be used by software to store uploaded documents
print "Create directory ".$datadir."\n";
@mkdir($datadir);
chmod($datadir,0775);
// Create install.forced.php into htdocs/install directory with value.
// This will set parameters of install for web installer wizard.
$file_source=$rootdir.'/../build/aps/install.forced.php.install';
$file=$rootdir.'/install/install.forced.php';
print "Create file ".$file.' from '.$file_source."\n";
$modify_hash=array(
'WEB___DIR'=>$rootdir,
'DB_'.$db_id.'_HOST'=>$db_address,
'DB_'.$db_id.'_PORT'=>$db_port,
'DB_'.$db_id.'_LOGIN'=>$dblogin,
'DB_'.$db_id.'_PASSWORD'=>$dbpassword,
'DB_'.$db_id.'_NAME'=>$dbname
);
$file_content = fread(fopen($file_source, 'r'), filesize($file_source));
foreach($modify_hash as $param => $val){
$file_content = str_replace($param, php_quote($val), $file_content);
}
$fp = fopen($file, 'wb');
if ($fp)
{
fputs($fp, $file_content);
fputs($fp, "\n");
fclose($fp);
chmod($file,0775);
}
else
{
print "configure.php install: Unable to write file $file.\n";
exit(2);
}
exit(0);
}
if($command == "remove")
{
//Code to be executed on invoking configure with the remove argument
exit(0);
}
if($command == "upgrade")
{
//Code to be executed on invoking configure with the upgrade argument
exit(0);
}
if($command == "configure")
{
//Code to be executed on invoking configure with the configure argument
exit(0);
}
print "configure.php: Error: unknown command $command.\n";
exit(1);
// Content of file-util.php we need
function php_quote($val)
{
$res_val = str_replace("\\", "\\\\", $val);
$res_val = str_replace("'", "\\'", $res_val);
return $res_val;
}

View File

@ -1,23 +0,0 @@
<?php
// File to force Dolibarr wizard installer choices.
//
// This file must be present into htdocs/install directory
// during install process to be used.
//
//
$force_install_noedit=1;
$force_install_message='KeepDefaultValuesDeb';
$force_install_main_data_root='WEB___DIR/dolibarr_documents';
$force_install_type='mysqli';
$force_install_dbserver='DB_main_HOST';
$force_install_port='DB_main_PORT';
$force_install_database='DB_main_NAME';
$force_install_createdatabase='0';
$force_install_databaselogin='DB_main_LOGIN';
$force_install_databasepass='DB_main_PASSWORD';
$force_install_createuser='0';
$force_install_databaserootlogin='';
$force_install_databaserootpass='';
$force_install_dolibarrlogin='admin';
$force_install_nophpinfo='1';
$force_install_lockinstall='444';

View File

@ -8,7 +8,7 @@ Copyright: 2002-2009, Rodolphe Quiedeville <rodolphe@quiedeville.org>
2003-2006, Jean-Louis Bergamo <jlb@j1b.org> 2003-2006, Jean-Louis Bergamo <jlb@j1b.org>
2003-2013, Laurent Destailleur <eldy@users.sourceforge.net> 2003-2013, Laurent Destailleur <eldy@users.sourceforge.net>
2003, Xavier Dutoit <doli@sydesy.com> 2003, Xavier Dutoit <doli@sydesy.com>
2004-2013, Regis Houssin <regis.houssin@capnetworks.com> 2004-2013, Regis Houssin <regis.houssin@inodbox.com>
2004, Sebastien Di Cintio <sdicintio@ressource-toi.org> 2004, Sebastien Di Cintio <sdicintio@ressource-toi.org>
2004, Benoit Mortier <benoit.mortier@opensides.be> 2004, Benoit Mortier <benoit.mortier@opensides.be>
2004, Christophe Combelles <ccomb@free.fr> 2004, Christophe Combelles <ccomb@free.fr>

View File

@ -0,0 +1 @@
htdocs/install/doctemplates/websites/website_template-corporate.zip

View File

@ -3,18 +3,30 @@ FROM php:7.0-apache
ENV HOST_USER_ID 33 ENV HOST_USER_ID 33
ENV PHP_INI_DATE_TIMEZONE 'UTC' ENV PHP_INI_DATE_TIMEZONE 'UTC'
RUN apt-get update && apt-get install -y libpng12-dev libjpeg-dev libldap2-dev \ RUN apt-get update && apt-get install -y libpng-dev libjpeg-dev libldap2-dev \
&& rm -rf /var/lib/apt/lists/* \ && 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-png-dir=/usr --with-jpeg-dir=/usr \
&& docker-php-ext-install gd \ && docker-php-ext-install gd \
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \ && docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
&& docker-php-ext-install ldap \ && docker-php-ext-install ldap \
&& docker-php-ext-install mysqli \ && docker-php-ext-install mysqli \
&& apt-get purge -y libpng12-dev libjpeg-dev libldap2-dev && apt-get purge -y libjpeg-dev libldap2-dev
COPY docker-run.sh /usr/local/bin/ COPY docker-run.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-run.sh RUN chmod +x /usr/local/bin/docker-run.sh
RUN pecl install xdebug-2.5.5 && docker-php-ext-enable xdebug
RUN echo 'zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20151012/xdebug.so"' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.remote_autostart=0' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.remote_enable=1' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.default_enable=0' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.remote_host=docker.for.mac.host.internal' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.remote_port=9000' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.remote_connect_back=0' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.profiler_enable=0' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.remote_log="/tmp/xdebug.log"' >> /usr/local/etc/php/php.ini
EXPOSE 80 EXPOSE 80
ENTRYPOINT ["docker-run.sh"] ENTRYPOINT ["docker-run.sh"]

View File

@ -3,42 +3,27 @@ File added into doxygen generated documentation
--> -->
<!-- Google analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-9049390-16', 'auto');
ga('send', 'pageview');
</script>
<!-- End google analytics -->
<hr class="footer" /> <hr class="footer" />
<address class="footer"><small>Generated on $datetime <address class="footer"><small>Generated on $datetime for <a href="https://www.dolibarr.org">$projectname</a> by Doxygen $doxygenversion </small></address>
for <a href="https://www.dolibarr.org">$projectname</a> by Doxygen $doxygenversion </small></address>
<!-- Google AdSense -->
<div class="center">
<script type="text/javascript"><!--
google_ad_client = "pub-1071905880519467";
/* PUBBANDEAUDOLIBARR */
google_ad_slot = "1421205532";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript" src="https://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</div>
<!-- End google adsense -->
<br> <br>
</div> </div>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-9049390-16"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-9049390-16');
</script>
<!-- Twitter ad collector --> <!-- Twitter ad collector -->
<script src="//platform.twitter.com/oct.js" type="text/javascript"></script> <script src="//platform.twitter.com/oct.js" type="text/javascript"></script>
<script type="text/javascript">twttr.conversion.trackPid('ntm4n', { tw_sale_amount: 0, tw_order_quantity: 0 });</script> <script type="text/javascript">twttr.conversion.trackPid('ntm4n', { tw_sale_amount: 0, tw_order_quantity: 0 });</script>

View File

@ -42,7 +42,7 @@ src="https://www.facebook.com/tr?id=1998533953704960&ev=PageView&noscript=1"
<table width="100%"> <table width="100%">
<tr> <tr>
<td><div id="projectname">$projectname</div> - <span id="projectnumber">$projectnumber</span></td> <td><div id="projectname">$projectname</div> - <span id="projectnumber">$projectnumber</span></td>
<td align="right"><!-- banner start --> <td class="right"><!-- banner start -->
<table cellpadding="0" cellspacing="0" class="moduletablemybanner"> <table cellpadding="0" cellspacing="0" class="moduletablemybanner">
<tr> <tr>
<td> <td>

View File

@ -11,10 +11,10 @@ LaunchProgram=Launch %1
AssocFileExtension=&Associate %1 with the %2 file extension AssocFileExtension=&Associate %1 with the %2 file extension
AssocingFileExtension=Associating %1 with the %2 file extension... AssocingFileExtension=Associating %1 with the %2 file extension...
YouWillInstallDoliWamp=You will install or upgrade DoliWamp (Apache+Mysql+PHP+Dolibarr) on your computer. YouWillInstallDoliWamp=You will install or upgrade DoliWamp (so Dolibarr + all required third party softwares like Apache, Mysql and PHP) on your computer.
ThisAssistantInstallOrUpgrade=This assistant installs or upgrades Dolibarr ERP-CRM and all required third party softwares (Apache, Mysql and PHP) optimized for a Dolibarr usage. 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=If you have technical knowledge and plan to share your Apache, Mysql and PHP with other projects than Dolibarr, you should not use this assistant and make a manual installation of Dolibarr on your existing Apache, Mysql and PHP installation. 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, you''re on the good way... 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/upgrade process ? DoYouWantToStart=Do you want to start installation/upgrade process ?
TechnicalParameters=Technical parameters TechnicalParameters=Technical parameters
@ -32,7 +32,7 @@ PortAlreadyInUse=Port %1 seems to be already in use. You should cancel to go bac
FirefoxDetected=Firefox has been detected on your computer. Would you like to use it as the default browser for Dolibarr ? 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 ? ChromeDetected=Chrome has been detected on your computer. Would you like to use it as the default browser for Dolibarr ?
ChooseDefaultBrowser=Please choose your default browser. If you are not sure, just click Open : 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 LaunchNow=Launch Dolibarr now
@ -43,5 +43,5 @@ DoliWampWillStartApacheMysql=DoliWamp installer will now start or restart Apache
OldVersionFoundAndMoveInNew=An old database version has been found and moved to be used by new Dolibarr version 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 OldVersionFoundButFailedToMoveInNew=An old database version has been found but could not be moved to be used with new Dolibarr version
DLLMissing=The "Visual C++ Redistributable for Visual Studio 2012" component is missing. Please install the 32-bit version (vcredit_x86.exe) first from https://www.microsoft.com/en-us/download/details.aspx?id=30679 and restart DoliWamp installation/upgrade. 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) ContinueAnyway=Continue anyway (install process may fails without this prerequisite)

View File

@ -11,10 +11,10 @@ LaunchProgram=Ex
AssocFileExtension=&Associer %1 avec l'extension de fichier %2 AssocFileExtension=&Associer %1 avec l'extension de fichier %2
AssocingFileExtension=Associe %1 avec l'extension de fichier %2... AssocingFileExtension=Associe %1 avec l'extension de fichier %2...
YouWillInstallDoliWamp=Vous allez installer ou mettre à jour DoliWamp (Apache+Mysql+PHP+Dolibarr) sur votre ordinateur. YouWillInstallDoliWamp=Vous allez installer ou mettre à jour DoliWamp sur votre ordinateur (donc Dolibarr + tous ses composants prérequis comme Apache, Mysql et PHP).
ThisAssistantInstallOrUpgrade=Cet assistant installe ou met à jour Dolibarr ERP-CRM et tous ses composants prérequis (Apache, Mysql et PHP) optimisés pour une utilisation de Dolibarr. ThisAssistantInstallOrUpgrade=AVERTISSEMENT: L'utilisation d'un ERP CRM installé sur un ordinateur local peut être dangereuse: si votre ordinateur tombe en panne, vous pouvez perdre toutes vos données. Faites-le si vous êtes prêt à gérer les sauvegardes vous-même sérieusement. Sinon, utilisez plutôt une installation en Saas (voir https://saas.dolibarr.org).
IfYouHaveTechnicalKnowledge=Si vous avez des compétences techniques et envisagez de partager votre Apache, Mysql et PHP avec d'autres applications que Dolibarr, vous ne devriez pas utiliser cet assistant mais faire plutôt une installation manuelle de Dolibarr sur un socle Apache, Mysql et PHP existant. IfYouHaveTechnicalKnowledge=De plus, si vous avez des compétences techniques et envisagez de partager votre Apache, Mysql et PHP avec d''autres applications que Dolibarr, vous ne devriez pas utiliser cet assistant mais faire plutôt une installation manuelle de Dolibarr sur un serveur existant équipé de Apache, Mysql et PHP.
ButIfYouLook=Mais si vous recherchez une installation clé en main automatisée, vous êtes sur la bonne voie... ButIfYouLook=Mais si vous recherchez une installation clé en main automatisée sur une poste local, vous êtes sur la bonne voie...
DoYouWantToStart=Voulez-vous démarrer le processus d'installation/mise à jour ? DoYouWantToStart=Voulez-vous démarrer le processus d'installation/mise à jour ?
TechnicalParameters=Paramètres techniques TechnicalParameters=Paramètres techniques
@ -33,7 +33,7 @@ PortAlreadyInUse=Le port %1 semble d
FirefoxDetected=Firefox a été détecté sur votre ordinateur. Voulez-vous en faire votre navigateur par défaut pour Dolibarr ? FirefoxDetected=Firefox a été détecté sur votre ordinateur. Voulez-vous en faire votre navigateur par défaut pour Dolibarr ?
ChromeDetected=Chrome a été détecté sur votre ordinateur. Voulez-vous en faire votre navigateur par défaut pour Dolibarr ? ChromeDetected=Chrome a été détecté sur votre ordinateur. Voulez-vous en faire votre navigateur par défaut pour Dolibarr ?
ChooseDefaultBrowser=Merci de choisir votre navigateur par défaut. Si vous n'êtes pas sûr, cliquez simplement sur Ouvrir : ChooseDefaultBrowser=Merci de choisir votre navigateur par défaut (iexplore.exe, firefox.exe, chrome.exe, MicrosoftEdge.exe...). Si vous n'êtes pas sûr, cliquez simplement sur Ouvrir :
LaunchNow=Lancer Dolibarr maintenant LaunchNow=Lancer Dolibarr maintenant
@ -44,3 +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. 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. 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.
ContinueAnyway=Continuer malgré tout (le process d'installaton échouera)

View File

@ -5,4 +5,4 @@ DOLIWAMP Package tools
This directory contains files used by makepack-dolibarr.pl This directory contains files used by makepack-dolibarr.pl
script to build the all-in-on .EXE package DoliWamp, ready script to build the all-in-on .EXE package DoliWamp, ready
to be distributedt (for Windows). to be distributed (for Windows).

View File

@ -32,7 +32,7 @@ AppPublisherURL=https://www.nltechno.com
AppSupportURL=https://www.dolibarr.org AppSupportURL=https://www.dolibarr.org
AppUpdatesURL=https://www.dolibarr.org AppUpdatesURL=https://www.dolibarr.org
AppComments=DoliWamp includes Dolibarr, Apache, PHP and Mysql softwares. AppComments=DoliWamp includes Dolibarr, Apache, PHP and Mysql softwares.
AppCopyright=Copyright (C) 2008-2017 Laurent Destailleur (NLTechno), Fabian Rodriguez (Le Goût du Libre) AppCopyright=Copyright (C) 2008-2019 Laurent Destailleur (NLTechno), Fabian Rodriguez (Le Goût du Libre)
DefaultDirName=c:\dolibarr DefaultDirName=c:\dolibarr
DefaultGroupName=Dolibarr DefaultGroupName=Dolibarr
;LicenseFile=COPYING ;LicenseFile=COPYING

View File

@ -527,10 +527,10 @@ a:hover {
</head> </head>
<body> <body>
<table width="100%"><tr><td align="left"> <table width="100%"><tr><td class="left">
<img src="index.php?img=pngLogo"> <img src="index.php?img=pngLogo">
</td> </td>
<td align="right"> <td class="right">
<ul class="utility"> <ul class="utility">
<li><a href="?lang={$langues[$langue]['autreLangueLien1']}">{$langues[$langue]['autreLangue1']}</a> <li><a href="?lang={$langues[$langue]['autreLangueLien1']}">{$langues[$langue]['autreLangue1']}</a>
- <a href="?lang={$langues[$langue]['autreLangueLien2']}">{$langues[$langue]['autreLangue2']}</a></li> - <a href="?lang={$langues[$langue]['autreLangueLien2']}">{$langues[$langue]['autreLangue2']}</a></li>

View File

@ -3,4 +3,4 @@ REM Launch Dolibarr Admin center
REM ---------------------------- REM ----------------------------
REM Go to admin center page REM Go to admin center page
start "DoliWamp admin" "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/ start "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/

View File

@ -4,4 +4,4 @@ REM ---------------------------
REM Go to help center page REM Go to help center page
echo Please wait... echo Please wait...
start "Dolibarr Help center" "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/dolibarr/support/ start "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/dolibarr/support/

View File

@ -3,7 +3,7 @@ REM Launch Dolibarr
REM --------------- REM ---------------
REM If no lock file, we call install process REM If no lock file, we call install process
IF NOT EXIST dolibarr_documents\install.lock start "Dolibarr" "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/dolibarr/install/ IF NOT EXIST dolibarr_documents\install.lock start "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/dolibarr/install/
REM If lock file exists, we call home page REM If lock file exists, we call home page
IF EXIST dolibarr_documents\install.lock start "Dolibarr" "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/dolibarr/ IF EXIST dolibarr_documents\install.lock start "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/dolibarr/

View File

@ -0,0 +1 @@
Help wanted...

View File

@ -22,7 +22,7 @@
* \brief This script create a xml checksum file * \brief This script create a xml checksum file
*/ */
if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Do not create database handler $db if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db
$sapi_type = php_sapi_name(); $sapi_type = php_sapi_name();
$script_file = basename(__FILE__); $script_file = basename(__FILE__);
@ -45,8 +45,7 @@ require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php";
$includecustom=0; $includecustom=0;
$includeconstants=array(); $includeconstants=array();
if (empty($argv[1])) if (empty($argv[1])) {
{
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n"; print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
print "Example: ".$script_file." release=6.0.0 includecustom=1 includeconstant=FR:INVOICE_CAN_ALWAYS_BE_REMOVED:0 includeconstant=all:MAILING_NO_USING_PHPMAIL:1\n"; print "Example: ".$script_file." release=6.0.0 includecustom=1 includeconstant=FR:INVOICE_CAN_ALWAYS_BE_REMOVED:0 includeconstant=all:MAILING_NO_USING_PHPMAIL:1\n";
exit -1; exit -1;
@ -54,14 +53,11 @@ if (empty($argv[1]))
parse_str($argv[1]); parse_str($argv[1]);
$i=0; $i=0;
while ($i < $argc) while ($i < $argc) {
{
if (! empty($argv[$i])) parse_str($argv[$i]); if (! empty($argv[$i])) parse_str($argv[$i]);
if (preg_match('/includeconstant=/',$argv[$i])) if (preg_match('/includeconstant=/', $argv[$i])) {
{
$tmp=explode(':', $includeconstant, 3); $tmp=explode(':', $includeconstant, 3);
if (count($tmp) != 3) if (count($tmp) != 3) {
{
print "Error: Bad parameter includeconstant ".$includeconstant."\n"; print "Error: Bad parameter includeconstant ".$includeconstant."\n";
exit -1; exit -1;
} }
@ -70,8 +66,7 @@ while ($i < $argc)
$i++; $i++;
} }
if (empty($release)) if (empty($release)) {
{
print "Error: Missing release paramater\n"; print "Error: Missing release paramater\n";
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n"; print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
exit -1; exit -1;
@ -81,39 +76,29 @@ $savrelease = $release;
// If release is auto, we take current version // If release is auto, we take current version
$tmpver=explode('-', $release, 2); $tmpver=explode('-', $release, 2);
if ($tmpver[0] == 'auto' || $tmpver[0] == 'autostable') if ($tmpver[0] == 'auto' || $tmpver[0] == 'autostable') {
{
$release=DOL_VERSION; $release=DOL_VERSION;
if ($tmpver[1] && $tmpver[0] == 'auto') $release.='-'.$tmpver[1]; if ($tmpver[1] && $tmpver[0] == 'auto') $release.='-'.$tmpver[1];
} }
if (empty($includecustom)) if (empty($includecustom)) {
{
$tmpverbis=explode('-', $release, 2); $tmpverbis=explode('-', $release, 2);
if (empty($tmpverbis[1]) || $tmpver[0] == 'autostable') if (empty($tmpverbis[1]) || $tmpver[0] == 'autostable') {
{ if (DOL_VERSION != $tmpverbis[0] && $savrelease != 'auto') {
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"; 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";
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n"; print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
exit -1; exit -1;
} }
} } else {
else
{
$tmpverter=explode('-', DOL_VERSION, 2); $tmpverter=explode('-', DOL_VERSION, 2);
if ($tmpverter[0] != $tmpverbis[0]) 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 '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"; print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
exit -1; exit -1;
} }
} }
} } else {
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 '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"; print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
exit -1; exit -1;
@ -123,10 +108,8 @@ else
print "Release : ".$release."\n"; print "Release : ".$release."\n";
print "Include custom in signature : ".$includecustom."\n"; print "Include custom in signature : ".$includecustom."\n";
print "Include constants in signature : "; print "Include constants in signature : ";
foreach ($includeconstants as $countrycode => $tmp) foreach ($includeconstants as $countrycode => $tmp) {
{ foreach($tmp as $constname => $constvalue) {
foreach($tmp as $constname => $constvalue)
{
print $constname.'='.$constvalue." "; print $constname.'='.$constvalue." ";
} }
} }
@ -135,20 +118,18 @@ print "\n";
//$outputfile=dirname(__FILE__).'/../htdocs/install/filelist-'.$release.'.xml'; //$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"; print 'Delete current files '.$outputdir.'/filelist*.xml'."\n";
dol_delete_file($outputdir.'/filelist*.xml',0,1,1); 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'); $fp = fopen($outputfile, 'w');
fputs($fp, '<?xml version="1.0" encoding="UTF-8" ?>'."\n"); fputs($fp, '<?xml version="1.0" encoding="UTF-8" ?>'."\n");
fputs($fp, '<checksum_list version="'.$release.'" date="'.dol_print_date(dol_now(), 'dayhourrfc').'" generator="'.$script_file.'">'."\n"); fputs($fp, '<checksum_list version="'.$release.'" date="'.dol_print_date(dol_now(), 'dayhourrfc').'" generator="'.$script_file.'">'."\n");
foreach ($includeconstants as $countrycode => $tmp) foreach ($includeconstants as $countrycode => $tmp) {
{
fputs($fp, '<dolibarr_constants country="'.$countrycode.'">'."\n"); fputs($fp, '<dolibarr_constants country="'.$countrycode.'">'."\n");
foreach($tmp as $constname => $constvalue) foreach($tmp as $constname => $constvalue) {
{
$valueforchecksum=(empty($constvalue)?'0':$constvalue); $valueforchecksum=(empty($constvalue)?'0':$constvalue);
$checksumconcat[]=$valueforchecksum; $checksumconcat[]=$valueforchecksum;
fputs($fp, ' <constant name="'.$constname.'">'.$valueforchecksum.'</constant>'."\n"); fputs($fp, ' <constant name="'.$constname.'">'.$valueforchecksum.'</constant>'."\n");
@ -191,7 +172,7 @@ fputs($fp, '</dolibarr_htdocs_dir>'."\n");
asort($checksumconcat); // Sort list of checksum asort($checksumconcat); // Sort list of checksum
//var_dump($checksumconcat); //var_dump($checksumconcat);
fputs($fp, '<dolibarr_htdocs_dir_checksum>'."\n"); fputs($fp, '<dolibarr_htdocs_dir_checksum>'."\n");
fputs($fp, md5(join(',',$checksumconcat))."\n"); fputs($fp, md5(join(',', $checksumconcat))."\n");
fputs($fp, '</dolibarr_htdocs_dir_checksum>'."\n"); fputs($fp, '</dolibarr_htdocs_dir_checksum>'."\n");
@ -233,7 +214,7 @@ fputs($fp, '</dolibarr_script_dir>'."\n");
asort($checksumconcat); // Sort list of checksum asort($checksumconcat); // Sort list of checksum
fputs($fp, '<dolibarr_script_dir_checksum>'."\n"); fputs($fp, '<dolibarr_script_dir_checksum>'."\n");
fputs($fp, md5(join(',',$checksumconcat))."\n"); fputs($fp, md5(join(',', $checksumconcat))."\n");
fputs($fp, '</dolibarr_script_dir_checksum>'."\n"); fputs($fp, '</dolibarr_script_dir_checksum>'."\n");
fputs($fp, '</checksum_list>'."\n"); fputs($fp, '</checksum_list>'."\n");

View File

@ -22,7 +22,7 @@ $PUBLISHSTABLE="eldy,dolibarr\@frs.sourceforge.net:/home/frs/project/dolibarr";
$PUBLISHBETARC="dolibarr\@vmprod1.dolibarr.org:/home/dolibarr/dolibarr.org/httpdocs/files"; $PUBLISHBETARC="dolibarr\@vmprod1.dolibarr.org:/home/dolibarr/dolibarr.org/httpdocs/files";
#@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","APS","EXEDOLIWAMP","SNAPSHOT"); # Possible packages #@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","EXEDOLIWAMP","SNAPSHOT"); # Possible packages @LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
%REQUIREMENTPUBLISH=( %REQUIREMENTPUBLISH=(
"SF"=>"git ssh rsync", "SF"=>"git ssh rsync",
@ -36,8 +36,8 @@ $PUBLISHBETARC="dolibarr\@vmprod1.dolibarr.org:/home/dolibarr/dolibarr.org/httpd
"RPM_FEDORA"=>"rpmbuild", "RPM_FEDORA"=>"rpmbuild",
"RPM_MANDRIVA"=>"rpmbuild", "RPM_MANDRIVA"=>"rpmbuild",
"RPM_OPENSUSE"=>"rpmbuild", "RPM_OPENSUSE"=>"rpmbuild",
"DEB"=>"dpkg", "DEB"=>"dpkg dpatch",
"APS"=>"zip", "FLATPACK"=>"flatpack",
"EXEDOLIWAMP"=>"ISCC.exe", "EXEDOLIWAMP"=>"ISCC.exe",
"SNAPSHOT"=>"tar" "SNAPSHOT"=>"tar"
); );
@ -129,7 +129,7 @@ $BUILDROOT="$TEMP/buildroot";
$result = open( IN, "<" . $SOURCE . "/htdocs/filefunc.inc.php" ); $result = open( IN, "<" . $SOURCE . "/htdocs/filefunc.inc.php" );
if ( !$result ) { die "Error: Can't open descriptor file " . $SOURCE . "/htdocs/filefunc.inc.php\n"; } if ( !$result ) { die "Error: Can't open descriptor file " . $SOURCE . "/htdocs/filefunc.inc.php\n"; }
while (<IN>) { while (<IN>) {
if ( $_ =~ /define\('DOL_VERSION','([\d\.a-z\-]+)'\)/ ) { $PROJVERSION = $1; break; } if ( $_ =~ /define\('DOL_VERSION',\s*'([\d\.a-z\-]+)'\)/ ) { $PROJVERSION = $1; break; }
} }
close IN; close IN;
($MAJOR,$MINOR,$BUILD)=split(/\./,$PROJVERSION,3); ($MAJOR,$MINOR,$BUILD)=split(/\./,$PROJVERSION,3);
@ -142,7 +142,6 @@ $FILENAMETGZ = "$PROJECT-$MAJOR.$MINOR.$BUILD";
$FILENAMEZIP = "$PROJECT-$MAJOR.$MINOR.$BUILD"; $FILENAMEZIP = "$PROJECT-$MAJOR.$MINOR.$BUILD";
$FILENAMEXZ = "$PROJECT-$MAJOR.$MINOR.$BUILD"; $FILENAMEXZ = "$PROJECT-$MAJOR.$MINOR.$BUILD";
$FILENAMEDEB = "see later"; $FILENAMEDEB = "see later";
$FILENAMEAPS = "$PROJECT-$MAJOR.$MINOR.$BUILD.app";
$FILENAMEEXEDOLIWAMP = "DoliWamp-$MAJOR.$MINOR.$BUILD"; $FILENAMEEXEDOLIWAMP = "DoliWamp-$MAJOR.$MINOR.$BUILD";
# For RPM # For RPM
$ARCH='noarch'; $ARCH='noarch';
@ -358,16 +357,16 @@ if ($nboftargetok) {
} }
else else
{ {
print "ChangeLog for $MAJOR.$MINOR\.$BUILD was found into '$SOURCE/ChangeLog. But you can regenerate it with command:'\n"; print "ChangeLog for $MAJOR.$MINOR\.$BUILD was found into '$SOURCE/ChangeLog'. But you can regenerate it with command:\n";
} }
if (! $BUILD || $BUILD eq '0-rc') # For a major version 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\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /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\|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 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/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\' | 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\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /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 "\n"; print "\n";
@ -388,6 +387,15 @@ if ($nboftargetok) {
#----------------------- #-----------------------
if ($CHOOSEDTARGET{'-CHKSUM'}) if ($CHOOSEDTARGET{'-CHKSUM'})
{ {
$ret=`git ls-files . --exclude-standard --others`;
if ($ret)
{
print "Some files exists in source directory and are not indexed neither excluded in .gitignore.\n";
print $ret;
print "Canceled.\n";
exit;
}
print 'Create xml check file with md5 checksum with command php '.$SOURCE.'/build/generate_filelist_xml.php release='.$MAJOR.'.'.$MINOR.'.'.$BUILD."\n"; print 'Create xml check file with md5 checksum with command php '.$SOURCE.'/build/generate_filelist_xml.php release='.$MAJOR.'.'.$MINOR.'.'.$BUILD."\n";
$ret=`php $SOURCE/build/generate_filelist_xml.php release=$MAJOR.$MINOR.$BUILD`; $ret=`php $SOURCE/build/generate_filelist_xml.php release=$MAJOR.$MINOR.$BUILD`;
print $ret."\n"; print $ret."\n";
@ -523,12 +531,21 @@ if ($nboftargetok) {
$ret=`rm -f $BUILDROOT/$PROJECT/doc/images/dolibarr_screenshot12.png`; $ret=`rm -f $BUILDROOT/$PROJECT/doc/images/dolibarr_screenshot12.png`;
# Security to avoid to package data files # Security to avoid to package data files
print "Remove documents dir\n";
$ret=`rm -fr $BUILDROOT/$PROJECT/document`; $ret=`rm -fr $BUILDROOT/$PROJECT/document`;
$ret=`rm -fr $BUILDROOT/$PROJECT/documents`; $ret=`rm -fr $BUILDROOT/$PROJECT/documents`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/document`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/document`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/documents`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/documents`;
print "Remove subdir of custom dir\n";
print "find $BUILDROOT/$PROJECT/htdocs/custom/* -type d -exec rm -fr {} \\;\n";
$ret=`find $BUILDROOT/$PROJECT/htdocs/custom/* -type d -exec rm -fr {} \\; >/dev/null 2>&1`; # For custom we want to remove all subdirs but not files
print "find $BUILDROOT/$PROJECT/htdocs/custom/* -type l -exec rm -fr {} \\;\n";
$ret=`find $BUILDROOT/$PROJECT/htdocs/custom/* -type l -exec rm -fr {} \\; >/dev/null 2>&1`; # For custom we want to remove all subdirs, even symbolic links, but not files
# Removed known external modules to avoid any error when packaging from env where external modules are tested # Removed known external modules to avoid any error when packaging from env where external modules are tested
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/abricot*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/accountingexport*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/allscreens*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/allscreens*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/ancotec*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/ancotec*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/cabinetmed*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/cabinetmed*`;
@ -543,12 +560,14 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/multicompany*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/multicompany*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/ndf*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/ndf*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/nltechno*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/nltechno*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/nomenclature*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/of/`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/oscim*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/oscim*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/pos*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/pos*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/teclib*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/teclib*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/timesheet*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/timesheet*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/webmail*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/webmail*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/accountingexport*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/workstation*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/oblyon*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/oblyon*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/allscreen*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/allscreen*`;
# Removed other test files # Removed other test files
@ -579,6 +598,8 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/Examples`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/Examples`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/unitTests`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/unitTests`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/license.md`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/license.md`;
$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 -fr $BUILDROOT/$PROJECT/htdocs/includes/stripe/LICENSE`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/freefont-*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/freefont-*`;
@ -592,13 +613,6 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/tools`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/tools`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/LICENSE.TXT`; $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/LICENSE.TXT`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/theme/common/octicons/LICENSE`; $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/theme/common/octicons/LICENSE`;
print "Remove subdir of custom dir\n";
print "find $BUILDROOT/$PROJECT/htdocs/custom/* -type d -exec rm -fr {} \\;\n";
$ret=`find $BUILDROOT/$PROJECT/htdocs/custom/* -type d -exec rm -fr {} \\; >/dev/null 2>&1`; # For custom we want to remove all subdirs but not files
print "find $BUILDROOT/$PROJECT/htdocs/custom/* -type l -exec rm -fr {} \\;\n";
$ret=`find $BUILDROOT/$PROJECT/htdocs/custom/* -type l -exec rm -fr {} \\; >/dev/null 2>&1`; # For custom we want to remove all subdirs, even symbolic links, but not files
} }
# Build package for each target # Build package for each target
@ -692,7 +706,7 @@ if ($nboftargetok) {
print "Go to directory $BUILDROOT\n"; print "Go to directory $BUILDROOT\n";
$olddir=getcwd(); $olddir=getcwd();
chdir("$BUILDROOT"); chdir("$BUILDROOT");
$cmd= "xz -9 -r $BUILDROOT/$FILENAMEAPS.xz \*"; $cmd= "xz -9 -r $BUILDROOT/$FILENAMEXZ.xz \*";
print $cmd."\n"; print $cmd."\n";
$ret= `$cmd`; $ret= `$cmd`;
chdir("$olddir"); chdir("$olddir");
@ -988,7 +1002,7 @@ if ($nboftargetok) {
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/mymoduleindex.php`; $ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/mymoduleindex.php`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/myobject_card.php`; $ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/myobject_card.php`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/myobject_list.php`; $ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/myobject_list.php`;
$ret=`chmod -R 755 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/scripts/myobject.php`; $ret=`chmod -R 755 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/scripts/mymodule.php`;
$cmd="find $BUILDROOT/$PROJECT.tmp/scripts -name '*.php' -type f -exec chmod 755 {} \\; "; $cmd="find $BUILDROOT/$PROJECT.tmp/scripts -name '*.php' -type f -exec chmod 755 {} \\; ";
$ret=`$cmd`; $ret=`$cmd`;
$cmd="find $BUILDROOT/$PROJECT.tmp/scripts -name '*.sh' -type f -exec chmod 755 {} \\; "; $cmd="find $BUILDROOT/$PROJECT.tmp/scripts -name '*.sh' -type f -exec chmod 755 {} \\; ";
@ -1033,92 +1047,6 @@ if ($nboftargetok) {
next; next;
} }
if ($target eq 'APS')
{
$NEWDESTI=$DESTI;
if ($NEWDESTI =~ /stable/)
{
mkdir($DESTI.'/package_aps');
if (-d $DESTI.'/package_aps') { $NEWDESTI=$DESTI.'/package_aps'; }
}
$newbuild = $BUILD;
$newbuild =~ s/(dev|alpha)/0/gi; # dev
$newbuild =~ s/beta/1/gi; # beta
$newbuild =~ s/rc./2/gi; # rc
if ($newbuild !~ /-/) { $newbuild.='-3'; } # finale
# now newbuild is 0-0 or 0-3 for example
$REL1 = $newbuild; $REL1 =~ s/-.*$//gi;
if ($RPMSUBVERSION eq 'auto') { $RPMSUBVERSION = $newbuild; $RPMSUBVERSION =~ s/^.*-//gi; }
print "Version is $MAJOR.$MINOR.$REL1-$RPMSUBVERSION\n";
print "Remove target $FILENAMEAPS.zip...\n";
unlink "$NEWDESTI/$FILENAMEAPS.zip";
#rmdir "$BUILDROOT/$PROJECT.tmp";
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp`;
print "Create directory $BUILDROOT/$PROJECT.tmp\n";
$ret=`mkdir -p "$BUILDROOT/$PROJECT.tmp"`;
print "Copy $BUILDROOT/$PROJECT to $BUILDROOT/$PROJECT.tmp\n";
$cmd="cp -pr \"$BUILDROOT/$PROJECT\" \"$BUILDROOT/$PROJECT.tmp\"";
$ret=`$cmd`;
print "Remove other files\n";
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/build/deb`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/build/dmg`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/build/doap`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/build/exe`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/build/live`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/build/patch`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/build/rpm`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/build/zip`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/build/perl`;
$APSVERSION="1.2";
print "Create APS files $BUILDROOT/$PROJECT.tmp/$PROJECT/APP-META.xml\n";
open (SPECFROM,"<$BUILDROOT/$PROJECT/build/aps/APP-META-$APSVERSION.xml") || die "Error";
open (SPECTO,">$BUILDROOT/$PROJECT.tmp/$PROJECT/APP-META.xml") || die "Error";
while (<SPECFROM>) {
$newbuild = $BUILD;
$newbuild =~ s/(dev|alpha)/0/gi; # dev
$newbuild =~ s/beta/1/gi; # beta
$newbuild =~ s/rc./2/gi; # rc
if ($newbuild !~ /-/) { $newbuild.='-3'; } # finale
# now newbuild is 0-0 or 0-3 for example
$_ =~ s/__VERSION__/$MAJOR.$MINOR.$REL1/;
$_ =~ s/__RELEASE__/$RPMSUBVERSION/;
print SPECTO $_;
}
close SPECFROM;
close SPECTO;
print "Version set to $MAJOR.$MINOR.$newbuild\n";
$cmd="cp -pr \"$BUILDROOT/$PROJECT/build/aps/configure.php\" \"$BUILDROOT/$PROJECT.tmp/$PROJECT/scripts/configure.php\"";
$ret=`$cmd`;
$cmd="cp -pr \"$BUILDROOT/$PROJECT/doc/images\" \"$BUILDROOT/$PROJECT.tmp/$PROJECT/images\"";
$ret=`$cmd`;
print "Remove other files\n";
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/dev`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/doc`;
print "Build APP-LIST.xml files\n";
print "Compress $BUILDROOT/$PROJECT.tmp/$PROJECT into $FILENAMEAPS.zip...\n";
print "Go to directory $BUILDROOT/$PROJECT.tmp\/$PROJECT\n";
$olddir=getcwd();
chdir("$BUILDROOT\/$PROJECT.tmp\/$PROJECT");
$cmd= "zip -9 -r $BUILDROOT/$FILENAMEAPS.zip \*";
print $cmd."\n";
$ret= `$cmd`;
chdir("$olddir");
# Move to final dir
print "Move $BUILDROOT/$FILENAMEAPS.zip to $NEWDESTI/$FILENAMEAPS.zip\n";
$ret=`mv "$BUILDROOT/$FILENAMEAPS.zip" "$NEWDESTI/$FILENAMEAPS.zip"`;
next;
}
if ($target eq 'EXEDOLIWAMP') if ($target eq 'EXEDOLIWAMP')
{ {
$NEWDESTI=$DESTI; $NEWDESTI=$DESTI;
@ -1140,7 +1068,7 @@ if ($nboftargetok) {
$ret=`cat "$SOURCE/build/exe/doliwamp/doliwamp.iss" | sed -e 's/__FILENAMEEXEDOLIWAMP__/$FILENAMEEXEDOLIWAMP/g' > "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`; $ret=`cat "$SOURCE/build/exe/doliwamp/doliwamp.iss" | sed -e 's/__FILENAMEEXEDOLIWAMP__/$FILENAMEEXEDOLIWAMP/g' > "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`;
print "Compil exe $FILENAMEEXEDOLIWAMP.exe file from iss file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\"\n"; print "Compil exe $FILENAMEEXEDOLIWAMP.exe file from iss file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\"\n";
$cmd= "ISCC.exe \"Z:$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\""; $cmd= "wine ISCC.exe \"Z:$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\"";
print "$cmd\n"; print "$cmd\n";
$ret= `$cmd`; $ret= `$cmd`;
#print "$ret\n"; #print "$ret\n";

View File

@ -43,9 +43,9 @@ To generate a changelog of a maintenance version x.y.z, you can do "cd ~/git/dol
- Run makepack-dolibarr.pl to generate all packages. - Run makepack-dolibarr.pl to generate all packages.
- Check content of built packages. - Check content of built packages.
- Move build files into www.dolibarr.org web site
(/home/dolibarr/wwwroot/files/stable).
- Run makepack-dolibarr.pl again with option to publish files on
dolibarr foundation server (Dir /home/dolibarr/wwwroot/files/stable on www.dolibarr.org).
- Run makepack-dolibarr.pl again with option to publish files on - Run makepack-dolibarr.pl again with option to publish files on
sourceforge. This will also add official tag. sourceforge. This will also add official tag.
- Edit symbolic links in directory "/home/dolibarr/wwwroot/files/stable/xxx" - Edit symbolic links in directory "/home/dolibarr/wwwroot/files/stable/xxx"

View File

@ -30,7 +30,7 @@ return "Regis Houssin";
# script_dolibarr_versions() # script_dolibarr_versions()
sub script_dolibarr_versions sub script_dolibarr_versions
{ {
return ( "7.0.0", "6.0.5", "5.0.7" ); return ( "9.0.0", "8.0.3", "7.0.4", "6.0.8", "5.0.7" );
} }
sub script_dolibarr_release sub script_dolibarr_release
@ -263,15 +263,16 @@ if ($upgrade) {
local @params = ( [ "action", "upgrade" ], local @params = ( [ "action", "upgrade" ],
[ "versionfrom", $upgrade->{'version'} ], [ "versionfrom", $upgrade->{'version'} ],
[ "versionto", $ver ], [ "versionto", $ver ],
[ "installlock", "444" ],
); );
local $p = $ver >= 3.8 ? "step5" : "etape5"; local $p = $ver >= 3.8 ? "step5" : "etape5";
local $err = &call_dolibarr_wizard_page(\@params, $p, $d, $opts); local $err = &call_dolibarr_wizard_page(\@params, $p, $d, $opts);
return (-1, "Dolibarr wizard failed : $err") if ($err); return (-1, "Dolibarr wizard failed : $err") if ($err);
# Remove the installation directory. # Remove the installation directory. (deprecated)
local $dinstall = "$opts->{'dir'}/install"; # local $dinstall = "$opts->{'dir'}/install";
$dinstall =~ s/\/$//; # $dinstall =~ s/\/$//;
$out = &run_as_domain_user($d, "rm -rf ".quotemeta($dinstall)); # $out = &run_as_domain_user($d, "rm -rf ".quotemeta($dinstall));
} }
else { else {
@ -306,15 +307,18 @@ else {
[ "login", "admin" ], [ "login", "admin" ],
[ "pass", $dompass ], [ "pass", $dompass ],
[ "pass_verif", $dompass ], [ "pass_verif", $dompass ],
[ "installlock", "444" ],
); );
local $p = $ver >= 3.8 ? "step5" : "etape5"; local $p = $ver >= 3.8 ? "step5" : "etape5";
local $err = &call_dolibarr_wizard_page(\@params, $p, $d, $opts); local $err = &call_dolibarr_wizard_page(\@params, $p, $d, $opts);
return (-1, "Dolibarr wizard failed : $err") if ($err); return (-1, "Dolibarr wizard failed : $err") if ($err);
# Remove the installation directory and protect config file. # Remove the installation directory (deprecated)
local $dinstall = "$opts->{'dir'}/install"; # local $dinstall = "$opts->{'dir'}/install";
$dinstall =~ s/\/$//; # $dinstall =~ s/\/$//;
$out = &run_as_domain_user($d, "rm -rf ".quotemeta($dinstall)); # $out = &run_as_domain_user($d, "rm -rf ".quotemeta($dinstall));
# Protect config file
&set_permissions_as_domain_user($d, 0644, $cfile); &set_permissions_as_domain_user($d, 0644, $cfile);
&set_permissions_as_domain_user($d, 0755, $cfiledir); &set_permissions_as_domain_user($d, 0755, $cfiledir);
} }
@ -386,6 +390,8 @@ sub script_dolibarr_check_latest
{ {
local ($ver) = @_; local ($ver) = @_;
local @vers = &osdn_package_versions("dolibarr", local @vers = &osdn_package_versions("dolibarr",
$ver >= 9.0 ? "dolibarr\\-(9\\.0\\.[0-9\\.]+)\\.tgz" :
$ver >= 8.0 ? "dolibarr\\-(8\\.0\\.[0-9\\.]+)\\.tgz" :
$ver >= 7.0 ? "dolibarr\\-(7\\.0\\.[0-9\\.]+)\\.tgz" : $ver >= 7.0 ? "dolibarr\\-(7\\.0\\.[0-9\\.]+)\\.tgz" :
$ver >= 6.0 ? "dolibarr\\-(6\\.0\\.[0-9\\.]+)\\.tgz" : $ver >= 6.0 ? "dolibarr\\-(6\\.0\\.[0-9\\.]+)\\.tgz" :
$ver >= 5.0 ? "dolibarr\\-(5\\.0\\.[0-9\\.]+)\\.tgz" : $ver >= 5.0 ? "dolibarr\\-(5\\.0\\.[0-9\\.]+)\\.tgz" :

View File

@ -0,0 +1,14 @@
<?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', '/');
// Load the main.inc.php file to have finctions llx_Header and llx_Footer defined
if (! defined("NOLOGIN")) define("NOLOGIN", '1');
global $conf, $langs, $user, $db;
include_once __DIR__ . '/../../htdocs/main.inc.php';

View File

@ -165,6 +165,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/barcode %_datadir/dolibarr/htdocs/barcode
%_datadir/dolibarr/htdocs/blockedlog %_datadir/dolibarr/htdocs/blockedlog
%_datadir/dolibarr/htdocs/bookmarks %_datadir/dolibarr/htdocs/bookmarks
%_datadir/dolibarr/htdocs/bom
%_datadir/dolibarr/htdocs/cashdesk %_datadir/dolibarr/htdocs/cashdesk
%_datadir/dolibarr/htdocs/categories %_datadir/dolibarr/htdocs/categories
%_datadir/dolibarr/htdocs/collab %_datadir/dolibarr/htdocs/collab
@ -177,9 +178,12 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/core %_datadir/dolibarr/htdocs/core
%_datadir/dolibarr/htdocs/cron %_datadir/dolibarr/htdocs/cron
%_datadir/dolibarr/htdocs/custom %_datadir/dolibarr/htdocs/custom
%_datadir/dolibarr/htdocs/datapolicy
%_datadir/dolibarr/htdocs/dav %_datadir/dolibarr/htdocs/dav
%_datadir/dolibarr/htdocs/debugbar
%_datadir/dolibarr/htdocs/don %_datadir/dolibarr/htdocs/don
%_datadir/dolibarr/htdocs/ecm %_datadir/dolibarr/htdocs/ecm
%_datadir/dolibarr/htdocs/emailcollector
%_datadir/dolibarr/htdocs/expedition %_datadir/dolibarr/htdocs/expedition
%_datadir/dolibarr/htdocs/expensereport %_datadir/dolibarr/htdocs/expensereport
%_datadir/dolibarr/htdocs/exports %_datadir/dolibarr/htdocs/exports
@ -198,6 +202,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/mailmanspip %_datadir/dolibarr/htdocs/mailmanspip
%_datadir/dolibarr/htdocs/margin %_datadir/dolibarr/htdocs/margin
%_datadir/dolibarr/htdocs/modulebuilder %_datadir/dolibarr/htdocs/modulebuilder
%_datadir/dolibarr/htdocs/mrp
%_datadir/dolibarr/htdocs/multicurrency %_datadir/dolibarr/htdocs/multicurrency
%_datadir/dolibarr/htdocs/opensurvey %_datadir/dolibarr/htdocs/opensurvey
%_datadir/dolibarr/htdocs/paybox %_datadir/dolibarr/htdocs/paybox
@ -206,12 +211,15 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/product %_datadir/dolibarr/htdocs/product
%_datadir/dolibarr/htdocs/projet %_datadir/dolibarr/htdocs/projet
%_datadir/dolibarr/htdocs/public %_datadir/dolibarr/htdocs/public
%_datadir/dolibarr/htdocs/reception
%_datadir/dolibarr/htdocs/resource %_datadir/dolibarr/htdocs/resource
%_datadir/dolibarr/htdocs/societe %_datadir/dolibarr/htdocs/societe
%_datadir/dolibarr/htdocs/stripe %_datadir/dolibarr/htdocs/stripe
%_datadir/dolibarr/htdocs/supplier_proposal %_datadir/dolibarr/htdocs/supplier_proposal
%_datadir/dolibarr/htdocs/support %_datadir/dolibarr/htdocs/support
%_datadir/dolibarr/htdocs/theme %_datadir/dolibarr/htdocs/theme
%_datadir/dolibarr/htdocs/takepos
%_datadir/dolibarr/htdocs/ticket
%_datadir/dolibarr/htdocs/user %_datadir/dolibarr/htdocs/user
%_datadir/dolibarr/htdocs/variants %_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webservices %_datadir/dolibarr/htdocs/webservices

View File

@ -54,7 +54,7 @@ BuildRequires: desktop-file-utils
Group: Applications/Productivity Group: Applications/Productivity
Requires: apache-base, apache-mod_php, php-cgi, php-cli, php-bz2, php-gd, php-ldap, php-imap, php-mysqli, php-openssl, fonts-ttf-dejavu Requires: apache-base, apache-mod_php, php-cgi, php-cli, php-bz2, php-gd, php-ldap, php-imap, php-mysqli, php-openssl, fonts-ttf-dejavu
Requires: mysql, mysql-client Requires: mysql, mysql-client
%else %else%_datadir/dolibarr/htdocs/datapolicy
%if 0%{?suse_version} %if 0%{?suse_version}
# Voir http://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros # Voir http://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros
Group: Productivity/Office/Management Group: Productivity/Office/Management
@ -124,7 +124,7 @@ cui hai bisogno ed essere facile da usare.
%if 0%{?sles_version} %if 0%{?sles_version}
%{__rm} -rf $RPM_BUILD_ROOT %{__rm} -rf $RPM_BUILD_ROOT
%{__mkdir} $RPM_BUILD_ROOT %{__mkdir} $RPM_BUILD_ROOT%_datadir/dolibarr/htdocs/datapolicy
%{__mkdir} $RPM_BUILD_ROOT%{_sysconfdir} %{__mkdir} $RPM_BUILD_ROOT%{_sysconfdir}
%{__mkdir} $RPM_BUILD_ROOT%{_sysconfdir}/%{name} %{__mkdir} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
%else %else
@ -245,6 +245,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/barcode %_datadir/dolibarr/htdocs/barcode
%_datadir/dolibarr/htdocs/blockedlog %_datadir/dolibarr/htdocs/blockedlog
%_datadir/dolibarr/htdocs/bookmarks %_datadir/dolibarr/htdocs/bookmarks
%_datadir/dolibarr/htdocs/bom
%_datadir/dolibarr/htdocs/cashdesk %_datadir/dolibarr/htdocs/cashdesk
%_datadir/dolibarr/htdocs/categories %_datadir/dolibarr/htdocs/categories
%_datadir/dolibarr/htdocs/collab %_datadir/dolibarr/htdocs/collab
@ -257,9 +258,12 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/core %_datadir/dolibarr/htdocs/core
%_datadir/dolibarr/htdocs/cron %_datadir/dolibarr/htdocs/cron
%_datadir/dolibarr/htdocs/custom %_datadir/dolibarr/htdocs/custom
%_datadir/dolibarr/htdocs/datapolicy
%_datadir/dolibarr/htdocs/dav %_datadir/dolibarr/htdocs/dav
%_datadir/dolibarr/htdocs/debugbar
%_datadir/dolibarr/htdocs/don %_datadir/dolibarr/htdocs/don
%_datadir/dolibarr/htdocs/ecm %_datadir/dolibarr/htdocs/ecm
%_datadir/dolibarr/htdocs/emailcollector
%_datadir/dolibarr/htdocs/expedition %_datadir/dolibarr/htdocs/expedition
%_datadir/dolibarr/htdocs/expensereport %_datadir/dolibarr/htdocs/expensereport
%_datadir/dolibarr/htdocs/exports %_datadir/dolibarr/htdocs/exports
@ -278,6 +282,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/mailmanspip %_datadir/dolibarr/htdocs/mailmanspip
%_datadir/dolibarr/htdocs/margin %_datadir/dolibarr/htdocs/margin
%_datadir/dolibarr/htdocs/modulebuilder %_datadir/dolibarr/htdocs/modulebuilder
%_datadir/dolibarr/htdocs/mrp
%_datadir/dolibarr/htdocs/multicurrency %_datadir/dolibarr/htdocs/multicurrency
%_datadir/dolibarr/htdocs/opensurvey %_datadir/dolibarr/htdocs/opensurvey
%_datadir/dolibarr/htdocs/paybox %_datadir/dolibarr/htdocs/paybox
@ -286,12 +291,15 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/product %_datadir/dolibarr/htdocs/product
%_datadir/dolibarr/htdocs/projet %_datadir/dolibarr/htdocs/projet
%_datadir/dolibarr/htdocs/public %_datadir/dolibarr/htdocs/public
%_datadir/dolibarr/htdocs/reception
%_datadir/dolibarr/htdocs/resource %_datadir/dolibarr/htdocs/resource
%_datadir/dolibarr/htdocs/societe %_datadir/dolibarr/htdocs/societe
%_datadir/dolibarr/htdocs/stripe %_datadir/dolibarr/htdocs/stripe
%_datadir/dolibarr/htdocs/supplier_proposal %_datadir/dolibarr/htdocs/supplier_proposal
%_datadir/dolibarr/htdocs/support %_datadir/dolibarr/htdocs/support
%_datadir/dolibarr/htdocs/theme %_datadir/dolibarr/htdocs/theme
%_datadir/dolibarr/htdocs/takepos
%_datadir/dolibarr/htdocs/ticket
%_datadir/dolibarr/htdocs/user %_datadir/dolibarr/htdocs/user
%_datadir/dolibarr/htdocs/variants %_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webservices %_datadir/dolibarr/htdocs/webservices

View File

@ -162,6 +162,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/barcode %_datadir/dolibarr/htdocs/barcode
%_datadir/dolibarr/htdocs/blockedlog %_datadir/dolibarr/htdocs/blockedlog
%_datadir/dolibarr/htdocs/bookmarks %_datadir/dolibarr/htdocs/bookmarks
%_datadir/dolibarr/htdocs/bom
%_datadir/dolibarr/htdocs/cashdesk %_datadir/dolibarr/htdocs/cashdesk
%_datadir/dolibarr/htdocs/categories %_datadir/dolibarr/htdocs/categories
%_datadir/dolibarr/htdocs/collab %_datadir/dolibarr/htdocs/collab
@ -174,9 +175,12 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/core %_datadir/dolibarr/htdocs/core
%_datadir/dolibarr/htdocs/cron %_datadir/dolibarr/htdocs/cron
%_datadir/dolibarr/htdocs/custom %_datadir/dolibarr/htdocs/custom
%_datadir/dolibarr/htdocs/datapolicy
%_datadir/dolibarr/htdocs/dav %_datadir/dolibarr/htdocs/dav
%_datadir/dolibarr/htdocs/debugbar
%_datadir/dolibarr/htdocs/don %_datadir/dolibarr/htdocs/don
%_datadir/dolibarr/htdocs/ecm %_datadir/dolibarr/htdocs/ecm
%_datadir/dolibarr/htdocs/emailcollector
%_datadir/dolibarr/htdocs/expedition %_datadir/dolibarr/htdocs/expedition
%_datadir/dolibarr/htdocs/expensereport %_datadir/dolibarr/htdocs/expensereport
%_datadir/dolibarr/htdocs/exports %_datadir/dolibarr/htdocs/exports
@ -195,6 +199,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/mailmanspip %_datadir/dolibarr/htdocs/mailmanspip
%_datadir/dolibarr/htdocs/margin %_datadir/dolibarr/htdocs/margin
%_datadir/dolibarr/htdocs/modulebuilder %_datadir/dolibarr/htdocs/modulebuilder
%_datadir/dolibarr/htdocs/mrp
%_datadir/dolibarr/htdocs/multicurrency %_datadir/dolibarr/htdocs/multicurrency
%_datadir/dolibarr/htdocs/opensurvey %_datadir/dolibarr/htdocs/opensurvey
%_datadir/dolibarr/htdocs/paybox %_datadir/dolibarr/htdocs/paybox
@ -203,12 +208,15 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/product %_datadir/dolibarr/htdocs/product
%_datadir/dolibarr/htdocs/projet %_datadir/dolibarr/htdocs/projet
%_datadir/dolibarr/htdocs/public %_datadir/dolibarr/htdocs/public
%_datadir/dolibarr/htdocs/reception
%_datadir/dolibarr/htdocs/resource %_datadir/dolibarr/htdocs/resource
%_datadir/dolibarr/htdocs/societe %_datadir/dolibarr/htdocs/societe
%_datadir/dolibarr/htdocs/stripe %_datadir/dolibarr/htdocs/stripe
%_datadir/dolibarr/htdocs/supplier_proposal %_datadir/dolibarr/htdocs/supplier_proposal
%_datadir/dolibarr/htdocs/support %_datadir/dolibarr/htdocs/support
%_datadir/dolibarr/htdocs/theme %_datadir/dolibarr/htdocs/theme
%_datadir/dolibarr/htdocs/takepos
%_datadir/dolibarr/htdocs/ticket
%_datadir/dolibarr/htdocs/user %_datadir/dolibarr/htdocs/user
%_datadir/dolibarr/htdocs/variants %_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webservices %_datadir/dolibarr/htdocs/webservices

View File

@ -173,6 +173,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/barcode %_datadir/dolibarr/htdocs/barcode
%_datadir/dolibarr/htdocs/blockedlog %_datadir/dolibarr/htdocs/blockedlog
%_datadir/dolibarr/htdocs/bookmarks %_datadir/dolibarr/htdocs/bookmarks
%_datadir/dolibarr/htdocs/bom
%_datadir/dolibarr/htdocs/cashdesk %_datadir/dolibarr/htdocs/cashdesk
%_datadir/dolibarr/htdocs/categories %_datadir/dolibarr/htdocs/categories
%_datadir/dolibarr/htdocs/collab %_datadir/dolibarr/htdocs/collab
@ -185,9 +186,12 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/core %_datadir/dolibarr/htdocs/core
%_datadir/dolibarr/htdocs/cron %_datadir/dolibarr/htdocs/cron
%_datadir/dolibarr/htdocs/custom %_datadir/dolibarr/htdocs/custom
%_datadir/dolibarr/htdocs/datapolicy
%_datadir/dolibarr/htdocs/dav %_datadir/dolibarr/htdocs/dav
%_datadir/dolibarr/htdocs/debugbar
%_datadir/dolibarr/htdocs/don %_datadir/dolibarr/htdocs/don
%_datadir/dolibarr/htdocs/ecm %_datadir/dolibarr/htdocs/ecm
%_datadir/dolibarr/htdocs/emailcollector
%_datadir/dolibarr/htdocs/expedition %_datadir/dolibarr/htdocs/expedition
%_datadir/dolibarr/htdocs/expensereport %_datadir/dolibarr/htdocs/expensereport
%_datadir/dolibarr/htdocs/exports %_datadir/dolibarr/htdocs/exports
@ -206,6 +210,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/mailmanspip %_datadir/dolibarr/htdocs/mailmanspip
%_datadir/dolibarr/htdocs/margin %_datadir/dolibarr/htdocs/margin
%_datadir/dolibarr/htdocs/modulebuilder %_datadir/dolibarr/htdocs/modulebuilder
%_datadir/dolibarr/htdocs/mrp
%_datadir/dolibarr/htdocs/multicurrency %_datadir/dolibarr/htdocs/multicurrency
%_datadir/dolibarr/htdocs/opensurvey %_datadir/dolibarr/htdocs/opensurvey
%_datadir/dolibarr/htdocs/paybox %_datadir/dolibarr/htdocs/paybox
@ -214,12 +219,15 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/product %_datadir/dolibarr/htdocs/product
%_datadir/dolibarr/htdocs/projet %_datadir/dolibarr/htdocs/projet
%_datadir/dolibarr/htdocs/public %_datadir/dolibarr/htdocs/public
%_datadir/dolibarr/htdocs/reception
%_datadir/dolibarr/htdocs/resource %_datadir/dolibarr/htdocs/resource
%_datadir/dolibarr/htdocs/societe %_datadir/dolibarr/htdocs/societe
%_datadir/dolibarr/htdocs/stripe %_datadir/dolibarr/htdocs/stripe
%_datadir/dolibarr/htdocs/supplier_proposal %_datadir/dolibarr/htdocs/supplier_proposal
%_datadir/dolibarr/htdocs/support %_datadir/dolibarr/htdocs/support
%_datadir/dolibarr/htdocs/theme %_datadir/dolibarr/htdocs/theme
%_datadir/dolibarr/htdocs/takepos
%_datadir/dolibarr/htdocs/ticket
%_datadir/dolibarr/htdocs/user %_datadir/dolibarr/htdocs/user
%_datadir/dolibarr/htdocs/variants %_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webservices %_datadir/dolibarr/htdocs/webservices

View File

@ -1,5 +1,6 @@
<VirtualHost *:80> <VirtualHost *:80>
DocumentRoot %TRAVIS_BUILD_DIR%/htdocs DocumentRoot %TRAVIS_BUILD_DIR%/htdocs
ErrorLog /var/log/apache2/travis_error_log
<Directory "%TRAVIS_BUILD_DIR%/htdocs/"> <Directory "%TRAVIS_BUILD_DIR%/htdocs/">
Options FollowSymLinks MultiViews ExecCGI Options FollowSymLinks MultiViews ExecCGI

View File

@ -1,8 +1,8 @@
{ {
"name": "dolibarr/dolibarr", "name" : "dolibarr/dolibarr",
"type": "project", "type" : "project",
"description": "Dolibarr ERP & CRM is a modern and easy to use web software to manage your business", "description" : "Dolibarr ERP & CRM is a modern and easy to use web software to manage your business",
"keywords": [ "keywords" : [
"erp", "erp",
"crm", "crm",
"invoice", "invoice",
@ -12,49 +12,51 @@
"stock", "stock",
"agenda" "agenda"
], ],
"homepage": "https://www.dolibarr.org", "homepage" : "https://www.dolibarr.org",
"license": "GPL-3.0-or-later", "license" : "GPL-3.0-or-later",
"support": { "support" : {
"issues": "https://github.com/Dolibarr/dolibarr/issues", "issues" : "https://github.com/Dolibarr/dolibarr/issues",
"forum": "https://www.dolibarr.org/forum", "forum" : "https://www.dolibarr.org/forum",
"wiki": "https://wiki.dolibarr.org", "wiki" : "https://wiki.dolibarr.org",
"source": "https://github.com/Dolibarr/dolibarr" "source" : "https://github.com/Dolibarr/dolibarr"
}, },
"config": { "config" : {
"vendor-dir": "htdocs/includes" "vendor-dir" : "htdocs/includes"
}, },
"require": { "require" : {
"php": ">=5.3.0", "php" : ">=5.3.0",
"ext-curl": "*", "ext-curl" : "*",
"ccampbell/chromephp": "4.1.0", "ccampbell/chromephp" : "4.1.0",
"ckeditor/ckeditor": "4.5.9", "ckeditor/ckeditor" : "4.6.2",
"mike42/escpos-php": "1.2.1", "mike42/escpos-php" : "1.2.1",
"mobiledetect/mobiledetectlib": "2.8.17", "mobiledetect/mobiledetectlib" : "2.8.17",
"phpoffice/phpexcel": "1.8.1", "phpoffice/phpexcel" : "1.8.1",
"restler/framework": "3.0.0-RC6", "restler/framework" : "3.0.0-RC6",
"tecnickcom/tcpdf": "6.2.12" "tecnickcom/tcpdf" : "^6.2",
"atgp/factur-x" : "^1.0",
"luracast/restler": "^3.0"
}, },
"require-dev": { "require-dev" : {
"jakub-onderka/php-parallel-lint": "^0", "jakub-onderka/php-parallel-lint" : "^0",
"jakub-onderka/php-console-highlighter": "^0", "jakub-onderka/php-console-highlighter" : "^0",
"phpunit/phpunit": "^4", "phpunit/phpunit" : "^4",
"squizlabs/php_codesniffer": "^2", "squizlabs/php_codesniffer" : "^2",
"phpunit/phpunit-selenium": "^2" "phpunit/phpunit-selenium" : "^2"
}, },
"suggest": { "suggest" : {
"ext-mysqlnd": "To use with MySQL or MariaDB", "ext-mysqlnd" : "To use with MySQL or MariaDB",
"ext-mysqli": "To use with MySQL or MariaDB", "ext-mysqli" : "To use with MySQL or MariaDB",
"ext-pgsql": "To use with PostgreSQL", "ext-pgsql" : "To use with PostgreSQL",
"ext-mssql": "To use with MSSQL (experimental)", "ext-mssql" : "To use with MSSQL (experimental)",
"ext-pdo_sqlite": "To use with SQLite (experimental)", "ext-pdo_sqlite" : "To use with SQLite (experimental)",
"ext-gd": "Image manipulation (Required but maybe built-in PHP)", "ext-gd" : "Image manipulation (Required but maybe built-in PHP)",
"ext-imagick": "Image manipulation (TCPDF)", "ext-imagick" : "Image manipulation (TCPDF)",
"ext-mcrypt": "(Required but maybe built-in PHP)", "ext-mcrypt" : "(Required but maybe built-in PHP)",
"ext-openssl": "Secure connections (Emails, SOAP…)", "ext-openssl" : "Secure connections (Emails, SOAP\u2026)",
"ext-mbstring": "Handle non UTF-8 databases", "ext-mbstring" : "Handle non UTF-8 databases",
"ext-soap": "Native SOAP", "ext-soap" : "Native SOAP",
"ext-zip": "ODT and Excel support", "ext-zip" : "ODT and Excel support",
"ext-xml": "Excel support", "ext-xml" : "Excel support",
"firephp/firephp-core": "Logging to Firebug console support" "firephp/firephp-core" : "Logging to Firebug console support"
} }
} }

341
composer.lock generated
View File

@ -4,9 +4,59 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"hash": "c586663818e933f26657871d86d01dc6", "content-hash": "949d55d933c4e0725a2086a189595483",
"content-hash": "09e891bb978d35a48902a5f57760aee9",
"packages": [ "packages": [
{
"name": "atgp/factur-x",
"version": "v1.0.1",
"source": {
"type": "git",
"url": "https://github.com/atgp/factur-x.git",
"reference": "22e22c3b5dfbb0f25afbd7c3fe69a0305199414c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/atgp/factur-x/zipball/22e22c3b5dfbb0f25afbd7c3fe69a0305199414c",
"reference": "22e22c3b5dfbb0f25afbd7c3fe69a0305199414c",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-fileinfo": "*",
"ext-libxml": "*",
"ext-simplexml": "*",
"ext-zlib": "*",
"php": ">=5.6",
"setasign/fpdi-fpdf": "^2.0",
"smalot/pdfparser": "^0.13.2"
},
"type": "library",
"autoload": {
"psr-4": {
"Atgp\\FacturX\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Lucas Gouy-Pailler",
"email": "lucas.gouypailler@atgp.net"
}
],
"description": "PHP library to manage your Factur-X / ZUGFeRD 2.0 PDF invoices files",
"keywords": [
"ZUGFeRD",
"factur-x",
"invoice",
"pdf",
"php",
"xml"
],
"time": "2019-01-16T10:09:35+00:00"
},
{ {
"name": "ccampbell/chromephp", "name": "ccampbell/chromephp",
"version": "4.1.0", "version": "4.1.0",
@ -48,20 +98,20 @@
"log", "log",
"logging" "logging"
], ],
"time": "2013-06-26 03:44:33" "time": "2013-06-26T03:44:33+00:00"
}, },
{ {
"name": "ckeditor/ckeditor", "name": "ckeditor/ckeditor",
"version": "4.5.11", "version": "4.6.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/ckeditor/ckeditor-releases.git", "url": "https://github.com/ckeditor/ckeditor-releases.git",
"reference": "48155a1e1c7e84736b5a166ad3f33acea2a51255" "reference": "268078ab43195b6004d64bc8764c41f2f829640e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/ckeditor/ckeditor-releases/zipball/48155a1e1c7e84736b5a166ad3f33acea2a51255", "url": "https://api.github.com/repos/ckeditor/ckeditor-releases/zipball/268078ab43195b6004d64bc8764c41f2f829640e",
"reference": "48155a1e1c7e84736b5a166ad3f33acea2a51255", "reference": "268078ab43195b6004d64bc8764c41f2f829640e",
"shasum": "" "shasum": ""
}, },
"type": "library", "type": "library",
@ -89,7 +139,7 @@
"text", "text",
"wysiwyg" "wysiwyg"
], ],
"time": "2016-09-07 13:32:39" "time": "2017-01-12T17:36:48+00:00"
}, },
{ {
"name": "mike42/escpos-php", "name": "mike42/escpos-php",
@ -153,7 +203,7 @@
"print", "print",
"receipt" "receipt"
], ],
"time": "2016-04-25 01:14:07" "time": "2016-04-25T01:14:07+00:00"
}, },
{ {
"name": "mobiledetect/mobiledetectlib", "name": "mobiledetect/mobiledetectlib",
@ -207,7 +257,7 @@
"mobile detector", "mobile detector",
"php mobile detect" "php mobile detect"
], ],
"time": "2015-09-17 14:45:21" "time": "2015-09-17T14:45:21+00:00"
}, },
{ {
"name": "phpoffice/phpexcel", "name": "phpoffice/phpexcel",
@ -264,7 +314,8 @@
"xls", "xls",
"xlsx" "xlsx"
], ],
"time": "2015-05-01 07:00:55" "abandoned": "phpoffice/phpspreadsheet",
"time": "2015-05-01T07:00:55+00:00"
}, },
{ {
"name": "restler/framework", "name": "restler/framework",
@ -273,12 +324,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/Luracast/Restler-Framework.git", "url": "https://github.com/Luracast/Restler-Framework.git",
"reference": "3388d76e73a81f871ce5baa906271071b12cd17f" "reference": "6bc0968f8c8aa47c9a62d548b9d7e34f1ed4fc09"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/Luracast/Restler-Framework/zipball/3388d76e73a81f871ce5baa906271071b12cd17f", "url": "https://api.github.com/repos/Luracast/Restler-Framework/zipball/6bc0968f8c8aa47c9a62d548b9d7e34f1ed4fc09",
"reference": "3388d76e73a81f871ce5baa906271071b12cd17f", "reference": "6bc0968f8c8aa47c9a62d548b9d7e34f1ed4fc09",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -325,20 +376,209 @@
"rest", "rest",
"server" "server"
], ],
"time": "2016-06-21 12:42:18" "time": "2018-01-06T01:39:27+00:00"
}, },
{ {
"name": "tecnickcom/tcpdf", "name": "setasign/fpdf",
"version": "6.2.12", "version": "1.8.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/tecnickcom/TCPDF.git", "url": "https://github.com/Setasign/FPDF.git",
"reference": "2f732eaa91b5665274689b1d40b285a7bacdc37f" "reference": "2c68c9e6c034ac3187d25968790139a73184cdb1"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/2f732eaa91b5665274689b1d40b285a7bacdc37f", "url": "https://api.github.com/repos/Setasign/FPDF/zipball/2c68c9e6c034ac3187d25968790139a73184cdb1",
"reference": "2f732eaa91b5665274689b1d40b285a7bacdc37f", "reference": "2c68c9e6c034ac3187d25968790139a73184cdb1",
"shasum": ""
},
"type": "library",
"autoload": {
"classmap": [
"fpdf.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"no usage restriction"
],
"authors": [
{
"name": "Olivier Plathey",
"email": "oliver@fpdf.org",
"homepage": "http://fpdf.org/"
}
],
"description": "FPDF is a PHP class which allows to generate PDF files with pure PHP. F from FPDF stands for Free: you may use it for any kind of usage and modify it to suit your needs.",
"homepage": "http://www.fpdf.org",
"keywords": [
"fpdf",
"pdf"
],
"time": "2016-01-01T17:47:15+00:00"
},
{
"name": "setasign/fpdi",
"version": "v2.2.0",
"source": {
"type": "git",
"url": "https://github.com/Setasign/FPDI.git",
"reference": "3c266002f8044f61b17329f7cd702d44d73f0f7f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Setasign/FPDI/zipball/3c266002f8044f61b17329f7cd702d44d73f0f7f",
"reference": "3c266002f8044f61b17329f7cd702d44d73f0f7f",
"shasum": ""
},
"require": {
"ext-zlib": "*",
"php": "^5.6 || ^7.0"
},
"require-dev": {
"phpunit/phpunit": "~5.7",
"setasign/fpdf": "~1.8",
"setasign/tfpdf": "1.25",
"tecnickcom/tcpdf": "~6.2"
},
"suggest": {
"setasign/fpdf": "FPDI will extend this class but as it is also possible to use TCPDF or tFPDF as an alternative. There's no fixed dependency configured.",
"setasign/fpdi-fpdf": "Use this package to automatically evaluate dependencies to FPDF.",
"setasign/fpdi-tcpdf": "Use this package to automatically evaluate dependencies to TCPDF.",
"setasign/fpdi-tfpdf": "Use this package to automatically evaluate dependencies to tFPDF."
},
"type": "library",
"autoload": {
"psr-4": {
"setasign\\Fpdi\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jan Slabon",
"email": "jan.slabon@setasign.com",
"homepage": "https://www.setasign.com"
},
{
"name": "Maximilian Kresse",
"email": "maximilian.kresse@setasign.com",
"homepage": "https://www.setasign.com"
}
],
"description": "FPDI is a collection of PHP classes facilitating developers to read pages from existing PDF documents and use them as templates in FPDF. Because it is also possible to use FPDI with TCPDF, there are no fixed dependencies defined. Please see suggestions for packages which evaluates the dependencies automatically.",
"homepage": "https://www.setasign.com/fpdi",
"keywords": [
"fpdf",
"fpdi",
"pdf"
],
"time": "2019-01-30T14:11:19+00:00"
},
{
"name": "setasign/fpdi-fpdf",
"version": "v2.2.0",
"source": {
"type": "git",
"url": "https://github.com/Setasign/FPDI-FPDF.git",
"reference": "e4363ac09e1b766b38ebea1c3cbe82b3480a11e9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Setasign/FPDI-FPDF/zipball/e4363ac09e1b766b38ebea1c3cbe82b3480a11e9",
"reference": "e4363ac09e1b766b38ebea1c3cbe82b3480a11e9",
"shasum": ""
},
"require": {
"setasign/fpdf": "^1.8",
"setasign/fpdi": "^2.2"
},
"type": "library",
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jan Slabon",
"email": "jan.slabon@setasign.com",
"homepage": "https://www.setasign.com"
}
],
"description": "Kind of metadata package for dependencies of the latest versions of FPDI and FPDF.",
"homepage": "https://www.setasign.com/fpdi",
"keywords": [
"fpdf",
"fpdi",
"pdf"
],
"time": "2019-01-30T14:38:19+00:00"
},
{
"name": "smalot/pdfparser",
"version": "v0.13.3",
"source": {
"type": "git",
"url": "https://github.com/smalot/pdfparser.git",
"reference": "c3a050fb9b47ec3a0ce1b6f1b6f48ec822ba04d6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/smalot/pdfparser/zipball/c3a050fb9b47ec3a0ce1b6f1b6f48ec822ba04d6",
"reference": "c3a050fb9b47ec3a0ce1b6f1b6f48ec822ba04d6",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"ext-zlib": "*",
"php": ">=5.3.0",
"tecnickcom/tcpdf": "~6.0"
},
"require-dev": {
"atoum/atoum": "^2.8 | ^3.0"
},
"type": "library",
"autoload": {
"psr-0": {
"Smalot\\PdfParser\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL-3.0"
],
"authors": [
{
"name": "Sebastien MALOT",
"email": "sebastien@malot.fr"
}
],
"description": "Pdf parser library. Can read and extract information from pdf file.",
"homepage": "http://www.pdfparser.org",
"keywords": [
"extract",
"parse",
"parser",
"pdf",
"text"
],
"time": "2019-01-11T08:49:57+00:00"
},
{
"name": "tecnickcom/tcpdf",
"version": "6.2.26",
"source": {
"type": "git",
"url": "https://github.com/tecnickcom/TCPDF.git",
"reference": "367241059ca166e3a76490f4448c284e0a161f15"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/367241059ca166e3a76490f4448c284e0a161f15",
"reference": "367241059ca166e3a76490f4448c284e0a161f15",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -347,7 +587,6 @@
"type": "library", "type": "library",
"autoload": { "autoload": {
"classmap": [ "classmap": [
"fonts",
"config", "config",
"include", "include",
"tcpdf.php", "tcpdf.php",
@ -368,13 +607,13 @@
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
"license": [ "license": [
"LGPLv3" "LGPL-3.0"
], ],
"authors": [ "authors": [
{ {
"name": "Nicola Asuni", "name": "Nicola Asuni",
"email": "info@tecnick.com", "email": "info@tecnick.com",
"homepage": "http://nicolaasuni.tecnick.com" "role": "lead"
} }
], ],
"description": "TCPDF is a PHP class for generating PDF documents and barcodes.", "description": "TCPDF is a PHP class for generating PDF documents and barcodes.",
@ -388,7 +627,7 @@
"pdf417", "pdf417",
"qrcode" "qrcode"
], ],
"time": "2015-09-12 10:08:34" "time": "2018-10-16T17:24:05+00:00"
} }
], ],
"packages-dev": [ "packages-dev": [
@ -444,7 +683,7 @@
"constructor", "constructor",
"instantiate" "instantiate"
], ],
"time": "2015-06-14 21:17:01" "time": "2015-06-14T21:17:01+00:00"
}, },
{ {
"name": "jakub-onderka/php-console-color", "name": "jakub-onderka/php-console-color",
@ -487,7 +726,7 @@
"homepage": "http://www.acci.cz" "homepage": "http://www.acci.cz"
} }
], ],
"time": "2014-04-08 15:00:19" "time": "2014-04-08T15:00:19+00:00"
}, },
{ {
"name": "jakub-onderka/php-console-highlighter", "name": "jakub-onderka/php-console-highlighter",
@ -531,7 +770,7 @@
"homepage": "http://www.acci.cz/" "homepage": "http://www.acci.cz/"
} }
], ],
"time": "2015-04-20 18:58:01" "time": "2015-04-20T18:58:01+00:00"
}, },
{ {
"name": "jakub-onderka/php-parallel-lint", "name": "jakub-onderka/php-parallel-lint",
@ -578,7 +817,7 @@
], ],
"description": "This tool check syntax of PHP files about 20x faster than serial check.", "description": "This tool check syntax of PHP files about 20x faster than serial check.",
"homepage": "https://github.com/JakubOnderka/PHP-Parallel-Lint", "homepage": "https://github.com/JakubOnderka/PHP-Parallel-Lint",
"time": "2015-12-15 10:42:16" "time": "2015-12-15T10:42:16+00:00"
}, },
{ {
"name": "phpdocumentor/reflection-common", "name": "phpdocumentor/reflection-common",
@ -632,7 +871,7 @@
"reflection", "reflection",
"static analysis" "static analysis"
], ],
"time": "2015-12-27 11:43:31" "time": "2015-12-27T11:43:31+00:00"
}, },
{ {
"name": "phpdocumentor/reflection-docblock", "name": "phpdocumentor/reflection-docblock",
@ -677,7 +916,7 @@
} }
], ],
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
"time": "2016-09-30 07:12:33" "time": "2016-09-30T07:12:33+00:00"
}, },
{ {
"name": "phpdocumentor/type-resolver", "name": "phpdocumentor/type-resolver",
@ -724,7 +963,7 @@
"email": "me@mikevanriel.com" "email": "me@mikevanriel.com"
} }
], ],
"time": "2016-06-10 07:14:17" "time": "2016-06-10T07:14:17+00:00"
}, },
{ {
"name": "phpspec/prophecy", "name": "phpspec/prophecy",
@ -786,7 +1025,7 @@
"spy", "spy",
"stub" "stub"
], ],
"time": "2016-06-07 08:13:47" "time": "2016-06-07T08:13:47+00:00"
}, },
{ {
"name": "phpunit/php-code-coverage", "name": "phpunit/php-code-coverage",
@ -848,7 +1087,7 @@
"testing", "testing",
"xunit" "xunit"
], ],
"time": "2015-10-06 15:47:00" "time": "2015-10-06T15:47:00+00:00"
}, },
{ {
"name": "phpunit/php-file-iterator", "name": "phpunit/php-file-iterator",
@ -895,7 +1134,7 @@
"filesystem", "filesystem",
"iterator" "iterator"
], ],
"time": "2015-06-21 13:08:43" "time": "2015-06-21T13:08:43+00:00"
}, },
{ {
"name": "phpunit/php-text-template", "name": "phpunit/php-text-template",
@ -936,7 +1175,7 @@
"keywords": [ "keywords": [
"template" "template"
], ],
"time": "2015-06-21 13:50:34" "time": "2015-06-21T13:50:34+00:00"
}, },
{ {
"name": "phpunit/php-timer", "name": "phpunit/php-timer",
@ -980,7 +1219,7 @@
"keywords": [ "keywords": [
"timer" "timer"
], ],
"time": "2016-05-12 18:03:57" "time": "2016-05-12T18:03:57+00:00"
}, },
{ {
"name": "phpunit/php-token-stream", "name": "phpunit/php-token-stream",
@ -1029,7 +1268,7 @@
"keywords": [ "keywords": [
"tokenizer" "tokenizer"
], ],
"time": "2015-09-15 10:49:45" "time": "2015-09-15T10:49:45+00:00"
}, },
{ {
"name": "phpunit/phpunit", "name": "phpunit/phpunit",
@ -1101,7 +1340,7 @@
"testing", "testing",
"xunit" "xunit"
], ],
"time": "2016-07-21 06:48:14" "time": "2016-07-21T06:48:14+00:00"
}, },
{ {
"name": "phpunit/phpunit-mock-objects", "name": "phpunit/phpunit-mock-objects",
@ -1157,7 +1396,7 @@
"mock", "mock",
"xunit" "xunit"
], ],
"time": "2015-10-02 06:51:40" "time": "2015-10-02T06:51:40+00:00"
}, },
{ {
"name": "phpunit/phpunit-selenium", "name": "phpunit/phpunit-selenium",
@ -1221,7 +1460,7 @@
"testing", "testing",
"xunit" "xunit"
], ],
"time": "2016-03-01 10:33:56" "time": "2016-03-01T10:33:56+00:00"
}, },
{ {
"name": "sebastian/comparator", "name": "sebastian/comparator",
@ -1285,7 +1524,7 @@
"compare", "compare",
"equality" "equality"
], ],
"time": "2015-07-26 15:48:44" "time": "2015-07-26T15:48:44+00:00"
}, },
{ {
"name": "sebastian/diff", "name": "sebastian/diff",
@ -1337,7 +1576,7 @@
"keywords": [ "keywords": [
"diff" "diff"
], ],
"time": "2015-12-08 07:14:41" "time": "2015-12-08T07:14:41+00:00"
}, },
{ {
"name": "sebastian/environment", "name": "sebastian/environment",
@ -1387,7 +1626,7 @@
"environment", "environment",
"hhvm" "hhvm"
], ],
"time": "2016-08-18 05:49:44" "time": "2016-08-18T05:49:44+00:00"
}, },
{ {
"name": "sebastian/exporter", "name": "sebastian/exporter",
@ -1454,7 +1693,7 @@
"export", "export",
"exporter" "exporter"
], ],
"time": "2016-06-17 09:04:28" "time": "2016-06-17T09:04:28+00:00"
}, },
{ {
"name": "sebastian/global-state", "name": "sebastian/global-state",
@ -1505,7 +1744,7 @@
"keywords": [ "keywords": [
"global state" "global state"
], ],
"time": "2015-10-12 03:26:01" "time": "2015-10-12T03:26:01+00:00"
}, },
{ {
"name": "sebastian/recursion-context", "name": "sebastian/recursion-context",
@ -1558,7 +1797,7 @@
], ],
"description": "Provides functionality to recursively process PHP variables", "description": "Provides functionality to recursively process PHP variables",
"homepage": "http://www.github.com/sebastianbergmann/recursion-context", "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
"time": "2015-11-11 19:50:13" "time": "2015-11-11T19:50:13+00:00"
}, },
{ {
"name": "sebastian/version", "name": "sebastian/version",
@ -1593,7 +1832,7 @@
], ],
"description": "Library that helps with managing the version number of Git-hosted PHP projects", "description": "Library that helps with managing the version number of Git-hosted PHP projects",
"homepage": "https://github.com/sebastianbergmann/version", "homepage": "https://github.com/sebastianbergmann/version",
"time": "2015-06-21 13:59:46" "time": "2015-06-21T13:59:46+00:00"
}, },
{ {
"name": "squizlabs/php_codesniffer", "name": "squizlabs/php_codesniffer",
@ -1671,7 +1910,7 @@
"phpcs", "phpcs",
"standards" "standards"
], ],
"time": "2016-09-01 23:53:02" "time": "2016-09-01T23:53:02+00:00"
}, },
{ {
"name": "symfony/yaml", "name": "symfony/yaml",
@ -1720,7 +1959,7 @@
], ],
"description": "Symfony Yaml Component", "description": "Symfony Yaml Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2016-10-24 18:41:13" "time": "2016-10-24T18:41:13+00:00"
}, },
{ {
"name": "webmozart/assert", "name": "webmozart/assert",
@ -1770,7 +2009,7 @@
"check", "check",
"validate" "validate"
], ],
"time": "2016-08-09 15:02:57" "time": "2016-08-09T15:02:57+00:00"
} }
], ],
"aliases": [], "aliases": [],

View File

@ -1,5 +1,5 @@
This file describe changes made on external library after beeing included This file describes changes made on external libraries after being included
in Dolibarr root. in Dolibarr root.
@ -8,6 +8,15 @@ ALL:
Check "@CHANGE" Check "@CHANGE"
PrestaShopWebservice:
---------------------
Replace
$params = array('filter', 'display', 'sort', 'limit', 'id_shop', 'id_group_shop');
With
$params = array('filter', 'display', 'sort', 'limit', 'id_shop', 'id_group_shop', 'date');
CKEDITOR (4.6.2): CKEDITOR (4.6.2):
----------------- -----------------
* In ckeditor/ckeditor/contents.css * In ckeditor/ckeditor/contents.css
@ -41,30 +50,6 @@ define('QR_FIND_FROM_RANDOM', false);
* Removed useless directories ("examples", "tools") * Removed useless directories ("examples", "tools")
* Fix
// initialize subsetchars
$subsetchars = array();
into
// initialize subsetchars
$subsetchars = array_fill(0, 256, true);
* Replace the continue into switch with a break:
case 're': {
// justify block
if (!TCPDF_STATIC::empty_string($this->lispacer)) {
$this->lispacer = '';
continue;
}
into
case 're': {
// justify block
if (!TCPDF_STATIC::empty_string($this->lispacer)) {
$this->lispacer = '';
break;
}
* Optionnaly, removed all fonts except * Optionnaly, removed all fonts except
dejavusans* (used by greek, arab, persan, romanian, turkish), dejavusans* (used by greek, arab, persan, romanian, turkish),
freemono* (russian), freemono* (russian),
@ -72,23 +57,30 @@ case 're': {
helvetica* (all other languages), helvetica* (all other languages),
zapfdingbats.php (for special chars like form checkboxes) zapfdingbats.php (for special chars like form checkboxes)
* Optionnaly, made freemono the default monotype font because we removed courier * Optionnaly, made freemono the default monotype font if we removed courier
In htdocs/includes/tcpdf/tcpdf.php In htdocs/includes/tcpdf/tcpdf.php
- protected $default_monospaced_font = 'courier'; - protected $default_monospaced_font = 'courier';
+ protected $default_monospaced_font = 'freemono'; + protected $default_monospaced_font = 'freemono';
TCPDI: TCPDI:
------ ------
Add fpdf_tpl.php 1.2 Add fpdf_tpl.php 1.2
Add tcpdi.php Add tcpdi.php
Add tcpdi_parser.php and replace: Add tcpdi_parser.php and replace:
require_once(dirname(__FILE__).'/include/tcpdf_filters.php'); require_once(dirname(__FILE__).'/include/tcpdf_filters.php');
with: with:
require_once(dirname(__FILE__).'/../tecnickcom/tcpdf/include/tcpdf_filters.php'); require_once(dirname(__FILE__).'/../tecnickcom/tcpdf/include/tcpdf_filters.php');
* Fix by replacing
} elseif (($key == '/Index') AND ($v[0] == PDF_TYPE_ARRAY AND count($v[1] >= 2))) {
with
} elseif (($key == '/Index') AND ($v[0] == PDF_TYPE_ARRAY AND count($v[1]) >= 2)) {
JSGANTT: JSGANTT:
@ -126,6 +118,13 @@ JQUERYFILETREE:
* Remove directory htdocs/includes/jquery/plugins/jqueryFileTree/connectors * Remove directory htdocs/includes/jquery/plugins/jqueryFileTree/connectors
PHPEXCEL:
---------
* Replace in htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/Shared/OLE.php
continue;
with:
continue 2;
RESTLER: RESTLER:
-------- --------
@ -142,7 +141,7 @@ to get
if ($className == 'Luracast\Restler\mixed') return; if ($className == 'Luracast\Restler\mixed') return;
... ...
Change also file Luracast/Restler/explorer/index.html Change also content of file htdocs/includes/restler/framework/Luracast/Restler/explorer/index.html
+With swagger 2: +With swagger 2:

View File

@ -48,8 +48,8 @@ $langs->load("main"); // To load language file for default language
@set_time_limit(0); @set_time_limit(0);
// Load user and its permissions // Load user and its permissions
$result=$user->fetch('','admin'); // Load user for login 'admin'. Comment line to run as anonymous user. $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; } if (! $result > 0) { dol_print_error('', $user->error); exit; }
$user->getrights(); $user->getrights();
@ -89,13 +89,13 @@ if ($idobject > 0)
else else
{ {
$error++; $error++;
dol_print_error($db,$obj->error); dol_print_error($db, $obj->error);
} }
} }
else else
{ {
$error++; $error++;
dol_print_error($db,$obj->error); dol_print_error($db, $obj->error);
} }

View File

@ -48,8 +48,8 @@ $langs->load("main"); // To load language file for default language
@set_time_limit(0); @set_time_limit(0);
// Load user and its permissions // Load user and its permissions
$result=$user->fetch('','admin'); // Load user for login 'admin'. Comment line to run as anonymous user. $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; } if (! $result > 0) { dol_print_error('', $user->error); exit; }
$user->getrights(); $user->getrights();
@ -87,13 +87,13 @@ if ($idobject > 0)
else else
{ {
$error++; $error++;
dol_print_error($db,$com->error); dol_print_error($db, $com->error);
} }
} }
else else
{ {
$error++; $error++;
dol_print_error($db,$com->error); dol_print_error($db, $com->error);
} }

View File

@ -48,8 +48,8 @@ $langs->load("main"); // To load language file for default language
@set_time_limit(0); @set_time_limit(0);
// Load user and its permissions // Load user and its permissions
$result=$user->fetch('','admin'); // Load user for login 'admin'. Comment line to run as anonymous user. $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; } if (! $result > 0) { dol_print_error('', $user->error); exit; }
$user->getrights(); $user->getrights();
@ -86,7 +86,7 @@ if ($idobject > 0)
else else
{ {
$error++; $error++;
dol_print_error($db,$myproduct->error); dol_print_error($db, $myproduct->error);
} }
// -------------------- END OF YOUR CODE -------------------- // -------------------- END OF YOUR CODE --------------------

View File

@ -48,8 +48,8 @@ $langs->load("main"); // To load language file for default language
@set_time_limit(0); @set_time_limit(0);
// Load user and its permissions // Load user and its permissions
$result=$user->fetch('','admin'); // Load user for login 'admin'. Comment line to run as anonymous user. $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; } if (! $result > 0) { dol_print_error('', $user->error); exit; }
$user->getrights(); $user->getrights();
@ -77,17 +77,17 @@ if ($idobject > 0)
else else
{ {
$error++; $error++;
dol_print_error($db,$obj->error); dol_print_error($db, $obj->error);
} }
} }
else if ($obj->error == 'ErrorLoginAlreadyExists') elseif ($obj->error == 'ErrorLoginAlreadyExists')
{ {
print "User with login ".$obj->login." already exists\n"; print "User with login ".$obj->login." already exists\n";
} }
else else
{ {
$error++; $error++;
dol_print_error($db,$obj->error); dol_print_error($db, $obj->error);
} }

View File

@ -48,8 +48,8 @@ $langs->load("main"); // To load language file for default language
@set_time_limit(0); @set_time_limit(0);
// Load user and its permissions // Load user and its permissions
$result=$user->fetch('','admin'); // Load user for login 'admin'. Comment line to run as anonymous user. $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; } if (! $result > 0) { dol_print_error('', $user->error); exit; }
$user->getrights(); $user->getrights();

View File

@ -1,7 +1,7 @@
Example fo recurring event, 1 week, no end, exported by Google Example fo recurring event, 1 week, no end, exported by Google
# The recurring event were recorded every monday the 20150518. This is the Recurrence-id, but then # The recurring event were recorded every monday the 20150518. This is the Recurrence-id, but then
# first occurence was moved on tuesday. So this record were added. # first occurrence was moved on tuesday. So this record were added.
BEGIN:VEVENT BEGIN:VEVENT
DTSTART;TZID=Europe/Paris:20150519T100000 DTSTART;TZID=Europe/Paris:20150519T100000
DTEND;TZID=Europe/Paris:20150519T110000 DTEND;TZID=Europe/Paris:20150519T110000

View File

@ -1,5 +1,5 @@
README (English) README (English)
-------------------------------- --------------------------------
This directory contains example of well formated mail messages. This directory contains example of well formatted mail messages.
This is to help to build the CMailFile.class.php code. This is to help to build the CMailFile.class.php code.

View File

@ -4,4 +4,4 @@ X-Mailer: Dolibarr version 2.7.0-beta (using php mail)
MIME-Version: 1.0 MIME-Version: 1.0
Content-Type: text/html; charset=UTF-8 Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit Content-Transfer-Encoding: 8bit
<html><head><title></title></head><body>Test&eacute;<br />fdsfsdf<br />fsdf<strong>sfd</strong>s<br />fssdfsd<br /></body></html> <html><head><title></title></head><body>Test&eacute;<br>fdsfsdf<br>fsdf<strong>sfd</strong>s<br>fssdfsd<br></body></html>

View File

@ -43,59 +43,59 @@ require_once DOL_DOCUMENT_ROOT."/societe/class/societe.class.php";
define(GEN_NUMBER_FACTURE, 1); define(GEN_NUMBER_FACTURE, 1);
$year = 2016; $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, 1, 9, $year),
mktime(12,0,0,2,13,$year), mktime(12, 0, 0, 2, 13, $year),
mktime(12,0,0,2,23,$year), mktime(12, 0, 0, 2, 23, $year),
mktime(12,0,0,3,30,$year), mktime(12, 0, 0, 3, 30, $year),
mktime(12,0,0,4,3,$year), mktime(12, 0, 0, 4, 3, $year),
mktime(12,0,0,4,3,$year), mktime(12, 0, 0, 4, 3, $year),
mktime(12,0,0,5,9,$year), mktime(12, 0, 0, 5, 9, $year),
mktime(12,0,0,5,1,$year), mktime(12, 0, 0, 5, 1, $year),
mktime(12,0,0,5,13,$year), mktime(12, 0, 0, 5, 13, $year),
mktime(12,0,0,5,19,$year), mktime(12, 0, 0, 5, 19, $year),
mktime(12,0,0,5,23,$year), mktime(12, 0, 0, 5, 23, $year),
mktime(12,0,0,6,3,$year), mktime(12, 0, 0, 6, 3, $year),
mktime(12,0,0,6,19,$year), mktime(12, 0, 0, 6, 19, $year),
mktime(12,0,0,6,24,$year), mktime(12, 0, 0, 6, 24, $year),
mktime(12,0,0,7,3,$year), mktime(12, 0, 0, 7, 3, $year),
mktime(12,0,0,7,9,$year), mktime(12, 0, 0, 7, 9, $year),
mktime(12,0,0,7,23,$year), mktime(12, 0, 0, 7, 23, $year),
mktime(12,0,0,7,30,$year), mktime(12, 0, 0, 7, 30, $year),
mktime(12,0,0,8,9,$year), mktime(12, 0, 0, 8, 9, $year),
mktime(12,0,0,9,23,$year), mktime(12, 0, 0, 9, 23, $year),
mktime(12,0,0,10,3,$year), mktime(12, 0, 0, 10, 3, $year),
mktime(12,0,0,11,12,$year), mktime(12, 0, 0, 11, 12, $year),
mktime(12,0,0,11,13,$year), mktime(12, 0, 0, 11, 13, $year),
mktime(12,0,0,1,3,($year - 1)), mktime(12, 0, 0, 1, 3, ($year - 1)),
mktime(12,0,0,1,9,($year - 1)), mktime(12, 0, 0, 1, 9, ($year - 1)),
mktime(12,0,0,2,13,($year - 1)), mktime(12, 0, 0, 2, 13, ($year - 1)),
mktime(12,0,0,2,23,($year - 1)), mktime(12, 0, 0, 2, 23, ($year - 1)),
mktime(12,0,0,3,30,($year - 1)), mktime(12, 0, 0, 3, 30, ($year - 1)),
mktime(12,0,0,4,3,($year - 1)), mktime(12, 0, 0, 4, 3, ($year - 1)),
mktime(12,0,0,4,3,($year - 1)), mktime(12, 0, 0, 4, 3, ($year - 1)),
mktime(12,0,0,5,9,($year - 1)), mktime(12, 0, 0, 5, 9, ($year - 1)),
mktime(12,0,0,5,1,($year - 1)), mktime(12, 0, 0, 5, 1, ($year - 1)),
mktime(12,0,0,5,13,($year - 1)), mktime(12, 0, 0, 5, 13, ($year - 1)),
mktime(12,0,0,5,19,($year - 1)), mktime(12, 0, 0, 5, 19, ($year - 1)),
mktime(12,0,0,5,23,($year - 1)), mktime(12, 0, 0, 5, 23, ($year - 1)),
mktime(12,0,0,6,3,($year - 1)), mktime(12, 0, 0, 6, 3, ($year - 1)),
mktime(12,0,0,6,19,($year - 1)), mktime(12, 0, 0, 6, 19, ($year - 1)),
mktime(12,0,0,6,24,($year - 1)), mktime(12, 0, 0, 6, 24, ($year - 1)),
mktime(12,0,0,7,3,($year - 1)), mktime(12, 0, 0, 7, 3, ($year - 1)),
mktime(12,0,0,7,9,($year - 1)), mktime(12, 0, 0, 7, 9, ($year - 1)),
mktime(12,0,0,7,23,($year - 1)), mktime(12, 0, 0, 7, 23, ($year - 1)),
mktime(12,0,0,7,30,($year - 1)), mktime(12, 0, 0, 7, 30, ($year - 1)),
mktime(12,0,0,8,9,($year - 1)), mktime(12, 0, 0, 8, 9, ($year - 1)),
mktime(12,0,0,9,23,($year - 1)), mktime(12, 0, 0, 9, 23, ($year - 1)),
mktime(12,0,0,10,3,($year - 1)), mktime(12, 0, 0, 10, 3, ($year - 1)),
mktime(12,0,0,11,12,$year), mktime(12, 0, 0, 11, 12, $year),
mktime(12,0,0,11,13,$year), mktime(12, 0, 0, 11, 13, $year),
mktime(12,0,0,12,12,$year), mktime(12, 0, 0, 12, 12, $year),
mktime(12,0,0,12,13,$year), mktime(12, 0, 0, 12, 13, $year),
); );
$ret=$user->fetch('','admin'); $ret=$user->fetch('', 'admin');
if (! $ret > 0) if (! $ret > 0)
{ {
print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; print 'A user with login "admin" and all permissions must be created to use this script.'."\n";
@ -150,7 +150,7 @@ while ($i < GEN_NUMBER_FACTURE && $result >= 0)
$object->mode_reglement_id = 3; $object->mode_reglement_id = 3;
$fuser = new User($db); $fuser = new User($db);
$fuser->fetch(mt_rand(1,2)); $fuser->fetch(mt_rand(1, 2));
$fuser->getRights(); $fuser->getRights();
$result=$object->create($fuser); $result=$object->create($fuser);
@ -163,10 +163,10 @@ while ($i < GEN_NUMBER_FACTURE && $result >= 0)
$prodid = mt_rand(1, $num_prods); $prodid = mt_rand(1, $num_prods);
$product=new Product($db); $product=new Product($db);
$result=$product->fetch($prodids[$prodid]); $result=$product->fetch($prodids[$prodid]);
$result=$object->addline($product->description, $product->price, mt_rand(1,5), 0, 0, 0, $prodids[$prodid], 0, '', '', 0, 0, '', $product->price_base_type, $product->price_ttc, $product->type); $result=$object->addline($product->description, $product->price, mt_rand(1, 5), 0, 0, 0, $prodids[$prodid], 0, '', '', 0, 0, '', $product->price_base_type, $product->price_ttc, $product->type);
if ($result < 0) if ($result < 0)
{ {
dol_print_error($db,$propal->error); dol_print_error($db, $propal->error);
} }
$xnbp++; $xnbp++;
} }
@ -178,14 +178,11 @@ while ($i < GEN_NUMBER_FACTURE && $result >= 0)
} }
else else
{ {
dol_print_error($db,$object->error); dol_print_error($db, $object->error);
} }
} }
else else
{ {
dol_print_error($db,$object->error); dol_print_error($db, $object->error);
} }
} }

View File

@ -49,59 +49,59 @@ require_once DOL_DOCUMENT_ROOT."/commande/class/commande.class.php";
define(GEN_NUMBER_COMMANDE, 10); define(GEN_NUMBER_COMMANDE, 10);
$year = 2016; $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, 1, 9, $year),
mktime(12,0,0,2,13,$year), mktime(12, 0, 0, 2, 13, $year),
mktime(12,0,0,2,23,$year), mktime(12, 0, 0, 2, 23, $year),
mktime(12,0,0,3,30,$year), mktime(12, 0, 0, 3, 30, $year),
mktime(12,0,0,4,3,$year), mktime(12, 0, 0, 4, 3, $year),
mktime(12,0,0,4,3,$year), mktime(12, 0, 0, 4, 3, $year),
mktime(12,0,0,5,9,$year), mktime(12, 0, 0, 5, 9, $year),
mktime(12,0,0,5,1,$year), mktime(12, 0, 0, 5, 1, $year),
mktime(12,0,0,5,13,$year), mktime(12, 0, 0, 5, 13, $year),
mktime(12,0,0,5,19,$year), mktime(12, 0, 0, 5, 19, $year),
mktime(12,0,0,5,23,$year), mktime(12, 0, 0, 5, 23, $year),
mktime(12,0,0,6,3,$year), mktime(12, 0, 0, 6, 3, $year),
mktime(12,0,0,6,19,$year), mktime(12, 0, 0, 6, 19, $year),
mktime(12,0,0,6,24,$year), mktime(12, 0, 0, 6, 24, $year),
mktime(12,0,0,7,3,$year), mktime(12, 0, 0, 7, 3, $year),
mktime(12,0,0,7,9,$year), mktime(12, 0, 0, 7, 9, $year),
mktime(12,0,0,7,23,$year), mktime(12, 0, 0, 7, 23, $year),
mktime(12,0,0,7,30,$year), mktime(12, 0, 0, 7, 30, $year),
mktime(12,0,0,8,9,$year), mktime(12, 0, 0, 8, 9, $year),
mktime(12,0,0,9,23,$year), mktime(12, 0, 0, 9, 23, $year),
mktime(12,0,0,10,3,$year), mktime(12, 0, 0, 10, 3, $year),
mktime(12,0,0,11,12,$year), mktime(12, 0, 0, 11, 12, $year),
mktime(12,0,0,11,13,$year), mktime(12, 0, 0, 11, 13, $year),
mktime(12,0,0,1,3,($year - 1)), mktime(12, 0, 0, 1, 3, ($year - 1)),
mktime(12,0,0,1,9,($year - 1)), mktime(12, 0, 0, 1, 9, ($year - 1)),
mktime(12,0,0,2,13,($year - 1)), mktime(12, 0, 0, 2, 13, ($year - 1)),
mktime(12,0,0,2,23,($year - 1)), mktime(12, 0, 0, 2, 23, ($year - 1)),
mktime(12,0,0,3,30,($year - 1)), mktime(12, 0, 0, 3, 30, ($year - 1)),
mktime(12,0,0,4,3,($year - 1)), mktime(12, 0, 0, 4, 3, ($year - 1)),
mktime(12,0,0,4,3,($year - 1)), mktime(12, 0, 0, 4, 3, ($year - 1)),
mktime(12,0,0,5,9,($year - 1)), mktime(12, 0, 0, 5, 9, ($year - 1)),
mktime(12,0,0,5,1,($year - 1)), mktime(12, 0, 0, 5, 1, ($year - 1)),
mktime(12,0,0,5,13,($year - 1)), mktime(12, 0, 0, 5, 13, ($year - 1)),
mktime(12,0,0,5,19,($year - 1)), mktime(12, 0, 0, 5, 19, ($year - 1)),
mktime(12,0,0,5,23,($year - 1)), mktime(12, 0, 0, 5, 23, ($year - 1)),
mktime(12,0,0,6,3,($year - 1)), mktime(12, 0, 0, 6, 3, ($year - 1)),
mktime(12,0,0,6,19,($year - 1)), mktime(12, 0, 0, 6, 19, ($year - 1)),
mktime(12,0,0,6,24,($year - 1)), mktime(12, 0, 0, 6, 24, ($year - 1)),
mktime(12,0,0,7,3,($year - 1)), mktime(12, 0, 0, 7, 3, ($year - 1)),
mktime(12,0,0,7,9,($year - 1)), mktime(12, 0, 0, 7, 9, ($year - 1)),
mktime(12,0,0,7,23,($year - 1)), mktime(12, 0, 0, 7, 23, ($year - 1)),
mktime(12,0,0,7,30,($year - 1)), mktime(12, 0, 0, 7, 30, ($year - 1)),
mktime(12,0,0,8,9,($year - 1)), mktime(12, 0, 0, 8, 9, ($year - 1)),
mktime(12,0,0,9,23,($year - 1)), mktime(12, 0, 0, 9, 23, ($year - 1)),
mktime(12,0,0,10,3,($year - 1)), mktime(12, 0, 0, 10, 3, ($year - 1)),
mktime(12,0,0,11,12,$year), mktime(12, 0, 0, 11, 12, $year),
mktime(12,0,0,11,13,$year), mktime(12, 0, 0, 11, 13, $year),
mktime(12,0,0,12,12,$year), mktime(12, 0, 0, 12, 12, $year),
mktime(12,0,0,12,13,$year), mktime(12, 0, 0, 12, 13, $year),
); );
$ret=$user->fetch('','admin'); $ret=$user->fetch('', 'admin');
if ($ret <= 0) if ($ret <= 0)
{ {
print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; print 'A user with login "admin" and all permissions must be created to use this script.'."\n";
@ -140,12 +140,10 @@ else { print "err"; }
$prodids = array(); $prodids = array();
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product WHERE tosell=1"; $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product WHERE tosell=1";
$resql = $db->query($sql); $resql = $db->query($sql);
if ($resql) if ($resql) {
{
$num_prods = $db->num_rows($resql); $num_prods = $db->num_rows($resql);
$i = 0; $i = 0;
while ($i < $num_prods) while ($i < $num_prods) {
{
$i++; $i++;
$row = $db->fetch_row($resql); $row = $db->fetch_row($resql);
@ -155,7 +153,6 @@ if ($resql)
print "Build ".GEN_NUMBER_COMMANDE." orders\n"; print "Build ".GEN_NUMBER_COMMANDE." orders\n";
for ($s = 0 ; $s < GEN_NUMBER_COMMANDE ; $s++) for ($s = 0 ; $s < GEN_NUMBER_COMMANDE ; $s++)
{ {
@ -177,7 +174,7 @@ for ($s = 0 ; $s < GEN_NUMBER_COMMANDE ; $s++)
$listofuserid=array(12,13,16); $listofuserid=array(12,13,16);
$fuser = new User($db); $fuser = new User($db);
$fuser->fetch($listofuserid[mt_rand(0,2)]); $fuser->fetch($listofuserid[mt_rand(0, 2)]);
$fuser->getRights(); $fuser->getRights();
$db->begin(); $db->begin();
@ -192,10 +189,10 @@ for ($s = 0 ; $s < GEN_NUMBER_COMMANDE ; $s++)
$prodid = mt_rand(1, $num_prods); $prodid = mt_rand(1, $num_prods);
$product=new Product($db); $product=new Product($db);
$result=$product->fetch($prodids[$prodid]); $result=$product->fetch($prodids[$prodid]);
$result=$object->addline($product->description, $product->price, mt_rand(1,5), 0, 0, 0, $prodids[$prodid], 0, 0, 0, $product->price_base_type, $product->price_ttc, '', '', $product->type); $result=$object->addline($product->description, $product->price, mt_rand(1, 5), 0, 0, 0, $prodids[$prodid], 0, 0, 0, $product->price_base_type, $product->price_ttc, '', '', $product->type);
if ($result <= 0) if ($result <= 0)
{ {
dol_print_error($db,$object->error); dol_print_error($db, $object->error);
} }
$xnbp++; $xnbp++;
} }
@ -210,14 +207,13 @@ for ($s = 0 ; $s < GEN_NUMBER_COMMANDE ; $s++)
{ {
print " KO\n"; print " KO\n";
$db->rollback(); $db->rollback();
dol_print_error($db,$object->error); dol_print_error($db, $object->error);
} }
} }
else else
{ {
print " KO\n"; print " KO\n";
$db->rollback(); $db->rollback();
dol_print_error($db,$object->error); dol_print_error($db, $object->error);
} }
} }

View File

@ -49,7 +49,7 @@ include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
define(GEN_NUMBER_PRODUIT, 100000); define(GEN_NUMBER_PRODUIT, 100000);
$ret=$user->fetch('','admin'); $ret=$user->fetch('', 'admin');
if (! $ret > 0) if (! $ret > 0)
{ {
print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; print 'A user with login "admin" and all permissions must be created to use this script.'."\n";
@ -85,16 +85,14 @@ for ($s = 0 ; $s < GEN_NUMBER_PRODUIT ; $s++)
{ {
print "Product ".$s; print "Product ".$s;
$produit = new Product($db); $produit = new Product($db);
$produit->type = mt_rand(0,1); $produit->type = mt_rand(0, 1);
$produit->status = 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->label = 'Label '.time().$s;
$produit->description = 'Description '.time().$s; $produit->description = 'Description '.time().$s;
$produit->price = mt_rand(1,1000); $produit->price = mt_rand(1, 1000);
$produit->tva_tx = "19.6"; $produit->tva_tx = "19.6";
$ret=$produit->create($user); $ret=$produit->create($user);
if ($ret < 0) print "Error $ret - ".$produit->error."\n"; if ($ret < 0) print "Error $ret - ".$produit->error."\n";
else print " OK with ref ".$produit->ref."\n"; else print " OK with ref ".$produit->ref."\n";
} }

View File

@ -45,59 +45,59 @@ require_once DOL_DOCUMENT_ROOT."/societe/class/societe.class.php";
define(GEN_NUMBER_PROPAL, 10); define(GEN_NUMBER_PROPAL, 10);
$year = 2016; $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, 1, 9, $year),
mktime(12,0,0,2,13,$year), mktime(12, 0, 0, 2, 13, $year),
mktime(12,0,0,2,23,$year), mktime(12, 0, 0, 2, 23, $year),
mktime(12,0,0,3,30,$year), mktime(12, 0, 0, 3, 30, $year),
mktime(12,0,0,4,3,$year), mktime(12, 0, 0, 4, 3, $year),
mktime(12,0,0,4,3,$year), mktime(12, 0, 0, 4, 3, $year),
mktime(12,0,0,5,9,$year), mktime(12, 0, 0, 5, 9, $year),
mktime(12,0,0,5,1,$year), mktime(12, 0, 0, 5, 1, $year),
mktime(12,0,0,5,13,$year), mktime(12, 0, 0, 5, 13, $year),
mktime(12,0,0,5,19,$year), mktime(12, 0, 0, 5, 19, $year),
mktime(12,0,0,5,23,$year), mktime(12, 0, 0, 5, 23, $year),
mktime(12,0,0,6,3,$year), mktime(12, 0, 0, 6, 3, $year),
mktime(12,0,0,6,19,$year), mktime(12, 0, 0, 6, 19, $year),
mktime(12,0,0,6,24,$year), mktime(12, 0, 0, 6, 24, $year),
mktime(12,0,0,7,3,$year), mktime(12, 0, 0, 7, 3, $year),
mktime(12,0,0,7,9,$year), mktime(12, 0, 0, 7, 9, $year),
mktime(12,0,0,7,23,$year), mktime(12, 0, 0, 7, 23, $year),
mktime(12,0,0,7,30,$year), mktime(12, 0, 0, 7, 30, $year),
mktime(12,0,0,8,9,$year), mktime(12, 0, 0, 8, 9, $year),
mktime(12,0,0,9,23,$year), mktime(12, 0, 0, 9, 23, $year),
mktime(12,0,0,10,3,$year), mktime(12, 0, 0, 10, 3, $year),
mktime(12,0,0,11,12,$year), mktime(12, 0, 0, 11, 12, $year),
mktime(12,0,0,11,13,$year), mktime(12, 0, 0, 11, 13, $year),
mktime(12,0,0,1,3,($year - 1)), mktime(12, 0, 0, 1, 3, ($year - 1)),
mktime(12,0,0,1,9,($year - 1)), mktime(12, 0, 0, 1, 9, ($year - 1)),
mktime(12,0,0,2,13,($year - 1)), mktime(12, 0, 0, 2, 13, ($year - 1)),
mktime(12,0,0,2,23,($year - 1)), mktime(12, 0, 0, 2, 23, ($year - 1)),
mktime(12,0,0,3,30,($year - 1)), mktime(12, 0, 0, 3, 30, ($year - 1)),
mktime(12,0,0,4,3,($year - 1)), mktime(12, 0, 0, 4, 3, ($year - 1)),
mktime(12,0,0,4,3,($year - 1)), mktime(12, 0, 0, 4, 3, ($year - 1)),
mktime(12,0,0,5,9,($year - 1)), mktime(12, 0, 0, 5, 9, ($year - 1)),
mktime(12,0,0,5,1,($year - 1)), mktime(12, 0, 0, 5, 1, ($year - 1)),
mktime(12,0,0,5,13,($year - 1)), mktime(12, 0, 0, 5, 13, ($year - 1)),
mktime(12,0,0,5,19,($year - 1)), mktime(12, 0, 0, 5, 19, ($year - 1)),
mktime(12,0,0,5,23,($year - 1)), mktime(12, 0, 0, 5, 23, ($year - 1)),
mktime(12,0,0,6,3,($year - 1)), mktime(12, 0, 0, 6, 3, ($year - 1)),
mktime(12,0,0,6,19,($year - 1)), mktime(12, 0, 0, 6, 19, ($year - 1)),
mktime(12,0,0,6,24,($year - 1)), mktime(12, 0, 0, 6, 24, ($year - 1)),
mktime(12,0,0,7,3,($year - 1)), mktime(12, 0, 0, 7, 3, ($year - 1)),
mktime(12,0,0,7,9,($year - 1)), mktime(12, 0, 0, 7, 9, ($year - 1)),
mktime(12,0,0,7,23,($year - 1)), mktime(12, 0, 0, 7, 23, ($year - 1)),
mktime(12,0,0,7,30,($year - 1)), mktime(12, 0, 0, 7, 30, ($year - 1)),
mktime(12,0,0,8,9,($year - 1)), mktime(12, 0, 0, 8, 9, ($year - 1)),
mktime(12,0,0,9,23,($year - 1)), mktime(12, 0, 0, 9, 23, ($year - 1)),
mktime(12,0,0,10,3,($year - 1)), mktime(12, 0, 0, 10, 3, ($year - 1)),
mktime(12,0,0,11,12,$year), mktime(12, 0, 0, 11, 12, $year),
mktime(12,0,0,11,13,$year), mktime(12, 0, 0, 11, 13, $year),
mktime(12,0,0,12,12,$year), mktime(12, 0, 0, 12, 12, $year),
mktime(12,0,0,12,13,$year), mktime(12, 0, 0, 12, 13, $year),
); );
$ret=$user->fetch('','admin'); $ret=$user->fetch('', 'admin');
if (! $ret > 0) if (! $ret > 0)
{ {
print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; print 'A user with login "admin" and all permissions must be created to use this script.'."\n";
@ -174,7 +174,7 @@ while ($i < GEN_NUMBER_PROPAL && $result >= 0)
$object = new Propal($db); $object = new Propal($db);
$fuser = new User($db); $fuser = new User($db);
$fuser->fetch(mt_rand(1,2)); $fuser->fetch(mt_rand(1, 2));
$fuser->getRights(); $fuser->getRights();
$object->contactid = $contids[$socids[$socid]][0]; $object->contactid = $contids[$socids[$socid]][0];
@ -193,10 +193,10 @@ while ($i < GEN_NUMBER_PROPAL && $result >= 0)
$prodid = mt_rand(1, $num_prods); $prodid = mt_rand(1, $num_prods);
$product=new Product($db); $product=new Product($db);
$result=$product->fetch($prodids[$prodid]); $result=$product->fetch($prodids[$prodid]);
$result=$object->addline($product->description, $product->price, mt_rand(1,5), 0, 0, 0, $prodids[$prodid], 0); $result=$object->addline($product->description, $product->price, mt_rand(1, 5), 0, 0, 0, $prodids[$prodid], 0);
if ($result < 0) if ($result < 0)
{ {
dol_print_error($db,$object->error); dol_print_error($db, $object->error);
} }
$xnbp++; $xnbp++;
} }
@ -211,13 +211,11 @@ while ($i < GEN_NUMBER_PROPAL && $result >= 0)
{ {
print " KO\n"; print " KO\n";
$db->rollback(); $db->rollback();
dol_print_error($db,$object->error); dol_print_error($db, $object->error);
} }
} }
else else
{ {
dol_print_error($db,$object->error); dol_print_error($db, $object->error);
} }
} }

View File

@ -52,7 +52,7 @@ $listoflastname = array("Joe","Marc","Steve","Laurent","Nico","Isabelle","Doroth
define(GEN_NUMBER_SOCIETE, 10); define(GEN_NUMBER_SOCIETE, 10);
$ret=$user->fetch('','admin'); $ret=$user->fetch('', 'admin');
if (! $ret > 0) if (! $ret > 0)
{ {
print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; print 'A user with login "admin" and all permissions must be created to use this script.'."\n";
@ -91,22 +91,22 @@ for ($s = 0 ; $s < GEN_NUMBER_SOCIETE ; $s++)
$soc = new Societe($db); $soc = new Societe($db);
$soc->name = "Company num ".time()."$s"; $soc->name = "Company num ".time()."$s";
$soc->town = $listoftown[mt_rand(0, count($listoftown)-1)]; $soc->town = $listoftown[mt_rand(0, count($listoftown)-1)];
$soc->client = mt_rand(1,2); // Une societe sur 2 est prospect, l'autre client $soc->client = mt_rand(1, 2); // Une societe sur 2 est prospect, l'autre client
$soc->fournisseur = mt_rand(0,1); // Une societe sur 2 est fournisseur $soc->fournisseur = mt_rand(0, 1); // Une societe sur 2 est fournisseur
$soc->code_client='CU'.time()."$s"; $soc->code_client='CU'.time()."$s";
$soc->code_fournisseur='SU'.time()."$s"; $soc->code_fournisseur='SU'.time()."$s";
$soc->tva_assuj=1; $soc->tva_assuj=1;
$soc->country_id=1; $soc->country_id=1;
$soc->country_code='FR'; $soc->country_code='FR';
// Un client sur 3 a une remise de 5% // Un client sur 3 a une remise de 5%
$user_remise=mt_rand(1,3); if ($user_remise==3) $soc->remise_percent=5; $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"; print "> client=".$soc->client.", fournisseur=".$soc->fournisseur.", remise=".$soc->remise_percent."\n";
$soc->note_private = 'Company created by the script generate-societe.php'; $soc->note_private = 'Company created by the script generate-societe.php';
$socid = $soc->create(); $socid = $soc->create();
if ($socid >= 0) if ($socid >= 0)
{ {
$rand = mt_rand(1,4); $rand = mt_rand(1, 4);
print "> Generates $rand contact(s)\n"; print "> Generates $rand contact(s)\n";
for ($c = 0 ; $c < $rand ; $c++) for ($c = 0 ; $c < $rand ; $c++)
{ {
@ -127,5 +127,3 @@ for ($s = 0 ; $s < GEN_NUMBER_SOCIETE ; $s++)
print "Error: ".$soc->error."\n"; print "Error: ".$soc->error."\n";
} }
} }

View File

@ -35,7 +35,7 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
} }
// Recupere root dolibarr // Recupere root dolibarr
$path=preg_replace('/import-products.php/i','',$_SERVER["PHP_SELF"]); $path=preg_replace('/import-products.php/i', '', $_SERVER["PHP_SELF"]);
require $path."../../htdocs/master.inc.php"; require $path."../../htdocs/master.inc.php";
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
@ -57,7 +57,7 @@ $error=0;
@set_time_limit(0); @set_time_limit(0);
print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n"; print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n";
dol_syslog($script_file." launched with arg ".implode(',',$argv)); dol_syslog($script_file." launched with arg ".implode(',', $argv));
$mode = $argv[1]; $mode = $argv[1];
$filepath = $argv[2]; $filepath = $argv[2];
@ -66,7 +66,7 @@ $defaultlang = empty($argv[3])?'en_US':$argv[3];
$startlinenb = empty($argv[4])?1:$argv[4]; $startlinenb = empty($argv[4])?1:$argv[4];
$endlinenb = empty($argv[5])?0:$argv[5]; $endlinenb = empty($argv[5])?0:$argv[5];
if (empty($mode) || ! in_array($mode,array('test','confirm','confirmforced')) || empty($filepath)) { 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"; print "Usage: $script_file (test|confirm|confirmforced) filepath.csv [defaultlang] [startlinenb] [endlinenb]\n";
print "Usage: $script_file test myfilepath.csv fr_FR 2 1002\n"; print "Usage: $script_file test myfilepath.csv fr_FR 2 1002\n";
print "\n"; print "\n";
@ -78,7 +78,7 @@ if (! file_exists($filepath)) {
exit(-1); exit(-1);
} }
$ret=$user->fetch('','admin'); $ret=$user->fetch('', 'admin');
if (! $ret > 0) if (! $ret > 0)
{ {
print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; print 'A user with login "admin" and all permissions must be created to use this script.'."\n";
@ -93,7 +93,7 @@ if (! $confirmed)
$input = trim(fgets(STDIN)); $input = trim(fgets(STDIN));
} }
// Open input and ouput files // Open input and output files
$fhandle = fopen($filepath, 'r'); $fhandle = fopen($filepath, 'r');
if (! $fhandle) if (! $fhandle)
{ {

View File

@ -35,7 +35,7 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
} }
// Recupere root dolibarr // Recupere root dolibarr
$path=preg_replace('/import-thirdparties.php/i','',$_SERVER["PHP_SELF"]); $path=preg_replace('/import-thirdparties.php/i', '', $_SERVER["PHP_SELF"]);
require $path."../../htdocs/master.inc.php"; require $path."../../htdocs/master.inc.php";
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
@ -57,7 +57,7 @@ $error=0;
@set_time_limit(0); @set_time_limit(0);
print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n"; print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n";
dol_syslog($script_file." launched with arg ".implode(',',$argv)); dol_syslog($script_file." launched with arg ".implode(',', $argv));
$mode = $argv[1]; $mode = $argv[1];
$filepath = $argv[2]; $filepath = $argv[2];
@ -66,7 +66,7 @@ $filepatherr = $filepath.'.err';
$startlinenb = empty($argv[3])?1:$argv[3]; $startlinenb = empty($argv[3])?1:$argv[3];
$endlinenb = empty($argv[4])?0:$argv[4]; $endlinenb = empty($argv[4])?0:$argv[4];
if (empty($mode) || ! in_array($mode,array('test','confirm','confirmforced')) || empty($filepath)) { if (empty($mode) || ! in_array($mode, array('test','confirm','confirmforced')) || empty($filepath)) {
print "Usage: $script_file (test|confirm|confirmforced) filepath.csv [startlinenb] [endlinenb]\n"; print "Usage: $script_file (test|confirm|confirmforced) filepath.csv [startlinenb] [endlinenb]\n";
print "Usage: $script_file test myfilepath.csv 2 1002\n"; print "Usage: $script_file test myfilepath.csv 2 1002\n";
print "\n"; print "\n";
@ -78,7 +78,7 @@ if (! file_exists($filepath)) {
exit(-1); exit(-1);
} }
$ret=$user->fetch('','admin'); $ret=$user->fetch('', 'admin');
if (! $ret > 0) if (! $ret > 0)
{ {
print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; print 'A user with login "admin" and all permissions must be created to use this script.'."\n";
@ -93,7 +93,7 @@ if (! $confirmed)
$input = trim(fgets(STDIN)); $input = trim(fgets(STDIN));
} }
// Open input and ouput files // Open input and output files
$fhandle = fopen($filepath, 'r'); $fhandle = fopen($filepath, 'r');
if (! $fhandle) if (! $fhandle)
{ {
@ -199,13 +199,13 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
{ {
$salesrep=new User($db); $salesrep=new User($db);
$tmp=explode(' ',$fields[3],2); $tmp=explode(' ', $fields[3], 2);
$salesrep->firstname = trim($tmp[0]); $salesrep->firstname = trim($tmp[0]);
$salesrep->lastname = trim($tmp[1]); $salesrep->lastname = trim($tmp[1]);
if ($salesrep->lastname) $salesrep->login = strtolower(substr($salesrep->firstname, 0, 1)) . strtolower(substr($salesrep->lastname, 0)); if ($salesrep->lastname) $salesrep->login = strtolower(substr($salesrep->firstname, 0, 1)) . strtolower(substr($salesrep->lastname, 0));
else $salesrep->login=strtolower($salesrep->firstname); else $salesrep->login=strtolower($salesrep->firstname);
$salesrep->login=preg_replace('/ /','',$salesrep->login); $salesrep->login=preg_replace('/ /', '', $salesrep->login);
$salesrep->fetch(0,$salesrep->login); $salesrep->fetch(0, $salesrep->login);
$result = $object->add_commercial($user, $salesrep->id); $result = $object->add_commercial($user, $salesrep->id);
if ($result < 0) if ($result < 0)

View File

@ -35,7 +35,7 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
} }
// Recupere root dolibarr // Recupere root dolibarr
$path=preg_replace('/import-users.php/i','',$_SERVER["PHP_SELF"]); $path=preg_replace('/import-users.php/i', '', $_SERVER["PHP_SELF"]);
require $path."../../htdocs/master.inc.php"; require $path."../../htdocs/master.inc.php";
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
@ -57,7 +57,7 @@ $error=0;
@set_time_limit(0); @set_time_limit(0);
print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n"; print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n";
dol_syslog($script_file." launched with arg ".implode(',',$argv)); dol_syslog($script_file." launched with arg ".implode(',', $argv));
$mode = $argv[1]; $mode = $argv[1];
$filepath = $argv[2]; $filepath = $argv[2];
@ -66,7 +66,7 @@ $filepatherr = $filepath.'.err';
$startlinenb = empty($argv[3])?1:$argv[3]; $startlinenb = empty($argv[3])?1:$argv[3];
$endlinenb = empty($argv[4])?0:$argv[4]; $endlinenb = empty($argv[4])?0:$argv[4];
if (empty($mode) || ! in_array($mode,array('test','confirm','confirmforced')) || empty($filepath)) { if (empty($mode) || ! in_array($mode, array('test','confirm','confirmforced')) || empty($filepath)) {
print "Usage: $script_file (test|confirm|confirmforced) filepath.csv [startlinenb] [endlinenb]\n"; print "Usage: $script_file (test|confirm|confirmforced) filepath.csv [startlinenb] [endlinenb]\n";
print "Usage: $script_file test myfilepath.csv 2 1002\n"; print "Usage: $script_file test myfilepath.csv 2 1002\n";
print "\n"; print "\n";
@ -78,7 +78,7 @@ if (! file_exists($filepath)) {
exit(-1); exit(-1);
} }
$ret=$user->fetch('','admin'); $ret=$user->fetch('', 'admin');
if (! $ret > 0) if (! $ret > 0)
{ {
print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; print 'A user with login "admin" and all permissions must be created to use this script.'."\n";
@ -93,7 +93,7 @@ if (! $confirmed)
$input = trim(fgets(STDIN)); $input = trim(fgets(STDIN));
} }
// Open input and ouput files // Open input and output files
$fhandle = fopen($filepath, 'r'); $fhandle = fopen($filepath, 'r');
if (! $fhandle) if (! $fhandle)
{ {
@ -127,12 +127,12 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
$object = new User($db); $object = new User($db);
$object->statut = 1; $object->statut = 1;
$tmp=explode(' ',$fields[3],2); $tmp=explode(' ', $fields[3], 2);
$object->firstname = trim($tmp[0]); $object->firstname = trim($tmp[0]);
$object->lastname = trim($tmp[1]); $object->lastname = trim($tmp[1]);
if ($object->lastname) $object->login = strtolower(substr($object->firstname, 0, 1)) . strtolower(substr($object->lastname, 0)); if ($object->lastname) $object->login = strtolower(substr($object->firstname, 0, 1)) . strtolower(substr($object->lastname, 0));
else $object->login=strtolower($object->firstname); else $object->login=strtolower($object->firstname);
$object->login=preg_replace('/ /','',$object->login); $object->login=preg_replace('/ /', '', $object->login);
$object->password = 'init'; $object->password = 'init';
print "Process line nb ".$i.", login ".$object->login; print "Process line nb ".$i.", login ".$object->login;

View File

@ -35,7 +35,7 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
} }
// Recupere root dolibarr // Recupere root dolibarr
$path=preg_replace('/purge-data.php/i','',$_SERVER["PHP_SELF"]); $path=preg_replace('/purge-data.php/i', '', $_SERVER["PHP_SELF"]);
require $path."../../htdocs/master.inc.php"; require $path."../../htdocs/master.inc.php";
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
@ -44,8 +44,7 @@ include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
include_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; include_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
$langs->load("main"); $langs->loadLangs(array("main", "errors"));
$langs->load("errors");
// Global variables // Global variables
$version=DOL_VERSION; $version=DOL_VERSION;
@ -54,133 +53,177 @@ $error=0;
// List of sql to execute // List of sql to execute
$sqls=array( $sqls=array(
'user'=>array( 'user'=>array(
'DELETE FROM '.MAIN_DB_PREFIX."user_rights WHERE fk_user IN (SELECT rowid FROM ".MAIN_DB_PREFIX."user WHERE admin = 0 and login != 'admin')", "DELETE FROM ".MAIN_DB_PREFIX."user_rights WHERE fk_user IN (SELECT rowid FROM ".MAIN_DB_PREFIX."user WHERE admin = 0 and login != 'admin') AND fk_user IN (select rowid FROM ".MAIN_DB_PREFIX."user where datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX."user WHERE admin = 0 and login != 'admin'", "DELETE FROM ".MAIN_DB_PREFIX."user WHERE admin = 0 and login != 'admin' AND datec < '__DATE__'",
),
'event'=>array(
//"DELETE FROM ".MAIN_DB_PREFIX."actioncomm WHERE lineid IN (SELECT rowid FROM ".MAIN_DB_PREFIX."bank WHERE datec < '__DATE__')",
"DELETE FROM ".MAIN_DB_PREFIX."actioncomm WHERE datec < '__DATE__'",
),
'payment'=>array(
"DELETE FROM ".MAIN_DB_PREFIX."paiement_facture where fk_facture IN (select rowid FROM ".MAIN_DB_PREFIX."facture where datec < '__DATE__')",
"DELETE FROM ".MAIN_DB_PREFIX."paiement where rowid NOT IN (SELECT fk_paiement FROM ".MAIN_DB_PREFIX."paiement_facture)",
), ),
'bank'=>array( 'bank'=>array(
'DELETE FROM '.MAIN_DB_PREFIX.'bank_account', "DELETE FROM ".MAIN_DB_PREFIX."bank_class WHERE lineid IN (SELECT rowid FROM ".MAIN_DB_PREFIX."bank WHERE datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'bank_class', "DELETE FROM ".MAIN_DB_PREFIX."bank_url WHERE fk_bank IN (SELECT rowid FROM ".MAIN_DB_PREFIX."bank WHERE datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'bank_url', "DELETE FROM ".MAIN_DB_PREFIX."bank WHERE datec < '__DATE__'",
'DELETE FROM '.MAIN_DB_PREFIX.'bank',
), ),
'contract'=>array( 'bankaccount'=>array(
'DELETE FROM '.MAIN_DB_PREFIX.'contratdet', "DELETE FROM ".MAIN_DB_PREFIX."bank_account WHERE datec < '__DATE__'",
'DELETE FROM '.MAIN_DB_PREFIX.'contrat',
), ),
'invoice'=>array( 'invoice'=>array(
'DELETE FROM '.MAIN_DB_PREFIX.'paiement_facture', '@payment',
'DELETE FROM '.MAIN_DB_PREFIX.'facture_rec', "DELETE FROM ".MAIN_DB_PREFIX."societe_remise_except where fk_facture_source IN (select rowid FROM ".MAIN_DB_PREFIX."facture where datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'facturedet', "DELETE FROM ".MAIN_DB_PREFIX."societe_remise_except where fk_facture IN (select rowid FROM ".MAIN_DB_PREFIX."facture where datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'facture WHERE fk_facture_source IS NOT NULL', "DELETE FROM ".MAIN_DB_PREFIX."societe_remise_except where fk_facture_line IN (select rowid FROM ".MAIN_DB_PREFIX."facturedet as fd WHERE fd.fk_facture IN (select rowid from ".MAIN_DB_PREFIX."facture where datec < '__DATE__'))",
'DELETE FROM '.MAIN_DB_PREFIX.'facture', "DELETE FROM ".MAIN_DB_PREFIX."facture_rec where datec < '__DATE__'",
"DELETE FROM ".MAIN_DB_PREFIX."facturedet WHERE fk_facture IN (select rowid FROM ".MAIN_DB_PREFIX."facture where datec < '__DATE__')",
"UPDATE ".MAIN_DB_PREFIX."facture SET fk_facture_source = NULL WHERE fk_facture_source IN (select f2.rowid FROM (select * from ".MAIN_DB_PREFIX."facture) as f2 where f2.datec < '__DATE__')",
"DELETE FROM ".MAIN_DB_PREFIX."facture where datec < '__DATE__'",
),
'accounting'=>array(
"DELETE FROM ".MAIN_DB_PREFIX."accounting_bookkeeping where doc_date < '__DATE__'",
), ),
'proposal'=>array( 'proposal'=>array(
'DELETE FROM '.MAIN_DB_PREFIX.'propaldet', "DELETE FROM ".MAIN_DB_PREFIX."propaldet WHERE fk_propal IN (select rowid FROM ".MAIN_DB_PREFIX."propal where datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'propal', "DELETE FROM ".MAIN_DB_PREFIX."propal WHERE datec < '__DATE__'",
), ),
'supplier_proposal'=>array( "supplier_proposal"=>array(
'DELETE FROM '.MAIN_DB_PREFIX.'supplier_proposaldet', "DELETE FROM ".MAIN_DB_PREFIX."supplier_proposaldet WHERE fk_supplier_proposal IN (select rowid FROM ".MAIN_DB_PREFIX."propal where datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'supplier_proposal', "DELETE FROM ".MAIN_DB_PREFIX."supplier_proposal where datec < '__DATE__'",
),
'supplier_order'=>array(
'DELETE FROM '.MAIN_DB_PREFIX.'commande_fournisseurdet',
'DELETE FROM '.MAIN_DB_PREFIX.'commande_fournisseur',
),
'supplier_invoice'=>array(
'DELETE FROM '.MAIN_DB_PREFIX.'facture_fourn_det',
'DELETE FROM '.MAIN_DB_PREFIX.'facture_fourn',
),
'delivery'=>array(
'DELETE FROM '.MAIN_DB_PREFIX.'livraisondet',
'DELETE FROM '.MAIN_DB_PREFIX.'livraison',
),
'shipment'=>array(
'@delivery',
'DELETE FROM '.MAIN_DB_PREFIX.'expeditiondet_batch',
'DELETE FROM '.MAIN_DB_PREFIX.'expeditiondet_extrafields',
'DELETE FROM '.MAIN_DB_PREFIX.'expeditiondet',
'DELETE FROM '.MAIN_DB_PREFIX.'expedition_extrafields',
'DELETE FROM '.MAIN_DB_PREFIX.'expedition',
), ),
'order'=>array( 'order'=>array(
'@shipment', '@shipment',
'DELETE FROM '.MAIN_DB_PREFIX.'commandedet', "DELETE FROM ".MAIN_DB_PREFIX."commandedet WHERE fk_commande IN (select rowid FROM ".MAIN_DB_PREFIX."commande where date_creation < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'commande', "DELETE FROM ".MAIN_DB_PREFIX."commande where date_creation < '__DATE__'",
),
'supplier_order'=>array(
"DELETE FROM ".MAIN_DB_PREFIX."commande_fournisseurdet WHERE fk_commande IN (select rowid FROM ".MAIN_DB_PREFIX."commande_fournisseur where date_creation < '__DATE__')",
"DELETE FROM ".MAIN_DB_PREFIX."commande_fournisseur where date_creation < '__DATE__'",
),
'supplier_invoice'=>array(
"DELETE FROM ".MAIN_DB_PREFIX."facture_fourn_det WHERE fk_facture_fourn IN (select rowid FROM ".MAIN_DB_PREFIX."facture_fourn where datec < '__DATE__')",
"DELETE FROM ".MAIN_DB_PREFIX."facture_fourn where datec < '__DATE__'",
),
'shipment'=>array(
'@delivery',
"DELETE FROM ".MAIN_DB_PREFIX."expeditiondet_batch WHERE fk_expeditiondet IN (select rowid FROM ".MAIN_DB_PREFIX."expeditiondet WHERE fk_expedition IN (select rowid FROM ".MAIN_DB_PREFIX."expedition where date_creation < '__DATE__'))",
"DELETE FROM ".MAIN_DB_PREFIX."expeditiondet_extrafields WHERE fk_object IN (select rowid FROM ".MAIN_DB_PREFIX."expeditiondet WHERE fk_expedition IN (select rowid FROM ".MAIN_DB_PREFIX."expedition where date_creation < '__DATE__'))",
"DELETE FROM ".MAIN_DB_PREFIX."expeditiondet WHERE fk_expedition IN (select rowid FROM ".MAIN_DB_PREFIX."expedition where date_creation < '__DATE__')",
"DELETE FROM ".MAIN_DB_PREFIX."expedition_extrafields WHERE fk_object IN (select rowid FROM ".MAIN_DB_PREFIX."expedition where date_creation < '__DATE__')",
"DELETE FROM ".MAIN_DB_PREFIX."expedition where date_creation < '__DATE__'",
),
'delivery'=>array(
"DELETE FROM ".MAIN_DB_PREFIX."livraisondet WHERE fk_livraison IN (select rowid FROM ".MAIN_DB_PREFIX."livraison where date_creation < '__DATE__')",
"DELETE FROM ".MAIN_DB_PREFIX."livraison where date_creation < '__DATE__'",
),
'contract'=>array(
"DELETE FROM ".MAIN_DB_PREFIX."contratdet_extrafields WHERE fk_object IN (select rowid FROM ".MAIN_DB_PREFIX."contratdet WHERE fk_contrat IN (select rowid FROM ".MAIN_DB_PREFIX."contrat where datec < '__DATE__'))",
"DELETE FROM ".MAIN_DB_PREFIX."contratdet WHERE fk_contrat IN (select rowid FROM ".MAIN_DB_PREFIX."contrat where datec < '__DATE__')",
"DELETE FROM ".MAIN_DB_PREFIX."contrat_extrafields WHERE fk_object IN (select rowid FROM ".MAIN_DB_PREFIX."contrat where datec < '__DATE__')",
"DELETE FROM ".MAIN_DB_PREFIX."contrat WHERE datec < '__DATE__'",
), ),
'intervention'=>array( 'intervention'=>array(
'DELETE FROM '.MAIN_DB_PREFIX.'fichinterdet', "DELETE FROM ".MAIN_DB_PREFIX."fichinterdet WHERE fk_fichinter IN (select rowid FROM ".MAIN_DB_PREFIX."fichinter where datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'fichinter', "DELETE FROM ".MAIN_DB_PREFIX."fichinter where datec < '__DATE__'",
),
'stock'=>array(
"DELETE FROM ".MAIN_DB_PREFIX."stock_mouvement WHERE datem < '__DATE__'",
), ),
'product'=>array( 'product'=>array(
'DELETE FROM '.MAIN_DB_PREFIX.'categorie_product', "DELETE FROM ".MAIN_DB_PREFIX."categorie_product WHERE fk_product IN (select rowid FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'product_lang', "DELETE FROM ".MAIN_DB_PREFIX."product_lang WHERE fk_product IN (select rowid FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'product_price', "DELETE FROM ".MAIN_DB_PREFIX."product_price_by_qty WHERE fk_product_price IN (select rowid FROM ".MAIN_DB_PREFIX."product_price where fk_product IN (select rowid FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__'))",
'DELETE FROM '.MAIN_DB_PREFIX.'product_fournisseur_price', "DELETE FROM ".MAIN_DB_PREFIX."product_price WHERE fk_product IN (select rowid FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'product_batch', "DELETE FROM ".MAIN_DB_PREFIX."product_fournisseur_price WHERE fk_product IN (select rowid FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'product_stock', "DELETE FROM ".MAIN_DB_PREFIX."product_batch WHERE fk_product_stock IN (select rowid FROM ".MAIN_DB_PREFIX."product_stock where fk_product IN (select rowid FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__'))",
'DELETE FROM '.MAIN_DB_PREFIX.'product_lot', "DELETE FROM ".MAIN_DB_PREFIX."product_stock WHERE fk_product IN (select rowid FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'product', "DELETE FROM ".MAIN_DB_PREFIX."product_lot WHERE fk_product IN (select rowid FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__')",
"DELETE FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__'",
), ),
'project'=>array( 'project'=>array(
'DELETE FROM '.MAIN_DB_PREFIX.'projet_task_time', // TODO set fk_project to null on object that refer to project
'DELETE FROM '.MAIN_DB_PREFIX.'projet_task', "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__'))",
'DELETE FROM '.MAIN_DB_PREFIX.'projet', "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__'",
), ),
'contact'=>array( 'contact'=>array(
'DELETE FROM '.MAIN_DB_PREFIX.'categorie_contact', "DELETE FROM ".MAIN_DB_PREFIX."categorie_contact WHERE fk_socpeople IN (select rowid FROM ".MAIN_DB_PREFIX."socpeople where datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'socpeople', "DELETE FROM ".MAIN_DB_PREFIX."socpeople where datec < '__DATE__'",
), ),
'thirdparty'=>array( 'thirdparty'=>array(
'@contact', '@contact',
'DELETE FROM '.MAIN_DB_PREFIX.'cabinetmed_cons', "DELETE FROM ".MAIN_DB_PREFIX."cabinetmed_cons WHERE fk_soc IN (select rowid FROM ".MAIN_DB_PREFIX."societe where datec < '__DATE__')",
'UPDATE '.MAIN_DB_PREFIX.'adherent SET fk_soc = NULL', "UPDATE ".MAIN_DB_PREFIX."adherent SET fk_soc = NULL WHERE fk_soc IN (select rowid FROM ".MAIN_DB_PREFIX."societe where datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'categorie_fournisseur', "DELETE FROM ".MAIN_DB_PREFIX."categorie_fournisseur WHERE fk_soc IN (select rowid FROM ".MAIN_DB_PREFIX."societe where datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'categorie_societe', "DELETE FROM ".MAIN_DB_PREFIX."categorie_societe WHERE fk_soc IN (select rowid FROM ".MAIN_DB_PREFIX."societe where datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'societe_remise_except', "DELETE FROM ".MAIN_DB_PREFIX."societe_remise_except WHERE fk_soc IN (select rowid FROM ".MAIN_DB_PREFIX."societe where datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'societe_rib', "DELETE FROM ".MAIN_DB_PREFIX."societe_rib WHERE fk_soc IN (select rowid FROM ".MAIN_DB_PREFIX."societe where datec < '__DATE__')",
'DELETE FROM '.MAIN_DB_PREFIX.'societe', "DELETE FROM ".MAIN_DB_PREFIX."societe where datec < '__DATE__'",
) )
); );
/* /*
* Main * Main
*/ */
@set_time_limit(0); @set_time_limit(0);
print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n"; print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n";
dol_syslog($script_file." launched with arg ".implode(',',$argv)); dol_syslog($script_file." launched with arg ".implode(',', $argv));
$mode = $argv[1]; $mode = $argv[1];
$option = $argv[2]; $option = $argv[2];
$date = $argv[3];
if (empty($mode) || ! in_array($mode,array('test','confirm'))) { if (empty($mode) || ! in_array($mode, array('test','confirm'))) {
print "Usage: $script_file (test|confirm) (all|option) [dbtype dbhost dbuser dbpassword dbname dbport]\n"; print "Usage: $script_file (test|confirm) (all|option) (all|YYYY-MM-DD) [dbtype dbhost dbuser dbpassword dbname dbport]\n";
print "\n"; print "\n";
print "option can be ".implode(',',array_keys($sqls))."\n"; print "option can be ".implode(',', array_keys($sqls))."\n";
exit(-1);
}
if (empty($option))
{
print "Usage: $script_file (test|confirm) (all|option) (all|YYYY-MM-DD) [dbtype dbhost dbuser dbpassword dbname dbport]\n";
print "\n";
print "option must be defined with a value in list ".implode(',', array_keys($sqls))."\n";
exit(-1);
}
if ($option != 'all')
{
$listofoptions=explode(',', $option);
foreach($listofoptions as $cursoroption)
{
if (! in_array($cursoroption, array_keys($sqls))) {
print "Usage: $script_file (test|confirm) (all|option) (all|YYYY-MM-DD) [dbtype dbhost dbuser dbpassword dbname dbport]\n";
print "\n";
print "option '".$cursoroption."' must be in list ".implode(',', array_keys($sqls))."\n";
exit(-1);
}
}
}
if (empty($date) || (! preg_match('/\d\d\d\d\-\d\d\-\d\d$/', $date) && $date != 'all')) {
print "Usage: $script_file (test|confirm) (all|option) (all|YYYY-MM-DD) [dbtype dbhost dbuser dbpassword dbname dbport]\n";
print "\n";
print "date can be 'all' or 'YYYY-MM-DD' to delete record before YYYY-MM-DD\n";
exit(-1); exit(-1);
} }
if (empty($option) || ! in_array($option, array_merge(array('all'),array_keys($sqls))) ) { if ($date == 'all') $date = '2199-01-01';
print "Usage: $script_file (test|confirm) (all|option) [dbtype dbhost dbuser dbpassword dbname dbport]\n";
print "\n";
print "option can be ".implode(',',array_keys($sqls))."\n";
exit(-1);
}
// Replace database handler // Replace database handler
if (! empty($argv[3])) if (! empty($argv[4]))
{ {
$db->close(); $db->close();
unset($db); unset($db);
$db=getDoliDBInstance($argv[3], $argv[4], $argv[5], $argv[6], $argv[7], $argv[8]); $db=getDoliDBInstance($argv[4], $argv[5], $argv[6], $argv[7], $argv[8], $argv[9]);
$user=new User($db); $user=new User($db);
} }
//var_dump($user->db->database_name); //var_dump($user->db->database_name);
$ret=$user->fetch('','admin'); $ret=$user->fetch('', 'admin');
if (! $ret > 0) if (! $ret > 0)
{ {
print 'An admin user with login "admin" must exists to use this script.'."\n"; print 'An admin user with login "admin" must exists to use this script.'."\n";
@ -190,6 +233,7 @@ if (! $ret > 0)
print "Purge all data for this database:\n"; print "Purge all data for this database:\n";
print "Before = ".$date."\n";
print "Server = ".$db->database_host."\n"; print "Server = ".$db->database_host."\n";
print "Database name = ".$db->database_name."\n"; print "Database name = ".$db->database_name."\n";
print "Database port = ".$db->database_port."\n"; print "Database port = ".$db->database_port."\n";
@ -207,23 +251,27 @@ if (! $confirmed)
* Process sql requests of a family * Process sql requests of a family
* *
* @param string $family Name of family key of array $sqls * @param string $family Name of family key of array $sqls
* @param string $date Date value
* @return int -1 if KO, 1 if OK * @return int -1 if KO, 1 if OK
*/ */
function processfamily($family) function processfamily($family, $date)
{ {
global $db, $sqls; global $db, $sqls;
$error=0; $error=0;
foreach($sqls[$family] as $sql) foreach($sqls[$family] as $sql)
{ {
if (preg_match('/^@/',$sql)) if (preg_match('/^@/', $sql))
{ {
$newfamily=preg_replace('/@/','',$sql); $newfamily=preg_replace('/@/', '', $sql);
processfamily($newfamily); processfamily($newfamily, $date);
continue; continue;
} }
$sql = preg_replace('/__DATE__/', $date, $sql);
print "Run sql: ".$sql."\n"; print "Run sql: ".$sql."\n";
$resql=$db->query($sql); $resql=$db->query($sql);
if (! $resql) if (! $resql)
{ {
@ -248,25 +296,29 @@ function processfamily($family)
$db->begin(); $db->begin();
$oldfamily=''; $listofoptions=explode(',', $option);
foreach($sqls as $family => $familysql) foreach($listofoptions as $cursoroption)
{ {
if ($option && $option != 'all' && $option != $family) continue; $oldfamily='';
foreach($sqls as $family => $familysql)
{
if ($cursoroption && $cursoroption != 'all' && $cursoroption != $family) continue;
if ($family != $oldfamily) print "Process action for family ".$family."\n"; if ($family != $oldfamily) print "Process action for family ".$family."\n";
$oldfamily = $family; $oldfamily = $family;
$result=processfamily($family); $result=processfamily($family, $date);
if ($result < 0) if ($result < 0)
{ {
$error++; $error++;
break; break;
} }
}
} }
if ($error || $mode != 'confirm') if ($error || $mode != 'confirm')
{ {
print "Rollback any changes.\n"; print "\nRollback any changes.\n";
$db->rollback(); $db->rollback();
} }
else else
@ -276,4 +328,3 @@ else
} }
$db->close(); $db->close();

View File

@ -1,3 +0,0 @@
<?php
// Wrapper to include main into htdocs
include_once '/home/ldestailleur/git/dolibarr_3.8/htdocs/main.inc.php';

View File

@ -1,3 +0,0 @@
<?php
// Wrapper to include master into htdocs
include_once '/home/ldestailleur/git/dolibarr_3.8/htdocs/master.inc.php';

View File

@ -6,11 +6,11 @@
# WARNING: This script erase all data of database # WARNING: This script erase all data of database
# with data into dump file # with data into dump file
# #
# Regis Houssin - regis.houssin@capnetworks.com # Regis Houssin - regis.houssin@inodbox.com
# Laurent Destailleur - eldy@users.sourceforge.net # Laurent Destailleur - eldy@users.sourceforge.net
#------------------------------------------------------ #------------------------------------------------------
# Usage: initdemo.sh # Usage: initdemo.sh confirm
# usage: initdemo.sh mysqldump_dolibarr_x.x.x.sql database port login pass # usage: initdemo.sh confirm mysqldump_dolibarr_x.x.x.sql database port login pass
#------------------------------------------------------ #------------------------------------------------------
@ -31,11 +31,20 @@ fi
# ----------------------------- command line params # ----------------------------- command line params
dumpfile=$1; confirm=$1;
base=$2; dumpfile=$2;
port=$3; base=$3;
admin=$4; port=$4;
passwd=$5; admin=$5;
passwd=$6;
# ----------------------------- check params
if [ "x$confirm" != "xconfirm" ]
then
echo "----- $0 -----"
echo "Usage: initdemo.sh confirm [mysqldump_dolibarr_x.x.x.sql database port login pass]"
exit
fi
# ----------------------------- if no params on command line # ----------------------------- if no params on command line
@ -133,10 +142,13 @@ then
esac esac
export documentdir=`cat $mydir/../../htdocs/conf/conf.php | grep '^\$dolibarr_main_data_root' | sed -e 's/$dolibarr_main_data_root=//' | sed -e 's/;//' | sed -e "s/'//g" | sed -e 's/"//g' `
# ---------------------------- confirmation # ---------------------------- confirmation
DIALOG=${DIALOG=dialog} DIALOG=${DIALOG=dialog}
$DIALOG --title "Init Dolibarr with demo values" --clear \ $DIALOG --title "Init Dolibarr with demo values" --clear \
--yesno "Do you confirm ? \n Dump file : '$dumpfile' \n Dump dir : '$mydir' \n Mysql database : '$base' \n Mysql port : '$port' \n Mysql login: '$admin' \n Mysql password : '$passwd'" 15 55 --yesno "Do you confirm ? \n Dump file : '$dumpfile' \n Dump dir : '$mydir' \n Document dir : '$documentdir' \n Mysql database : '$base' \n Mysql port : '$port' \n Mysql login: '$admin' \n Mysql password : '$passwd'" 15 55
case $? in case $? in
0) echo "Ok, start process...";; 0) echo "Ok, start process...";;
@ -165,15 +177,44 @@ export res=$?
export documentdir=`cat $mydir/../../htdocs/conf/conf.php | grep '^\$dolibarr_main_data_root' | sed -e 's/$dolibarr_main_data_root=//' | sed -e 's/;//' | sed -e "s/'//g" | sed -e 's/"//g' ` export documentdir=`cat $mydir/../../htdocs/conf/conf.php | grep '^\$dolibarr_main_data_root' | sed -e 's/$dolibarr_main_data_root=//' | sed -e 's/;//' | sed -e "s/'//g" | sed -e 's/"//g' `
if [ "x$documentdir" != "x" ] if [ "x$documentdir" != "x" ]
then then
$DIALOG --title "Reset document directory tpp" --clear \
--inputbox "Delete and recreate document directory $documentdir/:" 16 55 n 2> $fichtemp
valret=$?
case $valret in
0)
rep=`cat $fichtemp`;;
1)
exit;;
255)
exit;;
esac
echo "rep=$rep"
if [ "x$rep" = "xy" ]; then
echo rm -fr "$documentdir/*"
rm -fr $documentdir/*
fi
echo cp -pr $mydir/documents_demo/* "$documentdir/" echo cp -pr $mydir/documents_demo/* "$documentdir/"
cp -pr $mydir/documents_demo/* "$documentdir/" cp -pr $mydir/documents_demo/* "$documentdir/"
mkdir "$documentdir/doctemplates/" 2>/dev/null
echo cp -pr $mydir/../../htdocs/install/doctemplates/* "$documentdir/doctemplates/" echo cp -pr $mydir/../../htdocs/install/doctemplates/* "$documentdir/doctemplates/"
cp -pr $mydir/../../htdocs/install/doctemplates/* "$documentdir/doctemplates/" cp -pr $mydir/../../htdocs/install/doctemplates/* "$documentdir/doctemplates/"
mkdir -p "$documentdir/ecm/Administrative documents"
mkdir -p "$documentdir/ecm/Images" echo cp -pr $mydir/../../htdocs/install/medias/* "$documentdir/medias/image/"
cp -pr $mydir/../../htdocs/install/medias/* "$documentdir/medias/image/"
mkdir -p "$documentdir/ecm/Administrative documents" 2>/dev/null
mkdir -p "$documentdir/ecm/Images" 2>/dev/null
rm -f "$documentdir/doctemplates/"*/index.html rm -f "$documentdir/doctemplates/"*/index.html
echo cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images" echo cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images"
cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images" cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images"
chmod -R u+w "$documentdir/"
chown -R www-data "$documentdir/"
else else
echo Detection of documents directory from $mydir failed so demo files were not copied. echo Detection of documents directory from $mydir failed so demo files were not copied.
fi fi

View File

@ -7853,7 +7853,7 @@ CREATE TABLE `llx_socpeople` (
LOCK TABLES `llx_socpeople` WRITE; LOCK TABLES `llx_socpeople` WRITE;
/*!40000 ALTER TABLE `llx_socpeople` DISABLE KEYS */; /*!40000 ALTER TABLE `llx_socpeople` DISABLE KEYS */;
INSERT INTO `llx_socpeople` VALUES (1,'2010-07-08 14:26:14','2016-01-16 15:07:51',1,1,NULL,'MR','Indra','Mahala','','','',297,117,'2010-07-08','Project leader','','','','','','','',NULL,0,0,1,12,'Met during a congress at Dubai','',NULL,NULL,NULL,1),(2,'2010-07-08 22:44:50','2010-07-08 20:59:57',NULL,1,NULL,'MR','Freeman','Public','','','',200,11,NULL,'','','','','','','',NULL,NULL,0,0,1,1,'A friend that is a free contact not linked to any company',NULL,NULL,NULL,NULL,1),(3,'2010-07-08 22:59:02','2016-01-22 17:30:07',NULL,1,NULL,'MR','Mywife','Nicy','','','',NULL,11,'1980-10-03','','','','','','','','',NULL,1,0,1,12,'This is a private contact','',NULL,NULL,NULL,1),(4,'2010-07-09 00:16:58','2010-07-08 22:16:58',6,1,NULL,'MR','Rotchield','Evan','','','',NULL,6,NULL,'Bank director','','','','','','',NULL,NULL,0,0,1,1,'The bank director',NULL,NULL,NULL,NULL,1),(6,'2011-08-01 02:41:26','2016-01-22 17:29:53',17,1,NULL,'','Bookkeeper','Bob','99 account street','123456','BigTown',NULL,4,NULL,'book keeper','','','','','','','',NULL,0,0,1,12,'','',NULL,NULL,NULL,1),(7,'2016-07-30 16:11:06','2016-07-30 12:16:07',NULL,1,'','MR','Dad','','','','',NULL,14,'1967-09-04','','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(8,'2016-07-30 16:13:03','2016-07-30 12:15:58',NULL,1,'','MLE','Mom','','','','',NULL,14,NULL,'','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(9,'2016-07-30 16:14:41','2016-07-30 12:15:51',NULL,1,'','MR','Francky','','','89455','Virigia',NULL,205,'1980-07-09','Baker','555-98989898','','','','francky@example.com','','','',0,0,12,12,'','',NULL,NULL,NULL,1),(10,'2016-07-30 16:26:22','2016-07-30 12:52:38',10,1,'','MR','Eldy','','','33600','Pessac',NULL,1,'1972-10-10','Dolibarr project leader','','','','','eldy@example.com','','','ldestailleur_200x200.jpg',0,0,NULL,12,'','',NULL,NULL,NULL,1); INSERT INTO `llx_socpeople` VALUES (1,'2010-07-08 14:26:14','2016-01-16 15:07:51',1,1,NULL,'MR','Indra','Mahala','','','',297,117,'2010-07-08','Project leader','','','','','','','',NULL,0,0,1,12,'Met during a congress at Dubai','',NULL,NULL,NULL,1),(2,'2010-07-08 22:44:50','2010-07-08 20:59:57',NULL,1,NULL,'MR','Freeman','Public','','','',200,11,NULL,'','','','','','','',NULL,NULL,0,0,1,1,'A friend that is a free contact not linked to any company',NULL,NULL,NULL,NULL,1),(3,'2010-07-08 22:59:02','2016-01-22 17:30:07',NULL,1,NULL,'MR','Mywife','Nicy','','','',NULL,11,'1980-10-03','','','','','','','','',NULL,1,0,1,12,'This is a private contact','',NULL,NULL,NULL,1),(4,'2010-07-09 00:16:58','2010-07-08 22:16:58',6,1,NULL,'MR','Rotchield','Evan','','','',NULL,6,NULL,'Bank director','','','','','','',NULL,NULL,0,0,1,1,'The bank director',NULL,NULL,NULL,NULL,1),(6,'2011-08-01 02:41:26','2016-01-22 17:29:53',17,1,NULL,'','Bookkeeper','Bob','99 account street','123456','BigTown',NULL,4,NULL,'book keeper','','','','','','','',NULL,0,0,1,12,'','',NULL,NULL,NULL,1),(7,'2016-07-30 16:11:06','2016-07-30 12:16:07',NULL,1,'','MR','Dad','','','','',NULL,14,'1967-09-04','','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(8,'2016-07-30 16:13:03','2016-07-30 12:15:58',NULL,1,'','MLE','Mom','','','','',NULL,14,NULL,'','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(9,'2016-07-30 16:14:41','2016-07-30 12:15:51',NULL,1,'','MR','Francky','','','89455','Virigia',NULL,205,'1980-07-09','Baker','555-98989898','','','','francky@example.com','','','',0,0,12,12,'','',NULL,NULL,NULL,1),(10,'2016-07-30 16:26:22','2016-07-30 12:52:38',10,1,'','MR','Eldy','','','33600','Pessac',NULL,1,'1972-10-10','Dolibarr project leader','','','','','demo@example.com','','','ldestailleur_200x200.jpg',0,0,NULL,12,'','',NULL,NULL,NULL,1);
/*!40000 ALTER TABLE `llx_socpeople` ENABLE KEYS */; /*!40000 ALTER TABLE `llx_socpeople` ENABLE KEYS */;
UNLOCK TABLES; UNLOCK TABLES;

View File

@ -8260,7 +8260,7 @@ CREATE TABLE `llx_socpeople` (
LOCK TABLES `llx_socpeople` WRITE; LOCK TABLES `llx_socpeople` WRITE;
/*!40000 ALTER TABLE `llx_socpeople` DISABLE KEYS */; /*!40000 ALTER TABLE `llx_socpeople` DISABLE KEYS */;
INSERT INTO `llx_socpeople` VALUES (1,'2010-07-08 14:26:14','2016-01-16 15:07:51',1,1,NULL,'MR','Indra','Mahala','','','',297,117,'2010-07-08','Project leader','','','','','','','',NULL,0,0,1,12,'Met during a congress at Dubai','',NULL,NULL,NULL,1),(2,'2010-07-08 22:44:50','2010-07-08 20:59:57',NULL,1,NULL,'MR','Freeman','Public','','','',200,11,NULL,'','','','','','','',NULL,NULL,0,0,1,1,'A friend that is a free contact not linked to any company',NULL,NULL,NULL,NULL,1),(3,'2010-07-08 22:59:02','2016-01-22 17:30:07',NULL,1,NULL,'MR','Mywife','Nicy','','','',NULL,11,'1980-10-03','','','','','','','','',NULL,1,0,1,12,'This is a private contact','',NULL,NULL,NULL,1),(4,'2010-07-09 00:16:58','2010-07-08 22:16:58',6,1,NULL,'MR','Rotchield','Evan','','','',NULL,6,NULL,'Bank director','','','','','','',NULL,NULL,0,0,1,1,'The bank director',NULL,NULL,NULL,NULL,1),(6,'2011-08-01 02:41:26','2016-01-22 17:29:53',17,1,NULL,'','Bookkeeper','Bob','99 account street','123456','BigTown',NULL,4,NULL,'book keeper','','','','','','','',NULL,0,0,1,12,'','',NULL,NULL,NULL,1),(7,'2016-07-30 16:11:06','2016-07-30 12:16:07',NULL,1,'','MR','Dad','','','','',NULL,14,'1967-09-04','','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(8,'2016-07-30 16:13:03','2016-07-30 12:15:58',NULL,1,'','MLE','Mom','','','','',NULL,14,NULL,'','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(9,'2016-07-30 16:14:41','2016-07-30 12:15:51',NULL,1,'','MR','Francky','','','89455','Virigia',NULL,205,'1980-07-09','Baker','555-98989898','','','','francky@example.com','','','',0,0,12,12,'','',NULL,NULL,NULL,1),(10,'2016-07-30 16:26:22','2016-07-30 12:52:38',10,1,'','MR','Eldy','','','33600','Pessac',NULL,1,'1972-10-10','Dolibarr project leader','','','','','eldy@example.com','','','ldestailleur_200x200.jpg',0,0,NULL,12,'','',NULL,NULL,NULL,1),(11,'2017-05-12 13:16:36','2017-05-12 09:18:20',11,1,'','MR','Smith','Laurent','45 Big road','897','Seattle',NULL,11,NULL,'Director','','','','','','','','ldestailleur_200x200.png',0,0,12,12,'','',NULL,NULL,NULL,1),(12,'2017-05-12 13:19:31','2017-05-12 09:19:42',11,1,'','MR','Einstein','','','','',NULL,11,NULL,'Genius','333444555','','','','genius@example.com','','','Einstein.jpg',0,0,12,12,'','',NULL,NULL,NULL,1); INSERT INTO `llx_socpeople` VALUES (1,'2010-07-08 14:26:14','2016-01-16 15:07:51',1,1,NULL,'MR','Indra','Mahala','','','',297,117,'2010-07-08','Project leader','','','','','','','',NULL,0,0,1,12,'Met during a congress at Dubai','',NULL,NULL,NULL,1),(2,'2010-07-08 22:44:50','2010-07-08 20:59:57',NULL,1,NULL,'MR','Freeman','Public','','','',200,11,NULL,'','','','','','','',NULL,NULL,0,0,1,1,'A friend that is a free contact not linked to any company',NULL,NULL,NULL,NULL,1),(3,'2010-07-08 22:59:02','2016-01-22 17:30:07',NULL,1,NULL,'MR','Mywife','Nicy','','','',NULL,11,'1980-10-03','','','','','','','','',NULL,1,0,1,12,'This is a private contact','',NULL,NULL,NULL,1),(4,'2010-07-09 00:16:58','2010-07-08 22:16:58',6,1,NULL,'MR','Rotchield','Evan','','','',NULL,6,NULL,'Bank director','','','','','','',NULL,NULL,0,0,1,1,'The bank director',NULL,NULL,NULL,NULL,1),(6,'2011-08-01 02:41:26','2016-01-22 17:29:53',17,1,NULL,'','Bookkeeper','Bob','99 account street','123456','BigTown',NULL,4,NULL,'book keeper','','','','','','','',NULL,0,0,1,12,'','',NULL,NULL,NULL,1),(7,'2016-07-30 16:11:06','2016-07-30 12:16:07',NULL,1,'','MR','Dad','','','','',NULL,14,'1967-09-04','','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(8,'2016-07-30 16:13:03','2016-07-30 12:15:58',NULL,1,'','MLE','Mom','','','','',NULL,14,NULL,'','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(9,'2016-07-30 16:14:41','2016-07-30 12:15:51',NULL,1,'','MR','Francky','','','89455','Virigia',NULL,205,'1980-07-09','Baker','555-98989898','','','','francky@example.com','','','',0,0,12,12,'','',NULL,NULL,NULL,1),(10,'2016-07-30 16:26:22','2016-07-30 12:52:38',10,1,'','MR','Eldy','','','33600','Pessac',NULL,1,'1972-10-10','Dolibarr project leader','','','','','demo@example.com','','','ldestailleur_200x200.jpg',0,0,NULL,12,'','',NULL,NULL,NULL,1),(11,'2017-05-12 13:16:36','2017-05-12 09:18:20',11,1,'','MR','Smith','Laurent','45 Big road','897','Seattle',NULL,11,NULL,'Director','','','','','','','','ldestailleur_200x200.png',0,0,12,12,'','',NULL,NULL,NULL,1),(12,'2017-05-12 13:19:31','2017-05-12 09:19:42',11,1,'','MR','Einstein','','','','',NULL,11,NULL,'Genius','333444555','','','','genius@example.com','','','Einstein.jpg',0,0,12,12,'','',NULL,NULL,NULL,1);
/*!40000 ALTER TABLE `llx_socpeople` ENABLE KEYS */; /*!40000 ALTER TABLE `llx_socpeople` ENABLE KEYS */;
UNLOCK TABLES; UNLOCK TABLES;

View File

@ -8612,7 +8612,7 @@ CREATE TABLE `llx_socpeople` (
LOCK TABLES `llx_socpeople` WRITE; LOCK TABLES `llx_socpeople` WRITE;
/*!40000 ALTER TABLE `llx_socpeople` DISABLE KEYS */; /*!40000 ALTER TABLE `llx_socpeople` DISABLE KEYS */;
INSERT INTO `llx_socpeople` VALUES (1,'2010-07-08 14:26:14','2016-01-16 15:07:51',1,1,NULL,'MR','Indra','Mahala','','','',297,117,'2010-07-08','Project leader','','','','','','','',NULL,0,0,1,12,'Met during a congress at Dubai','',NULL,NULL,NULL,1),(2,'2010-07-08 22:44:50','2010-07-08 20:59:57',NULL,1,NULL,'MR','Freeman','Public','','','',200,11,NULL,'','','','','','','',NULL,NULL,0,0,1,1,'A friend that is a free contact not linked to any company',NULL,NULL,NULL,NULL,1),(3,'2010-07-08 22:59:02','2016-01-22 17:30:07',NULL,1,NULL,'MR','Mywife','Nicy','','','',NULL,11,'1980-10-03','','','','','','','','',NULL,1,0,1,12,'This is a private contact','',NULL,NULL,NULL,1),(4,'2010-07-09 00:16:58','2010-07-08 22:16:58',6,1,NULL,'MR','Rotchield','Evan','','','',NULL,6,NULL,'Bank director','','','','','','',NULL,NULL,0,0,1,1,'The bank director',NULL,NULL,NULL,NULL,1),(6,'2011-08-01 02:41:26','2016-01-22 17:29:53',17,1,NULL,'','Bookkeeper','Bob','99 account street','123456','BigTown',NULL,4,NULL,'book keeper','','','','','','','',NULL,0,0,1,12,'','',NULL,NULL,NULL,1),(7,'2016-07-30 16:11:06','2016-07-30 12:16:07',NULL,1,'','MR','Dad','','','','',NULL,14,'1967-09-04','','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(8,'2016-07-30 16:13:03','2016-07-30 12:15:58',NULL,1,'','MLE','Mom','','','','',NULL,14,NULL,'','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(9,'2016-07-30 16:14:41','2016-07-30 12:15:51',NULL,1,'','MR','Francky','','','89455','Virigia',NULL,205,'1980-07-09','Baker','555-98989898','','','','francky@example.com','','','',0,0,12,12,'','',NULL,NULL,NULL,1),(10,'2016-07-30 16:26:22','2016-07-30 12:52:38',10,1,'','MR','Eldy','','','33600','Pessac',NULL,1,'1972-10-10','Dolibarr project leader','','','','','eldy@example.com','','','ldestailleur_200x200.jpg',0,0,NULL,12,'','',NULL,NULL,NULL,1),(11,'2017-05-12 13:16:36','2017-05-12 09:18:20',11,1,'','MR','Smith','Laurent','45 Big road','897','Seattle',NULL,11,NULL,'Director','','','','','','','','ldestailleur_200x200.png',0,0,12,12,'','',NULL,NULL,NULL,1),(12,'2017-05-12 13:19:31','2017-05-12 09:19:42',11,1,'','MR','Einstein','','','','',NULL,11,NULL,'Genius','333444555','','','','genius@example.com','','','Einstein.jpg',0,0,12,12,'','',NULL,NULL,NULL,1); INSERT INTO `llx_socpeople` VALUES (1,'2010-07-08 14:26:14','2016-01-16 15:07:51',1,1,NULL,'MR','Indra','Mahala','','','',297,117,'2010-07-08','Project leader','','','','','','','',NULL,0,0,1,12,'Met during a congress at Dubai','',NULL,NULL,NULL,1),(2,'2010-07-08 22:44:50','2010-07-08 20:59:57',NULL,1,NULL,'MR','Freeman','Public','','','',200,11,NULL,'','','','','','','',NULL,NULL,0,0,1,1,'A friend that is a free contact not linked to any company',NULL,NULL,NULL,NULL,1),(3,'2010-07-08 22:59:02','2016-01-22 17:30:07',NULL,1,NULL,'MR','Mywife','Nicy','','','',NULL,11,'1980-10-03','','','','','','','','',NULL,1,0,1,12,'This is a private contact','',NULL,NULL,NULL,1),(4,'2010-07-09 00:16:58','2010-07-08 22:16:58',6,1,NULL,'MR','Rotchield','Evan','','','',NULL,6,NULL,'Bank director','','','','','','',NULL,NULL,0,0,1,1,'The bank director',NULL,NULL,NULL,NULL,1),(6,'2011-08-01 02:41:26','2016-01-22 17:29:53',17,1,NULL,'','Bookkeeper','Bob','99 account street','123456','BigTown',NULL,4,NULL,'book keeper','','','','','','','',NULL,0,0,1,12,'','',NULL,NULL,NULL,1),(7,'2016-07-30 16:11:06','2016-07-30 12:16:07',NULL,1,'','MR','Dad','','','','',NULL,14,'1967-09-04','','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(8,'2016-07-30 16:13:03','2016-07-30 12:15:58',NULL,1,'','MLE','Mom','','','','',NULL,14,NULL,'','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(9,'2016-07-30 16:14:41','2016-07-30 12:15:51',NULL,1,'','MR','Francky','','','89455','Virigia',NULL,205,'1980-07-09','Baker','555-98989898','','','','francky@example.com','','','',0,0,12,12,'','',NULL,NULL,NULL,1),(10,'2016-07-30 16:26:22','2016-07-30 12:52:38',10,1,'','MR','Eldy','','','33600','Pessac',NULL,1,'1972-10-10','Dolibarr project leader','','','','','demo@example.com','','','ldestailleur_200x200.jpg',0,0,NULL,12,'','',NULL,NULL,NULL,1),(11,'2017-05-12 13:16:36','2017-05-12 09:18:20',11,1,'','MR','Smith','Laurent','45 Big road','897','Seattle',NULL,11,NULL,'Director','','','','','','','','ldestailleur_200x200.png',0,0,12,12,'','',NULL,NULL,NULL,1),(12,'2017-05-12 13:19:31','2017-05-12 09:19:42',11,1,'','MR','Einstein','','','','',NULL,11,NULL,'Genius','333444555','','','','genius@example.com','','','Einstein.jpg',0,0,12,12,'','',NULL,NULL,NULL,1);
/*!40000 ALTER TABLE `llx_socpeople` ENABLE KEYS */; /*!40000 ALTER TABLE `llx_socpeople` ENABLE KEYS */;
UNLOCK TABLES; UNLOCK TABLES;

View File

@ -9181,7 +9181,7 @@ CREATE TABLE `llx_socpeople` (
LOCK TABLES `llx_socpeople` WRITE; LOCK TABLES `llx_socpeople` WRITE;
/*!40000 ALTER TABLE `llx_socpeople` DISABLE KEYS */; /*!40000 ALTER TABLE `llx_socpeople` DISABLE KEYS */;
INSERT INTO `llx_socpeople` VALUES (1,'2010-07-08 14:26:14','2016-01-16 15:07:51',1,1,NULL,'MR','Indra','Mahala','','','',297,117,'2010-07-08','Project leader','','','','','','','',NULL,0,0,1,12,'Met during a congress at Dubai','',NULL,NULL,NULL,1),(2,'2010-07-08 22:44:50','2010-07-08 20:59:57',NULL,1,NULL,'MR','Freeman','Public','','','',200,11,NULL,'','','','','','','',NULL,NULL,0,0,1,1,'A friend that is a free contact not linked to any company',NULL,NULL,NULL,NULL,1),(3,'2010-07-08 22:59:02','2016-01-22 17:30:07',NULL,1,NULL,'MR','Mywife','Nicy','','','',NULL,11,'1980-10-03','','','','','','','','',NULL,1,0,1,12,'This is a private contact','',NULL,NULL,NULL,1),(4,'2010-07-09 00:16:58','2010-07-08 22:16:58',6,1,NULL,'MR','Rotchield','Evan','','','',NULL,6,NULL,'Bank director','','','','','','',NULL,NULL,0,0,1,1,'The bank director',NULL,NULL,NULL,NULL,1),(6,'2011-08-01 02:41:26','2016-01-22 17:29:53',17,1,NULL,'','Bookkeeper','Bob','99 account street','123456','BigTown',NULL,4,NULL,'book keeper','','','','','','','',NULL,0,0,1,12,'','',NULL,NULL,NULL,1),(7,'2016-07-30 16:11:06','2016-07-30 12:16:07',NULL,1,'','MR','Dad','','','','',NULL,14,'1967-09-04','','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(8,'2016-07-30 16:13:03','2016-07-30 12:15:58',NULL,1,'','MLE','Mom','','','','',NULL,14,NULL,'','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(9,'2016-07-30 16:14:41','2016-07-30 12:15:51',NULL,1,'','MR','Francky','','','89455','Virigia',NULL,205,'1980-07-09','Baker','555-98989898','','','','francky@example.com','','','',0,0,12,12,'','',NULL,NULL,NULL,1),(10,'2016-07-30 16:26:22','2016-07-30 12:52:38',10,1,'','MR','Eldy','','','33600','Pessac',NULL,1,'1972-10-10','Dolibarr project leader','','','','','eldy@example.com','','','ldestailleur_200x200.jpg',0,0,NULL,12,'','',NULL,NULL,NULL,1),(11,'2017-05-12 13:16:36','2017-05-12 09:18:20',11,1,'','MR','Smith','Laurent','45 Big road','897','Seattle',NULL,11,NULL,'Director','','','','','','','','ldestailleur_200x200.png',0,0,12,12,'','',NULL,NULL,NULL,1),(12,'2017-05-12 13:19:31','2017-05-12 09:19:42',11,1,'','MR','Einstein','','','','',NULL,11,NULL,'Genius','333444555','','','','genius@example.com','','','Einstein.jpg',0,0,12,12,'','',NULL,NULL,NULL,1); INSERT INTO `llx_socpeople` VALUES (1,'2010-07-08 14:26:14','2016-01-16 15:07:51',1,1,NULL,'MR','Indra','Mahala','','','',297,117,'2010-07-08','Project leader','','','','','','','',NULL,0,0,1,12,'Met during a congress at Dubai','',NULL,NULL,NULL,1),(2,'2010-07-08 22:44:50','2010-07-08 20:59:57',NULL,1,NULL,'MR','Freeman','Public','','','',200,11,NULL,'','','','','','','',NULL,NULL,0,0,1,1,'A friend that is a free contact not linked to any company',NULL,NULL,NULL,NULL,1),(3,'2010-07-08 22:59:02','2016-01-22 17:30:07',NULL,1,NULL,'MR','Mywife','Nicy','','','',NULL,11,'1980-10-03','','','','','','','','',NULL,1,0,1,12,'This is a private contact','',NULL,NULL,NULL,1),(4,'2010-07-09 00:16:58','2010-07-08 22:16:58',6,1,NULL,'MR','Rotchield','Evan','','','',NULL,6,NULL,'Bank director','','','','','','',NULL,NULL,0,0,1,1,'The bank director',NULL,NULL,NULL,NULL,1),(6,'2011-08-01 02:41:26','2016-01-22 17:29:53',17,1,NULL,'','Bookkeeper','Bob','99 account street','123456','BigTown',NULL,4,NULL,'book keeper','','','','','','','',NULL,0,0,1,12,'','',NULL,NULL,NULL,1),(7,'2016-07-30 16:11:06','2016-07-30 12:16:07',NULL,1,'','MR','Dad','','','','',NULL,14,'1967-09-04','','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(8,'2016-07-30 16:13:03','2016-07-30 12:15:58',NULL,1,'','MLE','Mom','','','','',NULL,14,NULL,'','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(9,'2016-07-30 16:14:41','2016-07-30 12:15:51',NULL,1,'','MR','Francky','','','89455','Virigia',NULL,205,'1980-07-09','Baker','555-98989898','','','','francky@example.com','','','',0,0,12,12,'','',NULL,NULL,NULL,1),(10,'2016-07-30 16:26:22','2016-07-30 12:52:38',10,1,'','MR','Eldy','','','33600','Pessac',NULL,1,'1972-10-10','Dolibarr project leader','','','','','demo@example.com','','','ldestailleur_200x200.jpg',0,0,NULL,12,'','',NULL,NULL,NULL,1),(11,'2017-05-12 13:16:36','2017-05-12 09:18:20',11,1,'','MR','Smith','Laurent','45 Big road','897','Seattle',NULL,11,NULL,'Director','','','','','','','','ldestailleur_200x200.png',0,0,12,12,'','',NULL,NULL,NULL,1),(12,'2017-05-12 13:19:31','2017-05-12 09:19:42',11,1,'','MR','Einstein','','','','',NULL,11,NULL,'Genius','333444555','','','','genius@example.com','','','Einstein.jpg',0,0,12,12,'','',NULL,NULL,NULL,1);
/*!40000 ALTER TABLE `llx_socpeople` ENABLE KEYS */; /*!40000 ALTER TABLE `llx_socpeople` ENABLE KEYS */;
UNLOCK TABLES; UNLOCK TABLES;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -3,7 +3,7 @@
# Script to remove setup of a Dolibarr installation. # Script to remove setup of a Dolibarr installation.
# Note: "dialog" tool need to be available. # Note: "dialog" tool need to be available.
# #
# Regis Houssin - regis.houssin@capnetworks.com # Regis Houssin - regis.houssin@inodbox.com
# Laurent Destailleur - eldy@users.sourceforge.net # Laurent Destailleur - eldy@users.sourceforge.net
#------------------------------------------------------ #------------------------------------------------------
# WARNING: This script erase setup of instance, # WARNING: This script erase setup of instance,

View File

@ -3,7 +3,7 @@
# Script to extrac a database with demo values. # Script to extrac a database with demo values.
# Note: "dialog" tool need to be available if no parameter provided. # Note: "dialog" tool need to be available if no parameter provided.
# #
# Regis Houssin - regis.houssin@capnetworks.com # Regis Houssin - regis.houssin@inodbox.com
# Laurent Destailleur - eldy@users.sourceforge.net # Laurent Destailleur - eldy@users.sourceforge.net
#------------------------------------------------------ #------------------------------------------------------
# Usage: savedemo.sh # Usage: savedemo.sh
@ -171,6 +171,8 @@ export list="
--ignore-table=$base.llx_abonne_extrafields --ignore-table=$base.llx_abonne_extrafields
--ignore-table=$base.llx_abonne_type --ignore-table=$base.llx_abonne_type
--ignore-table=$base.llx_abonnement --ignore-table=$base.llx_abonnement
--ignore-table=$base.llx_accountingaccount
--ignore-table=$base.llx_accountingsystem
--ignore-table=$base.llx_advanced_extrafields --ignore-table=$base.llx_advanced_extrafields
--ignore-table=$base.llx_advanced_extrafields_options --ignore-table=$base.llx_advanced_extrafields_options
--ignore-table=$base.llx_advanced_extrafields_values --ignore-table=$base.llx_advanced_extrafields_values
@ -189,6 +191,9 @@ export list="
--ignore-table=$base.llx_c_dolicloud_plans --ignore-table=$base.llx_c_dolicloud_plans
--ignore-table=$base.llx_c_pays --ignore-table=$base.llx_c_pays
--ignore-table=$base.llx_c_source --ignore-table=$base.llx_c_source
--ignore-table=$base.llx_c_ticketsup_category
--ignore-table=$base.llx_c_ticketsup_severity
--ignore-table=$base.llx_c_ticketsup_type
--ignore-table=$base.llx_cabinetmed_c_banques --ignore-table=$base.llx_cabinetmed_c_banques
--ignore-table=$base.llx_cabinetmed_c_ccam --ignore-table=$base.llx_cabinetmed_c_ccam
--ignore-table=$base.llx_cabinetmed_c_examconclusion --ignore-table=$base.llx_cabinetmed_c_examconclusion
@ -246,6 +251,8 @@ export list="
--ignore-table=$base.llx_residence --ignore-table=$base.llx_residence
--ignore-table=$base.llx_residence_building --ignore-table=$base.llx_residence_building
--ignore-table=$base.llx_residence_building_links --ignore-table=$base.llx_residence_building_links
--ignore-table=$base.llx_societe_rib2
--ignore-table=$base.llx_ticketsup
--ignore-table=$base.llx_ultimatepdf --ignore-table=$base.llx_ultimatepdf
--ignore-table=$base.llx_update_modules --ignore-table=$base.llx_update_modules
--ignore-table=$base.llx_ventilation_achat --ignore-table=$base.llx_ventilation_achat

View File

@ -46,9 +46,9 @@ if (! $res && file_exists($path."../../htdocs/master.inc.php")) $res=@include $p
if (! $res && file_exists("../master.inc.php")) $res=@include "../master.inc.php"; if (! $res && file_exists("../master.inc.php")) $res=@include "../master.inc.php";
if (! $res && file_exists("../../master.inc.php")) $res=@include "../../master.inc.php"; if (! $res && file_exists("../../master.inc.php")) $res=@include "../../master.inc.php";
if (! $res && file_exists("../../../master.inc.php")) $res=@include "../../../master.inc.php"; if (! $res && file_exists("../../../master.inc.php")) $res=@include "../../../master.inc.php";
if (! $res && preg_match('/\/nltechno([^\/]*)\//',$_SERVER["PHP_SELF"],$reg)) $res=@include $path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only if (! $res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) $res=@include $path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
if (! $res && preg_match('/\/nltechno([^\/]*)\//',$_SERVER["PHP_SELF"],$reg)) $res=@include "../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only if (! $res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) $res=@include "../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
if (! $res) die ("Failed to include master.inc.php file\n"); if (! $res) die("Failed to include master.inc.php file\n");
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
@ -58,7 +58,7 @@ include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$login=''; $login='';
$server=''; $server='';
if (preg_match('/^(.*)@(.*):(.*)$/',$sourceserver,$reg)) if (preg_match('/^(.*)@(.*):(.*)$/', $sourceserver, $reg))
{ {
$login=$reg[1]; $login=$reg[1];
$server=$reg[2]; $server=$reg[2];
@ -84,7 +84,7 @@ print 'SFTP connect string : '.$sftpconnectstring."\n";
// SFTP connect // SFTP connect
if (! function_exists("ssh2_connect")) { if (! function_exists("ssh2_connect")) {
dol_print_error('','ssh2_connect function does not exists'); exit(1); dol_print_error('', 'ssh2_connect function does not exists'); exit(1);
} }
$connection = ssh2_connect($server, 22); $connection = ssh2_connect($server, 22);
@ -92,7 +92,7 @@ if ($connection)
{ {
if (! @ssh2_auth_password($connection, $login, $password)) if (! @ssh2_auth_password($connection, $login, $password))
{ {
dol_syslog("Could not authenticate with username ".$login." . and password ".preg_replace('/./', '*', $password),LOG_ERR); dol_syslog("Could not authenticate with username ".$login." . and password ".preg_replace('/./', '*', $password), LOG_ERR);
exit(-5); exit(-5);
} }
else else
@ -112,11 +112,11 @@ if ($connection)
ssh2_scp_recv($connection, $sourcefile, $targetdir.$targetfile); ssh2_scp_recv($connection, $sourcefile, $targetdir.$targetfile);
$fullcommand="cat ".$targetdir.$targetfile." | mysql -h".$databaseserver." -u".$loginbase." -p".$passwordbase." -D ".$database; $fullcommand="cat ".$targetdir.$targetfile." | mysql -h".$databaseserver." -u".$loginbase." -p".$passwordbase." -D ".$database;
if (preg_match('/\.bz2$/',$targetfile)) if (preg_match('/\.bz2$/', $targetfile))
{ {
$fullcommand="bzip2 -c -d ".$targetdir.$targetfile." | mysql -h".$databaseserver." -u".$loginbase." -p".$passwordbase." -D ".$database; $fullcommand="bzip2 -c -d ".$targetdir.$targetfile." | mysql -h".$databaseserver." -u".$loginbase." -p".$passwordbase." -D ".$database;
} }
if (preg_match('/\.gz$/',$targetfile)) if (preg_match('/\.gz$/', $targetfile))
{ {
$fullcommand="gzip -d ".$targetdir.$targetfile." | mysql -h".$databaseserver." -u".$loginbase." -p".$passwordbase." -D ".$database; $fullcommand="gzip -d ".$targetdir.$targetfile." | mysql -h".$databaseserver." -u".$loginbase." -p".$passwordbase." -D ".$database;
} }

View File

@ -41,9 +41,9 @@ if (! $res && file_exists($path."../../htdocs/master.inc.php")) $res=@include $p
if (! $res && file_exists("../master.inc.php")) $res=@include "../master.inc.php"; if (! $res && file_exists("../master.inc.php")) $res=@include "../master.inc.php";
if (! $res && file_exists("../../master.inc.php")) $res=@include "../../master.inc.php"; if (! $res && file_exists("../../master.inc.php")) $res=@include "../../master.inc.php";
if (! $res && file_exists("../../../master.inc.php")) $res=@include "../../../master.inc.php"; if (! $res && file_exists("../../../master.inc.php")) $res=@include "../../../master.inc.php";
if (! $res && preg_match('/\/nltechno([^\/]*)\//',$_SERVER["PHP_SELF"],$reg)) $res=@include $path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only if (! $res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) $res=@include $path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
if (! $res && preg_match('/\/nltechno([^\/]*)\//',$_SERVER["PHP_SELF"],$reg)) $res=@include "../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only if (! $res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) $res=@include "../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
if (! $res) die ("Failed to include master.inc.php file\n"); if (! $res) die("Failed to include master.inc.php file\n");
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';

View File

@ -0,0 +1,2 @@
This directory contains the file with the graphical database structure.
It can be read with MySQL Workbench software.

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<uml:Model xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML" xmi:id="_qb8akM37EdqwVrslYOdUDA">
<packagedElement xmi:type="uml:Package" xmi:id="_w8IxIM37EdqwVrslYOdUDA" name="dolibarr">
<packagedElement xmi:type="uml:Package" xmi:id="_T5aZ4FK9Ed60vaZbVikprw" name="OrdersModule"/>
<packagedElement xmi:type="uml:Package" xmi:id="_ZhuGMlK9Ed60vaZbVikprw" name="InvoiceModule"/>
<packagedElement xmi:type="uml:Package" xmi:id="_cf3SUlK9Ed60vaZbVikprw" name="UserModule"/>
<packagedElement xmi:type="uml:Package" xmi:id="_maM0glK9Ed60vaZbVikprw" name="FoundationModule"/>
<packagedElement xmi:type="uml:Package" xmi:id="_oqTO4lK9Ed60vaZbVikprw" name="ContractsModule"/>
<packagedElement xmi:type="uml:Package" xmi:id="_rEq_klK9Ed60vaZbVikprw" name="ProposalsModule"/>
<packagedElement xmi:type="uml:Package" xmi:id="_vxYmUlK9Ed60vaZbVikprw" name="EMailingManagement"/>
</packagedElement>
</uml:Model>

View File

@ -1,53 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<diagrams:Diagrams xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.topcased.org/DI/1.0" xmlns:diagrams="http://www.topcased.org/Diagrams/1.0" xmi:id="_SI6FkFK9Ed60vaZbVikprw" activeDiagram="_SI6FkVK9Ed60vaZbVikprw">
<model href="dolibarr.uml#_w8IxIM37EdqwVrslYOdUDA"/>
<diagrams xmi:id="_SI6FkVK9Ed60vaZbVikprw" position="0,0" size="100,100" name="dolibarr" viewport="0,0">
<property xmi:id="_SJ9OcFK9Ed60vaZbVikprw" key="pageFormatName" value="A4"/>
<property xmi:id="_SJ9OcVK9Ed60vaZbVikprw" key="diagramWidth" value="840"/>
<property xmi:id="_SJ9OclK9Ed60vaZbVikprw" key="diagramHeight" value="1188"/>
<property xmi:id="_SJ9Oc1K9Ed60vaZbVikprw" key="pageMarginName" value="Small Margin"/>
<property xmi:id="_SJ9OdFK9Ed60vaZbVikprw" key="diagramTopMargin" value="20"/>
<property xmi:id="_SJ9OdVK9Ed60vaZbVikprw" key="diagramBottomMargin" value="20"/>
<property xmi:id="_SJ9OdlK9Ed60vaZbVikprw" key="diagramLeftMargin" value="20"/>
<property xmi:id="_SJ9Od1K9Ed60vaZbVikprw" key="diagramRightMargin" value="20"/>
<property xmi:id="_SJ9OeFK9Ed60vaZbVikprw" key="orientation" value="portrait"/>
<semanticModel xsi:type="di:EMFSemanticModelBridge" xmi:id="_SI6FklK9Ed60vaZbVikprw" presentation="org.topcased.modeler.uml.classdiagram">
<element href="dolibarr.uml#_w8IxIM37EdqwVrslYOdUDA"/>
</semanticModel>
<contained xsi:type="di:GraphNode" xmi:id="_T2b-YFK9Ed60vaZbVikprw" position="15,190" size="176,81">
<semanticModel xsi:type="di:EMFSemanticModelBridge" xmi:id="_T2b-YVK9Ed60vaZbVikprw" presentation="default">
<element href="dolibarr.uml#_T5aZ4FK9Ed60vaZbVikprw"/>
</semanticModel>
</contained>
<contained xsi:type="di:GraphNode" xmi:id="_ZhuGMFK9Ed60vaZbVikprw" position="15,118" size="177,68">
<semanticModel xsi:type="di:EMFSemanticModelBridge" xmi:id="_ZhuGMVK9Ed60vaZbVikprw" presentation="default">
<element href="dolibarr.uml#_ZhuGMlK9Ed60vaZbVikprw"/>
</semanticModel>
</contained>
<contained xsi:type="di:GraphNode" xmi:id="_cf3SUFK9Ed60vaZbVikprw" position="15,10" size="174,81">
<semanticModel xsi:type="di:EMFSemanticModelBridge" xmi:id="_cf3SUVK9Ed60vaZbVikprw" presentation="default">
<element href="dolibarr.uml#_cf3SUlK9Ed60vaZbVikprw"/>
</semanticModel>
</contained>
<contained xsi:type="di:GraphNode" xmi:id="_maM0gFK9Ed60vaZbVikprw" position="291,118" size="145,73">
<semanticModel xsi:type="di:EMFSemanticModelBridge" xmi:id="_maM0gVK9Ed60vaZbVikprw" presentation="default">
<element href="dolibarr.uml#_maM0glK9Ed60vaZbVikprw"/>
</semanticModel>
</contained>
<contained xsi:type="di:GraphNode" xmi:id="_oqTO4FK9Ed60vaZbVikprw" position="15,274" size="179,80">
<semanticModel xsi:type="di:EMFSemanticModelBridge" xmi:id="_oqTO4VK9Ed60vaZbVikprw" presentation="default">
<element href="dolibarr.uml#_oqTO4lK9Ed60vaZbVikprw"/>
</semanticModel>
</contained>
<contained xsi:type="di:GraphNode" xmi:id="_rEq_kFK9Ed60vaZbVikprw" position="15,358" size="181,73">
<semanticModel xsi:type="di:EMFSemanticModelBridge" xmi:id="_rEq_kVK9Ed60vaZbVikprw" presentation="default">
<element href="dolibarr.uml#_rEq_klK9Ed60vaZbVikprw"/>
</semanticModel>
</contained>
<contained xsi:type="di:GraphNode" xmi:id="_vxYmUFK9Ed60vaZbVikprw" position="15,490" size="181,80">
<semanticModel xsi:type="di:EMFSemanticModelBridge" xmi:id="_vxYmUVK9Ed60vaZbVikprw" presentation="default">
<element href="dolibarr.uml#_vxYmUlK9Ed60vaZbVikprw"/>
</semanticModel>
</contained>
</diagrams>
</diagrams:Diagrams>

View File

@ -0,0 +1 @@
See https://github.com/atgp/factur-x

View File

@ -4,13 +4,15 @@
<description>Dolibarr coding standard.</description> <description>Dolibarr coding standard.</description>
<exclude-pattern type="relative">build/html</exclude-pattern> <exclude-pattern type="relative">build/html</exclude-pattern>
<exclude-pattern type="relative">build/aps</exclude-pattern>
<exclude-pattern type="relative">documents</exclude-pattern> <exclude-pattern type="relative">documents</exclude-pattern>
<exclude-pattern type="relative">htdocs/custom</exclude-pattern> <exclude-pattern type="relative">htdocs/custom</exclude-pattern>
<exclude-pattern type="relative">htdocs/includes</exclude-pattern> <exclude-pattern type="relative">htdocs/includes</exclude-pattern>
<exclude-pattern type="relative">htdocs/install/doctemplates/websites</exclude-pattern>
<exclude-pattern type="relative">htdocs/conf.php</exclude-pattern> <exclude-pattern type="relative">htdocs/conf.php</exclude-pattern>
<exclude-pattern type="relative">*/nltechno*</exclude-pattern> <exclude-pattern type="relative">*/nltechno*</exclude-pattern>
<exclude-pattern type="relative">*/htdocs/includes</exclude-pattern> <exclude-pattern type="relative">*/htdocs/includes</exclude-pattern>
<exclude-pattern type="relative">*.min.css</exclude-pattern> <exclude-pattern type="relative">*/htdocs/includes</exclude-pattern>
<!-- List of all tests --> <!-- List of all tests -->
@ -24,29 +26,14 @@
<!-- Rules from Generic Standard --> <!-- Rules from Generic Standard -->
<rule ref="Generic.CodeAnalysis.EmptyStatement" /> <rule ref="Generic.CodeAnalysis.EmptyStatement">
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedIf"/>
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedCATCH"> <exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedElse"/>
<severity>0</severity> <exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedElseif"/>
</rule> <exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedCatch"/>
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedFOREACH"> <exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedForeach"/>
<severity>0</severity> <exclude name="Generic.CodeAnalysis.EmptyStatement.NotAllowed"/>
</rule> <exclude name="Generic.CodeAnalysis.EmptyStatement.NotAllowedWarning"/>
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedIF">
<severity>0</severity>
</rule>
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedELSE">
<severity>0</severity>
</rule>
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedELSEIF">
<severity>0</severity>
</rule>
<rule ref="Generic.CodeAnalysis.EmptyStatement.NotAllowed">
<severity>0</severity>
</rule>
<rule ref="Generic.CodeAnalysis.EmptyStatement.NotAllowedWarning">
<severity>0</severity>
</rule> </rule>
<!-- <rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop" /> --> <!-- <rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop" /> -->
@ -63,6 +50,21 @@
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter.Found"> <rule ref="Generic.CodeAnalysis.UnusedFunctionParameter.Found">
<severity>0</severity> <severity>0</severity>
</rule> </rule>
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter.FoundBeforeLastUsed">
<severity>0</severity>
</rule>
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed">
<severity>0</severity>
</rule>
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass">
<severity>0</severity>
</rule>
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClassAfterLastUsed">
<severity>0</severity>
</rule>
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClassBeforeLastUsed">
<severity>0</severity>
</rule>
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod" /> <rule ref="Generic.CodeAnalysis.UselessOverridingMethod" />
@ -73,10 +75,13 @@
<!-- Warning if action on same line than if --> <!-- Warning if action on same line than if -->
<!-- <!--
<rule ref="Generic.ControlStructures.InlineControlStructure"> <rule ref="Generic.ControlStructures.InlineControlStructure">
<properties> <property name="error" value="false"/> </properties> <properties>
<property name="error" value="false"/>
</properties>
</rule> </rule>
--> -->
<!-- PHP code MUST use only UTF-8 without BOM. --> <!-- PHP code MUST use only UTF-8 without BOM. -->
<rule ref="Generic.Files.ByteOrderMark"/> <rule ref="Generic.Files.ByteOrderMark"/>
@ -95,8 +100,11 @@
</properties> </properties>
</rule> </rule>
<!-- To disallow several statements on same line --> <!-- Disallow several statements on same line -->
<!-- <rule ref="Generic.Formatting.DisallowMultipleStatements" /> --> <!-- We want to allow 'if () { ...small code... }' on same line for better code compacity and readability -->
<rule ref="Generic.Formatting.DisallowMultipleStatements">
<severity>0</severity>
</rule>
<!-- Have 2 chars padding maximum and always show as errors --> <!-- Have 2 chars padding maximum and always show as errors -->
<!-- <!--
@ -110,15 +118,16 @@
<rule ref="Generic.Functions.CallTimePassByReference" /> <rule ref="Generic.Functions.CallTimePassByReference" />
<rule ref="Generic.Functions.FunctionCallArgumentSpacing" /> <rule ref="Generic.Functions.FunctionCallArgumentSpacing" />
<rule ref="Generic.Functions.FunctionCallArgumentSpacing.NoSpaceAfterComma">
<rule ref="Generic.Functions.FunctionCallArgumentSpacing.NoSpaceBeforeEquals">
<severity>0</severity> <severity>0</severity>
</rule> </rule>
<rule ref="Generic.Functions.FunctionCallArgumentSpacing.NoSpaceBeforeEquals"> <rule ref="Generic.Functions.FunctionCallArgumentSpacing.NoSpaceBeforeEquals">
<severity>0</severity> <severity>0</severity>
</rule> </rule>
<rule ref="Generic.Functions.FunctionCallArgumentSpacing.NoSpaceAfterEquals">
<severity>0</severity> <!-- Disallow several spaces after comma -->
</rule> <!-- We want to allow this because we want to be able to align params on several similare functions on different lines -->
<rule ref="Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma"> <rule ref="Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma">
<severity>0</severity> <severity>0</severity>
</rule> </rule>
@ -153,7 +162,10 @@
<rule ref="Generic.PHP.ForbiddenFunctions" /> <rule ref="Generic.PHP.ForbiddenFunctions" />
<!-- Warning when using @ before functions --> <!-- Warning when using @ before functions -->
<!-- <rule ref="Generic.PHP.NoSilencedErrors" /> --> <!-- We want this. Some features need this -->
<rule ref="Generic.PHP.NoSilencedErrors">
<severity>0</severity>
</rule>
<!-- Say if null, true, false must be uppercase (Rule 2.5 of PSR2 https://www.php-fig.org/psr/psr-2/) --> <!-- Say if null, true, false must be uppercase (Rule 2.5 of PSR2 https://www.php-fig.org/psr/psr-2/) -->
<rule ref="Generic.PHP.LowerCaseConstant" /> <rule ref="Generic.PHP.LowerCaseConstant" />
@ -167,11 +179,51 @@
<!-- Disallow usage of tab --> <!-- Disallow usage of tab -->
<!-- <rule ref="Generic.WhiteSpace.DisallowTabIndent" /> --> <!-- <rule ref="Generic.WhiteSpace.DisallowTabIndent" /> -->
<!-- Check indent are done with spaces and wiht correct number --> <!-- Check indent are done with spaces and with correct number -->
<!-- Disabled as this does not support tab --> <!-- Disabled as this does not support tab -->
<!-- <rule ref="Generic.WhiteSpace.ScopeIndent" /> --> <!-- <rule ref="Generic.WhiteSpace.ScopeIndent" /> -->
<!-- TODO Enable this
<arg name="tab-width" value="4"/>
<rule ref="Generic.WhiteSpace.ScopeIndent">
<properties>
<property name="indent" value="4"/>
<property name="tabIndent" value="true"/>
</properties>
</rule>
-->
<rule ref="Squiz.WhiteSpace.ScopeClosingBrace.Indent" />
<!-- There MUST NOT be trailing whitespace at the end of non-blank lines. -->
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
<properties>
<property name="ignoreBlankLines" value="true"/>
</properties>
</rule>
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.StartFile">
<severity>0</severity>
</rule>
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndFile">
<severity>0</severity>
</rule>
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines">
<severity>0</severity>
</rule>
<rule ref="Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose" />
<rule ref="Squiz.ControlStructures.ForEachLoopDeclaration.SpaceAfterOpen" />
<rule ref="Squiz.ControlStructures.ForEachLoopDeclaration.SpaceBeforeClose" />
<rule ref="Squiz.Functions.MultiLineFunctionDeclaration" />
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing">
<properties>
<property name="equalsSpacing" value="1"/>
</properties>
</rule>
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint">
<severity>0</severity>
</rule>
<rule ref="Squiz.Scope.MethodScope.Missing" />
<!-- Rules from PEAR Standard --> <!-- Rules from PEAR Standard -->
@ -232,12 +284,12 @@
<severity>5</severity> <severity>5</severity>
</rule> </rule>
<rule ref="PEAR.Commenting.FunctionComment.MissingReturn"> <!--<rule ref="PEAR.Commenting.FunctionComment.MissingReturn">
<severity>0</severity> <severity>0</severity>
</rule> </rule>-->
<rule ref="PEAR.Commenting.FunctionComment.Missing"> <!--<rule ref="PEAR.Commenting.FunctionComment.Missing">
<severity>0</severity> <severity>0</severity>
</rule> </rule>-->
<rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamType" /> <rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamType" />
@ -280,22 +332,29 @@
<rule ref="PEAR.Commenting.InlineComment" /> <rule ref="PEAR.Commenting.InlineComment" />
<!-- <rule ref="PEAR.ControlStructures.ControlSignature" /> --> <!-- Check position of { after a control structure like if (), while (), etc... -->
<!--
<rule ref="PEAR.ControlStructures.ControlSignature" />
-->
<!-- <rule ref="PEAR.ControlStructures.MultiLineCondition" /> --> <!-- <rule ref="PEAR.ControlStructures.MultiLineCondition" /> -->
<!-- Test if () are removed for includes --> <!-- Test if () are removed for includes -->
<rule ref="PEAR.Files.IncludingFile" /> <rule ref="PEAR.Files.IncludingFile" />
<!-- Disable some error messages that we do not want. --> <!-- Disable some error messages that we do not want. -->
<rule ref="PEAR.Files.IncludingFile.UseInclude"> <rule ref="PEAR.Files.IncludingFile.UseInclude">
<severity>0</severity> <severity>0</severity>
</rule> </rule>
<!-- TODO Enable this test. We should use require for include in prior of include when out of if -->
<rule ref="PEAR.Files.IncludingFile.UseIncludeOnce"> <rule ref="PEAR.Files.IncludingFile.UseIncludeOnce">
<severity>0</severity> <severity>0</severity>
</rule> </rule>
<rule ref="PEAR.Files.IncludingFile.UseRequire"> <rule ref="PEAR.Files.IncludingFile.UseRequire">
<severity>0</severity> <severity>0</severity>
</rule> </rule>
<!-- TODO Enable this test. We should use require for include in prior of include when out of if -->
<rule ref="PEAR.Files.IncludingFile.UseRequireOnce"> <rule ref="PEAR.Files.IncludingFile.UseRequireOnce">
<severity>0</severity> <severity>0</severity>
</rule> </rule>
@ -304,12 +363,15 @@
<rule ref="PEAR.Functions.FunctionCallSignature" /> <rule ref="PEAR.Functions.FunctionCallSignature" />
<!-- TODO Enable this test. -->
<rule ref="PEAR.Functions.FunctionCallSignature.CloseBracketLine"> <rule ref="PEAR.Functions.FunctionCallSignature.CloseBracketLine">
<severity>0</severity> <severity>0</severity>
</rule> </rule>
<!-- TODO Enable this test. -->
<rule ref="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket"> <rule ref="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket">
<severity>0</severity> <severity>0</severity>
</rule> </rule>
<rule ref="PEAR.Functions.FunctionCallSignature.EmptyLine"> <rule ref="PEAR.Functions.FunctionCallSignature.EmptyLine">
<severity>0</severity> <severity>0</severity>
</rule> </rule>
@ -318,12 +380,6 @@
</rule> </rule>
<rule ref="PEAR.Functions.FunctionCallSignature.SpaceBeforeOpenBracket"> <rule ref="PEAR.Functions.FunctionCallSignature.SpaceBeforeOpenBracket">
<severity>0</severity> <severity>0</severity>
</rule>
<rule ref="PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket">
<severity>0</severity>
</rule>
<rule ref="PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket">
<severity>0</severity>
</rule> </rule>
<rule ref="PEAR.Functions.FunctionCallSignature.SpaceAfterCloseBracket"> <rule ref="PEAR.Functions.FunctionCallSignature.SpaceAfterCloseBracket">
<severity>0</severity> <severity>0</severity>
@ -360,14 +416,21 @@
<severity>0</severity> <severity>0</severity>
</rule> </rule>
<rule ref="PEAR.NamingConventions.ValidFunctionName.NotCamelCaps"> <!--<rule ref="PEAR.NamingConventions.ValidFunctionName.NotCamelCaps">
<severity>0</severity> <severity>0</severity>
</rule> </rule>-->
<!--<rule ref="PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps">
<severity>0</severity>
</rule>-->
<rule ref="PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore"> <rule ref="PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore">
<severity>0</severity> <severity>0</severity>
</rule> </rule>
<rule ref="PEAR.NamingConventions.ValidVariableName" /> <rule ref="PEAR.NamingConventions.ValidVariableName" />
<rule ref="PSR2.Classes.ClassDeclaration" />
<rule ref="PSR2.Methods.FunctionClosingBrace" />
<rule ref="PSR2.ControlStructures.ElseIfDeclaration.NotAllowed" />
<!-- This is not in PSR2 --> <!-- This is not in PSR2 -->
<rule ref="PEAR.NamingConventions.ValidVariableName.PrivateNoUnderscore"> <rule ref="PEAR.NamingConventions.ValidVariableName.PrivateNoUnderscore">
<severity>0</severity> <severity>0</severity>
@ -394,4 +457,10 @@
<!-- The closing ?> tag MUST be omitted from files containing only PHP. --> <!-- The closing ?> tag MUST be omitted from files containing only PHP. -->
<rule ref="Zend.Files.ClosingTag"/> <rule ref="Zend.Files.ClosingTag"/>
<rule ref="PSR2.Classes.ClassDeclaration" />
<rule ref="PSR2.Methods.FunctionClosingBrace" />
<rule ref="PSR2.Files.EndFileNewline.TooMany" />
<rule ref="PSR2.Files.EndFileNewline.NoneFound" />
<rule ref="PSR2.Methods.FunctionCallSignature.SpaceBeforeOpenBracket" />
<rule ref="PSR2.Classes.PropertyDeclaration.VarUsed" />
</ruleset> </ruleset>

View File

@ -17,14 +17,14 @@ fi
# To detec # To detec
if [ "x$1" = "xlist" ] if [ "x$1" = "xlist" ]
then then
find . \( -iname "functions" -o -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" -o -iname "*.pml" \) -exec file "{}" + | grep CRLF find . \( -iname "functions" -o -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" -o -iname "*.pml" \) -exec file "{}" + | grep -v 'documents\/website' | grep CRLF
# find . \( -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" \) -exec file "{}" + | grep -v 'htdocs\/includes' | grep CRLF # find . \( -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" \) -exec file "{}" + | grep -v 'documents\/website' | grep -v 'htdocs\/includes' | grep CRLF
fi fi
# To convert # To convert
if [ "x$1" = "xfix" ] if [ "x$1" = "xfix" ]
then then
for fic in `find . \( -iname "functions" -o -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" -o -iname "*.pml" \) -exec file "{}" + | grep CRLF | awk -F':' '{ print $1 }' ` for fic in `find . \( -iname "functions" -o -iname "*.md" -o -iname "*.html" -o -iname "*.htm" -o -iname "*.php" -o -iname "*.sh" -o -iname "*.cml" -o -iname "*.css" -o -iname "*.js" -o -iname "*.lang" -o -iname "*.pl" -o -iname "*.sql" -o -iname "*.txt" -o -iname "*.xml" -o -iname "*.pml" \) -exec file "{}" + | grep -v 'documents\/website' | grep CRLF | awk -F':' '{ print $1 }' `
do do
echo "Fix file $fic" echo "Fix file $fic"
dos2unix "$fic" dos2unix "$fic"

View File

@ -9,6 +9,10 @@ fi
FROM=$1-01-01 FROM=$1-01-01
TO=$1-12-31 TO=$1-12-31
echo "Number of contributors for the year"
echo "git log --since $FROM --before $TO | grep ^Author | sort -u -f -i -b | wc -l" echo "git log --since $FROM --before $TO | grep ^Author | sort -u -f -i -b | wc -l"
git log --since $FROM --before $TO | grep ^Author | sort -u -f -i -b | wc -l git log --since $FROM --before $TO | grep ^Author | sort -u -f -i -b | wc -l
echo "Number of commit for the year"
git log --pretty='format:%cd' --date=format:'%Y' | uniq -c | awk '{print "Year: "$2", commits: "$1}' | grep "Year: $1"

130
dev/tools/snakeCaseToCamelCase.sh Executable file
View File

@ -0,0 +1,130 @@
#!/bin/bash
## Need "rpl" package
RPL_INSTALLED=$(dpkg -s rpl)
if [[ -z ${RPL_INSTALLED} ]]; then
echo "This bash need rpl command, you can install it with: sudo apt install rpl"
fi
DIR_HTDOCS=$( cd "$( dirname "${BASH_SOURCE[0]}" )/../../htdocs" >/dev/null && pwd )
PATTERN=""
if [[ -f $1 ]]; then
TFile=("$1") # specific file
elif [[ -n $1 ]]; then
PATTERN=$1 # name of a particular file or pattern (ex: societe.class.php)
else
PATTERN="*.class.php" # *.lib.php
fi
if [[ -n ${PATTERN} ]]; then
TCLASSFILE=$(find "${DIR_HTDOCS}" -name "${PATTERN}" | grep -v "/custom/" | grep -v "/includes/" | grep -v -F -f "${DIR_HTDOCS}/../.gitignore")
TFile=()
I=0
for f in ${TCLASSFILE}; do
TFile[${I}]="${f}"
((I++))
done
fi
REGEX_FNC_W='^([[:blank:]]*)(public|private|protected)?[ \t]*(static)?[ \t]*[^\$\(]function[ \t]*([a-zA-Z0-9\-\_]*)[\(](.*)[\)][ \t]*([\{]?)$'
INDENT=" "
for f in ${TFile[@]}; do
# echo ${f}
IFS=$'\n'
TLine=($(cat "${f}" | grep -E "${REGEX_FNC_W}"))
for LINE in ${TLine[@]}; do
if [[ ${LINE} =~ ^${REGEX_FNC_W}$ ]]; then
FIRST_INDENT=${BASH_REMATCH[1]} # seem not work
FNC_TYPE=${BASH_REMATCH[2]}
STATIC=${BASH_REMATCH[3]}
FNC_NAME=${BASH_REMATCH[4]}
PARAMETERS_ORIGIN=${BASH_REMATCH[5]}
BRACKET_END=${BASH_REMATCH[6]}
if [[ ${LINE} =~ ^([[:blank:]]*) ]]; then # but this seems work to get indentation
FIRST_INDENT=${BASH_REMATCH[1]}
fi
[[ ${FNC_NAME} =~ ^__ ]] && continue # skip magic function
CAMEL_CASE=$(echo "${FNC_NAME}" | sed -r 's/(_)([a-zA-Z0-9])/\U\2/g')
[[ ${CAMEL_CASE} = ${FNC_NAME} ]] && continue # skip if no difference
#echo A: ${#FIRST_INDENT}
#printf "${FIRST_INDENT}TEST INDENT\n"
#echo B: ${FNC_TYPE}
#echo C: ${STATIC}
#echo D: ${FNC_NAME}
#echo D: ${CAMEL_CASE}
#echo E: ${PARAMETERS_ORIGIN}
#echo F: ${BRACKET_END}
#exit
[[ -n $(cat "${f}" | grep -i "function[[:blank:]]*${CAMEL_CASE}") ]] && continue # skip if already exists
TCommentLine=()
J=1
while :; do
COMMENT=$(cat ${f} | grep -B ${J} ${LINE/\$/\\$} | head -n1 | grep -P '^[\t\ ]*(/\*\*|\*[^/]?|\*/)')
if [[ -n ${COMMENT} ]]; then
TCommentLine[${J}]="${COMMENT}"
((J++))
else
break
fi
done
COMMENT_ORIGIN=""
COMMENT_ORIGIN_WITH_DEPRECATED=""
COMMENT_DUPLICATE=""
if [[ ${#TCommentLine[@]} -gt 0 ]]; then
for (( idx=${#TCommentLine[@]} ; idx>0 ; idx-- )) ; do
COMMENT_ORIGIN="${COMMENT_ORIGIN}\n${TCommentLine[idx]}"
done
COMMENT_DUPLICATE=${COMMENT_ORIGIN}
COMMENT_ORIGIN_WITH_DEPRECATED=$(echo "${COMMENT_ORIGIN%?} @deprecated\n${FIRST_INDENT} * @see ${CAMEL_CASE}\n${FIRST_INDENT} */")
fi
PARAMETERS=${PARAMETERS_ORIGIN}
TParam=()
I=0
while [[ ${PARAMETERS} =~ (\$[a-zA-Z0-9\_\-]+) ]]; do
TParam[${I}]=${BASH_REMATCH[1]}
PARAMETERS=${PARAMETERS#*"${BASH_REMATCH[1]}"}
((I++))
done
PARAMS_STR=$(printf ", %s" "${TParam[@]}")
PARAMS_STR=${PARAMS_STR:2}
REPLACE=${LINE}
[[ -z ${BRACKET_END} ]] && REPLACE="${LINE}\n${FIRST_INDENT}{\n${FIRST_INDENT}${INDENT}" || REPLACE="${LINE}\n${FIRST_INDENT}${INDENT}"
[[ -n ${STATIC} ]] && REPLACE="${REPLACE}return self::" || REPLACE="${REPLACE}return \$this->"
REPLACE="${REPLACE}${CAMEL_CASE}(${PARAMS_STR});\n${FIRST_INDENT}}\n\n"
REPLACE="${REPLACE}${FIRST_INDENT}${COMMENT_ORIGIN}\n${FIRST_INDENT}"
[[ -n ${STATIC} ]] && REPLACE="${REPLACE}${STATIC} "
[[ -n ${FNC_TYPE} ]] && REPLACE="${REPLACE}${FNC_TYPE} "
REPLACE="${REPLACE}function ${CAMEL_CASE}(${PARAMETERS_ORIGIN})"
[[ -n ${BRACKET_END} ]] && REPLACE="${REPLACE}\n${FIRST_INDENT}{"
echo " ${FNC_NAME} -> ${CAMEL_CASE}"
if [[ -n ${COMMENT_ORIGIN_WITH_DEPRECATED} ]]; then
rpl -e --quiet "${COMMENT_ORIGIN}" ${COMMENT_ORIGIN_WITH_DEPRECATED} "${f}"
fi
rpl -e --quiet "${LINE}" ${REPLACE} "${f}"
fi
done
done

View File

@ -21,14 +21,14 @@
<div class="center"> <div class="center">
<div class="login_table" align="center"> <div class="login_table center">
<!-- <tr><td colspan="2" valign="middle"> --> <!-- <tr><td colspan="2" valign="middle"> -->
<div id="login_line1" align="center"> <div id="login_line1" class="center">
<div id="login_left" style="display: inline-block; min-width: 250px; margin: 0 auto;"><div class="center"> <div id="login_left" style="display: inline-block; min-width: 250px; margin: 0 auto;"><div class="center">
<table class="none" summary="Login pass" cellpadding="2" align="center"> <table class="none center" summary="Login pass" cellpadding="2">
<!-- Login --> <!-- Login -->
<tr> <tr>
@ -50,7 +50,7 @@
</div> <!-- end div left --> </div> <!-- end div left -->
<!-- </td> <!-- </td>
<td align="center" valign="middle">--> <td class="center" valign="middle">-->
<div id="login_right" style="display: inline-block; min-width: 250px; margin: 0 auto;"> <div id="login_right" style="display: inline-block; min-width: 250px; margin: 0 auto;">
<img alt="Logo" title="" src="/dolibarrnew/theme/dolibarr_logo.png" id="img_logo" /> <img alt="Logo" title="" src="/dolibarrnew/theme/dolibarr_logo.png" id="img_logo" />

View File

@ -4,7 +4,7 @@ This directory contains tools to generate translation files for a new
languages or to update translation files for existing languages. languages or to update translation files for existing languages.
See Dolibarr Wiki page: See Dolibarr Wiki page:
http://wiki.dolibarr.org/index.php/Translator_documentation http://wiki.dolibarr.org/index.php/Translator_documentation
For more informations on how to use them. For more information on how to use them.
To install transifex client: To install transifex client:
sudo pip install --upgrade transifex-client sudo pip install --upgrade transifex-client

View File

@ -50,7 +50,7 @@ class autoTranslator
* @param string $_apikey Api key * @param string $_apikey Api key
* @return void * @return void
*/ */
function __construct($_destlang,$_refLang,$_langDir,$_limittofile,$_apikey) public function __construct($_destlang, $_refLang, $_langDir, $_limittofile, $_apikey)
{ {
// Set enviorment variables // Set enviorment variables
@ -63,9 +63,8 @@ class autoTranslator
// Translate // Translate
//ini_set('default_charset','UTF-8'); //ini_set('default_charset','UTF-8');
ini_set('default_charset',$this->_outputpagecode); ini_set('default_charset', $this->_outputpagecode);
$this->parse_refLangTranslationFiles(); $this->parseRefLangTranslationFiles();
} }
/** /**
@ -73,7 +72,7 @@ class autoTranslator
* *
* @return void * @return void
*/ */
private function parse_refLangTranslationFiles() private function parseRefLangTranslationFiles()
{ {
$files = $this->getTranslationFilesArray($this->_refLang); $files = $this->getTranslationFilesArray($this->_refLang);
@ -84,7 +83,7 @@ class autoTranslator
$counter++; $counter++;
$fileContent = null; $fileContent = null;
$refPath = $this->_langDir.$this->_refLang.self::DIR_SEPARATOR.$file; $refPath = $this->_langDir.$this->_refLang.self::DIR_SEPARATOR.$file;
$fileContent = file($refPath,FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES); $fileContent = file($refPath, FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES);
print "Processing file " . $file . ", with ".count($fileContent)." lines<br>\n"; print "Processing file " . $file . ", with ".count($fileContent)." lines<br>\n";
// Define target dirs // Define target dirs
@ -94,19 +93,19 @@ class autoTranslator
$targetlangs=array(); $targetlangs=array();
// If we must process all languages // If we must process all languages
$arraytmp=dol_dir_list($this->_langDir,'directories',0); $arraytmp=dol_dir_list($this->_langDir, 'directories', 0);
foreach($arraytmp as $dirtmp) foreach($arraytmp as $dirtmp)
{ {
if ($dirtmp['name'] === $this->_refLang) continue; // We discard source language if ($dirtmp['name'] === $this->_refLang) continue; // We discard source language
$tmppart=explode('_',$dirtmp['name']); $tmppart=explode('_', $dirtmp['name']);
if (preg_match('/^en/i',$dirtmp['name'])) continue; // We discard en_* languages if (preg_match('/^en/i', $dirtmp['name'])) continue; // We discard en_* languages
if (preg_match('/^fr/i',$dirtmp['name'])) continue; // We discard fr_* languages if (preg_match('/^fr/i', $dirtmp['name'])) continue; // We discard fr_* languages
if (preg_match('/^es/i',$dirtmp['name'])) continue; // We discard es_* languages if (preg_match('/^es/i', $dirtmp['name'])) continue; // We discard es_* languages
if (preg_match('/ca_ES/i',$dirtmp['name'])) continue; // We discard es_CA language if (preg_match('/ca_ES/i', $dirtmp['name'])) continue; // We discard es_CA language
if (preg_match('/pt_BR/i',$dirtmp['name'])) continue; // We discard pt_BR language if (preg_match('/pt_BR/i', $dirtmp['name'])) continue; // We discard pt_BR language
if (preg_match('/nl_BE/i',$dirtmp['name'])) continue; // We discard nl_BE language if (preg_match('/nl_BE/i', $dirtmp['name'])) continue; // We discard nl_BE language
if (preg_match('/^\./i',$dirtmp['name'])) continue; // We discard files .* if (preg_match('/^\./i', $dirtmp['name'])) continue; // We discard files .*
if (preg_match('/^CVS/i',$dirtmp['name'])) continue; // We discard CVS if (preg_match('/^CVS/i', $dirtmp['name'])) continue; // We discard CVS
$targetlangs[]=$dirtmp['name']; $targetlangs[]=$dirtmp['name'];
} }
//var_dump($targetlangs); //var_dump($targetlangs);
@ -123,7 +122,7 @@ class autoTranslator
{ {
// No file present, we generate file // No file present, we generate file
echo "File not found: " . $destPath . ". We generate it.<br>\n"; echo "File not found: " . $destPath . ". We generate it.<br>\n";
$this->createTranslationFile($destPath,$my_destlang); $this->createTranslationFile($destPath, $my_destlang);
} }
else else
{ {
@ -131,18 +130,18 @@ class autoTranslator
} }
// Translate lines // Translate lines
$fileContentDest = file($destPath,FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES); $fileContentDest = file($destPath, FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES);
$newlines=0; $newlines=0;
foreach($fileContent as $line){ foreach($fileContent as $line){
$key = $this->getLineKey($line); $key = $this->getLineKey($line);
$value = $this->getLineValue($line); $value = $this->getLineValue($line);
if ($key && $value) if ($key && $value)
{ {
$newlines+=$this->translateFileLine($fileContentDest,$file,$key,$value,$my_destlang); $newlines+=$this->translateFileLine($fileContentDest, $file, $key, $value, $my_destlang);
} }
} }
$this->updateTranslationFile($destPath,$file,$my_destlang); $this->updateTranslationFile($destPath, $file, $my_destlang);
echo "New translated lines: " . $newlines . "<br>\n"; echo "New translated lines: " . $newlines . "<br>\n";
//if ($counter ==3) die('fim'); //if ($counter ==3) die('fim');
} }
@ -157,7 +156,7 @@ class autoTranslator
* @param string $my_destlang Target language code * @param string $my_destlang Target language code
* @return void * @return void
*/ */
private function updateTranslationFile($destPath,$file,$my_destlang) private function updateTranslationFile($destPath, $file, $my_destlang)
{ {
$this->_time_end = date('Y-m-d H:i:s'); $this->_time_end = date('Y-m-d H:i:s');
@ -168,7 +167,7 @@ class autoTranslator
fwrite($fp, "\n"); fwrite($fp, "\n");
fwrite($fp, "// START - Lines generated via autotranslator.php tool (".$this->_time.").\n"); fwrite($fp, "// START - Lines generated via autotranslator.php tool (".$this->_time.").\n");
fwrite($fp, "// Reference language: ".$this->_refLang." -> ".$my_destlang."\n"); fwrite($fp, "// Reference language: ".$this->_refLang." -> ".$my_destlang."\n");
foreach( $this->_translatedFiles[$file] as $line) { foreach($this->_translatedFiles[$file] as $line) {
fwrite($fp, $line . "\n"); fwrite($fp, $line . "\n");
} }
fwrite($fp, "// STOP - Lines generated via autotranslator.php tool (".$this->_time_end.").\n"); fwrite($fp, "// STOP - Lines generated via autotranslator.php tool (".$this->_time_end.").\n");
@ -184,7 +183,7 @@ class autoTranslator
* @param string $my_destlang Target language code * @param string $my_destlang Target language code
* @return void * @return void
*/ */
private function createTranslationFile($path,$my_destlang) private function createTranslationFile($path, $my_destlang)
{ {
$fp = fopen($path, 'w+'); $fp = fopen($path, 'w+');
fwrite($fp, "/*\n"); fwrite($fp, "/*\n");
@ -206,11 +205,11 @@ class autoTranslator
* @param string $my_destlang Language code (ie: fr_FR) * @param string $my_destlang Language code (ie: fr_FR)
* @return int 0=Nothing translated, 1=Record translated * @return int 0=Nothing translated, 1=Record translated
*/ */
private function translateFileLine($content,$file,$key,$value,$my_destlang) private function translateFileLine($content, $file, $key, $value, $my_destlang)
{ {
//print "key =".$key."\n"; //print "key =".$key."\n";
foreach( $content as $line ) { foreach($content as $line) {
$destKey = $this->getLineKey($line); $destKey = $this->getLineKey($line);
$destValue = $this->getLineValue($line); $destValue = $this->getLineValue($line);
// If translated return // If translated return
@ -221,14 +220,16 @@ class autoTranslator
} }
} }
if ($key == 'CHARSET') $val=$this->_outputpagecode; if ($key == 'CHARSET') {
else if (preg_match('/^Format/',$key)) $val=$value; $val=$this->_outputpagecode;
else if ($value=='-') $val=$value; } elseif (preg_match('/^Format/', $key)) {
else $val=$value;
{ } elseif ($value=='-') {
$val=$value;
} else {
// If not translated then translate // If not translated then translate
if ($this->_outputpagecode == 'UTF-8') $val=$this->translateTexts(array($value),substr($this->_refLang,0,2),substr($my_destlang,0,2)); if ($this->_outputpagecode == 'UTF-8') $val=$this->translateTexts(array($value), substr($this->_refLang, 0, 2), substr($my_destlang, 0, 2));
else $val=utf8_decode($this->translateTexts(array($value),substr($this->_refLang,0,2),substr($my_destlang,0,2))); else $val=utf8_decode($this->translateTexts(array($value), substr($this->_refLang, 0, 2), substr($my_destlang, 0, 2)));
} }
$val=trim($val); $val=trim($val);
@ -247,7 +248,7 @@ class autoTranslator
*/ */
private function getLineKey($line) private function getLineKey($line)
{ {
$arraykey = explode('=',$line,2); $arraykey = explode('=', $line, 2);
return trim($arraykey[0]); return trim($arraykey[0]);
} }
@ -259,7 +260,7 @@ class autoTranslator
*/ */
private function getLineValue($line) private function getLineValue($line)
{ {
$arraykey = explode('=',$line,2); $arraykey = explode('=', $line, 2);
return trim(isset($arraykey[1])?$arraykey[1]:''); return trim(isset($arraykey[1])?$arraykey[1]:'');
} }
@ -273,7 +274,7 @@ class autoTranslator
{ {
$dir = new DirectoryIterator($this->_langDir.$lang); $dir = new DirectoryIterator($this->_langDir.$lang);
while($dir->valid()) { while($dir->valid()) {
if(!$dir->isDot() && $dir->isFile() && ! preg_match('/^\./',$dir->getFilename())) { if(!$dir->isDot() && $dir->isFile() && ! preg_match('/^\./', $dir->getFilename())) {
$files[] = $dir->getFilename(); $files[] = $dir->getFilename();
} }
$dir->next(); $dir->next();
@ -292,16 +293,16 @@ class autoTranslator
private function translateTexts($src_texts, $src_lang, $dest_lang) private function translateTexts($src_texts, $src_lang, $dest_lang)
{ {
// We want to be sure that src_lang and dest_lang are using 2 chars only // We want to be sure that src_lang and dest_lang are using 2 chars only
$tmp=explode('_',$src_lang); $tmp=explode('_', $src_lang);
if (! empty($tmp[1]) && $tmp[0] == $tmp[1]) $src_lang=$tmp[0]; if (! empty($tmp[1]) && $tmp[0] == $tmp[1]) $src_lang=$tmp[0];
$tmp=explode('_',$dest_lang); $tmp=explode('_', $dest_lang);
if (! empty($tmp[1]) && $tmp[0] == $tmp[1]) $dest_lang=$tmp[0]; if (! empty($tmp[1]) && $tmp[0] == $tmp[1]) $dest_lang=$tmp[0];
//setting language pair //setting language pair
$lang_pair = $src_lang.'|'.$dest_lang; $lang_pair = $src_lang.'|'.$dest_lang;
$src_text_to_translate=preg_replace('/%s/','SSSSS',implode('',$src_texts)); $src_text_to_translate=preg_replace('/%s/', 'SSSSS', implode('', $src_texts));
$src_text_to_translate=preg_replace('/'.preg_quote('\n\n').'/',' NNNNN ',$src_text_to_translate); $src_text_to_translate=preg_replace('/'.preg_quote('\n\n').'/', ' NNNNN ', $src_text_to_translate);
// Define GET URL v1 // Define GET URL v1
//$url = "http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=".urlencode($src_text_to_translate)."&langpair=".urlencode($lang_pair); //$url = "http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=".urlencode($src_text_to_translate)."&langpair=".urlencode($lang_pair);
@ -338,13 +339,12 @@ class autoTranslator
} }
$rep=$json['data']['translations'][0]['translatedText']; $rep=$json['data']['translations'][0]['translatedText'];
$rep=preg_replace('/SSSSS/i','%s',$rep); $rep=preg_replace('/SSSSS/i', '%s', $rep);
$rep=preg_replace('/NNNNN/i','\n\n',$rep); $rep=preg_replace('/NNNNN/i', '\n\n', $rep);
$rep=preg_replace('/&#39;/i','\'',$rep); $rep=preg_replace('/&#39;/i', '\'', $rep);
//print "OK ".join('',$src_texts).' => '.$rep."\n"; //print "OK ".join('',$src_texts).' => '.$rep."\n";
return $rep; return $rep;
} }
} }

View File

@ -90,7 +90,7 @@ if ($argv[2] != 'all')
require_once DOL_DOCUMENT_ROOT."/../dev/translation/autotranslator.class.php"; require_once DOL_DOCUMENT_ROOT."/../dev/translation/autotranslator.class.php";
$langParser = new autoTranslator($argv[2],$argv[1],$dir,$file,$argv[3]); $langParser = new autoTranslator($argv[2], $argv[1], $dir, $file, $argv[3]);
print "***** Finished *****\n"; print "***** Finished *****\n";

View File

@ -113,7 +113,7 @@ if (empty($files))
$dups=array(); $dups=array();
$exludefiles = array('.','..','README'); $exludefiles = array('.','..','README');
$files = array_diff($files,$exludefiles); $files = array_diff($files, $exludefiles);
// To force a file: $files=array('myfile.lang'); // To force a file: $files=array('myfile.lang');
if (isset($argv[2])) if (isset($argv[2]))
{ {
@ -128,10 +128,10 @@ foreach ($files AS $file) {
$content = file($workdir.$file); $content = file($workdir.$file);
foreach ($content AS $line => $row) { foreach ($content AS $line => $row) {
// don't want comment lines // don't want comment lines
if (substr($row,0,1) !== '#') { if (substr($row, 0, 1) !== '#') {
// don't want lines without the separator (why should those even be here, anyway...) // don't want lines without the separator (why should those even be here, anyway...)
if (strpos($row,'=')!==false) { if (strpos($row, '=')!==false) {
$row_array = explode('=',$row); // $row_array[0] = key $row_array = explode('=', $row); // $row_array[0] = key
$langstrings_3d[$path_file['basename']][$line+1]=$row_array[0]; $langstrings_3d[$path_file['basename']][$line+1]=$row_array[0];
$langstrings_3dtrans[$path_file['basename']][$line+1]=$row_array[1]; $langstrings_3dtrans[$path_file['basename']][$line+1]=$row_array[1];
$langstrings_full[]=$row_array[0]; $langstrings_full[]=$row_array[0];
@ -215,8 +215,8 @@ foreach ($dups as $string => $pages)
$s.="\n"; $s.="\n";
if ($duplicateinsamefile) $sduplicateinsamefile .= $s; if ($duplicateinsamefile) $sduplicateinsamefile .= $s;
else if ($inmain) $sinmainandother .= $s; elseif ($inmain) $sinmainandother .= $s;
else if ($inadmin) $sininstallandadmin .= $s; elseif ($inadmin) $sininstallandadmin .= $s;
else $sother .= $s; else $sother .= $s;
} }
@ -295,6 +295,10 @@ if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($a
if (preg_match('/^DescADHERENT_/', $value)) $qualifiedforclean=0; if (preg_match('/^DescADHERENT_/', $value)) $qualifiedforclean=0;
if (preg_match('/^SubmitTranslation/', $value)) $qualifiedforclean=0; if (preg_match('/^SubmitTranslation/', $value)) $qualifiedforclean=0;
if (preg_match('/^ModuleCompanyCode/', $value)) $qualifiedforclean=0; if (preg_match('/^ModuleCompanyCode/', $value)) $qualifiedforclean=0;
if (preg_match('/InDolibarr$/', $value)) $qualifiedforclean=0;
// admin.lang
if (preg_match('/^DAV_ALLOW_PUBLIC_DIR/i', $value)) $qualifiedforclean=0;
if (preg_match('/^DAV_ALLOW_ECM_DIR/i', $value)) $qualifiedforclean=0;
// boxes.lang // boxes.lang
if (preg_match('/^BoxTitleLast/', $value)) $qualifiedforclean=0; if (preg_match('/^BoxTitleLast/', $value)) $qualifiedforclean=0;
if (preg_match('/^BoxTitleLatest/', $value)) $qualifiedforclean=0; if (preg_match('/^BoxTitleLatest/', $value)) $qualifiedforclean=0;
@ -351,7 +355,7 @@ if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($a
$search = '-e "\''.$value.'\'" -e \'"'.$value.'"\' -e "('.$value.')" -e "('.$value.',"'; $search = '-e "\''.$value.'\'" -e \'"'.$value.'"\' -e "('.$value.')" -e "('.$value.',"';
$string = 'grep -R -m 1 -F --exclude=includes/* --include=*.php '.$search.' '.$htdocs.'* '.$scripts.'*'; $string = 'grep -R -m 1 -F --exclude=includes/* --include=*.php '.$search.' '.$htdocs.'* '.$scripts.'*';
//print $string."<br>\n"; //print $string."<br>\n";
exec($string,$output); exec($string, $output);
if (empty($output)) { if (empty($output)) {
$unused[$value] = $line; $unused[$value] = $line;
echo $line; // $trad contains the \n echo $line; // $trad contains the \n
@ -368,7 +372,7 @@ if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($a
{ {
$filetosave='/tmp/'.($argv[2]?$argv[2]:"").'notused.lang'; $filetosave='/tmp/'.($argv[2]?$argv[2]:"").'notused.lang';
print "Strings in en_US that are never used are saved into file ".$filetosave.":\n"; print "Strings in en_US that are never used are saved into file ".$filetosave.":\n";
file_put_contents($filetosave, implode("",$unused)); file_put_contents($filetosave, implode("", $unused));
print "To remove from original file, run command :\n"; print "To remove from original file, run command :\n";
if (($argv[2]?$argv[2]:"")) print 'cd htdocs/langs/en_US; mv '.($argv[2]?$argv[2]:"")." ".($argv[2]?$argv[2]:"").".tmp; "; if (($argv[2]?$argv[2]:"")) print 'cd htdocs/langs/en_US; mv '.($argv[2]?$argv[2]:"")." ".($argv[2]?$argv[2]:"").".tmp; ";
print "diff ".($argv[2]?$argv[2]:"").".tmp ".$filetosave." | grep \< | cut -b 3- > ".($argv[2]?$argv[2]:""); print "diff ".($argv[2]?$argv[2]:"").".tmp ".$filetosave." | grep \< | cut -b 3- > ".($argv[2]?$argv[2]:"");
@ -384,4 +388,3 @@ if ($web)
} }
exit; exit;

View File

@ -81,14 +81,14 @@ if ($filesToProcess == 'all')
{ {
$dir = new DirectoryIterator('htdocs/langs/'.$lPrimary); $dir = new DirectoryIterator('htdocs/langs/'.$lPrimary);
while($dir->valid()) { while($dir->valid()) {
if(!$dir->isDot() && $dir->isFile() && ! preg_match('/^\./',$dir->getFilename())) { if(!$dir->isDot() && $dir->isFile() && ! preg_match('/^\./', $dir->getFilename())) {
$files[] = $dir->getFilename(); $files[] = $dir->getFilename();
} }
$dir->next(); $dir->next();
} }
$filesToProcess=$files; $filesToProcess=$files;
} }
else $filesToProcess=explode(',',$filesToProcess); else $filesToProcess=explode(',', $filesToProcess);
// Arguments should be OK here. // Arguments should be OK here.
@ -256,7 +256,7 @@ foreach($filesToProcess as $fileToProcess)
print "Read Primary File $lPrimaryFile and write ".$output.":\n"; print "Read Primary File $lPrimaryFile and write ".$output.":\n";
fwrite($oh, "# Dolibarr language file - Source file is en_US - ".(preg_replace('/\.lang$/','',$fileToProcess))."\n"); fwrite($oh, "# Dolibarr language file - Source file is en_US - ".(preg_replace('/\.lang$/', '', $fileToProcess))."\n");
$cnt = 0; $cnt = 0;
while (($line = fgets($handle)) !== false) while (($line = fgets($handle)) !== false)
@ -306,11 +306,11 @@ foreach($filesToProcess as $fileToProcess)
//print "Found primary key = ".$key."\n"; //print "Found primary key = ".$key."\n";
// Key not in other file // Key not in other file
if (in_array($key, $arrayofkeytoalwayskeep) || preg_match('/^FormatDate/',$key) || preg_match('/^FormatHour/',$key)) if (in_array($key, $arrayofkeytoalwayskeep) || preg_match('/^FormatDate/', $key) || preg_match('/^FormatHour/', $key))
{ {
//print "Key $key is a key we always want to see into secondary file (line: $cnt).\n"; //print "Key $key is a key we always want to see into secondary file (line: $cnt).\n";
} }
else if ( ! array_key_exists($key, $aSecondary)) elseif ( ! array_key_exists($key, $aSecondary))
{ {
//print "Key $key does NOT exist in secondary language (line: $cnt).\n"; //print "Key $key does NOT exist in secondary language (line: $cnt).\n";
continue; continue;
@ -320,7 +320,7 @@ foreach($filesToProcess as $fileToProcess)
if ( if (
(! empty($aSecondary[$key]) && $aSecondary[$key] != $aPrimary[$key] (! empty($aSecondary[$key]) && $aSecondary[$key] != $aPrimary[$key]
&& ! empty($aEnglish[$key]) && $aSecondary[$key] != $aEnglish[$key]) && ! empty($aEnglish[$key]) && $aSecondary[$key] != $aEnglish[$key])
|| in_array($key, $arrayofkeytoalwayskeep) || preg_match('/^FormatDate/',$key) || preg_match('/^FormatHour/',$key) || in_array($key, $arrayofkeytoalwayskeep) || preg_match('/^FormatDate/', $key) || preg_match('/^FormatHour/', $key)
) )
{ {
//print "Key $key differs (aSecondary=".$aSecondary[$key].", aPrimary=".$aPrimary[$key].", aEnglish=".$aEnglish[$key].") so we add it into new secondary language (line: $cnt).\n"; //print "Key $key differs (aSecondary=".$aSecondary[$key].", aPrimary=".$aPrimary[$key].", aEnglish=".$aEnglish[$key].") so we add it into new secondary language (line: $cnt).\n";

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

After

Width:  |  Height:  |  Size: 268 KiB

View File

@ -11,15 +11,15 @@ informations on Dolibarr.<br>
But if you are looking for other resources (downloads, documentation, addons, ...), you can find this But if you are looking for other resources (downloads, documentation, addons, ...), you can find this
on Internet on web following sites:<br> on Internet on web following sites:<br>
<br> <br>
* <a href="http://wiki.dolibarr.org">Dolibarr wiki (documentation)</a><br> * <a href="https://wiki.dolibarr.org">Dolibarr wiki (documentation)</a><br>
<br> <br>
* <a href="http://www.dolibarr.org">Dolibarr portal (official website)</a><br> * <a href="https://www.dolibarr.org">Dolibarr portal (official website)</a><br>
<br> <br>
* <a href="http://demo.dolibarr.org">Dolibarr demo (online)</a><br> * <a href="https://demo.dolibarr.org">Dolibarr demo (online)</a><br>
<br> <br>
* <a href="http://www.nltechno.com/pages/dolibarrwinbin.php">DoliWamp, the Dolibarr for Windows</a><br> * <a href="https://www.nltechno.com/pages/dolibarrwinbin.php">DoliWamp, the Dolibarr for Windows</a><br>
<br> <br>
* <a href="http://www.dolistore.com">DoliStore (official addons/plugins market place)</a><br> * <a href="https://www.dolistore.com">DoliStore (official addons/plugins market place)</a><br>
</body> </body>
</html> </html>

View File

@ -7,12 +7,12 @@ Download
-------------------------------- --------------------------------
* Dolibarr ERP/CRM can be downloaded at sourceforge: * Dolibarr ERP/CRM can be downloaded at sourceforge:
http://sourceforge.net/projects/dolibarr/files https://sourceforge.net/projects/dolibarr/files
or from Dolibarr official web site: or from Dolibarr official web site:
http://www.dolibarr.org https://www.dolibarr.org
* Most external modules are only available on DoliStore: * Most external modules are only available on DoliStore:
http://www.dolistore.org https://www.dolistore.com
-------------------------------- --------------------------------
@ -22,4 +22,4 @@ Install
* For a Quick guide, take a look at README file into root directory. * For a Quick guide, take a look at README file into root directory.
* More complete documentations are also available on line on the Dolibarr Wiki: * More complete documentations are also available on line on the Dolibarr Wiki:
http://wiki.dolibarr.org https://wiki.dolibarr.org

33
doc/install/README-DE Normal file
View File

@ -0,0 +1,33 @@
README (deutsch / german / allemand)
--------------------------------
--------------------------------
Download / Herunterladen
--------------------------------
* Dolibarr ERP/CRM kann man über die offizielle Dolibarr Website
https://www.dolibarr.org/downloads
oder direkt von Sourceforge
https://sourceforge.net/projects/dolibarr/files/
herunterladen.
* Die meisten externen Module/Themens sind über den DoliStore verfügbar:
https://www.dolistore.com/de/
--------------------------------
Installation
--------------------------------
* Für eine kurze Einleitung, schau auf die README Datei im Hauptverzeichnis.
* Umfangreiche Dokumentationen sind im Dolibarr Wiki zu finden:
https://wiki.dolibarr.org/index.php/Hauptseite
* eine Deutsche Community bietet der Dolibarr e.V. unter
https://www.dolibarr.de/

Some files were not shown because too many files have changed in this diff Show More