forked from Wavyzz/dolibarr
Compare commits
38 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cf57e7e88b | ||
|
|
a186e16568 | ||
|
|
52138372ce | ||
|
|
a27538f582 | ||
|
|
a621032643 | ||
|
|
32646cb7f4 | ||
|
|
74b67eb6c6 | ||
|
|
644f365455 | ||
|
|
667890247c | ||
|
|
c727bbb530 | ||
|
|
e2b5315e23 | ||
|
|
2462daf1ed | ||
|
|
9c7381601f | ||
|
|
35a25599e5 | ||
|
|
9bfeb5e424 | ||
|
|
973a2ede97 | ||
|
|
d3fc152001 | ||
|
|
e8fd551043 | ||
|
|
34b3113bb7 | ||
|
|
90854dc2bf | ||
|
|
b44ddaa696 | ||
|
|
d10f277bba | ||
|
|
03a9daa3e6 | ||
|
|
e5193f16cc | ||
|
|
9abde6c057 | ||
|
|
a52ae607ba | ||
|
|
6aa8ba8935 | ||
|
|
5ad7894849 | ||
|
|
2c1571c514 | ||
|
|
f782ac6654 | ||
|
|
1e54e695b2 | ||
|
|
f2eb3c1a55 | ||
|
|
41a970c90f | ||
|
|
3d9b2a1676 | ||
|
|
7be0e0da1c | ||
|
|
bb01ad7d9a | ||
|
|
c81c91755d | ||
|
|
cd2b9538c1 |
13
.gitattributes
vendored
13
.gitattributes
vendored
@@ -11,31 +11,26 @@
|
||||
*.htm text eol=lf
|
||||
*.html text eol=lf
|
||||
*.js text eol=lf
|
||||
*.json text eol=lf
|
||||
*.css text eol=lf
|
||||
*.lang text eol=lf
|
||||
*.txt text eol=lf
|
||||
*.md text eol=lf
|
||||
*.pp text eol=lf
|
||||
*.sh text eol=lf
|
||||
*.yml text eol=lf
|
||||
*.yaml text eol=lf
|
||||
*.conf text eol=lf
|
||||
|
||||
.bash_aliases text eol=lf
|
||||
|
||||
# Denote all files that are truly binary and should not be modified.
|
||||
*.bmp binary
|
||||
*.frm binary
|
||||
*.ico binary
|
||||
*.jpeg binary
|
||||
*.png binary
|
||||
*.jpg binary
|
||||
*.odt binary
|
||||
*.odf binary
|
||||
*.frm binary
|
||||
*.MYD binary
|
||||
*.MYI binary
|
||||
*.odf binary
|
||||
*.odt binary
|
||||
*.png binary
|
||||
|
||||
|
||||
# Export ignores to generate clean production tarballs
|
||||
/build export-ignore
|
||||
|
||||
6
.github/CODE_OF_CONDUCT.md
vendored
6
.github/CODE_OF_CONDUCT.md
vendored
@@ -77,8 +77,8 @@ contact@dolibarr.org
|
||||
|
||||
## 10. License and attribution
|
||||
|
||||
This Code of Conduct is distributed under a [Creative Commons Attribution-ShareAlike license](https://creativecommons.org/licenses/by-sa/3.0/).
|
||||
This Code of Conduct is distributed under a [Creative Commons Attribution-ShareAlike license](http://creativecommons.org/licenses/by-sa/3.0/).
|
||||
|
||||
Portions of text derived from the [Django Code of Conduct](https://www.djangoproject.com/conduct/) and the [Geek Feminism Anti-Harassment Policy](https://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy).
|
||||
Portions of text derived from the [Django Code of Conduct](https://www.djangoproject.com/conduct/) and the [Geek Feminism Anti-Harassment Policy](http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy).
|
||||
|
||||
Retrieved on November 22, 2016 from [https://citizencodeofconduct.org/](http://citizencodeofconduct.org/)
|
||||
Retrieved on November 22, 2016 from [http://citizencodeofconduct.org/](http://citizencodeofconduct.org/)
|
||||
|
||||
33
.github/CONTRIBUTING.md
vendored
33
.github/CONTRIBUTING.md
vendored
@@ -4,17 +4,14 @@ How to contribute to Dolibarr
|
||||
Bug reports and feature requests
|
||||
--------------------------------
|
||||
|
||||
<a name="not-a-support-forum"></a>*Note*: **GitHub Issues is not a support forum.** If you have questions about Dolibarr / need help using the software, please use [the forums](https://www.dolibarr.org/forum.php). Forums exist in different languages.
|
||||
<a name="not-a-support-forum"></a>*Note*: Issues are not a support forum. If you need help using the software, please use [the forums](https://www.dolibarr.org/forum).
|
||||
|
||||
Issues are managed on [GitHub](https://github.com/Dolibarr/dolibarr/issues).
|
||||
Default **language here is english**. So please prepare your contributions in english.
|
||||
Issues are managed on [GitHub](https://github.com/Dolibarr/dolibarr/issues).
|
||||
|
||||
1. Please [use the search engine](https://help.github.com/articles/searching-issues) to check if nobody's already reported your problem.
|
||||
2. [Create an issue](https://help.github.com/articles/creating-an-issue). Choose an appropriate title. Prepend appropriately with Bug or Feature Request.
|
||||
3. Tell us the version you are using! (look at /htdocs/admin/system/dolibarr.php? and check if you are using the latest version)
|
||||
4. Write a report with as much detail as possible (Use [screenshots](https://help.github.com/articles/issue-attachments) or even screencasts and provide logging and debugging informations whenever possible).
|
||||
5. Delete unnecessary submissions.
|
||||
6. **Check your Message at Preview before sending.**
|
||||
4. Tell us the version you are using!
|
||||
3. Write a report with as much detail as possible (Use [screenshots](https://help.github.com/articles/issue-attachments) or even screencasts and provide logging and debugging informations whenever possible).
|
||||
|
||||
|
||||
|
||||
@@ -26,12 +23,10 @@ Default **language here is english**. So please prepare your contributions in en
|
||||
1. [Fork](https://help.github.com/articles/fork-a-repo) the [GitHub repository](https://github.com/Dolibarr/dolibarr).
|
||||
2. Clone your fork.
|
||||
3. Choose a branch(See the [Branches](#branches) section below).
|
||||
4. Read our developer documentation on the [Dolibarr Wiki](https://wiki.dolibarr.org/index.php?title=Developer_documentation).
|
||||
5. Commit and push your changes.
|
||||
6. [Make a pull request](https://help.github.com/articles/creating-a-pull-request).
|
||||
4. Commit and push your changes.
|
||||
5. [Make a pull request](https://help.github.com/articles/creating-a-pull-request).
|
||||
|
||||
<span id="branches" name="branches"></span>
|
||||
### Branches
|
||||
### <a name="branches"></a>Branches
|
||||
|
||||
Unless you're fixing a bug, all pull requests should be made against the *develop* branch.
|
||||
|
||||
@@ -61,7 +56,7 @@ You can add it to your git configuration using:
|
||||
git config --local commit.template .gitmessage
|
||||
```
|
||||
|
||||
where
|
||||
where
|
||||
|
||||
#### Keyword
|
||||
In uppercase if you want to have the log comment appears into the generated ChangeLog file.
|
||||
@@ -106,7 +101,7 @@ Long description (Can span accross multiple lines).
|
||||
</pre>
|
||||
|
||||
### Pull Requests
|
||||
Pull Request (PR) process is the process to submit a change (enhancement, bug fix, ...) into the code of the project. There is some rules to know and
|
||||
Pull Request (PR) process is the process to submit a change (enhancement, bug fix, ...) into the code of the project. There is some rules to know and
|
||||
a process to follow to optimize the chance to have PRs merged efficiently...
|
||||
|
||||
* A PR must be atomic. It means it must contains the lower possible changes for 1 need (1 bug fix or 1 new feature) without breaking usability of code. If a PR can be split into several PRs, it often means your PR is not atomic.
|
||||
@@ -117,15 +112,15 @@ a process to follow to optimize the chance to have PRs merged efficiently...
|
||||
|
||||
Also, some code changes need a prior approbation:
|
||||
|
||||
* if you want to include a new external library (into htdocs/includes directory), please ask before to the core project manager (mention @dolibarr-jedi in your issue) to see if such a library can be accepted.
|
||||
* if you want to include a new external library (into htdocs/includes directory), please ask before to the core project manager (mention @dolibarr-yoda in your issue) to see if such a library can be accepted.
|
||||
|
||||
* if you add a new tables or fields, you MUST first submit a standalone PR with the data structure changes you plan to add/modify (and only data structure changes). Start development only once this data structure has been accepted.
|
||||
* if you add a new table, you must first create a page on https://wiki.dolibarr.org/index.php/Category:Table_SQL (copy an existing page changing its name to see it into this index page). Then ask the project manager (@dolibarr-yoda) if the new data model you plan to add is compatible with curent and future works in progress and 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 (A label is added in such a case).
|
||||
|
||||
If the label of PR start with "Draft" or "WIP" (Work In Progress), it will not be analyzed for merging until you change the label of the PR (but it can be analyzed for discussion).
|
||||
If the label of PR start with "Draft" or "WIP" (Work In Progress), it will not be analyzed for merging until you change the label of PR (but it can be analyzed for discussion).
|
||||
|
||||
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. Don't expect anything on your PR if you have such errors, you MUST first fix the Continuous Integration error to have it taken into consideration.
|
||||
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. Don't expect anything on your PR if you have such errors, you MUST first fix the Continuous Integration error to have it taken into consideration.
|
||||
|
||||
If the PR is valid, and is kept open for a long time, a tag will also be added on the PR to describe the status of your PR and why the PR is kept open. By putting your mouse on the tag, you will get a full explanation of the tag/status that explain why your PR has not been integrated yet.
|
||||
In most cases, it gives you information of things you have to do to have the PR taken into consideration (for example a change is requested, a conflict is expected to be solved, some questions were asked). If you have a yellow, red flag of purple flag, don't expect to have your PR validated. You must first provide the answer the tag ask you. The majority of open PR are waiting an action of the author of the PR.
|
||||
@@ -146,7 +141,7 @@ 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 retrieve all old translation of a source text, and restore the translation in one click with no need to retranslate it if there is no need to.
|
||||
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.
|
||||
|
||||
|
||||
### Resources
|
||||
|
||||
2
.github/FUNDING.yml
vendored
2
.github/FUNDING.yml
vendored
@@ -2,4 +2,4 @@
|
||||
|
||||
open_collective: dolibarr
|
||||
custom: https://wiki.dolibarr.org/index.php/Subscribe
|
||||
github: [eldy]
|
||||
# github: [eldy]
|
||||
35
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
35
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us fix something that is broken
|
||||
title: ''
|
||||
labels: Bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
# Instructions
|
||||
*This is a template to help you report good issues. You may use [Github Markdown](https://help.github.com/articles/getting-started-with-writing-and-formatting-on-github/) syntax to format your issue report.*
|
||||
*Please:*
|
||||
- *replace the bracket enclosed texts with meaningful information*
|
||||
- *remove any unused sub-section*
|
||||
|
||||
|
||||
# Bug
|
||||
[*Short description*]
|
||||
|
||||
## Environment
|
||||
- **Version**: [*Affected Dolibarr version(s)*]
|
||||
- **OS**: [*Server OS type and version*]
|
||||
- **Web server**: [*Webserver type and version*]
|
||||
- **PHP**: [*PHP version*]
|
||||
- **Database**: [*Database type and version*]
|
||||
- **URL(s)**: [*Affected URL(s)*]
|
||||
|
||||
## Expected and actual behavior
|
||||
[*Verbose description*]
|
||||
|
||||
## Steps to reproduce the behavior
|
||||
[*Verbose description*]
|
||||
|
||||
## [Attached files](https://help.github.com/articles/issue-attachments) (Screenshots, screencasts, dolibarr.log, debugging informations…)
|
||||
[*Files*]
|
||||
71
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
71
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -1,71 +0,0 @@
|
||||
name: Bug report
|
||||
description: Create a report to help us fix something that is broken
|
||||
labels: ["Bug"]
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
This is a template to help you report good issues. You may use [Github Markdown](https://help.github.com/articles/getting-started-with-writing-and-formatting-on-github/) syntax to format your issue report.
|
||||
|
||||
- type: textarea
|
||||
id: bug
|
||||
attributes:
|
||||
label: Bug
|
||||
description: Please give a short description of the bug
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: environment-version
|
||||
attributes:
|
||||
label: Environment Version
|
||||
description: Affected Dolibarr version(s)
|
||||
|
||||
- type: input
|
||||
id: environment-os
|
||||
attributes:
|
||||
label: Environment OS
|
||||
description: Server OS type and version
|
||||
|
||||
- type: input
|
||||
id: environment-webserver
|
||||
attributes:
|
||||
label: Environment Web server
|
||||
description: Webserver type and version
|
||||
|
||||
- type: input
|
||||
id: environment-php
|
||||
attributes:
|
||||
label: Environment PHP
|
||||
description: PHP version
|
||||
|
||||
- type: input
|
||||
id: environment-database
|
||||
attributes:
|
||||
label: Environment Database
|
||||
description: Database type and version
|
||||
|
||||
- type: input
|
||||
id: environment-urls
|
||||
attributes:
|
||||
label: Environment URL(s)
|
||||
description: Affected URL(s)
|
||||
|
||||
- type: textarea
|
||||
id: expected-behaviour
|
||||
attributes:
|
||||
label: Expected and actual behavior
|
||||
description: Verbose description
|
||||
|
||||
- type: textarea
|
||||
id: reproduce
|
||||
attributes:
|
||||
label: Steps to reproduce the behavior
|
||||
description: Verbose description
|
||||
|
||||
- type: textarea
|
||||
id: files
|
||||
attributes:
|
||||
label: Attached files
|
||||
description: Screenshots, screencasts, dolibarr.log, debugging informations
|
||||
27
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
27
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest a new idea for this project
|
||||
title: ''
|
||||
labels: Feature request
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
# Instructions
|
||||
*This is a template to help you report good issues. You may use [Github Markdown](https://help.github.com/articles/getting-started-with-writing-and-formatting-on-github/) syntax to format your issue report.*
|
||||
*Please:*
|
||||
- *replace the bracket enclosed texts with meaningful information*
|
||||
- *remove any unused sub-section*
|
||||
|
||||
|
||||
# Feature Request
|
||||
[*Short description*]
|
||||
|
||||
## Use case
|
||||
[*Verbose description*]
|
||||
|
||||
## Suggested implementation
|
||||
[*Verbose description*]
|
||||
|
||||
## Suggested steps
|
||||
[*List of tasks to achieve goal*]
|
||||
35
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
35
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
@@ -1,35 +0,0 @@
|
||||
name: Feature request
|
||||
description: Suggest a new idea for this project
|
||||
labels: ["Feature request"]
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
This is a template to help you report good issues. You may use [Github Markdown](https://help.github.com/articles/getting-started-with-writing-and-formatting-on-github/) syntax to format your issue report.
|
||||
|
||||
- type: textarea
|
||||
id: feature-request
|
||||
attributes:
|
||||
label: Feature Request
|
||||
description: Short description
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: use-case
|
||||
attributes:
|
||||
label: Use case
|
||||
description: Verbose description
|
||||
|
||||
- type: textarea
|
||||
id: suggested-implementation
|
||||
attributes:
|
||||
label: Suggested implementation
|
||||
description: Verbose description
|
||||
|
||||
- type: textarea
|
||||
id: suggested-steps
|
||||
attributes:
|
||||
label: Suggested steps
|
||||
description: List of tasks to achieve goal
|
||||
10
.github/PULL_REQUEST_TEMPLATE.md
vendored
10
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -1,18 +1,18 @@
|
||||
# Instructions
|
||||
*This is a template to help you make good pull requests. You may use [Github Markdown](https://help.github.com/articles/getting-started-with-writing-and-formatting-on-github/) syntax to format your issue report.*
|
||||
*Please:*
|
||||
- *only keep the "FIX", "CLOSE" or "NEW" section* (use uppercase to have the PR appears into the ChangeLog, lowercase will not appears)
|
||||
- *only keep the "Fix", "Close" or "New" section*
|
||||
- *follow the project [contributing guidelines](/.github/CONTRIBUTING.md)*
|
||||
- *replace the bracket enclosed texts with meaningful information*
|
||||
- *replace the bracket enclosed textswith meaningful informations*
|
||||
|
||||
|
||||
# FIX|Fix #[*issue_number Short description*]
|
||||
# Fix #[*issue_number Short description*]
|
||||
[*Long description*]
|
||||
|
||||
|
||||
# CLOSE|Close #[*issue_number Short description*]
|
||||
# Close #[*issue_number Short description*]
|
||||
[*Long description*]
|
||||
|
||||
|
||||
# NEW|New [*Short description*]
|
||||
# New [*Short description*]
|
||||
[*Long description*]
|
||||
|
||||
6
.github/dependabot.yml
vendored
6
.github/dependabot.yml
vendored
@@ -1,6 +0,0 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
20
.github/workflows/exakat.yml
vendored
20
.github/workflows/exakat.yml
vendored
@@ -1,20 +0,0 @@
|
||||
# See syntax file on https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
|
||||
name: "Exakat analysis"
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 20 * * *"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
exakat:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Exakat
|
||||
uses: docker://exakat/exakat-ga
|
||||
with:
|
||||
ignore_rules: 'Classes/UseInstanceof,Performances/PrePostIncrement,Functions/UndefinedFunctions,Functions/WrongNumberOfArguments,Functions/WrongTypeWithCall,Variables/UndefinedVariable,Classes/DontUnsetProperties,Classes/NonPpp,Classes/StaticMethodsCalledFromObject,Classes/UseClassOperator,Functions/UsesDefaultArguments,Php/NoClassInGlobal,Php/ShouldUseCoalesce,Php/WrongTypeForNativeFunction,Structures/AddZero,Structures/DropElseAfterReturn,Structures/IfWithSameConditions,Structures/MergeIfThen,Structures/ElseIfElseif,Structures/ExitUsage,Structures/RepeatedPrint,Structures/RepeatedRegex,Structures/SameConditions,Structures/SwitchWithoutDefault,Structures/ShouldMakeTernary,Structures/UselessParenthesis,Structures/UseConstant'
|
||||
ignore_dirs: '/htdocs/includes,/build,/dev,/doc,/scripts,/test'
|
||||
6
.github/workflows/stale-issues-safe.yml
vendored
6
.github/workflows/stale-issues-safe.yml
vendored
@@ -14,11 +14,11 @@ jobs:
|
||||
- uses: Dolibarr/stale@staleunstale
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-message: 'This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue may be closed automatically by stale bot in 10 days (you should still be able to re-open it if required).'
|
||||
stale-message: 'This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue may be closed automatically by stale bot in 15 days (you should still be able to re-open it if required).'
|
||||
stale-label: 'Issue Stale (automatic label)'
|
||||
exempt-labels: 'Priority High / Blocking,Priority Top Strategic,Priority Medium,hacktoberfest,hacktoberfest-accepted,good first issue,Bug Security (CVE),Analysis of PR in progress'
|
||||
exempt-labels: 'Priority High / Blocking,Priority Top Strategic,Priority Medium,Hacktoberfest,good first issue,Bug Security (CVE),Analysis of PR in progres'
|
||||
days-before-stale: 365
|
||||
days-before-close: 10
|
||||
days-before-close: 15
|
||||
operations-per-run: 100
|
||||
dry-run: false
|
||||
|
||||
17
.gitignore
vendored
17
.gitignore
vendored
@@ -37,23 +37,8 @@ htdocs/includes/jakub-onderka/
|
||||
htdocs/includes/phpdocumentor/
|
||||
htdocs/includes/phpspec/
|
||||
htdocs/includes/phpunit/
|
||||
htdocs/includes/php-parallel-lint/
|
||||
htdocs/includes/sebastian/
|
||||
htdocs/includes/squizlabs/
|
||||
htdocs/includes/symfony/
|
||||
htdocs/includes/webmozart/
|
||||
htdocs/.well-known/apple-developer-merchantid-domain-association
|
||||
/factory/
|
||||
/output/
|
||||
|
||||
# Node Modules
|
||||
build/yarn-error.log
|
||||
build/node_modules/
|
||||
node_modules/
|
||||
|
||||
#yarn
|
||||
yarn.lock
|
||||
|
||||
#package-lock
|
||||
package-lock.json
|
||||
|
||||
doc/install.lock
|
||||
|
||||
@@ -17,10 +17,7 @@ filter:
|
||||
- build/*
|
||||
- dev/*
|
||||
- doc/*
|
||||
- documents/*
|
||||
- node_modules/*
|
||||
- test/*
|
||||
dependency_paths:
|
||||
- htdocs/includes/*
|
||||
paths:
|
||||
- htdocs/*
|
||||
|
||||
128
.travis.yml
128
.travis.yml
@@ -1,6 +1,6 @@
|
||||
# This script is used by Travis CI to run automatically Continuous test integration
|
||||
# from Dolibarr GitHub repository.
|
||||
# For syntax, see https://docs.travis-ci.com/user/languages/php/
|
||||
# For syntax, see http://about.travis-ci.org/docs/user/languages/php/
|
||||
|
||||
# We use dist: xenial to have php 5.6+ available
|
||||
os: linux
|
||||
@@ -9,9 +9,6 @@ dist: xenial
|
||||
|
||||
language: php
|
||||
|
||||
git:
|
||||
depth: 1
|
||||
|
||||
# Start on every boot
|
||||
services:
|
||||
- memcached
|
||||
@@ -41,23 +38,16 @@ env:
|
||||
|
||||
jobs:
|
||||
fast_finish: true
|
||||
#allow_failures:
|
||||
#- php: nightly
|
||||
allow_failures:
|
||||
- php: nightly
|
||||
include:
|
||||
- stage: PHP 5.6-7.4
|
||||
if: type = push
|
||||
- if: type = push
|
||||
php: '5.6'
|
||||
env: DB=postgresql
|
||||
- stage: PHP 5.6-7.4
|
||||
if: type = pull_request OR type = push
|
||||
php: '7.4.22'
|
||||
- if: type = pull_request OR type = push
|
||||
php: '7.4'
|
||||
env: DB=mysql
|
||||
- stage: PHP Dev
|
||||
if: type = push AND branch = develop
|
||||
php: nightly
|
||||
env: DB=mysql
|
||||
- stage: PHP Dev
|
||||
if: type = push AND branch = 15.0
|
||||
- if: type = push AND branch = develop
|
||||
php: nightly
|
||||
env: DB=mysql
|
||||
|
||||
@@ -80,6 +70,13 @@ before_install:
|
||||
phpenv config-rm xdebug.ini
|
||||
echo
|
||||
|
||||
- |
|
||||
if [ "$DB" = 'postgresql' ]; then
|
||||
echo "Check pgloader version"
|
||||
pgloader --version
|
||||
echo
|
||||
fi
|
||||
|
||||
install:
|
||||
- |
|
||||
echo "Updating Composer"
|
||||
@@ -93,36 +90,26 @@ install:
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Installing Composer dependencies - PHP Unit, Parallel Lint, PHP CodeSniffer, PHP Vardump check - for $TRAVIS_PHP_VERSION"
|
||||
if [ "$TRAVIS_PHP_VERSION" = '5.6' ]; then
|
||||
echo "Installing Composer dependencies (PHP Unit, Parallel Lint & PHP CodeSniffer"
|
||||
if [ "$TRAVIS_PHP_VERSION" = '5.4' ] || [ "$TRAVIS_PHP_VERSION" = '5.5' ]; then
|
||||
composer -n require phpunit/phpunit ^4 \
|
||||
jakub-onderka/php-parallel-lint ^0 \
|
||||
jakub-onderka/php-console-highlighter ^0 \
|
||||
squizlabs/php_codesniffer ^3
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '5.6' ] || [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] \
|
||||
[ "$TRAVIS_PHP_VERSION" = '7.2' ] || [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = '7.4' ]; then
|
||||
composer -n require phpunit/phpunit ^5 \
|
||||
php-parallel-lint/php-parallel-lint ^1 \
|
||||
php-parallel-lint/php-console-highlighter ^0 \
|
||||
php-parallel-lint/php-var-dump-check ~0.4 \
|
||||
jakub-onderka/php-parallel-lint ^0 \
|
||||
jakub-onderka/php-console-highlighter ^0 \
|
||||
squizlabs/php_codesniffer ^3
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = '7.2' ]; then
|
||||
composer -n require phpunit/phpunit ^6 \
|
||||
php-parallel-lint/php-parallel-lint ^1 \
|
||||
php-parallel-lint/php-console-highlighter ^0 \
|
||||
php-parallel-lint/php-var-dump-check ~0.4 \
|
||||
squizlabs/php_codesniffer ^3
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = '7.4' ] || [ "$TRAVIS_PHP_VERSION" = '7.4.22' ]; then
|
||||
composer -n require phpunit/phpunit ^7 \
|
||||
php-parallel-lint/php-parallel-lint ^1.2 \
|
||||
php-parallel-lint/php-console-highlighter ^0 \
|
||||
php-parallel-lint/php-var-dump-check ~0.4 \
|
||||
squizlabs/php_codesniffer ^3
|
||||
fi
|
||||
# phpunit 9 is required for php 8
|
||||
if [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
|
||||
composer -n require --ignore-platform-reqs phpunit/phpunit ^7 \
|
||||
php-parallel-lint/php-parallel-lint ^1.2 \
|
||||
php-parallel-lint/php-console-highlighter ^0 \
|
||||
php-parallel-lint/php-var-dump-check ~0.4 \
|
||||
composer -n require --ignore-platform-reqs phpunit/phpunit ^5 \
|
||||
jakub-onderka/php-parallel-lint ^0 \
|
||||
jakub-onderka/php-console-highlighter ^0 \
|
||||
squizlabs/php_codesniffer ^3
|
||||
fi
|
||||
fi
|
||||
echo
|
||||
|
||||
- |
|
||||
@@ -170,10 +157,6 @@ before_script:
|
||||
which phpcs
|
||||
phpcs --version | head -
|
||||
phpcs -i | head -
|
||||
# Check PHP Vardump check version
|
||||
echo "PHP Vardump check version"
|
||||
which var_dump_check
|
||||
var_dump_check --version
|
||||
# Check PHPUnit version
|
||||
echo "PHPUnit version"
|
||||
which phpunit
|
||||
@@ -186,10 +169,6 @@ before_script:
|
||||
mysql --version | head -
|
||||
mysql -e "SELECT VERSION();" | head -
|
||||
psql --version
|
||||
if [ "$DB" = 'postgresql' ]; then
|
||||
echo "Check pgloader version"
|
||||
pgloader --version
|
||||
fi
|
||||
echo
|
||||
|
||||
- |
|
||||
@@ -249,7 +228,7 @@ before_script:
|
||||
# enable php-fpm
|
||||
- sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
|
||||
- |
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = '7.2' ] || [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = '7.4' ] || [ "$TRAVIS_PHP_VERSION" = '7.4.22' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = '7.2' ] || [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = '7.4' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
|
||||
# Copy the included pool
|
||||
sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf
|
||||
fi
|
||||
@@ -279,43 +258,25 @@ script:
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Checking PHP syntax errors (only 1 version to not overload travis and avoid duplicate tests)"
|
||||
echo "Checking PHP syntax errors"
|
||||
# Ensure we catch errors
|
||||
set -e
|
||||
#parallel-lint --exclude htdocs/includes --blame .
|
||||
# Exclusions are defined in the ruleset.xml file
|
||||
if [ "$TRAVIS_PHP_VERSION" = "7.4.22" ]; then
|
||||
parallel-lint -e php --exclude dev/tools/test/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes \
|
||||
--exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian \
|
||||
--exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/php-parallel-lint --exclude htdocs/includes/symfony \
|
||||
--exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \
|
||||
--exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --blame .
|
||||
fi
|
||||
parallel-lint --exclude dev/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/webmozart --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes --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 --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/phpunit/ --exclude htdocs/includes/composer/autoload_static.php --blame .
|
||||
set +e
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Checking coding style (only for Pull Requests builds and 1 version to not overload travis and avoid duplicate tests)"
|
||||
echo "Checking coding style (excluding Pull Requests builds to not overload travis, excluding also some jobs to avoid duplicate tests)"
|
||||
# Ensure we catch errors
|
||||
set -e
|
||||
# Exclusions are defined in the ruleset.xml file
|
||||
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "7.4.22" ]; then
|
||||
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "7.4" ] && [ "$DB" = "mysql" ]; then
|
||||
phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .;
|
||||
fi
|
||||
set +e
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Checking missing debug"
|
||||
# Ensure we catch errors
|
||||
set -e
|
||||
# Exclusions are defined in the ruleset.xml file
|
||||
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "7.4.22" ]; then
|
||||
var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php .
|
||||
fi
|
||||
set +e
|
||||
echo
|
||||
|
||||
- |
|
||||
export INSTALL_FORCED_FILE=htdocs/install/install.forced.php
|
||||
echo "Setting up Dolibarr $INSTALL_FORCED_FILE to test installation"
|
||||
@@ -424,28 +385,9 @@ script:
|
||||
php upgrade.php 11.0.0 12.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade11001200.log
|
||||
php upgrade2.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-2.log
|
||||
php step5.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-3.log
|
||||
php upgrade.php 12.0.0 13.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade12001300.log
|
||||
php upgrade2.php 12.0.0 13.0.0 > $TRAVIS_BUILD_DIR/upgrade12001300-2.log
|
||||
php step5.php 12.0.0 13.0.0 > $TRAVIS_BUILD_DIR/upgrade12001300-3.log
|
||||
php upgrade.php 13.0.0 14.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade13001400.log
|
||||
php upgrade2.php 13.0.0 14.0.0 > $TRAVIS_BUILD_DIR/upgrade13001400-2.log
|
||||
php step5.php 13.0.0 14.0.0 > $TRAVIS_BUILD_DIR/upgrade13001400-3.log
|
||||
php upgrade.php 14.0.0 15.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade14001500.log
|
||||
php upgrade2.php 14.0.0 15.0.0 > $TRAVIS_BUILD_DIR/upgrade14001500-2.log
|
||||
php step5.php 14.0.0 15.0.0 > $TRAVIS_BUILD_DIR/upgrade14001500-3.log
|
||||
php upgrade.php 15.0.0 16.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade15001600.log
|
||||
php upgrade2.php 15.0.0 16.0.0 > $TRAVIS_BUILD_DIR/upgrade15001600-2.log
|
||||
php step5.php 15.0.0 16.0.0 > $TRAVIS_BUILD_DIR/upgrade15001600-3.log
|
||||
ls -alrt $TRAVIS_BUILD_DIR/
|
||||
|
||||
- |
|
||||
echo "Enabling new modules"
|
||||
# Enable modules not enabled into original dump
|
||||
set -e
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_API,MAIN_MODULE_PRODUCTBATCH,MAIN_MODULE_SUPPLIERPROPOSAL,MAIN_MODULE_STRIPE,MAIN_MODULE_EXPENSEREPORT > $TRAVIS_BUILD_DIR/enablemodule.log
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_WEBSITE,MAIN_MODULE_TICKET,MAIN_MODULE_ACCOUNTING,MAIN_MODULE_MRP >> $TRAVIS_BUILD_DIR/enablemodule.log
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_RECEPTION,MAIN_MODULE_RECRUITMENT >> $TRAVIS_BUILD_DIR/enablemodule.log
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_KNOWLEDGEMANAGEMENT,MAIN_MODULE_EVENTORGANIZATION,MAIN_MODULE_PARTNERSHIP >> $TRAVIS_BUILD_DIR/enablemodule.log
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL,MAIN_MODULE_WEBSITE,MAIN_MODULE_TICKETSUP,MAIN_MODULE_ACCOUNTING > $TRAVIS_BUILD_DIR/enablemodule.log
|
||||
echo $?
|
||||
cd -
|
||||
set +e
|
||||
|
||||
54
.tx/config
54
.tx/config
@@ -128,18 +128,24 @@ source_file = htdocs/langs/en_US/errors.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.eventorganization]
|
||||
file_filter = htdocs/langs/<lang>/eventorganization.lang
|
||||
source_file = htdocs/langs/en_US/eventorganization.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.exports]
|
||||
file_filter = htdocs/langs/<lang>/exports.lang
|
||||
source_file = htdocs/langs/en_US/exports.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.externalsite]
|
||||
file_filter = htdocs/langs/<lang>/externalsite.lang
|
||||
source_file = htdocs/langs/en_US/externalsite.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.ftp]
|
||||
file_filter = htdocs/langs/<lang>/ftp.lang
|
||||
source_file = htdocs/langs/en_US/ftp.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.help]
|
||||
file_filter = htdocs/langs/<lang>/help.lang
|
||||
source_file = htdocs/langs/en_US/help.lang
|
||||
@@ -170,18 +176,6 @@ source_file = htdocs/langs/en_US/interventions.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.intracommreport]
|
||||
file_filter = htdocs/langs/<lang>/intracommreport.lang
|
||||
source_file = htdocs/langs/en_US/intracommreport.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.knowledgemanagement]
|
||||
file_filter = htdocs/langs/<lang>/knowledgemanagement.lang
|
||||
source_file = htdocs/langs/en_US/knowledgemanagement.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.languages-not-res]
|
||||
file_filter = htdocs/langs/<lang>/languages.lang
|
||||
source_file = htdocs/langs/en_US/languages.lang
|
||||
@@ -278,12 +272,6 @@ source_file = htdocs/langs/en_US/other.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.partnership]
|
||||
file_filter = htdocs/langs/<lang>/partnership.lang
|
||||
source_file = htdocs/langs/en_US/partnership.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.paybox]
|
||||
file_filter = htdocs/langs/<lang>/paybox.lang
|
||||
source_file = htdocs/langs/en_US/paybox.lang
|
||||
@@ -338,12 +326,6 @@ source_file = htdocs/langs/en_US/receptions.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.recruitment]
|
||||
file_filter = htdocs/langs/<lang>/recruitment.lang
|
||||
source_file = htdocs/langs/en_US/recruitment.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.resource]
|
||||
file_filter = htdocs/langs/<lang>/resource.lang
|
||||
source_file = htdocs/langs/en_US/resource.lang
|
||||
@@ -380,18 +362,18 @@ source_file = htdocs/langs/en_US/stripe.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.supplier_proposal]
|
||||
file_filter = htdocs/langs/<lang>/supplier_proposal.lang
|
||||
source_file = htdocs/langs/en_US/supplier_proposal.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.suppliers]
|
||||
file_filter = htdocs/langs/<lang>/suppliers.lang
|
||||
source_file = htdocs/langs/en_US/suppliers.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.supplier_proposal]
|
||||
file_filter = htdocs/langs/<lang>/supplier_proposal.lang
|
||||
source_file = htdocs/langs/en_US/supplier_proposal.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.ticket]
|
||||
file_filter = htdocs/langs/<lang>/ticket.lang
|
||||
source_file = htdocs/langs/en_US/ticket.lang
|
||||
|
||||
2
COPYING
2
COPYING
@@ -1,7 +1,7 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
75
COPYRIGHT
75
COPYRIGHT
@@ -1,84 +1,73 @@
|
||||
|
||||
Copyright and license
|
||||
----------------------
|
||||
License
|
||||
-------
|
||||
|
||||
The Dolibarr software as a whole is distributed under the GNU General Public License as published by the Free Software Foundation;
|
||||
either version 3 of the License, or (at your option) any later version (GPL-3+). More information: https://www.gnu.org/licenses/gpl-3.0.txt.
|
||||
A copy of this license is available in the COPYING file.
|
||||
Dolibarr depends on third-party components and code snippets released under their own license (obviously, all compatible with the one of Dolibarr).
|
||||
These dependencies are listed in the bottom of this file.
|
||||
Dolibarr is released under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 3 of the License,
|
||||
or (at your option) any later version (GPL-3+).
|
||||
More information: https://www.gnu.org/licenses/gpl-3.0.txt
|
||||
|
||||
|
||||
The Dolibarr images resources (available in the doc directory) is distributed under the Creative Commons Attribution 4.0 International license (CC BY 4.0).
|
||||
|
||||
|
||||
The name Dolibarr is a trademark initially registered by Laurent Destailleur and ceased to the Dolibarr foundation. You can use the name Dolibarr
|
||||
for your own need as long as you follow the rules defined on the page https://wiki.dolibarr.org/index.php/Rules_to_use_the_brand_name_%22Dolibarr%22
|
||||
The use of the name DoliStore is also restricted to the same rules defined on https://wiki.dolibarr.org/index.php/Rules_to_use_the_brand_name_%22Dolibarr%22
|
||||
|
||||
|
||||
|
||||
Licence of dependencies of third-party components used by Dolibarr (all compatible with the Licence of Dolibarr):
|
||||
Dolibarr uses some external libraries released under different licenses. This is compatibility summary:
|
||||
|
||||
Component Version License GPL Compatible Usage
|
||||
-------------------------------------------------------------------------------------
|
||||
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)
|
||||
CKEditor 4.12.1 LGPL-2.1+ Yes Editor WYSIWYG
|
||||
EvalMath 1.0 BSD Yes Safe math expressions evaluation
|
||||
Escpos-php 2.2 MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers
|
||||
GeoIP2 0.2.0 Apache License 2.0 Yes Lib to make geoip convert
|
||||
Mobiledetect 2.8.39 MIT License Yes Detect mobile devices browsers
|
||||
GeoIP2 0.2.0 LGPL-2.1+ Yes Lib to make geoip convert
|
||||
Mobiledetect 2.8.34 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)
|
||||
PEAR Mail_MIME 1.8.9 BSD Yes NuSoap dependency
|
||||
ParseDown 1.6 MIT License Yes Markdown parser
|
||||
PCLZip 2.8.4 LGPL-3+ Yes Library to zip/unzip files
|
||||
PHPDebugBar 1.15.1 MIT License Yes Used only by the module "debugbar" for developers
|
||||
PHPSpreadSheet 1.8.2 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
|
||||
php-iban 4.1 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP
|
||||
PHPDebugBar 1.15.0 MIT License Yes Used only by the module "debugbar" for developers
|
||||
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
|
||||
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
|
||||
PSR/Logs 1.0 MIT License Yes Library for logs (used by DebugBar)
|
||||
PSR/simple-cache ? MIT License Yes Library for cache (used by PHPSpreadSheet)
|
||||
Restler 3.1.1 LGPL-3+ Yes Library to develop REST Web services (+ swagger-ui js lib into dir explorer)
|
||||
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)
|
||||
Sabre 3.2.2 BSD Yes DAV support
|
||||
Swift Mailer 5.4.2-DEV MIT License Yes Comprehensive mailing tools for PHP
|
||||
Symfony/var-dumper ??? MIT License Yes Library to make var dump (used by DebugBar)
|
||||
Stripe 7.67.0 MIT Licence Yes Library for Stripe module
|
||||
Swift Mailer 5.4.2-DEV MIT license Yes Comprehensive mailing tools for PHP
|
||||
Stripe 6.43.1 MIT licence Yes Library for Stripe module
|
||||
TCPDF 6.3.2 LGPL-3+ Yes PDF generation
|
||||
TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes FPDI replacement
|
||||
|
||||
JS libraries:
|
||||
Ace 1.4.14 BSD Yes JS library to get code syntaxique coloration in a textarea.
|
||||
ChartJS 3.7.1 MIT License Yes JS library for graph
|
||||
CKEditor 4.18 LGPL-2.1+ Yes Editor WYSIWYG
|
||||
jQuery 3.6.0 MIT License Yes JS library
|
||||
jQuery UI 1.13.1 GPL and MIT License Yes JS library plugin UI
|
||||
jQuery select2 4.0.13 GPL and Apache License Yes JS library plugin for sexier multiselect. Warning: 4.0.6+ create troubles without patching css
|
||||
Ace 1.4.8 BSD Yes JS library to get code syntaxique coloration in a textarea.
|
||||
ChartJS 2.9.3 MIT License Yes JS library for graph
|
||||
jQuery 3.4.1 MIT License Yes JS library
|
||||
jQuery UI 1.12.1 GPL and MIT License Yes JS library plugin UI
|
||||
jQuery select2 4.0.13 GPL and Apache License Yes JS library plugin for sexier multiselect. Warning: 4.0.6+ create troubles without patching css
|
||||
jQuery blockUI 2.70.0 GPL and MIT License Yes JS library plugin blockUI (to use ajax popups)
|
||||
jQuery Colorpicker 1.1 MIT License Yes JS library for color picker for a defined list of colors
|
||||
jQuery JCrop 0.9.8 GPL and MIT License Yes JS library plugin Crop (to crop images)
|
||||
jQuery Jeditable 1.7.1 GPL and MIT License Yes JS library plugin jeditable (to edit in place)
|
||||
jQuery jNotify 1.1.00 Apache License 2.0 Yes JS library plugin jNotify (to use ajax popups)
|
||||
jQuery jNotify 1.1.00 Apache Software License 2.0 Yes JS library plugin jNotify (to use ajax popups)
|
||||
jQuery jPicker 1.1.6 GPL and MIT License Yes JS library for color picker with not defined list of colors
|
||||
jQuery jqueryFileTree 1.0.1 GPL and MIT License Yes JS library for filetree
|
||||
jQuery jquerytreeview 1.4.1 MIT License Yes JS library for filetree
|
||||
jQuery TableDnD 0.6 GPL and MIT License Yes JS library plugin TableDnD (to reorder table rows)
|
||||
jQuery Timepicker 1.1.0 GPL and MIT License Yes JS library Timepicker addon for Datepicker
|
||||
jsGanttImproved 2.7.3 BSD License Yes JS library (to build Gantt reports)
|
||||
jsGanttImproved 1.7.5.4 BSD License Yes JS library (to build Gantt reports)
|
||||
JsTimezoneDetect 1.0.6 MIT License Yes JS library to detect user timezone
|
||||
SwaggerUI 2.2.10 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
|
||||
|
||||
Image libraries:
|
||||
Octicons 8.1 MIT Yes
|
||||
|
||||
Font libraries:
|
||||
Fontawesome 5.13 Font Awesome Free Licence Yes
|
||||
Fontawesome 5.13 Font Awesome Free licence Yes
|
||||
|
||||
|
||||
For more licenses compatibility informations: https://www.gnu.org/licenses/licenses.en.html
|
||||
For licenses compatibility informations:
|
||||
https://www.gnu.org/licenses/licenses.en.html
|
||||
|
||||
|
||||
Authors
|
||||
Copyright / Authors
|
||||
-------------------
|
||||
|
||||
See page https://github.com/Dolibarr/dolibarr/graphs/contributors
|
||||
|
||||
34
DCO
34
DCO
@@ -1,34 +0,0 @@
|
||||
Developer Certificate of Origin
|
||||
Version 1.1
|
||||
|
||||
Copyright (C) 2002 - Today, The Dolibarr team and its contributors.
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this
|
||||
license document, but changing it is not allowed.
|
||||
|
||||
|
||||
Developer's Certificate of Origin 1.1
|
||||
|
||||
By making a contribution to this project, I certify that:
|
||||
|
||||
(a) The contribution was created in whole or in part by me and I
|
||||
have the right to submit it under the open source license
|
||||
indicated in the file; or
|
||||
|
||||
(b) The contribution is based upon previous work that, to the best
|
||||
of my knowledge, is covered under an appropriate open source
|
||||
license and I have the right under that license to submit that
|
||||
work with modifications, whether created in whole or in part
|
||||
by me, under the same open source license (unless I am
|
||||
permitted to submit under a different license), as indicated
|
||||
in the file; or
|
||||
|
||||
(c) The contribution was provided directly to me by some other
|
||||
person who certified (a), (b) or (c) and I have not modified
|
||||
it.
|
||||
|
||||
(d) I understand and agree that this project and the contribution
|
||||
are public and that a record of the contribution (including all
|
||||
personal information I submit with it, including my sign-off) is
|
||||
maintained indefinitely and may be redistributed consistent with
|
||||
this project or the open source license(s) involved.
|
||||
6
INSTALL
Normal file
6
INSTALL
Normal file
@@ -0,0 +1,6 @@
|
||||
INSTALL
|
||||
-------
|
||||
|
||||
English: See README.md file.
|
||||
|
||||
French: Voir fichier README-FR.md.
|
||||
18
README-FR.md
18
README-FR.md
@@ -6,7 +6,7 @@
|
||||
Dolibarr ERP & CRM est un logiciel moderne pour gérer votre activité (société, association, auto-entrepreneurs, artisans).
|
||||
Il est simple d'utilisation et modulaire, vous permettant de n'activez que les fonctions dont vous avez besoin (contacts, fournisseurs, factures, commandes, stocks, agenda, ...).
|
||||
|
||||

|
||||

|
||||
|
||||
## LICENCE
|
||||
|
||||
@@ -62,11 +62,11 @@ Pour mettre à jour Dolibarr depuis une vieille version vers celle ci:
|
||||
- Au prochain accès, Dolibarr proposera la page de "mise à jour" des données (si nécessaire).
|
||||
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 être 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
|
||||
|
||||
See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) file.
|
||||
Voir fichier ChangeLog.
|
||||
|
||||
## CE QUE DOLIBARR PEUT FAIRE
|
||||
|
||||
@@ -82,17 +82,15 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
- Calendrier/Agenda partagé (avec export ical, vcal)
|
||||
- Suivi des opportunités et/ou projets (suivi de rentabilité incluant les factures, notes de frais, temps consommé valorisé, ...)
|
||||
- Gestion de contrats de services
|
||||
- Gestion de stock et inventaires
|
||||
- Gestion de stock
|
||||
- Gestion des expéditions
|
||||
- Gestion des demandes de congès
|
||||
- Gestion des notes de frais
|
||||
- Gestion de recrutement
|
||||
- GED (Gestion Electronique de Documents)
|
||||
- EMailings de masse
|
||||
- Réalisation de sondages
|
||||
- Gestion d'adhérents
|
||||
- Point de vente/Caisse enregistreuse
|
||||
- … (près de 100 modules disponibles en standard, près de 1000 autre sur la place de marché d'extensions)
|
||||
- …
|
||||
|
||||
### Autres modules
|
||||
|
||||
@@ -117,7 +115,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
- Peux être multi-société par ajout du module externe multi-société.
|
||||
- Plusieurs thèmes visuels.
|
||||
- Application simple à utiliser.
|
||||
- Requiert PHP et MariaDb, Mysql ou Postgresql (Voir versions exactes sur [https://wiki.dolibarr.org/index.php/Prérequis](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.
|
||||
- APIs.
|
||||
- Génération PDF et ODT des éléments (factures, propositions commerciales, commandes, bons expéditions, etc...)
|
||||
@@ -141,7 +139,7 @@ Dolibarr peut aussi être étendu à volonté avec l'ajout de module/application
|
||||
|
||||
Voici un liste de fonctionnalités pas encore gérées par Dolibarr:
|
||||
|
||||
- Dolibarr ne contient pas de module de génération de feuille de 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.
|
||||
- Dolibarr n'embarque pas de Webmail intégré nativement.
|
||||
- Dolibarr ne fait pas le café (pas encore).
|
||||
@@ -154,7 +152,7 @@ La documentation utilisateur, développeur et traducteur est disponible sous for
|
||||
|
||||
Ce projet existe grâce à ses nombreux contributeurs [[Contribuer](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)].
|
||||
|
||||
[](https://github.com/Dolibarr/dolibarr/graphs/contributors)
|
||||
<a href="https://github.com/Dolibarr/dolibarr/graphs/contributors"><img src="https://opencollective.com/dolibarr/contributors.svg?width=890&button=false" /></a>
|
||||
|
||||
## CREDITS
|
||||
|
||||
|
||||
170
README.md
170
README.md
@@ -2,21 +2,16 @@
|
||||
|
||||

|
||||

|
||||
[](https://php.net/)
|
||||
[](https://github.com/Dolibarr/dolibarr)
|
||||
[](https://bestpractices.coreinfrastructure.org/projects/5521)
|
||||
|
||||
Dolibarr ERP & CRM is a modern software package that helps 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…).
|
||||
|
||||
It's an Open Source Software suite (written in PHP with optional JavaScript enhancements) designed for small, medium or large companies, foundations and freelancers.
|
||||
It's an Open Source Software (written in PHP language) designed for small, medium or large companies, foundations and freelancers.
|
||||
|
||||
You can freely use, study, modify or distribute it according to its licence.
|
||||
You can freely use, study, modify or distribute it according to its Free Software licence.
|
||||
|
||||
You can use it as a standalone application or as a web application to access it from the Internet or a LAN.
|
||||
You can use it as a standalone application or as a web application to be able to access it from the Internet or a LAN.
|
||||
|
||||
Dolibarr has a large community ready to help you, free forums and [preferred partners ready to offer commercial support should you need it](https://partners.dolibarr.org)
|
||||
|
||||

|
||||

|
||||
|
||||
## LICENSE
|
||||
|
||||
@@ -32,23 +27,19 @@ Other licenses apply for some included dependencies. See [COPYRIGHT](https://git
|
||||
|
||||
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:
|
||||
|
||||
- [DoliWamp for Windows](https://wiki.dolibarr.org/index.php/Dolibarr_for_Windows_(DoliWamp))
|
||||
- [DoliDeb for Debian](https://wiki.dolibarr.org/index.php/Dolibarr_for_Ubuntu_or_Debian)
|
||||
- [DoliWamp for Windows](https://wiki.dolibarr.org/index.php/Dolibarr_for_Windows_(DoliWamp)
|
||||
- [DoliDeb for Debian](https://wiki.dolibarr.org/index.php/Dolibarr_for_Ubuntu_or_Debian
|
||||
- DoliRpm for Redhat, Fedora, OpenSuse, Mandriva or Mageia
|
||||
|
||||
Releases can be downloaded from [official website](https://www.dolibarr.org/).
|
||||
|
||||
### 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.
|
||||
|
||||
On GNU/Linux, first check if your distribution has already packaged Dolibarr.
|
||||
- Check that your installed PHP version is supported [see PHP support](https://wiki.dolibarr.org/index.php/Versions).
|
||||
|
||||
#### Generic install steps
|
||||
|
||||
- Check that your installed PHP version is supported [see PHP support](https://wiki.dolibarr.org/index.php/Releases).
|
||||
|
||||
- Uncompress the downloaded .zip archive to copy the "dolibarr/htdocs" directory and all its files inside your web server root or get the files directly from GitHub (recommanded if you know git as it makes it easier if you want to upgrade later):
|
||||
- Uncompress the downloaded .zip archive to copy the "dolibarr/htdocs" directory and all its files inside your web server root or get the files directly from GitHub (recommanded if you known git):
|
||||
|
||||
`git clone https://github.com/dolibarr/dolibarr -b x.y` (where x.y is main version like 3.6, 9.0, ...)
|
||||
|
||||
@@ -74,17 +65,18 @@ On GNU/Linux, first check if your distribution has already packaged Dolibarr.
|
||||
|
||||
### Saas/Cloud setup
|
||||
|
||||
If you don't have time to install it yourself, you can try some commercial 'ready to use' Cloud offers (See [https://saas.dolibarr.org](https://saas.dolibarr.org)). However, this third solution is not free.
|
||||
If you 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
|
||||
|
||||
Dolibarr supports upgrading, usually without the need for any (commercial) support (depending on if you use any commercial extensions). It supports upgrading all the way from any version after 2.8 without breakage. This is unique in the ERP ecosystem and a benefit our users highly appreciate!
|
||||
|
||||
- At first make a backup of your Dolibarr files & then [see](https://wiki.dolibarr.org/index.php/Installation_-_Upgrade#Upgrade_Dolibarr)
|
||||
- Check that your installed PHP version is supported by the new version [see PHP support](https://wiki.dolibarr.org/index.php/Releases).
|
||||
- At first make a backup of your Dolibarr files & than see https://wiki.dolibarr.org/index.php/Installation_-_Upgrade#Upgrade_Dolibarr
|
||||
- Check that your installed PHP version is supported by the new version [see PHP support](./doc/phpmatrix.md).
|
||||
- Overwrite all old files from 'dolibarr' directory with files provided into the new version's package.
|
||||
- At first next access, Dolibarr will redirect you to the "install/" page to follow the upgrade process.
|
||||
If an `install.lock` file exists to lock any other upgrade process, the application will ask you to remove the file manually (you should find the `install.lock` file in the directory used to store generated and uploaded documents, in most cases, it is the directory called "*documents*").
|
||||
- At first next access, Dolibarr will redirect your to the "install/" page to follow the upgrade process.
|
||||
If an `install.lock` file exists to lock any other upgrade process, the application will ask you to remove the file manually (you should find the `install.lock` file into the directory used to store generated and uploaded documents, in most cases, it is the directory called "*documents*").
|
||||
|
||||
*Note: migration process can be safely done multiple times by calling the `/install/index.php` page*
|
||||
|
||||
## WHAT'S NEW
|
||||
|
||||
@@ -94,114 +86,76 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
|
||||
### Main application/modules (all optional)
|
||||
|
||||
- Third-Parties Management: Customers, Prospects (Leads) and/or Suppliers + Contacts
|
||||
- Members/Membership/Foundation management
|
||||
|
||||
Product Management
|
||||
|
||||
- Customers, Prospects (Leads) and/or Suppliers directory + Contacts
|
||||
- Members management
|
||||
- Products and/or Services catalog
|
||||
- Stock / Warehouse management + Inventory
|
||||
- Barcodes
|
||||
- Batches / Lots / Serials
|
||||
- Product Variants
|
||||
- Bill of Materials (BOM)
|
||||
- Manufacturing Orders
|
||||
|
||||
Customer/Sales Management
|
||||
|
||||
- Customers/Prospects + Contacts management
|
||||
- Opportunities or Leads management
|
||||
- Commercial proposals management (online signing)
|
||||
- Customer Orders management
|
||||
- Contracts/Subscription management
|
||||
- Interventions management
|
||||
- Ticket System
|
||||
- Commercial proposals management
|
||||
- Customer & Supplier Orders management
|
||||
- Invoices and payment management
|
||||
- Shipping management
|
||||
- Customer Invoices/Credit notes and payment management
|
||||
- Point of Sale (POS)
|
||||
|
||||
Supplier/Purchase Management
|
||||
|
||||
- Suppliers/Vendors + Contacts
|
||||
- Supplier (price) requests
|
||||
- Purchase Orders management
|
||||
- Delivery/Receiption
|
||||
- Supplier Invoices/credit notes and payment management
|
||||
- INCOTERMS
|
||||
|
||||
Finance/Accounting
|
||||
|
||||
- Invoices/Payments
|
||||
- Warehouse/Stock management
|
||||
- Manufacturing Orders
|
||||
- Bank accounts management
|
||||
- Direct debit and Credit transfer management (European SEPA)
|
||||
- Direct debit orders management (European SEPA)
|
||||
- Accounting management
|
||||
- Donations management
|
||||
- Loan management
|
||||
- Margins
|
||||
- Reports
|
||||
|
||||
Collaboration
|
||||
|
||||
- Shared calendar/agenda (with ical and vcal import/export for third party tools integration)
|
||||
- Shared calendar/agenda (with ical and vcal export for third party tools integration)
|
||||
- Opportunities or Leads management
|
||||
- Projects & Tasks management
|
||||
- Ticket System
|
||||
- Surveys
|
||||
|
||||
HR
|
||||
|
||||
- Employee's leaves management
|
||||
- Contracts management
|
||||
- Interventions management
|
||||
- Employee's leave requests management
|
||||
- Expense reports
|
||||
- Recruitment management
|
||||
- Timesheets
|
||||
- Electronic Document Management (EDM)
|
||||
- Foundations members management
|
||||
- Point of Sale (POS)
|
||||
- …
|
||||
|
||||
### Other application/modules
|
||||
|
||||
- Electronic Document Management (EDM)
|
||||
- Bookmarks
|
||||
- Bookmarks management
|
||||
- Donations management
|
||||
- Reporting
|
||||
- Surveys
|
||||
- Data export/import
|
||||
- Barcodes
|
||||
- Barcodes support
|
||||
- Margin calculations
|
||||
- LDAP connectivity
|
||||
- ClickToDial integration
|
||||
- Mass emailing
|
||||
- RSS integration
|
||||
- Social platforms linking
|
||||
- Skype integration
|
||||
- Payment platforms integration (PayPal, Stripe, Paybox...)
|
||||
- Email-Collector
|
||||
|
||||
(around 100 modules available by default, 1000+ on the addon market place)
|
||||
- …
|
||||
|
||||
### Other general features
|
||||
|
||||
- Multi-Language Support (Localization in most major languages)
|
||||
- Localization in most major languages
|
||||
- Multi-Users and groups with finely grained rights
|
||||
- Multi-Currency
|
||||
- Multi-Company (by adding of an external module)
|
||||
- Multi-currency
|
||||
- Multi-company by adding of an external module
|
||||
- Very user friendly and easy to use
|
||||
- Customizable dashboards
|
||||
- customizable Dashboard
|
||||
- Highly customizable: enable only the modules you need, add user personalized fields, choose your skin, several menu managers (can be used by internal users as a back-office with a particular menu, or by external users as a front-office with another one)
|
||||
- APIs (REST, SOAP)
|
||||
- Code that is easy to understand, maintain and develop (PHP with no heavy framework; trigger and hook architecture)
|
||||
|
||||
- APIs
|
||||
- An easy to understand, maintain and develop code (PHP with no heavy framework; trigger and hook architecture)
|
||||
- Support a lot of country specific features:
|
||||
- Spanish Tax RE and ISPF
|
||||
- French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM)
|
||||
- Canadian double taxes (federal/province) and other countries using cumulative VAT
|
||||
- Tunisian tax stamp
|
||||
- Argentina invoice numbering using A,B,C...
|
||||
- ZATCA e-invoicing QR-Code
|
||||
- Compatible with [European directives](https://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE)
|
||||
- Compatible with data privacy rules (europe GDPR, ...)
|
||||
- Compatible with [European directives](http://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE)
|
||||
- Compatible with European GDPR rules
|
||||
- ...
|
||||
- Flexible PDF & ODT generation for invoices, proposals, orders...
|
||||
- ...
|
||||
- PDF or ODT generation for invoice, proposals, orders...
|
||||
- …
|
||||
|
||||
### System Environment / Requirements
|
||||
|
||||
- PHP
|
||||
- MariaDB, MySQL or PostgreSQL
|
||||
- Compatible with all Cloud solutions that match PHP & MySQL or PostgreSQL prerequisites.
|
||||
|
||||
See exact requirements on the [Wiki](https://wiki.dolibarr.org/index.php/Prerequisite)
|
||||
- Works with PHP 5.5+ and MariaDB 5.0.3+, MySQL 5.0.3+ or PostgreSQL 8.1.4+ (See requirements on the [Wiki](https://wiki.dolibarr.org/index.php/Prerequisite))
|
||||
- Compatible with all Cloud solutions that match MySQL, PHP or PostgreSQL prerequisites.
|
||||
|
||||
### Extending
|
||||
|
||||
@@ -213,25 +167,22 @@ These are features that Dolibarr does **not** yet fully support:
|
||||
|
||||
- Tasks dependencies in projects
|
||||
- Payroll module
|
||||
- No native embedded Webmail, but you can send email to contacts in Dolibarr with e.g. offers, invoices, etc.
|
||||
- No native embedded Webmail
|
||||
- Dolibarr can't do coffee (yet)
|
||||
|
||||
## DOCUMENTATION
|
||||
|
||||
Administrator, user, developer and translator's documentations are available along with other community resources in the [Wiki](https://wiki.dolibarr.org).
|
||||
Administrator, user, developer and translator's documentations are available along with other community resources on the [Wiki](https://wiki.dolibarr.org).
|
||||
|
||||
## CONTRIBUTING
|
||||
|
||||
This project exists thanks to all the people who contribute.
|
||||
Please read the instructions how to contribute (report a bug/error, a feature request, send code ...) [[Contribute](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)]
|
||||
This project exists thanks to all the people who contribute. [[Contribute](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)]
|
||||
|
||||
A view on Contributors:
|
||||
|
||||
[](https://github.com/Dolibarr/dolibarr/graphs/contributors)
|
||||
<a href="https://github.com/Dolibarr/dolibarr/graphs/contributors"><img src="https://opencollective.com/dolibarr/contributors.svg?width=890&button=false" /></a>
|
||||
|
||||
## CREDITS
|
||||
|
||||
Dolibarr is the work of many contributors over the years and uses some fine PHP libraries.
|
||||
Dolibarr is the work of many contributors over the years and uses some fine libraries.
|
||||
|
||||
See [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT) file.
|
||||
|
||||
@@ -242,7 +193,6 @@ Follow Dolibarr project on:
|
||||
- [Facebook](https://www.facebook.com/dolibarr)
|
||||
- [Twitter](https://www.twitter.com/dolibarr)
|
||||
- [LinkedIn](https://www.linkedin.com/company/association-dolibarr)
|
||||
- [Reddit](https://www.reddit.com/r/Dolibarr_ERP_CRM/)
|
||||
- [YouTube](https://www.youtube.com/user/DolibarrERPCRM)
|
||||
- [GitHub](https://github.com/Dolibarr/dolibarr)
|
||||
|
||||
|
||||
99
SECURITY.md
99
SECURITY.md
@@ -1,98 +1,13 @@
|
||||
# Security Policy
|
||||
|
||||
This file contains some policies about the security reports on Dolibarr ERP CRM project, one of the most popular Open Source ERP and CRM in the world.
|
||||
## Supported Versions
|
||||
|
||||
## Supported Versions for security reports
|
||||
|
||||
| Version | Supported |
|
||||
| ---------- | ---------------------- |
|
||||
| <= 15.0.0 | :x: |
|
||||
| >= 15.0.1+ | :white_check_mark: except CSRF attacks|
|
||||
| >= 16.0.0 | :white_check_mark: |
|
||||
| >= develop | :white_check_mark: |
|
||||
| Version | Supported |
|
||||
| -------- | ------------------ |
|
||||
| <= 8.0.* | :x: |
|
||||
| >= 9.0.* | :white_check_mark: |
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
To report a vulnerability, for a private report, please use GitHub security advisory at [https://github.com/Dolibarr/dolibarr/security/advisories/new](https://github.com/Dolibarr/dolibarr/security/advisories/new) (if you have permissions).
|
||||
Alternatively send an email to security@dolibarr.org (for everybody)
|
||||
|
||||
## Hunting vulnerabilities on Dolibarr
|
||||
|
||||
We believe that the future of software is online SaaS. This means software are more and more critical and no technology is perfect. Working with skilled security researchers is crucial in identifying weaknesses in our technology.
|
||||
|
||||
If you believe you've found a security bug in our service, we are happy to work with you to resolve the issue promptly and ensure you are fairly rewarded for your discovery.
|
||||
|
||||
Any type of denial of service attacks is strictly forbidden, as well as any interference with network equipment and Dolibarr infrastructure.
|
||||
|
||||
We recommand to install Dolibarr ERP CRM on your own server (as most Open Source software, download and use is free: [https://www.dolibarr.org/download](https://www.dolibarr.org/download)) to get access on every side of application.
|
||||
|
||||
### User Agent
|
||||
|
||||
If you try to find bug on Dolibarr, we recommend to append to your user-agent header the following value: '-securitytest-for-dolibarr'.
|
||||
|
||||
### Account access
|
||||
|
||||
You can install the web application yourself on your own platform/server so you get full access to application and sources. Download the zip of the files to put into your own web server virtual host from [https://www.dolibarr.org/download](https://www.dolibarr.org/download)
|
||||
|
||||
## Eligibility and Responsible Disclosure
|
||||
|
||||
We are happy to thank everyone who submits valid reports which help us improve the security of Dolibarr, however only those that meet the following eligibility requirements will be "validated reports" (if not, we may close the report without any answer):
|
||||
|
||||
You must be the first reporter of the vulnerability (duplicate reports are closed).
|
||||
|
||||
You must send a clear textual description of the report along with steps to reproduce the issue, include attachments such as screenshots or proof of concept code as necessary.
|
||||
|
||||
You must avoid tests that could cause degradation or interruption of our service (refrain from using automated tools, and limit yourself about requests per second), that's why we recommand to install software on your own platform.
|
||||
|
||||
You must not leak, manipulate, or destroy any user data of third parties to find your vulnerability.
|
||||
|
||||
## Scope for qualified vulnerabilities
|
||||
|
||||
ONLY vulnerabilities discovered, when the following setup on test platform is used, are "valid":
|
||||
|
||||
* $dolibarr_main_prod must be set to 1 into conf.php
|
||||
* $dolibarr_nocsrfcheck must be kept to the value 0 into conf.php (this is the default value)
|
||||
* $dolibarr_main_force_https must be set to something else than 0.
|
||||
* The constant MAIN_SECURITY_CSRF_WITH_TOKEN must be set to 3 into backoffice menu Home - Setup - Other (this protection should be set to 3 soon by default)
|
||||
* The module DebugBar and ModuleBuilder must NOT be enabled (by default, these modules are not enabled. They are developer tools)
|
||||
* ONLY security reports on modules provided by default and with the "stable" status are valid (troubles into "experimental", "developement" or external modules are not valid vulnerabilities).
|
||||
* The root of web server must link to htdocs and the documents directory must be outside of the web server root (this is the default when using the default installer but may differs with external installer).
|
||||
* The web server setup must be done so that only the documents directory is in write mode. The root directory called htdocs must be read-only.
|
||||
* CSRF attacks are accepted but double check that you have set MAIN_SECURITY_CSRF_WITH_TOKEN to value 3.
|
||||
* Ability for a high level user to edit web site pages into the CMS by including HTML or Javascript is an expected feature. Vulnerabilities into the website module are validated only if HTML or Javascript injection can be done by a non allowed user.
|
||||
|
||||
Scope is the web application (back office) and the APIs.
|
||||
|
||||
## Qualifying vulnerabilities for reporting
|
||||
|
||||
* Remote code execution (RCE)
|
||||
* Local files access and manipulation (LFI, RFI, XXE, SSRF, XSPA)
|
||||
* Code injections (HTML, JS, SQL, PHP, ...)
|
||||
* Cross-Site Scripting (XSS), except from setup page of module "External web site" (allowing any content here, editable by admin user only, is accepted on purpose) and except into module "Web site" when permission to edit website content is allowed (injecting any data in this case is allowed too).
|
||||
* Cross-Site Requests Forgery (CSRF) with real security impact (when using GET URLs, CSRF are qualified only for creating, updating or deleting data from pages restricted to admin users)
|
||||
* Open redirect
|
||||
* Broken authentication & session management
|
||||
* Insecure direct object references
|
||||
* CORS with real security impact
|
||||
* Horizontal and vertical privilege escalation
|
||||
* "HTTP Host Header" XSS
|
||||
* Software version disclosure (for non admin users only)
|
||||
* Stack traces or path disclosure (for non admin users only)
|
||||
|
||||
## Non-qualifying vulnerabilities for reporting
|
||||
|
||||
* "Self" XSS
|
||||
* SSL/TLS best practices
|
||||
* Denial of Service attacks
|
||||
* Clickjacking/UI redressing
|
||||
* Physical or social engineering attempts or issues that require physical access to a victim’s computer/device
|
||||
* Presence of autocomplete attribute on web forms
|
||||
* Vulnerabilities affecting outdated browsers or platforms, or vulnerabilities inside browsers themself.
|
||||
* Logout and other instances of low-severity Cross-Site Request Forgery
|
||||
* Missing security-related HTTP headers which do not lead directly to a vulnerability
|
||||
* Reports from automated web vulnerability scanners (Acunetix, Vega, etc.) that have not been validated
|
||||
* Invalid or missing SPF (Sender Policy Framework) records (Incomplete or missing SPF/DKIM/DMARC)
|
||||
* Reports on features flagged as "experimental" or "development"
|
||||
* Software version or private IP disclosure when logged user is admin
|
||||
* Stack traces or path disclosure when logged user is admin
|
||||
* Any vulnerabilities due to a configuration different than the one defined into chapter "Scope for qualified vulnerabilities".
|
||||
To report a vulnerability, please send an email to security@dolibarr.org
|
||||
In most cases, after fixing the security, we make an answer by email to say the issue has been fixed.
|
||||
|
||||
102
build.xml
Normal file
102
build.xml
Normal file
@@ -0,0 +1,102 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Script build for hudson CI -->
|
||||
<project name="dolibarr" default="hudson" basedir=".">
|
||||
<!-- Exclude/ignore paths -->
|
||||
<property name="ignorepaths" value="${basedir}/htdocs/conf,${basedir}/htdocs/core/filemanagerdol,${basedir}/htdocs/includes" />
|
||||
<property name="ignoreregexp" value="**/PEAR/*,**/NET/*,**/HTTP/*,**/zendgdata/*,**/reportico/*" />
|
||||
|
||||
<target name="clean">
|
||||
<!-- Clean up -->
|
||||
<delete dir="${basedir}/hudson"/>
|
||||
<delete dir="${basedir}/generatedJUnitFiles"/>
|
||||
|
||||
<!-- Create build directories -->
|
||||
<mkdir dir="${basedir}/hudson/doxygen"/>
|
||||
<mkdir dir="${basedir}/hudson/logs"/>
|
||||
<mkdir dir="${basedir}/hudson/coverage"/>
|
||||
</target>
|
||||
|
||||
<!-- Run phpmd, phpcpd, phpcs, doxygen and phploc in parallel -->
|
||||
<target name="parallelTasks">
|
||||
<parallel>
|
||||
<!-- <antcall target="phpmd"/> -->
|
||||
<antcall target="phpcpd"/>
|
||||
<!-- <antcall target="phpcs"/> -->
|
||||
<antcall target="doxygen"/>
|
||||
<antcall target="phploc"/>
|
||||
</parallel>
|
||||
</target>
|
||||
|
||||
<!-- Generate pmd.xml -->
|
||||
<!--
|
||||
<target name="phpmd">
|
||||
<exec executable="phpmd">
|
||||
<arg line="htdocs xml codesize,unusedcode
|
||||
-\-reportfile '${basedir}/hudson/logs/pmd.xml'
|
||||
-\-ignore=${ignorepaths}
|
||||
" />
|
||||
</exec>
|
||||
</target>
|
||||
-->
|
||||
|
||||
<!-- Generate pmd-cpd.xml -->
|
||||
<target name="phpcpd">
|
||||
<exec executable="phpcpd">
|
||||
<arg line=" --log-pmd '${basedir}/hudson/logs/pmd-cpd.xml'
|
||||
--exclude '${basedir}/htdocs/conf'
|
||||
--exclude '${basedir}/htdocs/core/filemanagerdol'
|
||||
--exclude '${basedir}/htdocs/includes'
|
||||
--exclude '**/PEAR/*,**/NET/*,**/HTTP/*,**/zendgdata/*,**/reportico/*'
|
||||
--min-tokens 70
|
||||
--min-lines 20
|
||||
htdocs
|
||||
" />
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<!-- Generate phploc.csv -->
|
||||
<target name="phploc">
|
||||
<exec executable="phploc">
|
||||
<arg line=" --log-csv '${basedir}/hudson/logs/phploc.csv'
|
||||
--exclude '${basedir}/htdocs/conf'
|
||||
--exclude '${basedir}/htdocs/core/filemanagerdol'
|
||||
--exclude '${basedir}/htdocs/includes'
|
||||
--exclude '**/PEAR/*,**/NET/*,**/HTTP/*,**/zendgdata/*,**/reportico/*'
|
||||
htdocs
|
||||
" />
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<!-- Generate checkstyle.xml -->
|
||||
<target name="phpcs">
|
||||
<exec executable="phpcs" dir="${basedir}">
|
||||
<arg line=" --standard=${basedir}/dev/codesniffer/jenkins_ruleset.xml
|
||||
--report=checkstyle
|
||||
--report-file=${basedir}/hudson/logs/checkstyle.xml
|
||||
--ignore=${ignorepaths},${ignoreregexp}
|
||||
htdocs
|
||||
"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<!-- Run unit tests and generate junit.xml and clover.xml -->
|
||||
<target name="phpunit">
|
||||
<exec executable="phpunit" dir="${basedir}" failonerror="true">
|
||||
<arg line=" --configuration ${basedir}/test/phpunit/phpunittest.xml
|
||||
--log-junit ${basedir}/hudson/logs/junit.xml
|
||||
--coverage-clover ${basedir}/hudson/coverage/clover.xml
|
||||
--coverage-html ${basedir}/hudson/coverage/
|
||||
test/phpunit/AllTests.php
|
||||
"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<!-- Generate Doxygen documentation -->
|
||||
<target name="doxygen" description="Dolibarr documentation" >
|
||||
<exec executable="doxygen" dir="${basedir}" failonerror="false">
|
||||
<arg value="${basedir}/build/doxygen/jenkins_doxygen.doxyfile"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="hudson" depends="clean,phpunit,phpcs,parallelTasks"/>
|
||||
</project>
|
||||
50
build/README
50
build/README
@@ -1,44 +1,48 @@
|
||||
README (English)
|
||||
|
||||
Path: /dolibarr/build/README
|
||||
|
||||
##################################################
|
||||
Building packages
|
||||
##################################################
|
||||
|
||||
All sub-directories of "build" directory contains files (setup or binary tools) required to build automatically Dolibarr packages.
|
||||
The build directory and all its contents is absolutely not required to make Dolibarr working.
|
||||
It is here only to build Dolibarr packages, and those generated packages will not contains this "build" directory.
|
||||
|
||||
|
||||
There are several tools:
|
||||
|
||||
--------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
- To build full Dolibarr packages, launch the script
|
||||
> Launch command perl makepack-dolibarr.pl
|
||||
|
||||
See makepack-howto.txt for prerequisites.
|
||||
Note: Prerequisites to build tgz, debian, rpm package
|
||||
> apt-get install tar dpkg dpatch p7zip-full rpm zip
|
||||
|
||||
--------------------------------------------------------------------------------------------------
|
||||
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
|
||||
For example by running isetup-5.3.9.exe (http://www.jrsoftware.org)
|
||||
> Install WampServer into "C:\Program Files\Wamp"
|
||||
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: Mysql5.0.45
|
||||
For example by running WampServer2-MYSQL5045.exe (http://www.wampserver.com)
|
||||
> To build from Windows (running from makepack-dolibarr.pl script is however
|
||||
recommanded), open file build/exe/doliwamp.iss and click on button "Compile".
|
||||
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
|
||||
> perl makepack-dolibarrtheme.pl
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------------------------
|
||||
|
||||
- To build a package for a module, launch the script
|
||||
> perl makepack-dolibarrmodule.pl
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------------------------
|
||||
|
||||
- To build developper documentation, launch the script
|
||||
> perl dolibarr-doxygen-build.pl
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------------------------
|
||||
Note:
|
||||
The build directory and all its contents is absolutely not required to make
|
||||
Dolibarr working. It is here only to build Dolibarr packages, and those
|
||||
generated packages will not contains this "build" directory.
|
||||
|
||||
|
||||
You can find in "build", following sub-directories:
|
||||
@@ -55,9 +59,6 @@ To build Mac OS package (not ready yet).
|
||||
* doap:
|
||||
To build Doap descriptor to promote/describe Dolibarr releases.
|
||||
|
||||
* docker:
|
||||
To deploy Dolibarr with docker.
|
||||
|
||||
* doxygen:
|
||||
Dir with config file to build doxygen documentation.
|
||||
|
||||
@@ -65,12 +66,12 @@ Dir with config file to build doxygen documentation.
|
||||
To build exe package for Windows that distribute Dolibarr sources or
|
||||
to build the complete DoliWamp package.
|
||||
|
||||
* gource:
|
||||
To build the video of history of git changes.
|
||||
|
||||
* launchpad:
|
||||
Doc file to explain how to use launchpad.
|
||||
|
||||
* live:
|
||||
Doc file to explain how to create a demo live CD.
|
||||
|
||||
* obs:
|
||||
Doc file to explain how to push release onto OBS.
|
||||
|
||||
@@ -89,8 +90,5 @@ To build Redhat, Opensuse or Mandriva package.
|
||||
* tgz:
|
||||
To build a tgz package.
|
||||
|
||||
* travis-ci:
|
||||
Used by travis to make CI.
|
||||
|
||||
* zip:
|
||||
To build a zip package.
|
||||
|
||||
@@ -51,17 +51,16 @@ export DEBEMAIL="eldy@destailleur.fr"
|
||||
|
||||
export QUILT_PATCHES=debian/patches
|
||||
|
||||
|
||||
# Note: alioth.debian.org is outdated --> https://alioth-archive.debian.org/ --> https://salsa.debian.org/public
|
||||
* Create an account login
|
||||
* Update your ~/.ssh/config file to add:
|
||||
Host svn.debian.org git.debian.org bzr.debian.org hg.debian.org darcs.debian.org arch.debian.org
|
||||
# To use Alioth.debian.org
|
||||
* Create an account login
|
||||
* Update your ~/.ssh/config file to add:
|
||||
Host svn.debian.org git.debian.org bzr.debian.org hg.debian.org darcs.debian.org arch.debian.org
|
||||
User eldy-guest
|
||||
IdentityFile ~/.ssh/id_rsa
|
||||
* Check login on page https://alioth.debian.org/users/login
|
||||
Ex: https://alioth.debian.org/users/eldy-guest
|
||||
* Setup your ssh as described into page: http://wiki.debian.org/Alioth/SSH
|
||||
* Ask to be included into project collab-maint: http://alioth.debian.org/projects/collab-maint/
|
||||
* Check login on page https://alioth.debian.org/users/login
|
||||
Ex: https://alioth.debian.org/users/eldy-guest
|
||||
* Setup your ssh as described into page: http://wiki.debian.org/Alioth/SSH
|
||||
* Ask to be included into project collab-maint: http://alioth.debian.org/projects/collab-maint/
|
||||
|
||||
|
||||
|
||||
@@ -83,7 +82,7 @@ export QUILT_PATCHES=debian/patches
|
||||
# dpkg -c package.deb List content of package
|
||||
# dpkg -I package.deb Give informations on package
|
||||
# dpkg -i package.deb Install a package
|
||||
# dpkg-reconfigure -plow package Reconfigure package
|
||||
# dpkg-reconfigure -plow package Reconfigure package
|
||||
# dpkg -L packagename List content of installed package
|
||||
# dpkg -r packagename Remove config files and interactive saved answers
|
||||
# dpkg -s packagename Give status of installed package
|
||||
@@ -91,7 +90,7 @@ export QUILT_PATCHES=debian/patches
|
||||
#
|
||||
# dpkg-buildpackage -us -uc Build a source and binary package
|
||||
#
|
||||
# gdebi package.deb Install a package + dependencies
|
||||
# gdebi package.deb Install a package + dependencies
|
||||
|
||||
|
||||
|
||||
@@ -99,21 +98,21 @@ export QUILT_PATCHES=debian/patches
|
||||
|
||||
- Post an ITP with reportbugs :
|
||||
> reportbug -B debian --email username@domain.tld wnpp
|
||||
See page https://www.debian.org/devel/wnpp/#l1 for example of ITP requests contents.
|
||||
See page http://www.debian.org/devel/wnpp/#l1 for example of ITP requests contents.
|
||||
|
||||
- Wait until you received bug number.
|
||||
For first ITP submission of Dolibarr, bug id was 634783.
|
||||
|
||||
- Check bug is into database by searching with id on
|
||||
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=634783
|
||||
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=634783
|
||||
|
||||
- Add a line for upstream into file changelog with bug number
|
||||
|
||||
- Call for a mentor on ML debian-mentors to upload packages
|
||||
|
||||
- Once package is uploaded, following URL are available:
|
||||
https://packages.qa.debian.org/package.html
|
||||
https://bugs.debian.org/package
|
||||
http://packages.qa.debian.org/package.html
|
||||
http://bugs.debian.org/package
|
||||
|
||||
|
||||
##### Modify severity of a bug ticket
|
||||
@@ -307,7 +306,7 @@ If script fails with error Bad certificate, you can set "export PERL_LWP_SSL_VER
|
||||
- htdocs/includes/jquery/plugins/datatables
|
||||
- htdocs/includes/jszip
|
||||
- htdocs/includes/mike42
|
||||
- htdocs/includes/phpoffice
|
||||
- htdocs/includes/phpexcel or htdocs/includes/phpoffice
|
||||
- htdocs/includes/restler/framework/Luracast/Restler/explorer
|
||||
- htdocs/includes/swiftmailer
|
||||
- htdocs/includes/tcpdf or htdocs/includes/tecnickcom
|
||||
|
||||
@@ -232,7 +232,7 @@ $dolibarr_main_prod='0';
|
||||
# Examples:
|
||||
# $dolibarr_mailing_limit_sendbycli='0';
|
||||
|
||||
# dolibarr_main_distrib
|
||||
# dolibarr_distrib
|
||||
# A key to identify the distribution used for first installation
|
||||
$dolibarr_main_distrib = 'debian';
|
||||
$dolibarr_distrib = 'deb';
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ Priority: optional
|
||||
Maintainer: Laurent Destailleur (eldy) <eldy@users.sourceforge.net>
|
||||
# Uploaders: Laurent Destailleur (eldy) <eldy@users.sourceforge.net> # Only if differs from Maintainer
|
||||
Standards-Version: 3.9.6
|
||||
Homepage: https://www.dolibarr.org
|
||||
Homepage: http://www.dolibarr.org
|
||||
Build-Depends: debhelper (>= 9), po-debconf
|
||||
# This package need at least debian 7 or ubuntu 13.04 or any distribution based on this version
|
||||
|
||||
@@ -33,7 +33,7 @@ Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm |
|
||||
Recommends: apache2 | lighttpd | httpd,
|
||||
mariadb-server | virtual-mysql-server,
|
||||
# Required PHP extensions for debian 9 but we can't add them into a Depends, it does not exists on debian 7 and 8
|
||||
php-xml, php-mbstring, php-intl
|
||||
php-xml, php-mbstring
|
||||
Suggests: www-browser, php5-geoip
|
||||
Description: Web based software to manage a company or foundation
|
||||
Dolibarr ERP & CRM is an easy to use open source/free software package for
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: Dolibarr
|
||||
Upstream-Contact: Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
Source: https://www.dolibarr.org/files/stable/standard/
|
||||
@@ -37,8 +37,7 @@ Copyright: 2002-2009, Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
2010, Servitux Servicios Informaticos <info@servitux.es>
|
||||
2011, Herve Prot <herve.prot@symeos.com>
|
||||
2011, Remy Younes <ryounes@gmail.com>
|
||||
2012-2013, Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
|
||||
2012-2013, Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
License: GPL-3+
|
||||
This program is free software; you can redistribute it
|
||||
and/or modify it under the terms of the GNU General Public
|
||||
@@ -57,9 +56,7 @@ License: GPL-3+
|
||||
.
|
||||
On Debian systems, the full text of the GNU General Public
|
||||
License version 3 can be found in the file
|
||||
'/usr/share/common-licenses/GPL-3'.
|
||||
|
||||
------------------------------------------------------------
|
||||
`/usr/share/common-licenses/GPL-3'.
|
||||
|
||||
Files: htdocs/includes/adodbtime/*
|
||||
Copyright: 2003-2005, John Lim
|
||||
@@ -83,9 +80,6 @@ Comment:
|
||||
Those files are not shipped in the binary package since we use
|
||||
the library as packaged in "libphp-adodb".
|
||||
|
||||
|
||||
------------------------------------------------------------
|
||||
|
||||
Files: htdocs/includes/ckeditor/*
|
||||
Copyright: 2003-2012 CKSource - Frederico Knabben
|
||||
License: GPL-2+
|
||||
@@ -115,9 +109,6 @@ Comment:
|
||||
Those files are not shipped in the binary package since we use the
|
||||
library as packaged in "ckeditor".
|
||||
|
||||
|
||||
------------------------------------------------------------
|
||||
|
||||
Files: htdocs/includes/fonts/*
|
||||
Copyright: 2003, Bitstream Inc
|
||||
unknown, Gavin Graham
|
||||
@@ -167,10 +158,7 @@ License: other
|
||||
Comments:
|
||||
Those files are not shipped in the binary package as we
|
||||
configure Dolibarr to use Dejavu fonts from "fonts-dejavu-core".
|
||||
|
||||
|
||||
------------------------------------------------------------
|
||||
|
||||
|
||||
Files: doc/images/*
|
||||
Copyright: Laurent Destailleur
|
||||
License: CC-BY-SA-3.0
|
||||
@@ -186,15 +174,33 @@ License: CC-BY-SA-3.0
|
||||
distribute the resulting work only under the same, similar or a compatible
|
||||
license.
|
||||
.
|
||||
For more information, see https://creativecommons.org/licenses/by-sa/3.0/
|
||||
For more information, see http://creativecommons.org/licenses/by-sa/3.0/
|
||||
|
||||
Files: htdocs/includes/fpdfi/*
|
||||
Copyright: 2004-2011 Setasign - Jan Slabon
|
||||
License: GPL-2+
|
||||
This program is free software; you can redistribute it
|
||||
and/or modify it under the terms of the GNU General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later
|
||||
version.
|
||||
.
|
||||
This program is distributed in the hope that it will be
|
||||
useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE. See the GNU General Public License for more
|
||||
details.
|
||||
.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
.
|
||||
On Debian systems, the full text of the GNU General Public
|
||||
License version 2 can be found in the file
|
||||
`/usr/share/common-licenses/GPL-2'.
|
||||
|
||||
|
||||
------------------------------------------------------------
|
||||
|
||||
Files: htdocs/includes/geoip2/*
|
||||
Files: htdocs/includes/geoip/*
|
||||
Copyright: 2007 MaxMind LLC
|
||||
License: CC-By-SA
|
||||
License: LGPL-2.1+
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
@@ -210,14 +216,10 @@ License: CC-By-SA
|
||||
.
|
||||
On Debian systems, the full text of the GNU Lesser General Public
|
||||
License version 2.1 can be found in the file
|
||||
'/usr/share/common-licenses/LGPL-2.1'.
|
||||
|
||||
|
||||
------------------------------------------------------------
|
||||
`/usr/share/common-licenses/LGPL-2.1'.
|
||||
|
||||
Files: htdocs/includes/jquery/*
|
||||
Copyright: JQuery team
|
||||
https://www.jquery.com
|
||||
License: GPL-2+ or MIT
|
||||
=== GPL-2+ LICENSE NOTICE ===
|
||||
.
|
||||
@@ -238,7 +240,7 @@ License: GPL-2+ or MIT
|
||||
.
|
||||
On Debian systems, the full text of the GNU General Public
|
||||
License version 2 can be found in the file
|
||||
'/usr/share/common-licenses/GPL-2'.
|
||||
`/usr/share/common-licenses/GPL-2'.
|
||||
.
|
||||
=== MIT LICENSE ===
|
||||
.
|
||||
@@ -265,8 +267,6 @@ Comment:
|
||||
"libjs-jquery-ui". Most of the plugins are shipped though.
|
||||
|
||||
|
||||
------------------------------------------------------------
|
||||
|
||||
Files: htdocs/includes/jquery/plugins/flot/*
|
||||
Copyright: Flot team
|
||||
License: Public-Domain
|
||||
@@ -275,9 +275,6 @@ Comment:
|
||||
Those files are not shipped in the binary package because we configure
|
||||
Dolibarr to use the files provided by "libjs-flot".
|
||||
|
||||
|
||||
------------------------------------------------------------
|
||||
|
||||
Files: htdocs/includes/jsgantt/*
|
||||
Copyright: JSGantt team
|
||||
License: GPL-2+
|
||||
@@ -298,10 +295,7 @@ License: GPL-2+
|
||||
.
|
||||
On Debian systems, the full text of the GNU General Public
|
||||
License version 2 can be found in the file
|
||||
'/usr/share/common-licenses/GPL-2'.
|
||||
|
||||
|
||||
------------------------------------------------------------
|
||||
`/usr/share/common-licenses/GPL-2'.
|
||||
|
||||
Files: htdocs/includes/nusoap/*
|
||||
Copyright: 2002-2010 NuSphere Corporation
|
||||
@@ -321,14 +315,11 @@ License: LGPL-2.1+
|
||||
.
|
||||
On Debian systems, the full text of the GNU Lesser General Public
|
||||
License version 2.1 can be found in the file
|
||||
'/usr/share/common-licenses/LGPL-2.1'.
|
||||
`/usr/share/common-licenses/LGPL-2.1'.
|
||||
Comment:
|
||||
Those files are not shipped in the binary package since we
|
||||
configure Dolibarr to use the library provided in "libnusoap-php".
|
||||
|
||||
|
||||
------------------------------------------------------------
|
||||
|
||||
Files: htdocs/includes/odtphp/*
|
||||
Copyright: 2008, Julien Pauli
|
||||
2008, Cyril PIERRE de GEYER
|
||||
@@ -351,12 +342,29 @@ License: GPL-2+
|
||||
.
|
||||
On Debian systems, the full text of the GNU General Public
|
||||
License version 2 can be found in the file
|
||||
'/usr/share/common-licenses/GPL-2'.
|
||||
`/usr/share/common-licenses/GPL-2'.
|
||||
|
||||
Files: htdocs/includes/phpexcel/*
|
||||
Copyright: 2006-2011 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||
License: LGPL-2.1+
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
.
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
.
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
.
|
||||
On Debian systems, the full text of the GNU Lesser General Public
|
||||
License version 2.1 can be found in the file
|
||||
`/usr/share/common-licenses/LGPL-2.1'.
|
||||
|
||||
------------------------------------------------------------
|
||||
|
||||
Files: htdocs/includes/tecnickcom/*
|
||||
Files: htdocs/includes/tcpdf/*
|
||||
Copyright: 2002-2013 Nicola Asuni - Tecnick.com LTD
|
||||
License: LGPL-3.0+
|
||||
TCPDF is free software: you can redistribute it and/or modify it
|
||||
|
||||
@@ -23,7 +23,7 @@ setup_empty_conf() {
|
||||
mkdir -p /etc/dolibarr
|
||||
touch /etc/dolibarr/conf.php
|
||||
chown root:www-data /etc/dolibarr/conf.php
|
||||
chmod 660 /etc/dolibarr/conf.php
|
||||
chmod 664 /etc/dolibarr/conf.php
|
||||
}
|
||||
|
||||
is_new_upstream_version() {
|
||||
@@ -150,6 +150,7 @@ case "$1" in
|
||||
##grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
||||
##grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
|
||||
##grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
|
||||
#grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
|
||||
#grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
|
||||
|
||||
@@ -24,7 +24,6 @@ $force_install_databaserootpass='__SUPERUSERPASSWORD__';
|
||||
$force_install_dolibarrlogin='admin';
|
||||
$force_install_nophpinfo='1';
|
||||
$force_install_lockinstall='444';
|
||||
$force_install_distrib='debian';
|
||||
|
||||
// Value to overwrite path to use shared libraries/fonts instead of embedded one.
|
||||
// If during install, we enable/disable declaration to use non embedded libraries, we must also check they are
|
||||
@@ -35,6 +34,7 @@ $force_install_distrib='debian';
|
||||
//$force_dolibarr_lib_GEOIP_PATH='';
|
||||
//$force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap';
|
||||
//$force_dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip';
|
||||
//$force_dolibarr_lib_PHPEXCEL_PATH=''; // Use '' or 'disabled'
|
||||
//$force_dolibarr_js_CKEDITOR='/javascript/ckeditor'; // Use '/javascript/ckeditor' or 'disabled'
|
||||
//$force_dolibarr_js_JQUERY='/javascript/jquery';
|
||||
//$force_dolibarr_js_JQUERY_UI='/javascript/jquery-ui';
|
||||
|
||||
@@ -103,6 +103,8 @@ override_dh_install:
|
||||
|
||||
# clean from useless files
|
||||
rm -fr htdocs/includes/jquery/plugins/multiselect
|
||||
rm -fr htdocs/includes/phpexcel/PHPExcel/Shared/PDF
|
||||
rm -fr htdocs/includes/phpexcel/PHPExcel/Shared/PCLZip
|
||||
rm -fr htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-2.33
|
||||
rm -fr htdocs/includes/tcpdf/fonts/freefont-20100919
|
||||
rm -fr htdocs/includes/tcpdf/fonts/utils
|
||||
@@ -111,6 +113,7 @@ override_dh_install:
|
||||
|
||||
# Licence files are already included into copyright file.
|
||||
rm -f htdocs/includes/jquery/plugins/flot/LICENSE.txt
|
||||
rm -f htdocs/includes/phpexcel/license.txt
|
||||
rm -f htdocs/includes/tcpdf/LICENSE.TXT
|
||||
|
||||
# Drop unwanted executable permissions
|
||||
|
||||
@@ -1,60 +1,38 @@
|
||||
FROM php:7.3-apache
|
||||
FROM php:7.2-apache
|
||||
|
||||
ENV HOST_USER_ID 33
|
||||
ENV PHP_INI_DATE_TIMEZONE 'UTC'
|
||||
ENV PHP_INI_MEMORY_LIMIT 256M
|
||||
|
||||
RUN apt-get update -y \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
libfreetype6-dev \
|
||||
libjpeg62-turbo-dev \
|
||||
libjpeg62-turbo \
|
||||
libpng-dev \
|
||||
libpng16-16 \
|
||||
libldap2-dev \
|
||||
libxml2-dev \
|
||||
libzip-dev \
|
||||
zlib1g-dev \
|
||||
libicu-dev \
|
||||
g++ \
|
||||
default-mysql-client \
|
||||
unzip \
|
||||
curl \
|
||||
apt-utils \
|
||||
msmtp \
|
||||
msmtp-mta \
|
||||
mailutils \
|
||||
&& apt-get autoremove -y \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
|
||||
&& docker-php-ext-install -j$(nproc) calendar intl mysqli pdo_mysql gd soap zip \
|
||||
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
|
||||
&& docker-php-ext-install -j$(nproc) ldap && \
|
||||
mv ${PHP_INI_DIR}/php.ini-development ${PHP_INI_DIR}/php.ini
|
||||
RUN apt-get update && apt-get install -y libpng-dev libjpeg-dev libldap2-dev libzip-dev zlib1g-dev libicu-dev g++\
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
|
||||
&& docker-php-ext-install gd \
|
||||
&& docker-php-ext-install zip \
|
||||
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
|
||||
&& docker-php-ext-install ldap \
|
||||
&& docker-php-ext-install mysqli \
|
||||
&& docker-php-ext-install calendar \
|
||||
&& docker-php-ext-configure intl \
|
||||
&& docker-php-ext-install intl \
|
||||
&& apt-get autoremove --purge -y libjpeg-dev libldap2-dev zlib1g-dev libicu-dev g++
|
||||
|
||||
RUN mkdir /var/documents
|
||||
RUN chown www-data:www-data /var/documents
|
||||
RUN chown www-data /var/documents
|
||||
|
||||
COPY docker-run.sh /usr/local/bin/
|
||||
RUN chmod +x /usr/local/bin/docker-run.sh
|
||||
|
||||
RUN pecl install xdebug && docker-php-ext-enable xdebug
|
||||
RUN echo 'zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20180731/xdebug.so"' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.mode=debug' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.start_with_request=yes' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.client_host=host.docker.internal' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.client_port=9003' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.discover_client_host=true' >> ${PHP_INI_DIR}/php.ini
|
||||
#RUN echo 'xdebug.log="/tmp/xdebug.log"' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.idekey="netbeans-xdebug"' >> ${PHP_INI_DIR}/php.ini
|
||||
|
||||
# set up sendmail config, to use maildev
|
||||
RUN echo "account default" > /etc/msmtprc
|
||||
RUN echo "auth off" >> /etc/msmtprc
|
||||
RUN echo "port 25" >> /etc/msmtprc
|
||||
RUN echo "host mail" >> /etc/msmtprc
|
||||
RUN echo "from local@localdomain.com" >> /etc/msmtprc
|
||||
RUN echo "domain localhost.localdomain" >> /etc/msmtprc
|
||||
RUN echo "sendmail_path=/usr/bin/msmtp -t" >> /usr/local/etc/php/conf.d/php-sendmail.ini
|
||||
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.host' >> /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
|
||||
RUN echo '172.17.0.1 docker.host' >> /etc/hosts
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
# How to use it ?
|
||||
|
||||
The docker-compose.yml file is used to build and run Dolibarr in the current workspace.
|
||||
This docker image intended for developpement usage.
|
||||
For production usage you should consider other contributor reference like https://hub.docker.com/r/tuxgasy/dolibarr
|
||||
|
||||
Before build/run, define the variable HOST_USER_ID as following:
|
||||
|
||||
@@ -16,7 +14,7 @@ And then, you can run :
|
||||
|
||||
docker-compose up
|
||||
|
||||
This will run 4 containers Docker : Dolibarr, MariaDB, PhpMyAdmin and MailDev.
|
||||
This will run 3 container Docker : Dolibarr, MariaDB and PhpMyAdmin.
|
||||
|
||||
The URL to go to the Dolibarr is :
|
||||
|
||||
@@ -25,10 +23,6 @@ The URL to go to the Dolibarr is :
|
||||
The URL to go to PhpMyAdmin is (login/password is root/root) :
|
||||
|
||||
http://0.0.0.0:8080
|
||||
|
||||
In Dolibarr configuration Email let PHP mail function, To see all mail send by Dolibarr go to maildev
|
||||
|
||||
http://0.0.0.0:8081
|
||||
|
||||
Setup the database connection during the installation process, please use mariadb (name of the database container) as database host.
|
||||
Setup documents folder, during the installation process, to /var/documents
|
||||
Setup the database connection during the installation process, please use mariad
|
||||
b (name of the database container) as database host.
|
||||
|
||||
@@ -1,60 +1,25 @@
|
||||
version: '3'
|
||||
mariadb:
|
||||
build: mariadb
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
MYSQL_DATABASE: dolibarr
|
||||
|
||||
networks:
|
||||
internal-pod:
|
||||
internal: true
|
||||
external-pod:
|
||||
internal: false
|
||||
phpmyadmin:
|
||||
image: phpmyadmin/phpmyadmin
|
||||
environment:
|
||||
PMA_HOST: mariadb
|
||||
links:
|
||||
- mariadb
|
||||
ports:
|
||||
- "8080:80"
|
||||
|
||||
services:
|
||||
mariadb:
|
||||
image: mariadb:latest
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
MYSQL_DATABASE: dolibarr
|
||||
ports:
|
||||
- "3306:3306"
|
||||
networks:
|
||||
- internal-pod
|
||||
- external-pod
|
||||
|
||||
phpmyadmin:
|
||||
image: phpmyadmin/phpmyadmin
|
||||
environment:
|
||||
PMA_HOST: mariadb
|
||||
depends_on:
|
||||
- mariadb
|
||||
ports:
|
||||
- "8080:80"
|
||||
networks:
|
||||
- internal-pod
|
||||
- external-pod
|
||||
|
||||
web:
|
||||
build: .
|
||||
environment:
|
||||
HOST_USER_ID: $HOST_USER_ID
|
||||
volumes:
|
||||
- ../../htdocs:/var/www/html/
|
||||
- ../../documents:/var/documents
|
||||
ports:
|
||||
- "80:80"
|
||||
- "9000:9000"
|
||||
depends_on:
|
||||
- mariadb
|
||||
- mail
|
||||
networks:
|
||||
- internal-pod
|
||||
- external-pod
|
||||
extra_hosts:
|
||||
- "localhost.localdomain:127.0.0.1"
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
mail:
|
||||
image: maildev/maildev
|
||||
ports:
|
||||
- "8081:80"
|
||||
- "25:25"
|
||||
networks:
|
||||
- internal-pod
|
||||
- external-pod
|
||||
web:
|
||||
build: .
|
||||
environment:
|
||||
HOST_USER_ID: $HOST_USER_ID
|
||||
volumes:
|
||||
- ../../htdocs:/var/www/html
|
||||
links:
|
||||
- mariadb
|
||||
ports:
|
||||
- "80:80"
|
||||
|
||||
@@ -1,23 +1,15 @@
|
||||
#!/bin/bash
|
||||
# Script used by the Dockerfile.
|
||||
# See README.md to know how to create a Dolibarr env with docker
|
||||
|
||||
usermod -u ${HOST_USER_ID} www-data
|
||||
groupmod -g ${HOST_USER_ID} www-data
|
||||
usermod -u $HOST_USER_ID www-data
|
||||
groupmod -g $HOST_USER_ID www-data
|
||||
|
||||
chgrp -hR www-data /var/www/html
|
||||
chmod g+rwx /var/www/html/conf
|
||||
|
||||
if [ ! -d /var/documents ]; then
|
||||
echo "[docker-run] => create volume directory /var/documents ..."
|
||||
mkdir -p /var/documents
|
||||
fi
|
||||
echo "[docker-run] => Set Permission to www-data for /var/documents"
|
||||
chown -R www-data:www-data /var/documents
|
||||
|
||||
if [ ! -f /usr/local/etc/php/php.ini ]; then
|
||||
cat <<EOF > /usr/local/etc/php/php.ini
|
||||
date.timezone = $PHP_INI_DATE_TIMEZONE
|
||||
display_errors = On
|
||||
EOF
|
||||
fi
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Dolibarr source code documentation</title>
|
||||
<title>$title</title>
|
||||
<!-- from dolibarr.org -->
|
||||
<meta http-equiv="Content-Type" content="text/html" charset=utf-8 />
|
||||
<meta name="verify-v1"
|
||||
|
||||
2
build/exe/doliwamp/.gitignore
vendored
2
build/exe/doliwamp/.gitignore
vendored
@@ -1 +1 @@
|
||||
/doliwamp.tmp.iss*
|
||||
/doliwamp.tmp.iss
|
||||
|
||||
@@ -5,7 +5,6 @@ It's a dedicated Dolibarr version for Windows newbies with no technical knowledg
|
||||
|
||||
This directory contains files used by *makepack-dolibarr.pl* script to build the all-in-on .EXE package DoliWamp, ready
|
||||
to be distributed (for Windows).
|
||||
The build of .exe files need to have some windows executable files already installed (Apache, MariaDb). The package to install to get this files are defined into the file *doliwamp.iss* (searhc line starting with "; Value OK:")
|
||||
|
||||
If you have technical knowledge in web administration and plan to share your server instance (Apache, Mysql or PHP) with other projects than Dolibarr or want to use Dolibarr other components (PostgreSQL), you should not use this assistant and make a manual installation of Dolibarr on your existing server by downloading the standard package (.tgz or .zip file).
|
||||
|
||||
|
||||
@@ -24,14 +24,15 @@ OutputBaseFilename=__FILENAMEEXEDOLIWAMP__
|
||||
;OutputManifestFile=build\doliwampbuild.log
|
||||
; Define full path from which all relative path are defined
|
||||
; You must modify this to put here your dolibarr root directory
|
||||
;SourceDir=Z:\home\ldestailleur\git\dolibarrxxx
|
||||
SourceDir=..\..\..
|
||||
AppId=doliwamp
|
||||
AppPublisher=DoliCloud
|
||||
AppPublisherURL=https://www.dolicloud.com
|
||||
AppPublisher=NLTechno
|
||||
AppPublisherURL=https://www.nltechno.com
|
||||
AppSupportURL=https://www.dolibarr.org
|
||||
AppUpdatesURL=https://www.dolibarr.org
|
||||
AppComments=DoliWamp includes Dolibarr, Apache, PHP and Mysql software.
|
||||
AppCopyright=Copyright (C) 2008-2022 Laurent Destailleur (DoliCloud), Fabian Rodriguez (Le Goût du Libre)
|
||||
AppCopyright=Copyright (C) 2008-2020 Laurent Destailleur (NLTechno), Fabian Rodriguez (Le Goût du Libre)
|
||||
DefaultDirName=c:\dolibarr
|
||||
DefaultGroupName=Dolibarr
|
||||
;LicenseFile=COPYING
|
||||
@@ -80,7 +81,7 @@ Name: "desktopicon"; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:
|
||||
Name: "{app}\logs"
|
||||
Name: "{app}\tmp"
|
||||
Name: "{app}\dolibarr_documents"
|
||||
Name: "{app}\bin\apache\apache2.4.51\logs"
|
||||
Name: "{app}\bin\apache\apache2.4.41\logs"
|
||||
|
||||
[Files]
|
||||
; Stop/start
|
||||
@@ -98,30 +99,41 @@ Source: "build\exe\doliwamp\startdoliwamp_manual_donotuse.bat.install"; DestDir:
|
||||
Source: "build\exe\doliwamp\builddemosslfiles.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
|
||||
Source: "build\exe\doliwamp\UsedPort.exe"; DestDir: "{app}\"; Flags: ignoreversion;
|
||||
|
||||
; Apache, Php, Mysql
|
||||
; PhpMyAdmin, Apache, Php, Mysql
|
||||
; Put here path of Wampserver applications
|
||||
; Value OK: apache 2.4.51, php 7.3.33, mariadb10.6.5 (wampserver3.2.6_x64.exe)
|
||||
Source: "C:\wamp64\bin\apache\apache2.4.51\*.*"; DestDir: "{app}\bin\apache\apache2.4.51"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,httpd.conf,wampserver.conf,*.log,*_log"
|
||||
Source: "C:\wamp64\bin\php\php7.3.33\*.*"; DestDir: "{app}\bin\php\php7.3.33"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,phpForApache.ini,wampserver.conf,*.log,*_log"
|
||||
Source: "C:\wamp64\bin\mariadb\mariadb10.6.5\*.*"; DestDir: "{app}\bin\mariadb\mariadb10.6.5"; Flags: ignoreversion recursesubdirs; Excludes: "my.ini,data\*,wampserver.conf,*.log,*_log,MySQLInstanceConfig.exe"
|
||||
; Value OK: apache 2.2.6, php 5.2.5 (5.2.11, 5.3.0 and 5.3.1 fails if php_exif, php_pgsql, php_zip is on), mysql 5.0.45
|
||||
; Value OK: apache 2.2.11, php 5.3.0 (if no php_exif, php_pgsql, php_zip), mysql 5.0.45
|
||||
; Value OK: apache 2.4.9, php 5.5.12, mysql 5.0.45 instead of 5.6.17 (wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b.exe)
|
||||
; Value OK: apache 2.4.41, php 7.3.12, mariadb10.4.10 (wampserver3.2.0_x64.exe)
|
||||
Source: "C:\wamp64\apps\phpmyadmin4.9.2\*.*"; DestDir: "{app}\apps\phpmyadmin4.9.2"; Flags: ignoreversion recursesubdirs; Excludes: "config.inc.php,wampserver.conf,*.log,*_log,darkblue_orange"
|
||||
;Source: "C:\Program Files\Wamp\bin\apache\apache2.4.9\*.*"; DestDir: "{app}\bin\apache\apache2.4.9"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,httpd.conf,wampserver.conf,*.log,*_log"
|
||||
Source: "C:\wamp64\bin\apache\apache2.4.41\*.*"; DestDir: "{app}\bin\apache\apache2.4.41"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,httpd.conf,wampserver.conf,*.log,*_log"
|
||||
;Source: "C:\Program Files\Wamp\bin\php\php5.5.12\*.*"; DestDir: "{app}\bin\php\php5.5.12"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,phpForApache.ini,wampserver.conf,*.log,*_log"
|
||||
Source: "C:\wamp64\bin\php\php7.3.12\*.*"; DestDir: "{app}\bin\php\php7.3.12"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,phpForApache.ini,wampserver.conf,*.log,*_log"
|
||||
;Source: "C:\Program Files\Wamp\bin\mysql\mysql5.0.45\*.*"; DestDir: "{app}\bin\mysql\mysql5.0.45"; Flags: ignoreversion recursesubdirs; Excludes: "my.ini,data\*,wampserver.conf,*.log,*_log,MySQLInstanceConfig.exe"
|
||||
Source: "C:\wamp64\bin\mariadb\mariadb10.4.10\*.*"; DestDir: "{app}\bin\mariadb\mariadb10.4.10"; Flags: ignoreversion recursesubdirs; Excludes: "my.ini,data\*,wampserver.conf,*.log,*_log,MySQLInstanceConfig.exe"
|
||||
|
||||
; Mysql data files (does not overwrite if exists)
|
||||
; We must copy them because the tool mysql_install_db.exe to generate them at first install does not return to prompt so make install hang
|
||||
;Source: "build\exe\doliwamp\mysql\*.*"; DestDir: "{app}\bin\mariadb\data\mysql"; Flags: onlyifdoesntexist ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db"
|
||||
|
||||
; Dolibarr
|
||||
Source: "htdocs\*.*"; DestDir: "{app}\www\dolibarr\htdocs"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,custom\*,custom2\*,documents\*,includes\ckeditor\_source\*,includes\savant\*,includes\phpmailer\*,jquery\plugins\template\*,nltechno*\*,sabre\sabre\*\tests,tcpdf\fonts\dejavu-fonts-ttf-2.33\*,tcpdf\fonts\freefont-20100919\*,tcpdf\fonts\utils\*,*\conf.php,*\conf.php.mysql,*\conf.php.old,*\conf.php.postgres,*\conf.php.sav,*\install.forced.php"
|
||||
Source: "htdocs\*.*"; DestDir: "{app}\www\dolibarr\htdocs"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,custom\*,custom2\*,documents\*,includes\ckeditor\_source\*,includes\savant\*,includes\phpmailer\*,jquery\plugins\template\*,nltechno*\*,sabre\sabre\*\tests,PHPExcel\Shared\PDF\*,PHPExcel\Shared\PCLZip\*,tcpdf\fonts\dejavu-fonts-ttf-2.33\*,tcpdf\fonts\freefont-20100919\*,tcpdf\fonts\utils\*,*\conf.php,*\conf.php.mysql,*\conf.php.old,*\conf.php.postgres,*\conf.php.sav,*\install.forced.php"
|
||||
Source: "dev\*.*"; DestDir: "{app}\www\dolibarr\dev"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,dbmodel\*,fpdf\*,initdata\*,initdemo\*,iso-normes\*,licence\*,phpcheckstyle\*,phpunit\*,samples\*,test\*,uml\*,vagrant\*,xdebug\*"
|
||||
Source: "doc\*.*"; DestDir: "{app}\www\dolibarr\doc"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,wiki\*,plaquette\*,dev\*,images\dolibarr_screenshot2.png,images\dolibarr_screenshot3.png,images\dolibarr_screenshot4.png,images\dolibarr_screenshot5.png,images\dolibarr_screenshot6.png,images\dolibarr_screenshot7.png,images\dolibarr_screenshot8.png,images\dolibarr_screenshot9.png,images\dolibarr_screenshot10.png,images\dolibarr_screenshot11.png,images\dolibarr_screenshot12.png"
|
||||
Source: "scripts\*.*"; DestDir: "{app}\www\dolibarr\scripts"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,product\materiel.net.php,product\import-product.php"
|
||||
Source: "*.*"; DestDir: "{app}\www\dolibarr"; Flags: ignoreversion; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,default.properties,install.lock"
|
||||
|
||||
; Config files
|
||||
Source: "build\exe\doliwamp\phpmyadmin.conf.install"; DestDir: "{app}\alias"; Flags: ignoreversion;
|
||||
Source: "build\exe\doliwamp\dolibarr.conf.install"; DestDir: "{app}\alias"; Flags: ignoreversion;
|
||||
Source: "build\exe\doliwamp\httpd.conf.install"; DestDir: "{app}\bin\apache\apache2.4.51\conf"; Flags: ignoreversion;
|
||||
Source: "build\exe\doliwamp\config.inc.php.install"; DestDir: "{app}\apps\phpmyadmin4.1.14"; Flags: ignoreversion;
|
||||
;Source: "build\exe\doliwamp\httpd.conf.install"; DestDir: "{app}\bin\apache\apache2.4.9\conf"; Flags: ignoreversion;
|
||||
Source: "build\exe\doliwamp\httpd.conf.install"; DestDir: "{app}\bin\apache\apache2.4.41\conf"; Flags: ignoreversion;
|
||||
Source: "build\exe\doliwamp\my.ini.install"; DestDir: "{app}\bin\mysql\mysql5.0.45"; Flags: ignoreversion;
|
||||
Source: "build\exe\doliwamp\my.ini.install"; DestDir: "{app}\bin\mariadb\mariadb10.6.5"; Flags: ignoreversion;
|
||||
Source: "build\exe\doliwamp\php.ini.install"; DestDir: "{app}\bin\php\php7.3.33"; Flags: ignoreversion;
|
||||
Source: "build\exe\doliwamp\my.ini.install"; DestDir: "{app}\bin\mariadb\mariadb10.4.10"; Flags: ignoreversion;
|
||||
;Source: "build\exe\doliwamp\php.ini.install"; DestDir: "{app}\bin\php\php5.5.12"; Flags: ignoreversion;
|
||||
Source: "build\exe\doliwamp\php.ini.install"; DestDir: "{app}\bin\php\php7.3.12"; Flags: ignoreversion;
|
||||
Source: "build\exe\doliwamp\index.php.install"; DestDir: "{app}\www"; Flags: ignoreversion;
|
||||
Source: "build\exe\doliwamp\install.forced.php.install"; DestDir: "{app}\www\dolibarr\htdocs\install"; Flags: ignoreversion;
|
||||
Source: "build\exe\doliwamp\openssl.conf"; DestDir: "{app}"; Flags: ignoreversion;
|
||||
@@ -184,6 +196,7 @@ var destFileA: String;
|
||||
var srcContents: String;
|
||||
var browser: String;
|
||||
var mysqlVersion: String;
|
||||
var phpmyadminVersion: String;
|
||||
var phpDllCopy: String;
|
||||
var batFile: String;
|
||||
|
||||
@@ -227,9 +240,13 @@ procedure InitializeWizard();
|
||||
begin
|
||||
|
||||
//version des applis, a modifier pour chaque version de WampServer 2
|
||||
apacheVersion := '2.4.51';
|
||||
phpVersion := '7.3.33' ;
|
||||
mysqlVersion := '10.6.5';
|
||||
//apacheVersion := '2.4.9';
|
||||
//phpVersion := '5.5.12' ;
|
||||
apacheVersion := '2.4.41';
|
||||
phpVersion := '7.3.12' ;
|
||||
//mysqlVersion := '5.0.45';
|
||||
mysqlVersion := '10.4.10';
|
||||
phpmyadminVersion := '4.1.14';
|
||||
|
||||
smtpServer := 'localhost';
|
||||
apachePort := '80';
|
||||
@@ -363,9 +380,9 @@ begin
|
||||
|
||||
|
||||
// Migration of database
|
||||
// datadir := pathWithSlashes+'/bin/mariadb/mariadb10.6.5/data';
|
||||
// exedirold := pathWithSlashes+'/bin/mariadb/mariadb10.6.5/';
|
||||
// exedirnew := pathWithSlashes+'/bin/mariadb/mariadb10.6.5/';
|
||||
// datadir := pathWithSlashes+'/bin/mariadb/marradb10.4.10/data';
|
||||
// exedirold := pathWithSlashes+'/bin/mariadb/marradb10.4.10/';
|
||||
// exedirnew := pathWithSlashes+'/bin/mariadb/marradb10.4.10/';
|
||||
|
||||
// If we have a new database version, we should only copy old my.ini file into new directory
|
||||
// and change only all basedir= strings to use new version. Like this, data dir is still correct.
|
||||
@@ -582,17 +599,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
if browser = 'iexplore.exe' then
|
||||
begin
|
||||
if FileExists (pfPath+'/Microsoft/Edge/Application/msedge.exe') then
|
||||
begin
|
||||
if MsgBox(CustomMessage('MicrosoftEdgeDetected'),mbConfirmation,MB_YESNO) = IDYES then
|
||||
begin
|
||||
browser := pfPath+'/Microsoft/Edge/Application/msedge.exe';
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
if browser = 'iexplore.exe' then
|
||||
begin
|
||||
if FileExists (pfPath+'/Internet Explorer/iexplore.exe') then
|
||||
@@ -629,6 +635,27 @@ begin
|
||||
begin
|
||||
|
||||
|
||||
//----------------------------------------------
|
||||
// Create file alias phpmyadmin (always)
|
||||
//----------------------------------------------
|
||||
|
||||
destFile := pathWithSlashes+'/alias/phpmyadmin.conf';
|
||||
srcFile := pathWithSlashes+'/alias/phpmyadmin.conf.install';
|
||||
|
||||
if FileExists(srcFile) then
|
||||
begin
|
||||
LoadStringFromFile (srcFile, srcContents);
|
||||
|
||||
//installDir et version de phpmyadmin
|
||||
StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
|
||||
StringChangeEx (srcContents, 'WAMPPHPMYADMINVERSION', phpmyadminVersion, True);
|
||||
|
||||
SaveStringToFile(destFile,srcContents, False);
|
||||
end;
|
||||
DeleteFile(srcFile);
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------
|
||||
// Create file alias dolibarr (if not exists)
|
||||
//----------------------------------------------
|
||||
@@ -664,6 +691,35 @@ begin
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------
|
||||
// Create file configuration for phpmyadmin (if not exists)
|
||||
//----------------------------------------------
|
||||
|
||||
destFile := pathWithSlashes+'/apps/phpmyadmin'+phpmyadminVersion+'/config.inc.php';
|
||||
srcFile := pathWithSlashes+'/apps/phpmyadmin'+phpmyadminVersion+'/config.inc.php.install';
|
||||
|
||||
if FileExists(srcFile) then
|
||||
begin
|
||||
if not FileExists (destFile) then
|
||||
begin
|
||||
LoadStringFromFile (srcFile, srcContents);
|
||||
StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
|
||||
StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
|
||||
SaveStringToFile(destFile,srcContents, False);
|
||||
end
|
||||
else
|
||||
begin
|
||||
// We must replace to use format 2.4 of apache
|
||||
DeleteFile(destFile);
|
||||
LoadStringFromFile (srcFile, srcContents);
|
||||
StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
|
||||
StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
|
||||
SaveStringToFile(destFile,srcContents, False);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------
|
||||
// Create file httpd.conf (if not exists)
|
||||
//----------------------------------------------
|
||||
@@ -1026,7 +1082,7 @@ Filename: "{app}\rundoliwamp.bat"; Description: {cm:LaunchNow}; Flags: shellexec
|
||||
|
||||
[UninstallDelete]
|
||||
Type: files; Name: "{app}\*.*"
|
||||
Type: files; Name: "{app}\bin\mariadb\mariadb10.6.5\*.*"
|
||||
Type: files; Name: "{app}\bin\mariadb\mariadb10.4.10\*.*"
|
||||
Type: filesandordirs; Name: "{app}\alias"
|
||||
Type: filesandordirs; Name: "{app}\apps"
|
||||
Type: filesandordirs; Name: "{app}\bin\apache"
|
||||
|
||||
@@ -22,7 +22,6 @@ $force_install_databaserootpass='WAMPMYSQLNEWPASSWORD';
|
||||
$force_install_dolibarrlogin='admin';
|
||||
$force_install_nophpinfo='1';
|
||||
$force_install_lockinstall='644';
|
||||
$force_install_distrib='doliwamp';
|
||||
|
||||
$force_install_module='';
|
||||
?>
|
||||
@@ -22,9 +22,7 @@
|
||||
* \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();
|
||||
$script_file = basename(__FILE__);
|
||||
@@ -32,8 +30,8 @@ $path=dirname(__FILE__).'/';
|
||||
|
||||
// Test if batch mode
|
||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||
exit;
|
||||
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once $path."../htdocs/master.inc.php";
|
||||
@@ -48,32 +46,30 @@ $includecustom=0;
|
||||
$includeconstants=array();
|
||||
|
||||
if (empty($argv[1])) {
|
||||
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value] [buildzip=1]\n";
|
||||
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;
|
||||
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";
|
||||
exit -1;
|
||||
}
|
||||
|
||||
parse_str($argv[1]);
|
||||
|
||||
$i=0;
|
||||
while ($i < $argc) {
|
||||
if (! empty($argv[$i])) {
|
||||
parse_str($argv[$i]); // set all params $release, $includecustom, $includeconstant, $buildzip ...
|
||||
}
|
||||
if (preg_match('/includeconstant=/', $argv[$i])) {
|
||||
$tmp=explode(':', $includeconstant, 3); // $includeconstant has been set with previous parse_str()
|
||||
if (count($tmp) != 3) {
|
||||
print "Error: Bad parameter includeconstant=".$includeconstant."\n";
|
||||
exit -1;
|
||||
}
|
||||
$includeconstants[$tmp[0]][$tmp[1]] = $tmp[2];
|
||||
}
|
||||
$i++;
|
||||
if (! empty($argv[$i])) parse_str($argv[$i]);
|
||||
if (preg_match('/includeconstant=/', $argv[$i])) {
|
||||
$tmp=explode(':', $includeconstant, 3);
|
||||
if (count($tmp) != 3) {
|
||||
print "Error: Bad parameter includeconstant ".$includeconstant."\n";
|
||||
exit -1;
|
||||
}
|
||||
$includeconstants[$tmp[0]][$tmp[1]] = $tmp[2];
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
if (empty($release)) {
|
||||
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";
|
||||
exit -1;
|
||||
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";
|
||||
exit -1;
|
||||
}
|
||||
|
||||
$savrelease = $release;
|
||||
@@ -81,72 +77,65 @@ $savrelease = $release;
|
||||
// If release is auto, we take current version
|
||||
$tmpver=explode('-', $release, 2);
|
||||
if ($tmpver[0] == 'auto' || $tmpver[0] == 'autostable') {
|
||||
$release=DOL_VERSION;
|
||||
if ($tmpver[1] && $tmpver[0] == 'auto') {
|
||||
$release.='-'.$tmpver[1];
|
||||
}
|
||||
$release=DOL_VERSION;
|
||||
if ($tmpver[1] && $tmpver[0] == 'auto') $release.='-'.$tmpver[1];
|
||||
}
|
||||
|
||||
if (empty($includecustom)) {
|
||||
$tmpverbis=explode('-', $release, 2);
|
||||
if (empty($tmpverbis[1]) || $tmpver[0] == 'autostable') {
|
||||
if (DOL_VERSION != $tmpverbis[0] && $savrelease != 'auto') {
|
||||
print 'Error: When parameter "includecustom" is not set and there is no suffix in release parameter, version declared into filefunc.in.php ('.DOL_VERSION.') must be exact same value than "release" parameter ('.$tmpverbis[0].')'."\n";
|
||||
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
||||
exit -1;
|
||||
}
|
||||
} else {
|
||||
$tmpverter=explode('-', DOL_VERSION, 2);
|
||||
if ($tmpverter[0] != $tmpverbis[0]) {
|
||||
print 'Error: When parameter "includecustom" is not set, version declared into filefunc.in.php ('.DOL_VERSION.') must have value without prefix ('.$tmpverter[0].') that is exact same value than "release" parameter ('.$tmpverbis[0].')'."\n";
|
||||
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
||||
exit -1;
|
||||
}
|
||||
}
|
||||
$tmpverbis=explode('-', $release, 2);
|
||||
if (empty($tmpverbis[1]) || $tmpver[0] == 'autostable') {
|
||||
if (DOL_VERSION != $tmpverbis[0] && $savrelease != 'auto') {
|
||||
print 'Error: When parameter "includecustom" is not set and there is no suffix in release parameter, version declared into filefunc.in.php ('.DOL_VERSION.') must be exact same value than "release" parameter ('.$tmpverbis[0].')'."\n";
|
||||
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
||||
exit -1;
|
||||
}
|
||||
} else {
|
||||
$tmpverter=explode('-', DOL_VERSION, 2);
|
||||
if ($tmpverter[0] != $tmpverbis[0]) {
|
||||
print 'Error: When parameter "includecustom" is not set, version declared into filefunc.in.php ('.DOL_VERSION.') must have value without prefix ('.$tmpverter[0].') that is exact same value than "release" parameter ('.$tmpverbis[0].')'."\n";
|
||||
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
||||
exit -1;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (! preg_match('/'.preg_quote(DOL_VERSION, '/').'-/', $release)) {
|
||||
print 'Error: When parameter "includecustom" is set, version declared into filefunc.inc.php ('.DOL_VERSION.') must be used with a suffix into "release" parameter (ex: '.DOL_VERSION.'-mydistrib).'."\n";
|
||||
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
||||
exit -1;
|
||||
}
|
||||
if (! preg_match('/'.preg_quote(DOL_VERSION, '/').'-/', $release)) {
|
||||
print 'Error: When parameter "includecustom" is set, version declared into filefunc.inc.php ('.DOL_VERSION.') must be used with a suffix into "release" parameter (ex: '.DOL_VERSION.'-mydistrib).'."\n";
|
||||
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
||||
exit -1;
|
||||
}
|
||||
}
|
||||
|
||||
print "Working on files into : ".DOL_DOCUMENT_ROOT."\n";
|
||||
print "Release : ".$release."\n";
|
||||
print "Working on files into : ".DOL_DOCUMENT_ROOT."\n";
|
||||
print "Include custom in signature : ".$includecustom."\n";
|
||||
print "Include constants in signature : ";
|
||||
foreach ($includeconstants as $countrycode => $tmp) {
|
||||
foreach ($tmp as $constname => $constvalue) {
|
||||
print $constname.'='.$constvalue." ";
|
||||
}
|
||||
foreach($tmp as $constname => $constvalue) {
|
||||
print $constname.'='.$constvalue." ";
|
||||
}
|
||||
}
|
||||
print "\n";
|
||||
|
||||
//$outputfile=dirname(__FILE__).'/../htdocs/install/filelist-'.$release.'.xml';
|
||||
$outputdir=dirname(dirname(__FILE__)).'/htdocs/install';
|
||||
print 'Delete current files '.$outputdir.'/filelist*.xml*'."\n";
|
||||
dol_delete_file($outputdir.'/filelist*.xml*', 0, 1, 1);
|
||||
print 'Delete current files '.$outputdir.'/filelist*.xml'."\n";
|
||||
dol_delete_file($outputdir.'/filelist*.xml', 0, 1, 1);
|
||||
|
||||
$checksumconcat=array();
|
||||
|
||||
$outputfile=$outputdir.'/filelist-'.$release.'.xml';
|
||||
$fp = fopen($outputfile, 'w');
|
||||
if (empty($fp)) {
|
||||
print 'Failed to open file '.$outputfile."\n";
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
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");
|
||||
|
||||
foreach ($includeconstants as $countrycode => $tmp) {
|
||||
fputs($fp, '<dolibarr_constants country="'.$countrycode.'">'."\n");
|
||||
foreach ($tmp as $constname => $constvalue) {
|
||||
$valueforchecksum=(empty($constvalue)?'0':$constvalue);
|
||||
$checksumconcat[]=$valueforchecksum;
|
||||
fputs($fp, ' <constant name="'.$constname.'">'.$valueforchecksum.'</constant>'."\n");
|
||||
}
|
||||
fputs($fp, '</dolibarr_constants>'."\n");
|
||||
fputs($fp, '<dolibarr_constants country="'.$countrycode.'">'."\n");
|
||||
foreach($tmp as $constname => $constvalue) {
|
||||
$valueforchecksum=(empty($constvalue)?'0':$constvalue);
|
||||
$checksumconcat[]=$valueforchecksum;
|
||||
fputs($fp, ' <constant name="'.$constname.'">'.$valueforchecksum.'</constant>'."\n");
|
||||
}
|
||||
fputs($fp, '</dolibarr_constants>'."\n");
|
||||
}
|
||||
|
||||
fputs($fp, '<dolibarr_htdocs_dir includecustom="'.$includecustom.'">'."\n");
|
||||
@@ -156,30 +145,27 @@ $iterator1 = new RecursiveIteratorIterator($dir_iterator1);
|
||||
// Need to ignore document custom etc. Note: this also ignore natively symbolic links.
|
||||
$files = new RegexIterator($iterator1, '#^(?:[A-Z]:)?(?:/(?!(?:'.($includecustom?'':'custom\/|').'documents\/|conf\/|install\/))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i');
|
||||
*/
|
||||
// Define qualified files (must be same than into generate_filelist_xml.php and in api_setup.class.php)
|
||||
$regextoinclude = '\.(php|php3|php4|php5|phtml|phps|phar|inc|css|scss|html|xml|js|json|tpl|jpg|jpeg|png|gif|ico|sql|lang|txt|yml|bak|md|mp3|mp4|wav|mkv|z|gz|zip|rar|tar|less|svg|eot|woff|woff2|ttf|manifest)$';
|
||||
$regextoexclude = '('.($includecustom?'':'custom|').'documents|conf|install|dejavu-fonts-ttf-.*|public\/test|sabre\/sabre\/.*\/tests|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
|
||||
$regextoinclude='\.(php|php3|php4|php5|phtml|phps|phar|inc|css|scss|html|xml|js|json|tpl|jpg|jpeg|png|gif|ico|sql|lang|txt|yml|md|mp3|mp4|wav|mkv|z|gz|zip|rar|tar|less|svg|eot|woff|woff2|ttf|manifest)$';
|
||||
$regextoexclude='('.($includecustom?'':'custom|').'documents|conf|install|public\/test|sabre\/sabre\/.*\/tests|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
|
||||
$files = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude, 'fullname');
|
||||
|
||||
$dir='';
|
||||
$needtoclose=0;
|
||||
foreach ($files as $filetmp) {
|
||||
$file = $filetmp['fullname'];
|
||||
//$newdir = str_replace(dirname(__FILE__).'/../htdocs', '', dirname($file));
|
||||
$newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file));
|
||||
if ($newdir!=$dir) {
|
||||
if ($needtoclose) {
|
||||
fputs($fp, ' </dir>'."\n");
|
||||
}
|
||||
fputs($fp, ' <dir name="'.$newdir.'">'."\n");
|
||||
$dir = $newdir;
|
||||
$needtoclose=1;
|
||||
}
|
||||
if (filetype($file)=="file") {
|
||||
$md5=md5_file($file);
|
||||
$checksumconcat[]=$md5;
|
||||
fputs($fp, ' <md5file name="'.basename($file).'" size="'.filesize($file).'">'.$md5.'</md5file>'."\n");
|
||||
}
|
||||
$file = $filetmp['fullname'];
|
||||
//$newdir = str_replace(dirname(__FILE__).'/../htdocs', '', dirname($file));
|
||||
$newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file));
|
||||
if ($newdir!=$dir) {
|
||||
if ($needtoclose)
|
||||
fputs($fp, ' </dir>'."\n");
|
||||
fputs($fp, ' <dir name="'.$newdir.'" >'."\n");
|
||||
$dir = $newdir;
|
||||
$needtoclose=1;
|
||||
}
|
||||
if (filetype($file)=="file") {
|
||||
$md5=md5_file($file);
|
||||
$checksumconcat[]=$md5;
|
||||
fputs($fp, ' <md5file name="'.basename($file).'" size="'.filesize($file).'">'.$md5.'</md5file>'."\n");
|
||||
}
|
||||
}
|
||||
fputs($fp, ' </dir>'."\n");
|
||||
fputs($fp, '</dolibarr_htdocs_dir>'."\n");
|
||||
@@ -207,23 +193,22 @@ $files = dol_dir_list(dirname(__FILE__).'/../scripts/', 'files', 1, $regextoincl
|
||||
$dir='';
|
||||
$needtoclose=0;
|
||||
foreach ($files as $filetmp) {
|
||||
$file = $filetmp['fullname'];
|
||||
//$newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file));
|
||||
$newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file));
|
||||
$newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file));
|
||||
if ($newdir!=$dir) {
|
||||
if ($needtoclose) {
|
||||
fputs($fp, ' </dir>'."\n");
|
||||
}
|
||||
fputs($fp, ' <dir name="'.$newdir.'" >'."\n");
|
||||
$dir = $newdir;
|
||||
$needtoclose=1;
|
||||
}
|
||||
if (filetype($file)=="file") {
|
||||
$md5=md5_file($file);
|
||||
$checksumconcat[]=$md5;
|
||||
fputs($fp, ' <md5file name="'.basename($file).'" size="'.filesize($file).'">'.$md5.'</md5file>'."\n");
|
||||
}
|
||||
$file = $filetmp['fullname'];
|
||||
//$newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file));
|
||||
$newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file));
|
||||
$newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file));
|
||||
if ($newdir!=$dir) {
|
||||
if ($needtoclose)
|
||||
fputs($fp, ' </dir>'."\n");
|
||||
fputs($fp, ' <dir name="'.$newdir.'" >'."\n");
|
||||
$dir = $newdir;
|
||||
$needtoclose=1;
|
||||
}
|
||||
if (filetype($file)=="file") {
|
||||
$md5=md5_file($file);
|
||||
$checksumconcat[]=$md5;
|
||||
fputs($fp, ' <md5file name="'.basename($file).'" size="'.filesize($file).'">'.$md5.'</md5file>'."\n");
|
||||
}
|
||||
}
|
||||
fputs($fp, ' </dir>'."\n");
|
||||
fputs($fp, '</dolibarr_script_dir>'."\n");
|
||||
@@ -236,22 +221,6 @@ fputs($fp, '</dolibarr_script_dir_checksum>'."\n");
|
||||
fputs($fp, '</checksum_list>'."\n");
|
||||
fclose($fp);
|
||||
|
||||
if (empty($buildzip)) {
|
||||
print "File ".$outputfile." generated\n";
|
||||
} else {
|
||||
if ($buildzip == '1' || $buildzip == 'zip') {
|
||||
$result = dol_compress_file($outputfile, $outputfile.'.zip', 'zip');
|
||||
if ($result > 0) {
|
||||
dol_delete_file($outputfile);
|
||||
print "File ".$outputfile.".zip generated\n";
|
||||
}
|
||||
} elseif ($buildzip == '2' || $buildzip == 'gz') {
|
||||
$result = dol_compress_file($outputfile, $outputfile.'.gz', 'gz');
|
||||
if ($result > 0) {
|
||||
dol_delete_file($outputfile);
|
||||
print "File ".$outputfile.".gz generated\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
print "File ".$outputfile." generated\n";
|
||||
|
||||
exit(0);
|
||||
|
||||
@@ -65,7 +65,7 @@ $DIR||='.'; $DIR =~ s/([^\/\\])[\\\/]+$/$1/;
|
||||
|
||||
$SOURCE="$DIR/..";
|
||||
$DESTI="$SOURCE/build";
|
||||
if ($SOURCE !~ /^\// && $SOURCE !~ /^[a-z]:/i)
|
||||
if ($SOURCE !~ /^\//)
|
||||
{
|
||||
print "Error: Launch the script $PROG.$Extension with its full path from /.\n";
|
||||
print "$PROG.$Extension aborted.\n";
|
||||
@@ -76,23 +76,15 @@ if (! $ENV{"DESTIBETARC"} || ! $ENV{"DESTISTABLE"})
|
||||
{
|
||||
print "Error: Missing environment variables.\n";
|
||||
print "You must define the environment variable DESTIBETARC and DESTISTABLE to point to the\ndirectories where you want to save the generated packages.\n";
|
||||
print "$PROG.$Extension aborted.\n";
|
||||
print "\n";
|
||||
print "You can set them with\n";
|
||||
print "On Linux:\n";
|
||||
print "export DESTIBETARC='/tmp'; export DESTISTABLE='/tmp';\n";
|
||||
print "On Windows:\n";
|
||||
print "set DESTIBETARC=c:/tmp\n";
|
||||
print "set DESTISTABLE=c:/tmp\n";
|
||||
print "\n";
|
||||
print "Example: DESTIBETARC='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/lastbuild'\n";
|
||||
print "Example: DESTISTABLE='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/stable'\n";
|
||||
print "$PROG.$Extension aborted.\n";
|
||||
sleep 2;
|
||||
exit 1;
|
||||
}
|
||||
if (! -d $ENV{"DESTIBETARC"} || ! -d $ENV{"DESTISTABLE"})
|
||||
{
|
||||
print "Error: Directory of environment variable DESTIBETARC ($ENV{'DESTIBETARC'}) or DESTISTABLE ($ENV{'DESTISTABLE'}) does not exist.\n";
|
||||
print "Error: Directory of environment variable DESTIBETARC or DESTISTABLE does not exist.\n";
|
||||
print "$PROG.$Extension aborted.\n";
|
||||
sleep 2;
|
||||
exit 1;
|
||||
@@ -102,7 +94,7 @@ if (! -d $ENV{"DESTIBETARC"} || ! -d $ENV{"DESTISTABLE"})
|
||||
# --------------
|
||||
if ("$^O" =~ /linux/i || (-d "/etc" && -d "/var" && "$^O" !~ /cygwin/i)) { $OS='linux'; $CR=''; }
|
||||
elsif (-d "/etc" && -d "/Users") { $OS='macosx'; $CR=''; }
|
||||
elsif ("$^O" =~ /cygwin/i || "$^O" =~ /win32/i || "$^O" =~ /msys/i) { $OS='windows'; $CR="\r"; }
|
||||
elsif ("$^O" =~ /cygwin/i || "$^O" =~ /win32/i) { $OS='windows'; $CR="\r"; }
|
||||
if (! $OS) {
|
||||
print "Error: Can't detect your OS.\n";
|
||||
print "Can't continue.\n";
|
||||
@@ -398,9 +390,6 @@ if ($nboftargetok) {
|
||||
$olddir=getcwd();
|
||||
chdir("$SOURCE");
|
||||
|
||||
print "Clean $SOURCE/htdocs/includes/autoload.php\n";
|
||||
$ret=`rm -f $SOURCE/htdocs/includes/autoload.php`;
|
||||
|
||||
$ret=`git ls-files . --exclude-standard --others`;
|
||||
if ($ret)
|
||||
{
|
||||
@@ -487,7 +476,6 @@ if ($nboftargetok) {
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build.xml`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/phpstan.neon`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/pom.xml`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/README-*.md`;
|
||||
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/build/html`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build/Doli*-*`;
|
||||
@@ -507,19 +495,15 @@ if ($nboftargetok) {
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/cache.manifest`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/conf/conf.php`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/conf/conf.php.mysql`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/conf/conf.php.nova*`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/conf/conf.php.old`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/conf/conf.php.pgsql`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/conf/conf.php.postgres`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/conf/conf*sav*`;
|
||||
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/install/mssql/README`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/install/mysql/README`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/install/pgsql/README`;
|
||||
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/install/mssql`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/install/sqlite3`;
|
||||
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/node_modules`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/install/mssql`;
|
||||
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/ansible`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/codesniffer`;
|
||||
@@ -591,51 +575,52 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/teclib*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/timesheet*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/webmail*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/theme/common/fontawesome-5/svgs`;
|
||||
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/workstation*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/oblyon*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/allscreen*`;
|
||||
# Removed other test files
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/Thumbs.db $BUILDROOT/$PROJECT/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/*/Thumbs.db`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/.cvsignore $BUILDROOT/$PROJECT/*/.cvsignore $BUILDROOT/$PROJECT/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.cvsignore`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/.gitignore $BUILDROOT/$PROJECT/*/.gitignore $BUILDROOT/$PROJECT/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.gitignore`;
|
||||
|
||||
# Removed files installed by the awful composer
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/geoip/sample*.*`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/bin`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/ckeditor/adapters`; # Keep this removal in case we embed libraries
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/ckeditor/samples`; # Keep this removal in case we embed libraries
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/_source`; # _source must be kept into tarball for official debian, not for the rest
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/composer`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/doctrine`;
|
||||
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/multiselect/MIT-LICENSE.txt`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/select2/release.sh`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/doc`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/example`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/example`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mobiledetect/mobiledetectlib/.gitmodules`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mobiledetect/mobiledetectlib/docs`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nnnick/chartjs/.github`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nnnick/chartjs/docs`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nnnick/chartjs/samples`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nnnick/chartjs/scripts`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nnnick/chartjs/src`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nnnick/chartjs/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/samples`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/parsedown/LICENSE.txt`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/php-iban/docs`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/.gitattributes`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/Classes/license.md`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/Shared/PDF`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/Shared/PCLZip`;
|
||||
$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/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 -f $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/examples`;
|
||||
$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/ae_fonts_*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/utils`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/LICENSE.TXT`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/freefont-*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/ae_fonts_*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/utils`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/tools`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/vendor`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/webmozart`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/autoload.php`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/LICENSE.TXT`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/theme/common/octicons/LICENSE`;
|
||||
}
|
||||
|
||||
# Build package for each target
|
||||
@@ -1082,52 +1067,28 @@ if ($nboftargetok) {
|
||||
print "Remove target $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe...\n";
|
||||
unlink "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe";
|
||||
|
||||
if ($OS eq 'windows') {
|
||||
print "Check that ISCC.exe is in your PATH.\n";
|
||||
} else {
|
||||
print "Check that in your Wine setup, you have created a Z: drive that point to your / directory.\n";
|
||||
}
|
||||
|
||||
print "Check that in your Wine setup, you have created a Z: drive that point to your / directory.\n";
|
||||
|
||||
$SOURCEBACK=$SOURCE;
|
||||
$SOURCEBACK =~ s/\//\\/g;
|
||||
|
||||
print "Prepare file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\" from \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.iss\"\n";
|
||||
|
||||
#$ret=`cat "$SOURCE/build/exe/doliwamp/doliwamp.iss" | sed -e 's/__FILENAMEEXEDOLIWAMP__/$FILENAMEEXEDOLIWAMP/g' > "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`;
|
||||
open(IN, '<' . $SOURCE."/build/exe/doliwamp/doliwamp.iss") or die $!;
|
||||
open(OUT, '>' . "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss") or die $!;
|
||||
while(<IN>)
|
||||
{
|
||||
$_ =~ s/__FILENAMEEXEDOLIWAMP__/$FILENAMEEXEDOLIWAMP/g;
|
||||
print OUT $_;
|
||||
}
|
||||
close(IN);
|
||||
close(OUT);
|
||||
print "Prepare file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss from \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.iss\"\n";
|
||||
$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\" on OS $OS\n";
|
||||
|
||||
if ($OS eq 'windows') {
|
||||
$cmd= "ISCC.exe \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\"";
|
||||
} else {
|
||||
#$cmd= "wine ISCC.exe \"Z:$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\"";
|
||||
}
|
||||
print "Compil exe $FILENAMEEXEDOLIWAMP.exe file from iss file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\"\n";
|
||||
$cmd= "wine ISCC.exe \"Z:$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\"";
|
||||
print "$cmd\n";
|
||||
$ret= `$cmd`;
|
||||
print "ret=$ret\n";
|
||||
#print "$ret\n";
|
||||
|
||||
# Move to final dir
|
||||
print "Move \"$SOURCE\\build\\$FILENAMEEXEDOLIWAMP.exe\" to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
|
||||
rename("$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe","$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe");
|
||||
print "Move $SOURCE/build/$FILENAMEEXEDOLIWAMP.exe to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
|
||||
|
||||
use File::Copy;
|
||||
|
||||
#$ret=`mv "$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe" "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"`;
|
||||
$ret=move("$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe", "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe");
|
||||
$ret=`mv "$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe" "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"`;
|
||||
|
||||
print "Remove tmp file $SOURCE/build/exe/doliwamp/doliwamp.tmp.iss\n";
|
||||
#$ret=`rm "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`;
|
||||
$ret=unlink("$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss");
|
||||
$ret=`rm "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`;
|
||||
|
||||
next;
|
||||
}
|
||||
@@ -1274,7 +1235,7 @@ if ($nboftargetok) {
|
||||
|
||||
print "\n----- Summary -----\n";
|
||||
foreach my $target (sort keys %CHOOSEDTARGET) {
|
||||
if ($target eq '-CHKSUM') { print "Checksum was generated\n"; next; }
|
||||
if ($target eq '-CHKSUM') { print "Checksum was generated"; next; }
|
||||
if ($CHOOSEDTARGET{$target} < 0) {
|
||||
print "Package $target not built (bad requirement).\n";
|
||||
} else {
|
||||
|
||||
@@ -1,47 +1,19 @@
|
||||
----- Dolibarr Makepack How To -----
|
||||
This documentation describe steps to build a BETA or RELEASE versions
|
||||
of Dolibarr. There is a chapter for BETA version and a chapter for RELEASE version.
|
||||
|
||||
|
||||
***** Prerequisites For Linux *****
|
||||
|
||||
Prerequisites to build tgz, debian and rpm packages:
|
||||
> apt-get install perl tar dpkg dpatch p7zip-full rpm zip php-cli
|
||||
|
||||
Prerequisites to build autoexe DoliWamp package:
|
||||
> apt-get install wine q4wine
|
||||
> Launch "wine cmd" to check a drive Z: pointing to / exists.
|
||||
> Install InnoSetup
|
||||
For example by running isetup-5.5.8.exe (https://www.jrsoftware.org) https://files.jrsoftware.org/is/5/
|
||||
> Install WampServer into "C:\wamp64" to have Apache, PHP and MariaDB
|
||||
For example by running wampserver3.2.0_x64.exe (https://www.wampserver.com).
|
||||
See file build/exe/doliwamp.iss to know the doliwamp version currently setup.
|
||||
> Add path to ISCC into PATH windows var:
|
||||
Launch wine cmd, then regedit and add entry int HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment\PATH
|
||||
> To build manually the .exe from Windows (running from makepack-dolibarr.pl script is however recommanded),
|
||||
open file build/exe/doliwamp.iss and click on button "Compile".
|
||||
The .exe file will be build into directory build.
|
||||
|
||||
|
||||
***** Prerequisites For Windows *****
|
||||
|
||||
Install Perl
|
||||
Install WampServer-3.2.*-64.exe
|
||||
isetup-5.5.8.exe
|
||||
|
||||
of Dolibarr. There is a chapter for BETA version and a chapter for
|
||||
RELEASE version.
|
||||
|
||||
***** Actions to do a BETA *****
|
||||
This files describe steps made by Dolibarr packaging team to make a
|
||||
beta version of Dolibarr, step by step.
|
||||
|
||||
- Check all files are commited.
|
||||
- Update version/info in ChangeLog, for this you can:
|
||||
To generate a changelog of a major new version x.y.0 (from a repo on branch develop), you can do "cd ~/git/dolibarr; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent develop) | sed -ne 's/^ //p' | head -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"
|
||||
To generate a changelog of a major new version x.y.0 (from a repo on branch x.y repo), you can do "cd ~/git/dolibarr_x.y; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent x.y.0) | sed -ne 's/^ //p' | head -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"
|
||||
- Update version/info in ChangeLog.
|
||||
To generate a changelog of a major new version x.y.0 (from develop repo), you can do "cd ~/git/dolibarr; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent develop) | sed -ne 's/^ //p' | head -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"
|
||||
To generate a changelog of a major new version x.y.0 (from x.y repo), you can do "cd ~/git/dolibarr_x.y; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent x.y.0) | sed -ne 's/^ //p' | head -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"
|
||||
To generate a changelog of a maintenance version x.y.z, you can do "cd ~/git/dolibarr_x.y; git log x.y.z-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"
|
||||
Recopy the content of the output file into the file ChangeLog.
|
||||
- Note: To know number of lines changes: git diff --shortstat A B
|
||||
- Update version number with x.y.z-w in file htdocs/filefunc.inc.php
|
||||
- To know number of lines changes: git diff --shortstat A B
|
||||
- Update version number with x.y.z-w in htdocs/filefunc.inc.php
|
||||
- Commit all changes.
|
||||
|
||||
- Run makepack-dolibarr.pl to generate all packages.
|
||||
@@ -52,6 +24,7 @@ Recopy the content of the output file into the file ChangeLog.
|
||||
(/home/dolibarr/wwwroot/files/lastbuild).
|
||||
|
||||
- Post a news on dolibarr.org/dolibarr.fr + social networks
|
||||
- Send mail on mailings-list
|
||||
|
||||
|
||||
***** Actions to do a RELEASE *****
|
||||
@@ -59,13 +32,12 @@ This files describe steps made by Dolibarr packaging team to make a
|
||||
complete release of Dolibarr, step by step.
|
||||
|
||||
- Check all files are commited.
|
||||
- Update version/info in ChangeLog, for this you can:
|
||||
To generate a changelog of a major new version x.y.0 (from a repo on branch develop), you can do "cd ~/git/dolibarr; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent develop) | sed -ne 's/^ //p' | head -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"
|
||||
To generate a changelog of a major new version x.y.0 (from a repo pn branch x.y), you can do "cd ~/git/dolibarr_x.y; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent x.y.0) | sed -ne 's/^ //p' | head -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"
|
||||
- Update version/info in ChangeLog.
|
||||
To generate a changelog of a major new version x.y.0 (from develop repo), you can do "cd ~/git/dolibarr; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent develop) | sed -ne 's/^ //p' | head -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"
|
||||
To generate a changelog of a major new version x.y.0 (from x.y repo), you can do "cd ~/git/dolibarr_x.y; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent x.y.0) | sed -ne 's/^ //p' | head -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"
|
||||
To generate a changelog of a maintenance version x.y.z, you can do "cd ~/git/dolibarr_x.y; git log x.y.z-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"
|
||||
Recopy the content of the output file into the file ChangeLog.
|
||||
- Note: To know the number of lines changes: git diff --shortstat A B
|
||||
- Update version number with x.y.z in file htdocs/filefunc.inc.php
|
||||
- To know number of lines changes: git diff --shortstat A B
|
||||
- Update version number with x.y.z in htdocs/filefunc.inc.php
|
||||
- Commit all changes.
|
||||
|
||||
- Run makepack-dolibarr.pl to generate all packages.
|
||||
@@ -80,3 +52,4 @@ Recopy the content of the output file into the file ChangeLog.
|
||||
on server to point to new files (used by some web sites).
|
||||
|
||||
- Post a news on dolibarr.org/dolibarr.fr + social networks
|
||||
- Send mail on mailings-list
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
README (English)
|
||||
##################################################
|
||||
Building PAD files
|
||||
http://pad.asp-software.org/padgen.php
|
||||
##################################################
|
||||
|
||||
This directory contains files and docs used to build
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
To make htmldoc working from wiki.dolibarr.org, the wiki must be modified to have
|
||||
To make htmldoc working from wiki.dolibarr.org, them must be modified to have
|
||||
|
||||
To disable part of content, add:
|
||||
class="htmldoc-ignore"
|
||||
with css
|
||||
.htmldoc-ignore { display: none; }
|
||||
|
||||
Note:
|
||||
$_SERVER["HTTP_USER_AGENT"] is "HTMLDOC/x.y.z"
|
||||
$_COOKIE["htmldoc"] may also be defined if set on command line.
|
||||
|
||||
To disable part, add
|
||||
class="htmldoc-ignore" with css
|
||||
.htmldoc-ignore { display: none; }
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#HTMLDOC 1.8.27
|
||||
-t pdf14 -f "../../doc/dolibarr_en.pdf" --webpage --no-title --logoimage "../../doc/images/dolibarr_256x256.png" --linkcolor #2200c0 --linkstyle plain --size Universal --left 0.30in --right 0.30in --top 0.40in --bottom 0.30in --header ... --header1 ... --footer c/d --nup 1 --tocheader ... --tocfooter ... --portrait --color --no-pscommands --no-xrxcomments --compression=9 --jpeg=50 --fontsize 10.0 --fontspacing 1.0 --headingfont Helvetica --bodyfont Helvetica --headfootsize 9.0 --headfootfont Helvetica --charset iso-8859-1 --links --no-embedfonts --pagemode document --pagelayout single --firstpage p1 --pageeffect none --pageduration 10 --effectduration 1.0 --no-encryption --permissions all --owner-password "" --user-password "" --browserwidth 680 --no-strict --no-overflow
|
||||
https://wiki.dolibarr.org/index.php/Home
|
||||
https://wiki.dolibarr.org/index.php/What_Dolibarr_Does
|
||||
http://wiki.dolibarr.org/index.php/Main_Page
|
||||
http://wiki.dolibarr.org/index.php/What_Dolibarr_Do
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# \file dolibarr.pl
|
||||
# \brief Dolibarr script install for Virtualmin Pro
|
||||
# \author (c)2009-2020 Regis Houssin <regis.houssin@inodbox.com>
|
||||
# \author (c)2009-2019 Regis Houssin <regis.houssin@inodbox.com>
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ return "Regis Houssin";
|
||||
# script_dolibarr_versions()
|
||||
sub script_dolibarr_versions
|
||||
{
|
||||
return ( "14.0.5", "13.0.5", "12.0.5", "11.0.5", "10.0.7", "9.0.4", "8.0.6", "7.0.5" );
|
||||
return ( "10.0.0", "9.0.3", "8.0.5", "7.0.5", "6.0.8" );
|
||||
}
|
||||
|
||||
sub script_dolibarr_release
|
||||
@@ -77,16 +77,6 @@ if ($ver >= 3.6) {
|
||||
push(@rv, "Dolibarr requires PHP version 5.3 or later");
|
||||
}
|
||||
}
|
||||
if ($ver >= 12.0) {
|
||||
# Check for PHP 5.6+
|
||||
local $phpv = &get_php_version($phpver || 5, $d);
|
||||
if (!$phpv) {
|
||||
push(@rv, "Could not work out exact PHP version");
|
||||
}
|
||||
elsif ($phpv < 5.6) {
|
||||
push(@rv, "Dolibarr requires PHP version 5.6 or later");
|
||||
}
|
||||
}
|
||||
|
||||
return @rv;
|
||||
}
|
||||
@@ -386,7 +376,7 @@ sub script_dolibarr_realversion
|
||||
local ($d, $opts, $sinfo) = @_;
|
||||
local $lref = &read_file_lines("$opts->{'dir'}/filefunc.inc.php", 1);
|
||||
foreach my $l (@$lref) {
|
||||
if ($l =~ /'DOL_VERSION',\s?'([0-9a-z\.\-]+)'/) {
|
||||
if ($l =~ /'DOL_VERSION','([0-9a-z\.\-]+)'/) {
|
||||
return $1;
|
||||
}
|
||||
}
|
||||
@@ -400,10 +390,6 @@ sub script_dolibarr_check_latest
|
||||
{
|
||||
local ($ver) = @_;
|
||||
local @vers = &osdn_package_versions("dolibarr",
|
||||
$ver >= 14.0 ? "dolibarr\\-(12\\.0\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 13.0 ? "dolibarr\\-(12\\.0\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 12.0 ? "dolibarr\\-(12\\.0\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 11.0 ? "dolibarr\\-(11\\.0\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 10.0 ? "dolibarr\\-(10\\.0\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 9.0 ? "dolibarr\\-(9\\.0\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 8.0 ? "dolibarr\\-(8\\.0\\.[0-9\\.]+)\\.tgz" :
|
||||
@@ -424,7 +410,7 @@ return $ver eq $vers[0] ? undef : $vers[0];
|
||||
|
||||
sub script_dolibarr_site
|
||||
{
|
||||
return 'https://www.dolibarr.org/';
|
||||
return 'http://www.dolibarr.org/';
|
||||
}
|
||||
|
||||
sub script_dolibarr_passmode
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
PHPStan
|
||||
|
||||
https://phpstan.org
|
||||
|
||||
PHPStan requires PHP >= 7.1
|
||||
|
||||
Install: composer require --dev phpstan/phpstan
|
||||
|
||||
Config File: phpstan.neon
|
||||
@@ -3,54 +3,48 @@ README (English)
|
||||
RPM Package tools
|
||||
##################################################
|
||||
|
||||
This directory contains files used by makepack-dolibarr.pl script to build a package,
|
||||
ready to be distributed with format RPM (https://rpm.org)
|
||||
for Linux Distributions like Redhat, Fedora, CentOS, OpenSuse, OpenMandriva, Mageia ...
|
||||
This directory contains files used by makepack-dolibarr.pl
|
||||
script to build a package, ready to be distributed,
|
||||
with format RPM (for Redhat, OpenSuse, Mandriva, ...).
|
||||
|
||||
|
||||
# This is standard command to work on RPM packaging:
|
||||
|
||||
#
|
||||
# To install all packagers tools:
|
||||
- Fedora: yum -y install rpmlint fedora-packager mock koji hunspell-en hunspell-es hunspell-fr hunspell-it
|
||||
- OpenSuse: yast --install update-desktop-files
|
||||
|
||||
# Fedora: yum -y install rpmlint fedora-packager mock koji hunspell-en hunspell-es hunspell-fr hunspell-it
|
||||
# OpenSuse: yast --install update-desktop-files
|
||||
#
|
||||
# rpmlint file.rpm Test a package
|
||||
# mock -r fedora-15-i386 --rebuild ../SRPMS/hello-2.7-1.fc15.src.rpm
|
||||
|
||||
|
||||
# On Fedora
|
||||
# =========
|
||||
# rpm -i --test dolibarr-...rpm to list dependencies of RPM
|
||||
# yum -v install dolibarr-...rpm to install package and dependencies
|
||||
# yum -v erase dolibarr to remove package
|
||||
# chcon -R -h -t httpd_sys_script_rw_t /file to add temporary context rw for httpd on /file
|
||||
# restorecon -R -v /file to restore values into files (cancel chcon, validate semanage)
|
||||
# semanage fcontext -a -t httpd_sys_script_rw_t "/dir/(.*)?" to add persistent context rw for httpd on /dir (this add file_contexts.local)
|
||||
|
||||
|
||||
# On OpenSuse
|
||||
# ===========
|
||||
# zypper install dolibarr-...rpm to install package and dependencies
|
||||
# zypper remove dolibarr to remove package
|
||||
# zypper search xxx to search a package
|
||||
|
||||
|
||||
# On Mageia (after su - root)
|
||||
# ===========================
|
||||
# urpmi dolibarr-...rpm to install package and dependencies
|
||||
# urpme dolibarr to remove package
|
||||
#
|
||||
# On Fedora
|
||||
# rpm -i --test dolibarr-...rpm To list dependencies of RPM
|
||||
# yum -v install dolibarr-...rpm To install package and dependencies
|
||||
# yum -v erase dolibarr To remove package
|
||||
# chcon -R -h -t httpd_sys_script_rw_t /file To add temporary context rw for httpd on /file
|
||||
# semanage fcontext -a -t httpd_sys_script_rw_t "/dir/(.*)?" To add persistent context rw for httpd on /dir (this add file_contexts.local)
|
||||
# restorecon -R -v /file Restore values into files (cancel chcon, validate semanage)
|
||||
#
|
||||
# On OpenSuse
|
||||
# zypper install dolibarr-...rpm To install package and dependencies
|
||||
# zypper remove dolibarr To remove package
|
||||
# zypper search xxx To search a package
|
||||
#
|
||||
# On Mageia (after su - root)
|
||||
# urpmi dolibarr-...rpm To install package and dependencies
|
||||
# urpme dolibarr To remove package
|
||||
#
|
||||
# More on rpm on page http://www.trustonme.net/didactels/273.html
|
||||
|
||||
|
||||
To submit a package to Fedora:
|
||||
- Create account on https://bugzilla.redhat.com
|
||||
- Create account on https://developer.fedoraproject.org/
|
||||
- Create SRPMS package
|
||||
- Upload package on https://fedorapeople.org
|
||||
- Create a bug with form https://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Fedora&format=fedora-review
|
||||
|
||||
- Create account on bugzilla.redhat.com
|
||||
- Create account on fedoraproject.org
|
||||
- Create SRPMS package.
|
||||
- Upload package onf http://fedorapeople.org
|
||||
- Create a bug with form https://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Fedora&format=fedora-review
|
||||
This is example of content of review field (used for Bug 723326 - https://bugzilla.redhat.com/show_bug.cgi?id=723326):
|
||||
SRPMS URL: https://www.dolibarr.org/files/fedora/dolibarr-x.y.z-xxx.src.rpm
|
||||
SRPMS URL: http://www.dolibarr.org/files/fedora/dolibarr-x.y.z-xxx.src.rpm
|
||||
Description: Dolibarr ERP & CRM is an easy to use open source/free software
|
||||
for small and medium companies, foundations or freelances. It includes
|
||||
different features for Enterprise Resource Planning (ERP) and Customer
|
||||
@@ -62,4 +56,4 @@ is my first package to maintain myself. So i'm seeking a sponsor.
|
||||
- Install fedora packager tools: yum install fedora-packager
|
||||
- Setup fedora packagers tools: fedora-packager-setup
|
||||
- Send your package: koji build --scratch f16 path_to_source_RPM
|
||||
- Check if package is available: https://koji.fedoraproject.org/koji/
|
||||
- Check if package is available: http://koji.fedoraproject.org/koji/
|
||||
@@ -166,6 +166,7 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/blockedlog
|
||||
%_datadir/dolibarr/htdocs/bookmarks
|
||||
%_datadir/dolibarr/htdocs/bom
|
||||
%_datadir/dolibarr/htdocs/cashdesk
|
||||
%_datadir/dolibarr/htdocs/categories
|
||||
%_datadir/dolibarr/htdocs/collab
|
||||
%_datadir/dolibarr/htdocs/comm
|
||||
@@ -180,11 +181,9 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/datapolicy
|
||||
%_datadir/dolibarr/htdocs/dav
|
||||
%_datadir/dolibarr/htdocs/debugbar
|
||||
%_datadir/dolibarr/htdocs/delivery
|
||||
%_datadir/dolibarr/htdocs/don
|
||||
%_datadir/dolibarr/htdocs/ecm
|
||||
%_datadir/dolibarr/htdocs/emailcollector
|
||||
%_datadir/dolibarr/htdocs/eventorganization
|
||||
%_datadir/dolibarr/htdocs/expedition
|
||||
%_datadir/dolibarr/htdocs/expensereport
|
||||
%_datadir/dolibarr/htdocs/exports
|
||||
@@ -197,9 +196,8 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/imports
|
||||
%_datadir/dolibarr/htdocs/includes
|
||||
%_datadir/dolibarr/htdocs/install
|
||||
%_datadir/dolibarr/htdocs/intracommreport
|
||||
%_datadir/dolibarr/htdocs/knowledgemanagement
|
||||
%_datadir/dolibarr/htdocs/langs/HOWTO-Translation.txt
|
||||
%_datadir/dolibarr/htdocs/livraison
|
||||
%_datadir/dolibarr/htdocs/loan
|
||||
%_datadir/dolibarr/htdocs/mailmanspip
|
||||
%_datadir/dolibarr/htdocs/margin
|
||||
@@ -207,14 +205,12 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/mrp
|
||||
%_datadir/dolibarr/htdocs/multicurrency
|
||||
%_datadir/dolibarr/htdocs/opensurvey
|
||||
%_datadir/dolibarr/htdocs/partnership
|
||||
%_datadir/dolibarr/htdocs/paybox
|
||||
%_datadir/dolibarr/htdocs/paypal
|
||||
%_datadir/dolibarr/htdocs/printing
|
||||
%_datadir/dolibarr/htdocs/product
|
||||
%_datadir/dolibarr/htdocs/projet
|
||||
%_datadir/dolibarr/htdocs/public
|
||||
%_datadir/dolibarr/htdocs/recruitment
|
||||
%_datadir/dolibarr/htdocs/reception
|
||||
%_datadir/dolibarr/htdocs/resource
|
||||
%_datadir/dolibarr/htdocs/salaries
|
||||
@@ -227,10 +223,8 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/ticket
|
||||
%_datadir/dolibarr/htdocs/user
|
||||
%_datadir/dolibarr/htdocs/variants
|
||||
%_datadir/dolibarr/htdocs/webhook
|
||||
%_datadir/dolibarr/htdocs/webservices
|
||||
%_datadir/dolibarr/htdocs/website
|
||||
%_datadir/dolibarr/htdocs/workstation
|
||||
%_datadir/dolibarr/htdocs/zapier
|
||||
%_datadir/dolibarr/htdocs/*.ico
|
||||
%_datadir/dolibarr/htdocs/*.patch
|
||||
@@ -279,6 +273,7 @@ then
|
||||
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
|
||||
|
||||
@@ -54,11 +54,11 @@ BuildRequires: desktop-file-utils
|
||||
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: mysql, mysql-client
|
||||
%else
|
||||
%else%_datadir/dolibarr/htdocs/datapolicy
|
||||
%if 0%{?suse_version}
|
||||
# Voir http://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros
|
||||
Group: Productivity/Office/Management
|
||||
Requires: apache2, apache2-mod_php, php >= 5.3.0, php-gd, php-ldap, php-imap, php-mysql, php-openssl, dejavu
|
||||
Requires: apache2, apache2-mod_php5, php5 >= 5.3.0, php5-gd, php5-ldap, php5-imap, php5-mysql, php5-openssl, dejavu
|
||||
Requires: mysql-community-server, mysql-community-server-client
|
||||
BuildRequires: update-desktop-files fdupes
|
||||
%else
|
||||
@@ -68,7 +68,6 @@ Requires: mysql-server, mysql
|
||||
Requires: php-mysqli >= 4.1.0
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%endif
|
||||
|
||||
# Set yes to build test package, no for release (this disable need of /usr/bin/php not found by OpenSuse)
|
||||
@@ -125,7 +124,7 @@ cui hai bisogno ed essere facile da usare.
|
||||
|
||||
%if 0%{?sles_version}
|
||||
%{__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}/%{name}
|
||||
%else
|
||||
@@ -247,6 +246,7 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/blockedlog
|
||||
%_datadir/dolibarr/htdocs/bookmarks
|
||||
%_datadir/dolibarr/htdocs/bom
|
||||
%_datadir/dolibarr/htdocs/cashdesk
|
||||
%_datadir/dolibarr/htdocs/categories
|
||||
%_datadir/dolibarr/htdocs/collab
|
||||
%_datadir/dolibarr/htdocs/comm
|
||||
@@ -261,11 +261,9 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/datapolicy
|
||||
%_datadir/dolibarr/htdocs/dav
|
||||
%_datadir/dolibarr/htdocs/debugbar
|
||||
%_datadir/dolibarr/htdocs/delivery
|
||||
%_datadir/dolibarr/htdocs/don
|
||||
%_datadir/dolibarr/htdocs/ecm
|
||||
%_datadir/dolibarr/htdocs/emailcollector
|
||||
%_datadir/dolibarr/htdocs/eventorganization
|
||||
%_datadir/dolibarr/htdocs/expedition
|
||||
%_datadir/dolibarr/htdocs/expensereport
|
||||
%_datadir/dolibarr/htdocs/exports
|
||||
@@ -278,9 +276,8 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/imports
|
||||
%_datadir/dolibarr/htdocs/includes
|
||||
%_datadir/dolibarr/htdocs/install
|
||||
%_datadir/dolibarr/htdocs/intracommreport
|
||||
%_datadir/dolibarr/htdocs/knowledgemanagement
|
||||
%_datadir/dolibarr/htdocs/langs/HOWTO-Translation.txt
|
||||
%_datadir/dolibarr/htdocs/livraison
|
||||
%_datadir/dolibarr/htdocs/loan
|
||||
%_datadir/dolibarr/htdocs/mailmanspip
|
||||
%_datadir/dolibarr/htdocs/margin
|
||||
@@ -288,14 +285,12 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/mrp
|
||||
%_datadir/dolibarr/htdocs/multicurrency
|
||||
%_datadir/dolibarr/htdocs/opensurvey
|
||||
%_datadir/dolibarr/htdocs/partnership
|
||||
%_datadir/dolibarr/htdocs/paybox
|
||||
%_datadir/dolibarr/htdocs/paypal
|
||||
%_datadir/dolibarr/htdocs/printing
|
||||
%_datadir/dolibarr/htdocs/product
|
||||
%_datadir/dolibarr/htdocs/projet
|
||||
%_datadir/dolibarr/htdocs/public
|
||||
%_datadir/dolibarr/htdocs/recruitment
|
||||
%_datadir/dolibarr/htdocs/reception
|
||||
%_datadir/dolibarr/htdocs/resource
|
||||
%_datadir/dolibarr/htdocs/salaries
|
||||
@@ -308,10 +303,8 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/ticket
|
||||
%_datadir/dolibarr/htdocs/user
|
||||
%_datadir/dolibarr/htdocs/variants
|
||||
%_datadir/dolibarr/htdocs/webhook
|
||||
%_datadir/dolibarr/htdocs/webservices
|
||||
%_datadir/dolibarr/htdocs/website
|
||||
%_datadir/dolibarr/htdocs/workstation
|
||||
%_datadir/dolibarr/htdocs/zapier
|
||||
%_datadir/dolibarr/htdocs/*.ico
|
||||
%_datadir/dolibarr/htdocs/*.patch
|
||||
@@ -430,6 +423,7 @@ then
|
||||
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
|
||||
|
||||
@@ -163,6 +163,7 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/blockedlog
|
||||
%_datadir/dolibarr/htdocs/bookmarks
|
||||
%_datadir/dolibarr/htdocs/bom
|
||||
%_datadir/dolibarr/htdocs/cashdesk
|
||||
%_datadir/dolibarr/htdocs/categories
|
||||
%_datadir/dolibarr/htdocs/collab
|
||||
%_datadir/dolibarr/htdocs/comm
|
||||
@@ -176,12 +177,10 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/custom
|
||||
%_datadir/dolibarr/htdocs/datapolicy
|
||||
%_datadir/dolibarr/htdocs/dav
|
||||
%_datadir/dolibarr/htdocs/delivery
|
||||
%_datadir/dolibarr/htdocs/debugbar
|
||||
%_datadir/dolibarr/htdocs/don
|
||||
%_datadir/dolibarr/htdocs/ecm
|
||||
%_datadir/dolibarr/htdocs/emailcollector
|
||||
%_datadir/dolibarr/htdocs/eventorganization
|
||||
%_datadir/dolibarr/htdocs/expedition
|
||||
%_datadir/dolibarr/htdocs/expensereport
|
||||
%_datadir/dolibarr/htdocs/exports
|
||||
@@ -194,9 +193,8 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/imports
|
||||
%_datadir/dolibarr/htdocs/includes
|
||||
%_datadir/dolibarr/htdocs/install
|
||||
%_datadir/dolibarr/htdocs/intracommreport
|
||||
%_datadir/dolibarr/htdocs/knowledgemanagement
|
||||
%_datadir/dolibarr/htdocs/langs/HOWTO-Translation.txt
|
||||
%_datadir/dolibarr/htdocs/livraison
|
||||
%_datadir/dolibarr/htdocs/loan
|
||||
%_datadir/dolibarr/htdocs/mailmanspip
|
||||
%_datadir/dolibarr/htdocs/margin
|
||||
@@ -204,14 +202,12 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/mrp
|
||||
%_datadir/dolibarr/htdocs/multicurrency
|
||||
%_datadir/dolibarr/htdocs/opensurvey
|
||||
%_datadir/dolibarr/htdocs/partnership
|
||||
%_datadir/dolibarr/htdocs/paybox
|
||||
%_datadir/dolibarr/htdocs/paypal
|
||||
%_datadir/dolibarr/htdocs/printing
|
||||
%_datadir/dolibarr/htdocs/product
|
||||
%_datadir/dolibarr/htdocs/projet
|
||||
%_datadir/dolibarr/htdocs/public
|
||||
%_datadir/dolibarr/htdocs/recruitment
|
||||
%_datadir/dolibarr/htdocs/reception
|
||||
%_datadir/dolibarr/htdocs/resource
|
||||
%_datadir/dolibarr/htdocs/salaries
|
||||
@@ -224,10 +220,8 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/ticket
|
||||
%_datadir/dolibarr/htdocs/user
|
||||
%_datadir/dolibarr/htdocs/variants
|
||||
%_datadir/dolibarr/htdocs/webhook
|
||||
%_datadir/dolibarr/htdocs/webservices
|
||||
%_datadir/dolibarr/htdocs/website
|
||||
%_datadir/dolibarr/htdocs/workstation
|
||||
%_datadir/dolibarr/htdocs/zapier
|
||||
%_datadir/dolibarr/htdocs/*.ico
|
||||
%_datadir/dolibarr/htdocs/*.patch
|
||||
@@ -276,6 +270,7 @@ then
|
||||
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
|
||||
|
||||
@@ -25,7 +25,7 @@ BuildArch: noarch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
Group: Productivity/Office/Management
|
||||
Requires: apache2, apache2-mod_php, php >= 5.3.0, php-gd, php-ldap, php-imap, php-mysql, php-openssl, dejavu
|
||||
Requires: apache2, apache2-mod_php5, php5 >= 5.3.0, php5-gd, php5-ldap, php5-imap, php5-mysql, php5-openssl, dejavu
|
||||
Requires: mysql-community-server, mysql-community-server-client
|
||||
%if 0%{?suse_version}
|
||||
BuildRequires: update-desktop-files fdupes
|
||||
@@ -67,6 +67,7 @@ Programmo web, progettato per poter fornire solo ciò di
|
||||
cui hai bisogno ed essere facile da usare.
|
||||
|
||||
|
||||
|
||||
#---- prep
|
||||
%prep
|
||||
%setup -q
|
||||
@@ -173,6 +174,7 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/blockedlog
|
||||
%_datadir/dolibarr/htdocs/bookmarks
|
||||
%_datadir/dolibarr/htdocs/bom
|
||||
%_datadir/dolibarr/htdocs/cashdesk
|
||||
%_datadir/dolibarr/htdocs/categories
|
||||
%_datadir/dolibarr/htdocs/collab
|
||||
%_datadir/dolibarr/htdocs/comm
|
||||
@@ -187,11 +189,9 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/datapolicy
|
||||
%_datadir/dolibarr/htdocs/dav
|
||||
%_datadir/dolibarr/htdocs/debugbar
|
||||
%_datadir/dolibarr/htdocs/delivery
|
||||
%_datadir/dolibarr/htdocs/don
|
||||
%_datadir/dolibarr/htdocs/ecm
|
||||
%_datadir/dolibarr/htdocs/emailcollector
|
||||
%_datadir/dolibarr/htdocs/eventorganization
|
||||
%_datadir/dolibarr/htdocs/expedition
|
||||
%_datadir/dolibarr/htdocs/expensereport
|
||||
%_datadir/dolibarr/htdocs/exports
|
||||
@@ -204,9 +204,8 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/imports
|
||||
%_datadir/dolibarr/htdocs/includes
|
||||
%_datadir/dolibarr/htdocs/install
|
||||
%_datadir/dolibarr/htdocs/intracommreport
|
||||
%_datadir/dolibarr/htdocs/knowledgemanagement
|
||||
%_datadir/dolibarr/htdocs/langs/HOWTO-Translation.txt
|
||||
%_datadir/dolibarr/htdocs/livraison
|
||||
%_datadir/dolibarr/htdocs/loan
|
||||
%_datadir/dolibarr/htdocs/mailmanspip
|
||||
%_datadir/dolibarr/htdocs/margin
|
||||
@@ -214,14 +213,12 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/mrp
|
||||
%_datadir/dolibarr/htdocs/multicurrency
|
||||
%_datadir/dolibarr/htdocs/opensurvey
|
||||
%_datadir/dolibarr/htdocs/partnership
|
||||
%_datadir/dolibarr/htdocs/paybox
|
||||
%_datadir/dolibarr/htdocs/paypal
|
||||
%_datadir/dolibarr/htdocs/printing
|
||||
%_datadir/dolibarr/htdocs/product
|
||||
%_datadir/dolibarr/htdocs/projet
|
||||
%_datadir/dolibarr/htdocs/public
|
||||
%_datadir/dolibarr/htdocs/recruitment
|
||||
%_datadir/dolibarr/htdocs/reception
|
||||
%_datadir/dolibarr/htdocs/resource
|
||||
%_datadir/dolibarr/htdocs/salaries
|
||||
@@ -234,10 +231,8 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/ticket
|
||||
%_datadir/dolibarr/htdocs/user
|
||||
%_datadir/dolibarr/htdocs/variants
|
||||
%_datadir/dolibarr/htdocs/webhook
|
||||
%_datadir/dolibarr/htdocs/webservices
|
||||
%_datadir/dolibarr/htdocs/website
|
||||
%_datadir/dolibarr/htdocs/workstation
|
||||
%_datadir/dolibarr/htdocs/zapier
|
||||
%_datadir/dolibarr/htdocs/*.ico
|
||||
%_datadir/dolibarr/htdocs/*.patch
|
||||
@@ -286,6 +281,7 @@ then
|
||||
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
||||
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
|
||||
grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
|
||||
|
||||
@@ -17,7 +17,6 @@ $force_install_databaserootpass='__SUPERUSERPASSWORD__';
|
||||
$force_install_dolibarrlogin='admin';
|
||||
$force_install_nophpinfo='1';
|
||||
$force_install_lockinstall='444';
|
||||
$force_install_distrib='rpmfedora';
|
||||
|
||||
// Value to overwrite path to use shared libraries/fonts instead of embedded one
|
||||
$force_dolibarr_lib_ADODB_PATH='/usr/share/php/adodb';
|
||||
@@ -25,6 +24,7 @@ $force_dolibarr_lib_ADODB_PATH='/usr/share/php/adodb';
|
||||
//$force_dolibarr_lib_GEOIP_PATH='';
|
||||
$force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap';
|
||||
//$force_dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip';
|
||||
$force_dolibarr_lib_PHPEXCEL_PATH='';
|
||||
$force_dolibarr_lib_TCPDF_PATH='';
|
||||
//$force_dolibarr_js_CKEDITOR='/javascript/ckeditor';
|
||||
//$force_dolibarr_js_JQUERY='/javascript/jquery';
|
||||
|
||||
@@ -17,7 +17,6 @@ $force_install_databaserootpass='__SUPERUSERPASSWORD__';
|
||||
$force_install_dolibarrlogin='admin';
|
||||
$force_install_nophpinfo='1';
|
||||
$force_install_lockinstall='444';
|
||||
$force_install_distrib='rpmgeneric';
|
||||
|
||||
// Value to overwrite path to use shared libraries/fonts instead of embedded one
|
||||
// We don't force any external lib with generic package
|
||||
|
||||
@@ -17,7 +17,6 @@ $force_install_databaserootpass='__SUPERUSERPASSWORD__';
|
||||
$force_install_dolibarrlogin='admin';
|
||||
$force_install_nophpinfo='1';
|
||||
$force_install_lockinstall='444';
|
||||
$force_install_distrib='rpmmandriva';
|
||||
|
||||
// Value to overwrite path to use shared libraries/fonts instead of embedded one
|
||||
$force_dolibarr_lib_ADODB_PATH='/usr/share/php/adodb';
|
||||
@@ -25,6 +24,7 @@ $force_dolibarr_lib_ADODB_PATH='/usr/share/php/adodb';
|
||||
//$force_dolibarr_lib_GEOIP_PATH='';
|
||||
$force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap';
|
||||
//$force_dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip';
|
||||
$force_dolibarr_lib_PHPEXCEL_PATH='';
|
||||
$force_dolibarr_lib_TCPDF_PATH='';
|
||||
//$force_dolibarr_js_CKEDITOR='/javascript/ckeditor';
|
||||
//$force_dolibarr_js_JQUERY='/javascript/jquery';
|
||||
|
||||
@@ -17,7 +17,6 @@ $force_install_databaserootpass='__SUPERUSERPASSWORD__';
|
||||
$force_install_dolibarrlogin='admin';
|
||||
$force_install_nophpinfo='1';
|
||||
$force_install_lockinstall='444';
|
||||
$force_install_distrib='rpmopensuse';
|
||||
|
||||
// Value to overwrite path to use shared libraries/fonts instead of embedded one
|
||||
//$force_dolibarr_lib_ADODB_PATH='/usr/share/php/adodb';
|
||||
@@ -25,6 +24,7 @@ $force_install_distrib='rpmopensuse';
|
||||
//$force_dolibarr_lib_GEOIP_PATH='';
|
||||
//$force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap';
|
||||
//$force_dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip';
|
||||
$force_dolibarr_lib_PHPEXCEL_PATH='';
|
||||
$force_dolibarr_lib_TCPDF_PATH='';
|
||||
//$force_dolibarr_js_CKEDITOR='/javascript/ckeditor';
|
||||
//$force_dolibarr_js_JQUERY='/javascript/jquery';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Format of sitemap file is available at
|
||||
# https://www.sitemaps.org/protocol.html
|
||||
# http://www.sitemaps.org/protocol.html
|
||||
|
||||
# To build a sitemap from urllist-bing.txt, run
|
||||
# google-sitemapgen --config=config-bing.xml --testing
|
||||
|
||||
@@ -1 +1 @@
|
||||
https://wiki.dolibarr.org/
|
||||
http://wiki.dolibarr.org/
|
||||
|
||||
60
composer.json
Normal file
60
composer.json
Normal file
@@ -0,0 +1,60 @@
|
||||
{
|
||||
"name" : "dolibarr/dolibarr",
|
||||
"type" : "project",
|
||||
"description" : "Dolibarr ERP & CRM is a modern and easy to use web software to manage your business",
|
||||
"keywords" : [
|
||||
"erp",
|
||||
"crm",
|
||||
"invoice",
|
||||
"sme",
|
||||
"proposal",
|
||||
"order",
|
||||
"stock",
|
||||
"agenda"
|
||||
],
|
||||
"homepage" : "https://www.dolibarr.org",
|
||||
"license" : "GPL-3.0-or-later",
|
||||
"support" : {
|
||||
"issues" : "https://github.com/Dolibarr/dolibarr/issues",
|
||||
"forum" : "https://www.dolibarr.org/forum",
|
||||
"wiki" : "https://wiki.dolibarr.org",
|
||||
"source" : "https://github.com/Dolibarr/dolibarr"
|
||||
},
|
||||
"config" : {
|
||||
"vendor-dir" : "htdocs/includes"
|
||||
},
|
||||
"require" : {
|
||||
"php" : ">=5.6.0",
|
||||
"ext-curl" : "*",
|
||||
"ckeditor/ckeditor" : "4.12.1",
|
||||
"mike42/escpos-php" : "2.2",
|
||||
"mobiledetect/mobiledetectlib" : "2.8.34",
|
||||
"phpoffice/phpexcel" : "1.8.1",
|
||||
"restler/framework" : "3.0.0-RC6",
|
||||
"tecnickcom/tcpdf" : "6.3.2",
|
||||
"nnnick/chartjs" : "^2.9",
|
||||
"stripe/stripe-php" : "6.43.1"
|
||||
},
|
||||
"require-dev" : {
|
||||
"jakub-onderka/php-parallel-lint" : "^0",
|
||||
"jakub-onderka/php-console-highlighter" : "^0",
|
||||
"phpunit/phpunit" : "^4",
|
||||
"squizlabs/php_codesniffer" : "^2",
|
||||
"phpunit/phpunit-selenium" : "^2"
|
||||
},
|
||||
"suggest" : {
|
||||
"ext-mysqlnd" : "To use with MySQL or MariaDB",
|
||||
"ext-mysqli" : "To use with MySQL or MariaDB",
|
||||
"ext-pgsql" : "To use with PostgreSQL",
|
||||
"ext-mssql" : "To use with MSSQL (experimental)",
|
||||
"ext-pdo_sqlite" : "To use with SQLite (experimental)",
|
||||
"ext-gd" : "Image manipulation (Required but maybe built-in PHP)",
|
||||
"ext-imagick" : "Generation of thumbs from PDF",
|
||||
"ext-mcrypt" : "(Required but maybe built-in PHP)",
|
||||
"ext-openssl" : "Secure connections (Emails, SOAP\u2026)",
|
||||
"ext-mbstring" : "Handle non UTF-8 characters",
|
||||
"ext-soap" : "Native SOAP",
|
||||
"ext-zip" : "ODT, Excel and file compression support",
|
||||
"ext-xml" : "Excel support"
|
||||
}
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
{
|
||||
"name" : "dolibarr/dolibarr",
|
||||
"type" : "project",
|
||||
"description" : "Dolibarr ERP & CRM is a modern and easy to use web software to manage your business",
|
||||
"keywords" : [
|
||||
"erp",
|
||||
"crm",
|
||||
"invoice",
|
||||
"sme",
|
||||
"proposal",
|
||||
"order",
|
||||
"stock",
|
||||
"agenda"
|
||||
],
|
||||
"homepage" : "https://www.dolibarr.org",
|
||||
"license" : "GPL-3.0-or-later",
|
||||
"support" : {
|
||||
"issues" : "https://github.com/Dolibarr/dolibarr/issues",
|
||||
"forum" : "https://www.dolibarr.org/forum",
|
||||
"wiki" : "https://wiki.dolibarr.org",
|
||||
"source" : "https://github.com/Dolibarr/dolibarr"
|
||||
},
|
||||
"config" : {
|
||||
"vendor-dir" : "htdocs/includes"
|
||||
},
|
||||
"require" : {
|
||||
"php" : ">=5.6.0",
|
||||
"ext-curl" : "*",
|
||||
"ckeditor/ckeditor" : "4.12.1",
|
||||
"mike42/escpos-php" : "2.2",
|
||||
"mobiledetect/mobiledetectlib" : "2.8.39",
|
||||
"phpoffice/phpexcel" : "1.8.2",
|
||||
"restler/framework" : "3.0.0-RC6",
|
||||
"tecnickcom/tcpdf" : "6.3.2",
|
||||
"nnnick/chartjs" : "^2.9",
|
||||
"stripe/stripe-php" : "6.43.1",
|
||||
"maximebf/debugbar" : "1.15.1",
|
||||
"symfony/var-dumper" : "3.2"
|
||||
},
|
||||
"require-dev" : {
|
||||
"php-parallel-lint/php-parallel-lint" : "^0",
|
||||
"php-parallel-lint/php-console-highlighter" : "^0",
|
||||
"phpunit/phpunit" : "^4",
|
||||
"squizlabs/php_codesniffer" : "^2",
|
||||
"phpunit/phpunit-selenium" : "^2"
|
||||
},
|
||||
"suggest" : {
|
||||
"ext-mysqlnd" : "To use with MySQL or MariaDB",
|
||||
"ext-mysqli" : "To use with MySQL or MariaDB",
|
||||
"ext-pgsql" : "To use with PostgreSQL",
|
||||
"ext-mssql" : "To use with MSSQL (experimental)",
|
||||
"ext-pdo_sqlite" : "To use with SQLite (experimental)",
|
||||
"ext-gd" : "Image manipulation (Required but maybe built-in PHP)",
|
||||
"ext-imagick" : "Generation of thumbs from PDF",
|
||||
"ext-mcrypt" : "(Required but maybe built-in PHP)",
|
||||
"ext-openssl" : "Secure connections (Emails, SOAP\u2026)",
|
||||
"ext-mbstring" : "Handle non UTF-8 characters",
|
||||
"ext-soap" : "Native SOAP",
|
||||
"ext-zip" : "ODT, Excel and file compression support",
|
||||
"ext-xml" : "Excel support"
|
||||
}
|
||||
}
|
||||
1910
composer.lock
generated
Normal file
1910
composer.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
15
dev/README
15
dev/README
@@ -1,14 +1,13 @@
|
||||
README (English)
|
||||
--------------------------------
|
||||
This directory contains sub-directories to provide tools or
|
||||
documentation for developers.
|
||||
Note: All files in this directory are in VCS only and are not
|
||||
provided with a standard release.
|
||||
|
||||
This directory contains sub-directories to provide tools or documentation for developers.
|
||||
|
||||
Note: All files in this directory are in the source repository only and are not provided with a standard release. They are useless to make Dolibarr working.
|
||||
|
||||
You may find a more complete documentation on Dolibarr on the wiki:
|
||||
|
||||
There is also some documentation on Dolibarr Wiki:
|
||||
https://wiki.dolibarr.org/
|
||||
|
||||
and on
|
||||
|
||||
and
|
||||
https://doxygen.dolibarr.org/
|
||||
|
||||
|
||||
@@ -28,6 +28,19 @@ With
|
||||
|
||||
|
||||
|
||||
DEBUGBAR:
|
||||
---------
|
||||
|
||||
Move
|
||||
this.options = {
|
||||
bodyMarginBottom: true,
|
||||
bodyMarginBottomHeight: parseInt($('body').css('margin-bottom')),
|
||||
};
|
||||
few line lower in the
|
||||
initialize: function() {
|
||||
|
||||
|
||||
|
||||
ESCPOS:
|
||||
-------
|
||||
Replace
|
||||
@@ -48,14 +61,6 @@ By
|
||||
* In file nusoap.php, to avoid a warning,
|
||||
Replace call to serialize_val with no bugged value
|
||||
|
||||
* In all files, replace constructor names into __construct. Replace also parent::constructor_name with parent::__construct
|
||||
|
||||
* Line 4222 of file nusoap.php
|
||||
|
||||
$rev = array();
|
||||
preg_match('/\$Revision: ([^ ]+)/', $this->revision, $rev);
|
||||
$this->outgoing_headers[] = "X-SOAP-Server: $this->title/$this->version (".(isset($rev[1]) ? $rev[1] : '').")";
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -111,10 +116,6 @@ with
|
||||
// DOL CHANGE If we keep this, the image is not visible on pages after the first one.
|
||||
//var_dump($file.' '.(!@TCPDF_STATIC::file_exists($file)));
|
||||
//return false;
|
||||
$tfile = str_replace(' ', '%20', $file);
|
||||
if (@TCPDF_STATIC::file_exists($tfile)) {
|
||||
$file = $tfile;
|
||||
}
|
||||
}
|
||||
|
||||
* Replace in tcpdf.php
|
||||
@@ -137,15 +138,17 @@ with
|
||||
}
|
||||
}
|
||||
elseif (($imgsrc[0] === '/') AND !empty($_SERVER['DOCUMENT_ROOT']) AND ($_SERVER['DOCUMENT_ROOT'] != '/')) {
|
||||
|
||||
|
||||
|
||||
* In tecnickcom/tcpdf/include/tcpdf_static.php, in function fopenLocal, replace
|
||||
* In tecnickcom/tcpdf/include/tcpdf_static, in function fopenLocal, replace
|
||||
|
||||
if (strpos($filename, '://') === false) {
|
||||
|
||||
with
|
||||
|
||||
if (strpos($filename, '//') === 0) {
|
||||
if (strpos($filename, '//') === 0)
|
||||
{
|
||||
// Share folder on a (windows) server
|
||||
// e.g.: "//[MyServerName]/[MySharedFolder]/"
|
||||
//
|
||||
@@ -189,48 +192,44 @@ with:
|
||||
|
||||
TCPDI:
|
||||
------
|
||||
Add file fpdf_tpl.php 1.2
|
||||
Add fpdf_tpl.php 1.2
|
||||
Add tcpdi.php
|
||||
|
||||
Add file tcpdi.php
|
||||
|
||||
Add file tcpdi_parser.php and replace:
|
||||
require_once(dirname(__FILE__).'/include/tcpdf_filters.php');
|
||||
Add tcpdi_parser.php and replace:
|
||||
require_once(dirname(__FILE__).'/include/tcpdf_filters.php');
|
||||
with:
|
||||
require_once(dirname(__FILE__).'/../tecnickcom/tcpdf/include/tcpdf_filters.php');
|
||||
require_once(dirname(__FILE__).'/../tecnickcom/tcpdf/include/tcpdf_filters.php');
|
||||
|
||||
|
||||
* Fix syntax error by replacing
|
||||
* 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)) {
|
||||
|
||||
* Fix php fatal error on php 8.0 on tcpdi.php
|
||||
while (list($k, $v) = each($value[1])) {
|
||||
with
|
||||
foreach ($value[1] as $k => $v) {
|
||||
|
||||
|
||||
|
||||
JSGANTT:
|
||||
--------
|
||||
* Replace in function JSGantt.taskLink
|
||||
var OpenWindow=window.open(pRef, "newwin", "height="+vHeight+",width="+vWidth);
|
||||
var OpenWindow=window.open(pRef, "newwin", "height="+vHeight+",width="+vWidth);
|
||||
with
|
||||
// LDR To open in same window
|
||||
//var OpenWindow=window.open(pRef, "newwin", "height="+vHeight+",width="+vWidth);
|
||||
window.location.href=pRef
|
||||
// LDR To open in same window
|
||||
//var OpenWindow=window.open(pRef, "newwin", "height="+vHeight+",width="+vWidth);
|
||||
window.location.href=pRef
|
||||
|
||||
* Replace
|
||||
vTmpDiv=this.newNode(vTmpCell, 'div', null, null, vTaskList[i].getResource());
|
||||
vTmpDiv=this.newNode(vTmpCell, 'div', null, null, vTaskList[i].getResource());
|
||||
with
|
||||
var vTmpNode=this.newNode(vTmpCell, 'div', null, '');
|
||||
vTmpNode=this.newNode(vTmpNode, 'a', null, '', vLangs[vLang]['moreinfo']);
|
||||
vTmpNode.setAttribute('href',vTaskList[i].getLink());
|
||||
var vTmpNode=this.newNode(vTmpCell, 'div', null, '');
|
||||
vTmpNode=this.newNode(vTmpNode, 'a', null, '', vLangs[vLang]['moreinfo']);
|
||||
vTmpNode.setAttribute('href',vTaskList[i].getLink());
|
||||
|
||||
* Replace '% Comp.' to have a smaller text column header
|
||||
'comp':'% Comp.'
|
||||
'comp':'% Comp.'
|
||||
with
|
||||
'comp':'%'
|
||||
'comp':'%'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -239,58 +238,35 @@ JCROP:
|
||||
* Remove analytics tag into file index.html
|
||||
|
||||
|
||||
|
||||
JQUERYFILETREE:
|
||||
---------------
|
||||
* 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:
|
||||
--------
|
||||
Change content of file htdocs/includes/restler/framework/Luracast/Restler/explorer/index.html
|
||||
|
||||
+With swagger 2:
|
||||
|
||||
* Add line into Util.php to complete function
|
||||
|
||||
public static function getShortName($className)
|
||||
{
|
||||
// @CHANGE LDR
|
||||
if (!is_string($className)) return;
|
||||
if (! is_string($className)) return;
|
||||
//var_dump($className);
|
||||
|
||||
* Add line into Data/Text.php to complete function
|
||||
|
||||
public static function endsWith($haystack, $needle)
|
||||
{
|
||||
$length = strlen($needle);
|
||||
if ($length == 0) {
|
||||
return true;
|
||||
}
|
||||
// @CHANGE LDR
|
||||
if (!is_string($haystack)) return false;
|
||||
|
||||
* Replace
|
||||
|
||||
$loaders = array_unique(static::$rogueLoaders);
|
||||
|
||||
with
|
||||
|
||||
$loaders = array_unique(static::$rogueLoaders, SORT_REGULAR);
|
||||
|
||||
* Replace CommentParser.php line 423
|
||||
elseif (count($value) && is_numeric($value[0]))
|
||||
|
||||
with
|
||||
|
||||
elseif (count($value) && isset($value[0]) && is_numeric($value[0]))
|
||||
|
||||
|
||||
+With swagger 2 provided into /explorer:
|
||||
----------------------------------------
|
||||
|
||||
Change content of file htdocs/includes/restler/framework/Luracast/Restler/explorer/index.html
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
PARSEDOWN
|
||||
---------
|
||||
|
||||
|
||||
@@ -5,4 +5,4 @@ This directory contains samples of code to use Dolibarr business classes to buil
|
||||
external interfaces that need to read/update data from/into Dolibarr.
|
||||
|
||||
You can also have a look at the Dolibarr doxygen doc that describes all files and classes:
|
||||
https://doxygen.dolibarr.org/
|
||||
http://www.dolibarr.org/html_doxygen/index.html
|
||||
|
||||
@@ -29,8 +29,8 @@ $path=dirname(__FILE__).'/';
|
||||
|
||||
// Test if batch mode
|
||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||
exit;
|
||||
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
// Global variables
|
||||
@@ -49,10 +49,7 @@ $langs->load("main"); // To load language file for default language
|
||||
|
||||
// Load user and its permissions
|
||||
$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();
|
||||
|
||||
|
||||
@@ -85,16 +82,19 @@ $obj->lines[]=$line1;
|
||||
|
||||
// Create invoice
|
||||
$idobject=$obj->create($user);
|
||||
if ($idobject > 0) {
|
||||
if ($idobject > 0)
|
||||
{
|
||||
// Change status to validated
|
||||
$result=$obj->validate($user);
|
||||
if ($result > 0) {
|
||||
print "OK Object created with id ".$idobject."\n";
|
||||
} else {
|
||||
if ($result > 0) print "OK Object created with id ".$idobject."\n";
|
||||
else
|
||||
{
|
||||
$error++;
|
||||
dol_print_error($db, $obj->error);
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
$error++;
|
||||
dol_print_error($db, $obj->error);
|
||||
}
|
||||
@@ -102,10 +102,13 @@ if ($idobject > 0) {
|
||||
|
||||
// -------------------- END OF YOUR CODE --------------------
|
||||
|
||||
if (! $error) {
|
||||
if (! $error)
|
||||
{
|
||||
$db->commit();
|
||||
print '--- end ok'."\n";
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
print '--- end error code='.$error."\n";
|
||||
$db->rollback();
|
||||
}
|
||||
|
||||
@@ -29,8 +29,8 @@ $path=dirname(__FILE__).'/';
|
||||
|
||||
// Test if batch mode
|
||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||
exit;
|
||||
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
// Global variables
|
||||
@@ -49,10 +49,7 @@ $langs->load("main"); // To load language file for default language
|
||||
|
||||
// Load user and its permissions
|
||||
$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();
|
||||
|
||||
|
||||
@@ -83,16 +80,19 @@ $com->lines[]=$orderline1;
|
||||
|
||||
// Create order
|
||||
$idobject=$com->create($user);
|
||||
if ($idobject > 0) {
|
||||
if ($idobject > 0)
|
||||
{
|
||||
// Change status to validated
|
||||
$result=$com->valid($user);
|
||||
if ($result > 0) {
|
||||
print "OK Object created with id ".$idobject."\n";
|
||||
} else {
|
||||
if ($result > 0) print "OK Object created with id ".$idobject."\n";
|
||||
else
|
||||
{
|
||||
$error++;
|
||||
dol_print_error($db, $com->error);
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
$error++;
|
||||
dol_print_error($db, $com->error);
|
||||
}
|
||||
@@ -100,10 +100,13 @@ if ($idobject > 0) {
|
||||
|
||||
// -------------------- END OF YOUR CODE --------------------
|
||||
|
||||
if (! $error) {
|
||||
if (! $error)
|
||||
{
|
||||
$db->commit();
|
||||
print '--- end ok'."\n";
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
print '--- end error code='.$error."\n";
|
||||
$db->rollback();
|
||||
}
|
||||
|
||||
@@ -29,8 +29,8 @@ $path=dirname(__FILE__).'/';
|
||||
|
||||
// Test if batch mode
|
||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||
exit;
|
||||
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
// Global variables
|
||||
@@ -49,10 +49,7 @@ $langs->load("main"); // To load language file for default language
|
||||
|
||||
// Load user and its permissions
|
||||
$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();
|
||||
|
||||
|
||||
@@ -82,19 +79,25 @@ $myproduct->weight_units = 0;
|
||||
|
||||
// Create product in database
|
||||
$idobject = $myproduct->create($user);
|
||||
if ($idobject > 0) {
|
||||
if ($idobject > 0)
|
||||
{
|
||||
print "OK Object created with id ".$idobject."\n";
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
$error++;
|
||||
dol_print_error($db, $myproduct->error);
|
||||
}
|
||||
|
||||
// -------------------- END OF YOUR CODE --------------------
|
||||
|
||||
if (! $error) {
|
||||
if (! $error)
|
||||
{
|
||||
$db->commit();
|
||||
print '--- end ok'."\n";
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
print '--- end error code='.$error."\n";
|
||||
$db->rollback();
|
||||
}
|
||||
|
||||
@@ -29,8 +29,8 @@ $path=dirname(__FILE__).'/';
|
||||
|
||||
// Test if batch mode
|
||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||
exit;
|
||||
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
// Global variables
|
||||
@@ -49,10 +49,7 @@ $langs->load("main"); // To load language file for default language
|
||||
|
||||
// Load user and its permissions
|
||||
$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();
|
||||
|
||||
|
||||
@@ -72,18 +69,23 @@ $obj->nom = 'ABCDEF';
|
||||
|
||||
// Create user
|
||||
$idobject=$obj->create($user);
|
||||
if ($idobject > 0) {
|
||||
if ($idobject > 0)
|
||||
{
|
||||
// Change status to validated
|
||||
$result=$obj->setStatut(1);
|
||||
if ($result > 0) {
|
||||
print "OK Object created with id ".$idobject."\n";
|
||||
} else {
|
||||
if ($result > 0) print "OK Object created with id ".$idobject."\n";
|
||||
else
|
||||
{
|
||||
$error++;
|
||||
dol_print_error($db, $obj->error);
|
||||
}
|
||||
} elseif ($obj->error == 'ErrorLoginAlreadyExists') {
|
||||
print "User with login ".$obj->login." already exists\n";
|
||||
} else {
|
||||
}
|
||||
elseif ($obj->error == 'ErrorLoginAlreadyExists')
|
||||
{
|
||||
print "User with login ".$obj->login." already exists\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$error++;
|
||||
dol_print_error($db, $obj->error);
|
||||
}
|
||||
@@ -91,10 +93,13 @@ if ($idobject > 0) {
|
||||
|
||||
// -------------------- END OF YOUR CODE --------------------
|
||||
|
||||
if (! $error) {
|
||||
if (! $error)
|
||||
{
|
||||
$db->commit();
|
||||
print '--- end ok'."\n";
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
print '--- end error code='.$error."\n";
|
||||
$db->rollback();
|
||||
}
|
||||
|
||||
@@ -29,8 +29,8 @@ $path=dirname(__FILE__).'/';
|
||||
|
||||
// Test if batch mode
|
||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||
exit;
|
||||
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
// Global variables
|
||||
@@ -49,17 +49,14 @@ $langs->load("main"); // To load language file for default language
|
||||
|
||||
// Load user and its permissions
|
||||
$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();
|
||||
|
||||
|
||||
print "***** ".$script_file." (".$version.") *****\n";
|
||||
if (! isset($argv[1])) { // Check parameters
|
||||
print "Usage: ".$script_file." id_thirdparty ...\n";
|
||||
exit;
|
||||
print "Usage: ".$script_file." id_thirdparty ...\n";
|
||||
exit;
|
||||
}
|
||||
print '--- start'."\n";
|
||||
print 'Argument id_thirdparty='.$argv[1]."\n";
|
||||
|
||||
@@ -3,26 +3,11 @@
|
||||
#
|
||||
# Use this sample to search into a ldap
|
||||
#
|
||||
|
||||
# Anonymous access
|
||||
# ldapsearch -h hostname -p 389
|
||||
#
|
||||
# Login access (using a Bind DN)
|
||||
# ldapsearch -h hostname -p 389 -z 0 -D "uid=root,cn=users,dc=ldap,dc=test,dc=local" -w password
|
||||
# ldapsearch -H ldap://hostname:389 -z 0 -D "uid=root,cn=users,dc=ldap,dc=test,dc=local" -w password
|
||||
# ldapsearch -d1 -H ldap://hostname:389 -x -z 0 -D "uid=root,cn=users,dc=ldap,dc=test,dc=local" -w password
|
||||
# ldapsearch -H ldap://hostname:389 -z 0 -D "uid=root,cn=users,dc=ldap,dc=test,dc=local" -w password
|
||||
#
|
||||
# Login access in SSL (using a Bind DN)
|
||||
# ldapsearch -H ldaps://hostnamme:636 -z 0 -D "uid=root,cn=users,dc=ldap,dc=test,dc=local" -w password -b "cn=users,dc=ldap,dc=test,dc=local
|
||||
# If it fails, you may try to use "hostname" that is real name of certificate.
|
||||
# You must also check that /etc/ldap/ldap.conf contains the line TLS_CACERT /etc/ssl/certs/ca-certificates.crt
|
||||
|
||||
# What to search
|
||||
# ldapsearch -h hostname -p 389 -x -D "uid=root,cn=users,dc=ldap,dc=test,dc=local" -w password -b "cn=users,dc=ldap,dc=test,dc=local"
|
||||
# ldapsearch -h hostname -p 389 -x -D "cn=manager,o=somecompany.com" -w password -b "ou=people,dc=teclib,dc=infra"
|
||||
# ldapsearch -h hostname -p 389 -x -D "cn=manager,o=somecompany.com" -w password -b "o=somecompany.com" "(objectclass=*)"
|
||||
# ldapsearch -h hostname -x
|
||||
# ldapsearch -h hostname -x -b "ou=people,dc=teclib,dc=infra"
|
||||
# ldapsearch -h hostname -x -z 0 -b "o=somecompany.com" -D "cn=manager,o=somecompany.com" -w password "(objectclass=*)"
|
||||
# ldapsearch -h hostname -x -b "o=somecompany.com" -D "cn=manager,o=somecompany.com" -w password "(objectclass=*)"
|
||||
#
|
||||
# Example to test a ldap search:
|
||||
# ldapsearch -h hostname -p 389 -x -z 5 -b 'OU=Collaborateurs,OU=Utilisateurs,OU=MyCompany,DC=bocal,DC=lan' -D 'CN=UserAdmin,OU=Informatique,OU=Utilisateurs,OU=MyCompany,DC=bocal,DC=lan' -w password
|
||||
# ldapsearch -h hostname -x -z 5 -b 'OU=Collaborateurs,OU=Utilisateurs,OU=MyCompany,DC=bocal,DC=lan' -D 'CN=UserAdmin,OU=Informatique,OU=Utilisateurs,OU=MyCompany,DC=bocal,DC=lan' -w password
|
||||
|
||||
|
||||
@@ -1,89 +0,0 @@
|
||||
Delivered-To: testldrdev@gmail.com
|
||||
Received: by 2002:a2e:9b9a:0:0:0:0:0 with SMTP id z26csp1425223lji;
|
||||
Thu, 20 Aug 2020 08:29:02 -0700 (PDT)
|
||||
X-Received: by 2002:a05:620a:1292:: with SMTP id w18mr2938234qki.158.1597937342304;
|
||||
Thu, 20 Aug 2020 08:29:02 -0700 (PDT)
|
||||
ARC-Seal: i=1; a=rsa-sha256; t=1597937342; cv=none;
|
||||
d=google.com; s=arc-20160816;
|
||||
b=FhT/+rJ/zNYgVQ5Nt/rLZJycGd/Ntkhm6LwI16YUfmEmxeGrP/cXXQULrqQ1LhBr9B
|
||||
oRKweltTdnpyA14gm0kzbs1vUkf5HxLUuGk8IqqJWAPMUZoN8oUPkzq2BuKNQGxPiE+y
|
||||
Hsg/fnYp8WzcAlZOLsEP2kcFIdA95Dyy5LkM8HgphI1jSS1d6gkx6nDGIMIpDD9D+w4X
|
||||
ISxRUXp5JlDwFCUMOPoAvHIBUdJ3jpLsjesbMEnU4ssFqhxU21pBq+Fc+csSPeY5DL0M
|
||||
HR1o+ChEAXIdDOrDqa0ohHfqR216juGCzH8YuEQ88LT0Qbst9IkOYWiAQv4TIh7vHtvQ
|
||||
TMvA==
|
||||
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
|
||||
h=to:subject:message-id:date:from:mime-version:dkim-signature;
|
||||
bh=sojOjnIKAXmsZ9zvMk5MGvY3qyOaFgnpRe6YPMYutOI=;
|
||||
b=CRlrRPfoGkfmz6iXKy4HdxKQ4SeJTiIxjC2jNkgQPSnIDFJgDkJcwASJVpcjTmlVmH
|
||||
Z9WnHKVUPRIHGDEoMRlx6eUx9QfelWqPYu3BBQGFry9sgth0BR/1s6tmQ+P+bAj23ryo
|
||||
aL3UkF6KCSx4GhEk3MfHA5Ex81YDFHvHL3BZ2kb3XCVSlPiBq2szw1ETmRAsDdS5Gbu+
|
||||
ZlzBbl4pRtUWgi1fB5H4Wcv7e90F4Et1SBP8IKSCa23qu2nV9xefgjfMw2ndxCj1zgCL
|
||||
c3l7Ul6pw32nqf6+vxfZTstwIwgu6dXZXCHDqJqesI2g8RGxeba+LfKZEDpBuSeINS9r
|
||||
GMvw==
|
||||
ARC-Authentication-Results: i=1; mx.google.com;
|
||||
dkim=pass header.i=@destailleur.fr header.s=google header.b=IPMz90Yj;
|
||||
spf=pass (google.com: domain of contact@destailleur.fr designates 209.85.220.41 as permitted sender) smtp.mailfrom=contact@destailleur.fr;
|
||||
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=destailleur.fr
|
||||
Return-Path: <contact@destailleur.fr>
|
||||
Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41])
|
||||
by mx.google.com with SMTPS id w14sor2138230qtb.9.2020.08.20.08.29.00
|
||||
for <testldrdev@gmail.com>
|
||||
(Google Transport Security);
|
||||
Thu, 20 Aug 2020 08:29:01 -0700 (PDT)
|
||||
Received-SPF: pass (google.com: domain of contact@destailleur.fr designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
|
||||
Authentication-Results: mx.google.com;
|
||||
dkim=pass header.i=@destailleur.fr header.s=google header.b=IPMz90Yj;
|
||||
spf=pass (google.com: domain of contact@destailleur.fr designates 209.85.220.41 as permitted sender) smtp.mailfrom=contact@destailleur.fr;
|
||||
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=destailleur.fr
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=destailleur.fr; s=google;
|
||||
h=mime-version:from:date:message-id:subject:to;
|
||||
bh=sojOjnIKAXmsZ9zvMk5MGvY3qyOaFgnpRe6YPMYutOI=;
|
||||
b=IPMz90Yjw1Mf57/rYWUYGtpc+IazEWcy6/bqxf1j0h6rxDH/wjhxsCWzfARgqqlfVj
|
||||
ACg4IbPpZZlKFIYDSCbfMlWF65rbKfNre56HldfQgy0Tq3LC434zHz2ZZMOVCM52w3J9
|
||||
VGBpASUlSL1o+YRmzOpRtHVu7I9aNwGxHuA070Yka8XLV76vV3P0vdL8PcoHq0jUUEoi
|
||||
+dCZ9NCPuAFtGK2IavNoM2qQrLdfYIi+RwgWBtqjTwzyvDEJR+p5fIPK142ynMbHgWYO
|
||||
RVtMqAgxjvL4sfyKZ5KuzKXkQNM3zyzMinWK89scBl+QLFCcWA4Qqc0dJjqLCBhh8lmq
|
||||
n67g==
|
||||
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=1e100.net; s=20161025;
|
||||
h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
|
||||
bh=sojOjnIKAXmsZ9zvMk5MGvY3qyOaFgnpRe6YPMYutOI=;
|
||||
b=H0GsrFAi9JmRTKQ2budtDeLBqCaTisHKYCVVziyxmv+/tIcrSZBA4tdKwm+wR80r50
|
||||
zMJXmyVS2DMDWfnIlOv39wcwQjYN3WK1aRJfV0bVuEWrQuzt5MMWbskf6xbzo201nhr9
|
||||
ZlqATsEV7v1u5EHmfYwRhR8+AOmENdnm0g9RXPJVrFS58WNEJUSotS5Y5rZPjnT943y0
|
||||
62Kf4Bd6uWvXhPFXWQoZLtWrPpkbcYPWIBmpftKhD0PD9c6rKaVduV0WhbigYsDoxb3F
|
||||
iIafGPOyq91hiHR2gTLHiMmTDm+IDQ4n6gSkS7HKpZlLQhHoBMnpqJZYoxMJTxdpAbSy
|
||||
mY+A==
|
||||
X-Gm-Message-State: AOAM5325RcN4/ThWbYCO3vWRMFFBrfzJUHC1bd1Z9VB3/2Q3RuF9lmIJ +SjshEErhK68Of2pHDZQ3aPU4rzDfV8ozbvRsgChdfZg8aA=
|
||||
X-Google-Smtp-Source: ABdhPJxUOUdurKEQfLldtiQGRkgC/h8gKQG1zhS+8k93p6N1SsOn517+GeRyT3E+/Uw536pmReO29la3EIAS6VT33SE=
|
||||
X-Received: by 2002:aed:3e8e:: with SMTP id n14mr3191190qtf.67.1597937340509; Thu, 20 Aug 2020 08:29:00 -0700 (PDT)
|
||||
MIME-Version: 1.0
|
||||
From: John Tester <customer@customercompany.fr>
|
||||
Date: Thu, 20 Aug 2020 17:28:34 +0200
|
||||
Message-ID: <CALeEO_kij-ogXKzrjV_pTgqVbUB9j=287VkX34iVSWgDHFA8eg@mail.gmail.com>
|
||||
Subject: Support besoin
|
||||
To: testldrdev@gmail.com
|
||||
Content-Type: multipart/alternative; boundary="0000000000008e099705ad50c772"
|
||||
|
||||
--0000000000008e099705ad50c772
|
||||
Content-Type: text/plain; charset="UTF-8"
|
||||
|
||||
adfsdfsdfds
|
||||
|
||||
--
|
||||
Laurent.
|
||||
------------------------------------------------------------------------------------
|
||||
Twitter: https://www.twitter.com/eldy10
|
||||
|
||||
--0000000000008e099705ad50c772
|
||||
Content-Type: text/html; charset="UTF-8"
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
|
||||
<div dir=3D"ltr">adfsdfsdfds<br clear=3D"all"><div><br></div>-- <br><div di=
|
||||
r=3D"ltr" class=3D"gmail_signature" data-smartmail=3D"gmail_signature">Laur=
|
||||
ent.<br>-------------------------------------------------------------------=
|
||||
-----------------<br>Twitter: <a href=3D"https://www.twitter.com/eldy10" ta=
|
||||
rget=3D"_blank">https://www.twitter.com/eldy10</a></div></div>
|
||||
|
||||
--0000000000008e099705ad50c772--
|
||||
@@ -1,57 +0,0 @@
|
||||
Return-Path: <testldrdev@gmail.com>
|
||||
Received: from smtp.gmail.com ([2a01:e0a:7e:4ae0:329c:23ff:feb8:dc8d])
|
||||
by smtp.gmail.com with ESMTPSA id 32sm5811196wrh.18.2020.08.20.09.31.37
|
||||
for <customer@customercompany.fr>
|
||||
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
|
||||
Thu, 20 Aug 2020 09:31:37 -0700 (PDT)
|
||||
From: testldrdev@gmail.com
|
||||
X-Google-Original-From: <aa@aa.comg>
|
||||
To: customer@customercompany.fr
|
||||
Subject: [MyBigCompany - Ticket #TS2008-0040] Nouveau message
|
||||
Date: Thu, 20 Aug 2020 18:31:37 +0200
|
||||
Message-ID: <1597941097.SMTPs-dolibarr-tic58@83b5bc91f83a56e458db71e0adac2b62>
|
||||
References: <1597941097.SMTPs-dolibarr-tic58@83b5bc91f83a56e458db71e0adac2b62>
|
||||
X-Dolibarr-TRACKID: tic58@83b5bc91f83a56e458db71e0adac2b62
|
||||
X-RemoteAddr: 127.0.0.1
|
||||
X-Mailer: Dolibarr version 13.0.0-alpha (using SMTPs Mailer)
|
||||
X-Dolibarr-Option: MAIN_MAIL_USE_MULTI_PART
|
||||
Mime-Version: 1.0
|
||||
Content-Type: multipart/mixed; boundary="multipart_x.1597941097.x_boundary"
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
--multipart_x.1597941097.x_boundary
|
||||
Content-Type: multipart/alternative; boundary="mul_872cdd6a64216735955664484832b075"
|
||||
|
||||
--mul_872cdd6a64216735955664484832b075
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
|
||||
Bonjour
|
||||
|
||||
|
||||
Une nouvelle réponse a été ajoutée à un ticket que vous suivez. Voici
|
||||
le message :PredefinedMailContentTicket_send
|
||||
|
||||
|
||||
Vous pouvez voir la progression du ticket en cliquant sur le lien
|
||||
ci-dessus. : fr5uw2yospypn2rz
|
||||
Cordialement,
|
||||
|
||||
--
|
||||
--mul_872cdd6a64216735955664484832b075
|
||||
Content-Type: text/html; charset=UTF-8
|
||||
|
||||
<html><head><title></title></head><body>Bonjour<br>
|
||||
|
||||
<br>
|
||||
Une nouvelle réponse a été ajoutée à un ticket que vous suivez. Voici
|
||||
le message :PredefinedMailContentTicket_send<br>
|
||||
<br>
|
||||
<br>
|
||||
Vous pouvez voir la progression du ticket en cliquant sur le lien
|
||||
ci-dessus. : <a
|
||||
href="http://localhostgit/dolibarr_dev/htdocs/public/ticket/view.php?track_id=fr5uw2yospypn2rz">fr5uw2yospypn2rz</a><br>
|
||||
<br>Cordialement,<br>
|
||||
<br>
|
||||
--</body></html>
|
||||
--mul_872cdd6a64216735955664484832b075--
|
||||
--multipart_x.1597941097.x_boundary--
|
||||
@@ -1,48 +0,0 @@
|
||||
MIME-Version: 1.0
|
||||
Date: Thu, 20 Aug 2020 18:34:01 +0200
|
||||
References: <CALeEO_kij-ogXKzrjV_pTgqVbUB9j=287VkX34iVSWgDHFA8eg@mail.gmail.com>
|
||||
In-Reply-To: <CALeEO_kij-ogXKzrjV_pTgqVbUB9j=287VkX34iVSWgDHFA8eg@mail.gmail.com>
|
||||
Message-ID: <CAC8+=32ccpEo12RR-juT=FW6+gNV-DcvNjxs_0s6Wn40xmfhug@mail.gmail.com>
|
||||
Subject: Re: Support besoin
|
||||
From: John Tester <testldrdev@gmail.com>
|
||||
To: John Tester <customer@customercompany.fr>
|
||||
Content-Type: multipart/alternative; boundary="0000000000001620dd05ad51b075"
|
||||
|
||||
--0000000000001620dd05ad51b075
|
||||
Content-Type: text/plain; charset="UTF-8"
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
|
||||
Merci pour votre question.
|
||||
Voici la rep.
|
||||
|
||||
Le jeu. 20 ao=C3=BBt 2020 =C3=A0 17:29, John Tester <laurent@destai=
|
||||
lleur.fr>
|
||||
a =C3=A9crit :
|
||||
|
||||
> adfsdfsdfds
|
||||
>
|
||||
> --
|
||||
> Laurent.
|
||||
>
|
||||
> -------------------------------------------------------------------------=
|
||||
-----------
|
||||
> Twitter: https://www.twitter.com/eldy10
|
||||
>
|
||||
|
||||
--0000000000001620dd05ad51b075
|
||||
Content-Type: text/html; charset="UTF-8"
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
|
||||
<div dir=3D"ltr">Merci pour votre question.<div>Voici la rep.</div></div><b=
|
||||
r><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">Le=C2=A0=
|
||||
jeu. 20 ao=C3=BBt 2020 =C3=A0=C2=A017:29, John Tester <<a href=
|
||||
=3D"mailto:customer@customercompany.fr">customer@customercompany.fr</a>> a =C3=A9c=
|
||||
rit=C2=A0:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0=
|
||||
px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div =
|
||||
dir=3D"ltr">adfsdfsdfds<br clear=3D"all"><div><br></div>-- <br><div dir=3D"=
|
||||
ltr">Laurent.<br>----------------------------------------------------------=
|
||||
--------------------------<br>Twitter: <a href=3D"https://www.twitter.com/e=
|
||||
ldy10" target=3D"_blank">https://www.twitter.com/eldy10</a></div></div>
|
||||
</blockquote></div>
|
||||
|
||||
--0000000000001620dd05ad51b075--
|
||||
@@ -1,134 +0,0 @@
|
||||
Delivered-To: testldrdev@gmail.com
|
||||
Received: by 2002:a2e:9b9a:0:0:0:0:0 with SMTP id z26csp1483607lji;
|
||||
Thu, 20 Aug 2020 09:56:03 -0700 (PDT)
|
||||
X-Received: by 2002:ac8:3868:: with SMTP id r37mr3301993qtb.95.1597942563252;
|
||||
Thu, 20 Aug 2020 09:56:03 -0700 (PDT)
|
||||
ARC-Seal: i=1; a=rsa-sha256; t=1597942563; cv=none;
|
||||
d=google.com; s=arc-20160816;
|
||||
b=skUGL+keim3FdNXfKGgQokCfj85gnhYhuLbMM61qY5W6ixSH9s8I6uoNh3gzVy89XM
|
||||
NGbZiajjDiPMBryl87PhD+ACBjv8WoZAQiojAga0ELPPmVDnhrtWKANLbRrkUI3Xtfoj
|
||||
b1o2iHP2Q12Vqs6xiAy86yxURlIKGM3tw91WryWiIPiAL7bRZPn49N3XbO2ULE0QKTBq
|
||||
BI5YnOxt9NfTj0xhKaLLIJ9M1qa4e1QyOHl56WuEv3Gx6uHDAQDYz+C5G0VgdjBvwRzH
|
||||
pJaiAulc1uW/V9TcRMwvwIWtI7eWygvU2PiuI/c05G1KVKibAubHE55IjOJCn2O2UaH4
|
||||
WMNQ==
|
||||
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
|
||||
h=to:subject:message-id:date:from:in-reply-to:references:mime-version
|
||||
:dkim-signature;
|
||||
bh=j6+rsx5MBsg1/s7LIIfByV7u0jGK09n72bnK4XcN6ZQ=;
|
||||
b=Ps5kk+tBGQzMP6ugDCwKf4hzn8fn3DU4AFz1dJvkHdDestLZWN99Qtr6iNMdslsHJm
|
||||
ov378c+8oCfcV7shyBYjlAFfikFi7o4RM/evh3yqqjAnhyVfcYH7c9cexVvDo/AXUAZ7
|
||||
N7Mh7EOvyDXXsaHK2l89XiAxZx/hZh/O+/HR2EoVEGre1eYRYwI/aEfPN8d4/fL2VtCD
|
||||
0wzAwnUrINuXmcaUDT30Twjk9kwGjjTsM6Z531vKM6L3y48a7f3GTE7V+vo2QxHdUT54
|
||||
fQVue9OO7b4VKTEj/x/dmNr+92sHRAMMS7dj/VXMmzM+WttUCAPNxZ27/bvt4bBc5oBp
|
||||
QPEA==
|
||||
ARC-Authentication-Results: i=1; mx.google.com;
|
||||
dkim=pass header.i=@destailleur.fr header.s=google header.b=SEYSmxbT;
|
||||
spf=pass (google.com: domain of contact@destailleur.fr designates 209.85.220.41 as permitted sender) smtp.mailfrom=contact@destailleur.fr;
|
||||
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=destailleur.fr
|
||||
Return-Path: <contact@destailleur.fr>
|
||||
Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41])
|
||||
by mx.google.com with SMTPS id q3sor2285165qtn.34.2020.08.20.09.56.02
|
||||
for <testldrdev@gmail.com>
|
||||
(Google Transport Security);
|
||||
Thu, 20 Aug 2020 09:56:03 -0700 (PDT)
|
||||
Received-SPF: pass (google.com: domain of contact@destailleur.fr designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
|
||||
Authentication-Results: mx.google.com;
|
||||
dkim=pass header.i=@destailleur.fr header.s=google header.b=SEYSmxbT;
|
||||
spf=pass (google.com: domain of contact@destailleur.fr designates 209.85.220.41 as permitted sender) smtp.mailfrom=contact@destailleur.fr;
|
||||
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=destailleur.fr
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=destailleur.fr; s=google;
|
||||
h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
|
||||
bh=j6+rsx5MBsg1/s7LIIfByV7u0jGK09n72bnK4XcN6ZQ=;
|
||||
b=SEYSmxbTKCuc1baQZzjIJwm7WXvgjt/nEGhMLqWxQCU3beM3qhH8wYlSeMyB8Z/9pi
|
||||
tszZFZhZ3cjnIbbJnjzsMYJgBnYbkf6hz14+BsFwyPU030EkDjJy2i3DSXzYK7A+GbBn
|
||||
G9I9foG/4+pcx0LnFsjchGsRhLFkTKJIsP2SVfOx0wlim3WHMIqIXvKsxY05PoPyf8Tp
|
||||
IwQi7iNl/+nTyjNHl2DQh+ty3CRTmUw9uEbY+jRRvIg5i/7cfREekK98d7qi/5HQycr6
|
||||
aptRDdCVHXpe47q+c7OPiMEEQWs+mFJhBqPXIlU54fwFApEEnLn/jwGbrPsrPYJaswgI
|
||||
vd/g==
|
||||
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=1e100.net; s=20161025;
|
||||
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
|
||||
:message-id:subject:to;
|
||||
bh=j6+rsx5MBsg1/s7LIIfByV7u0jGK09n72bnK4XcN6ZQ=;
|
||||
b=M6a4k1gKc4e7TwKncuNPy0b3KxutR1FLFJGWxd4NyW84b7f3LfIR94IeInLQIWmY8C
|
||||
Ddus0upZJI4+NN9XBGvXCdsiiYlwFGBJRWwjv82XFKVAKL5DD94RJNQZJUiE39hgJ2aa
|
||||
6V9gasiP+nUAX4ZV9bZmw21CgKEZrZVXh5unmW2ABrfcx8lHjp/DUw5XEkym1J92Wo1l
|
||||
g0H3XrC2FL+aQuj+WpCynMNkY9ljw71oqyv3SP9pjnVNHArAdZiPMHkNxiuPdq7q41fg
|
||||
eIbdRCQXYZL5O48QsjDdiXwaQzx+NcYtrKAH0RIVD1lG6zc9pxqDJsbGxP9VLs8jGDTT
|
||||
mSdQ==
|
||||
X-Gm-Message-State: AOAM532LuATWDKbo1HImMWshHVqb0kC0isehf3owfYUKq5J68o3juKbm kCgUMt25A2C7QoNMDXcjfJyteBNQD7ZhSh3yeYTGoLSvsD4=
|
||||
X-Google-Smtp-Source: ABdhPJyQYCpCHSwA87x030i8YChySZqcNXxT1qVlZyEA+XM6DTyPZusa8gtbDUVcMyx7Jma/7toh+4EEE2bWg0bG+2E=
|
||||
X-Received: by 2002:aed:3e8e:: with SMTP id n14mr3547383qtf.67.1597942562373; Thu, 20 Aug 2020 09:56:02 -0700 (PDT)
|
||||
MIME-Version: 1.0
|
||||
References: <CALeEO_kij-ogXKzrjV_pTgqVbUB9j=287VkX34iVSWgDHFA8eg@mail.gmail.com> <CAC8+=32ccpEo12RR-juT=FW6+gNV-DcvNjxs_0s6Wn40xmfhug@mail.gmail.com>
|
||||
In-Reply-To: <CAC8+=32ccpEo12RR-juT=FW6+gNV-DcvNjxs_0s6Wn40xmfhug@mail.gmail.com>
|
||||
From: John Tester <customer@customercompany.fr>
|
||||
Date: Thu, 20 Aug 2020 18:55:36 +0200
|
||||
Message-ID: <CALeEO_nLUY8Tk+o7WoaHtBkxvOy0dhvt+fL0MwPrApGty_AG_g@mail.gmail.com>
|
||||
Subject: Re: Support besoin
|
||||
To: John Tester <testldrdev@gmail.com>
|
||||
Content-Type: multipart/alternative; boundary="000000000000cd54be05ad51fe67"
|
||||
|
||||
--000000000000cd54be05ad51fe67
|
||||
Content-Type: text/plain; charset="UTF-8"
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
|
||||
Merci
|
||||
|
||||
Le jeu. 20 ao=C3=BBt 2020 =C3=A0 18:34, John Tester <testldrdev@gma=
|
||||
il.com> a
|
||||
=C3=A9crit :
|
||||
|
||||
> Merci pour votre question.
|
||||
> Voici la rep.
|
||||
>
|
||||
> Le jeu. 20 ao=C3=BBt 2020 =C3=A0 17:29, John Tester <laurent@dest=
|
||||
ailleur.fr>
|
||||
> a =C3=A9crit :
|
||||
>
|
||||
>> adfsdfsdfds
|
||||
>>
|
||||
>> --
|
||||
>> Laurent.
|
||||
>>
|
||||
>> ------------------------------------------------------------------------=
|
||||
------------
|
||||
>> Twitter: https://www.twitter.com/eldy10
|
||||
>>
|
||||
>
|
||||
|
||||
--=20
|
||||
Laurent.
|
||||
---------------------------------------------------------------------------=
|
||||
---------
|
||||
Twitter: https://www.twitter.com/eldy10
|
||||
|
||||
--000000000000cd54be05ad51fe67
|
||||
Content-Type: text/html; charset="UTF-8"
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
|
||||
<div dir=3D"ltr">Merci</div><br><div class=3D"gmail_quote"><div dir=3D"ltr"=
|
||||
class=3D"gmail_attr">Le=C2=A0jeu. 20 ao=C3=BBt 2020 =C3=A0=C2=A018:34, Lau=
|
||||
rent Destailleur <<a href=3D"mailto:testldrdev@gmail.com">testldrdev@gma=
|
||||
il.com</a>> a =C3=A9crit=C2=A0:<br></div><blockquote class=3D"gmail_quot=
|
||||
e" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204)=
|
||||
;padding-left:1ex"><div dir=3D"ltr">Merci pour votre question.<div>Voici la=
|
||||
rep.</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"g=
|
||||
mail_attr">Le=C2=A0jeu. 20 ao=C3=BBt 2020 =C3=A0=C2=A017:29, Laurent Destai=
|
||||
lleur <<a href=3D"mailto:customer@customercompany.fr" target=3D"_blank">laure=
|
||||
nt@destailleur.fr</a>> a =C3=A9crit=C2=A0:<br></div><blockquote class=3D=
|
||||
"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(2=
|
||||
04,204,204);padding-left:1ex"><div dir=3D"ltr">adfsdfsdfds<br clear=3D"all"=
|
||||
><div><br></div>-- <br><div dir=3D"ltr">Laurent.<br>-----------------------=
|
||||
-------------------------------------------------------------<br>Twitter: <=
|
||||
a href=3D"https://www.twitter.com/eldy10" target=3D"_blank">https://www.twi=
|
||||
tter.com/eldy10</a></div></div>
|
||||
</blockquote></div>
|
||||
</blockquote></div><br clear=3D"all"><div><br></div>-- <br><div dir=3D"ltr"=
|
||||
class=3D"gmail_signature">Laurent.<br>------------------------------------=
|
||||
------------------------------------------------<br>Twitter: <a href=3D"htt=
|
||||
ps://www.twitter.com/eldy10" target=3D"_blank">https://www.twitter.com/eldy=
|
||||
10</a></div>
|
||||
|
||||
--000000000000cd54be05ad51fe67--
|
||||
@@ -1,21 +0,0 @@
|
||||
# EditorConfig is awesome: https://editorconfig.org
|
||||
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
# Unix-style newlines with a newline ending every file
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
|
||||
[*.js]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = false
|
||||
1
dev/examples/zapier/.gitignore
vendored
1
dev/examples/zapier/.gitignore
vendored
@@ -5,4 +5,3 @@ node_modules
|
||||
.environment
|
||||
.env
|
||||
.zapierapprc
|
||||
package-lock.json
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
# HOW TO BUILD
|
||||
|
||||
Take a look at the dolibarr wiki page of Zapier module:
|
||||
|
||||
https://wiki.dolibarr.org/index.php?title=Module_Zapier
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*jshint esversion: 6 */
|
||||
const test = (z , bundle) => {
|
||||
const url = bundle.authData.url+'/api/index.php/status';
|
||||
const testAuth = (z , bundle) => {
|
||||
const url = bundle.authData.url+'/api/index.php/login';
|
||||
// Normally you want to make a request to an endpoint that is either specifically designed to test auth, or one that
|
||||
// every user will have access to, such as an account or profile endpoint like /me.
|
||||
// In this example, we'll hit httpbin, which validates the Authorization Header against the arguments passed in the URL path
|
||||
@@ -11,92 +11,67 @@ const test = (z , bundle) => {
|
||||
// This method can return any truthy value to indicate the credentials are valid.
|
||||
// Raise an error to show
|
||||
return promise.then((response) => {
|
||||
if (response.status === 400) {
|
||||
throw new Error('400 -The Session Key you supplied is invalid');
|
||||
}
|
||||
if (response.status === 403) {
|
||||
throw new Error('403 -The Session Key you supplied is invalid');
|
||||
if (response.status === 401) {
|
||||
throw new Error('The Session Key you supplied is invalid');
|
||||
}
|
||||
return response;
|
||||
});
|
||||
};
|
||||
|
||||
// To include the session key header on all outbound requests, simply define a function here.
|
||||
// It runs runs before each request is sent out, allowing you to make tweaks to the request in a centralized spot
|
||||
const includeSessionKeyHeader = (request, z, bundle) => {
|
||||
if (bundle.authData.sessionKey) {
|
||||
request.headers = request.headers || {};
|
||||
request.headers['DOLAPIKEY'] = bundle.authData.sessionKey;
|
||||
}
|
||||
return request;
|
||||
};
|
||||
|
||||
// If we get a response and it is a 401, we can raise a special error telling Zapier to retry this after another exchange.
|
||||
const sessionRefreshIf401 = (response, z, bundle) => {
|
||||
if (bundle.authData.sessionKey) {
|
||||
if (response.status === 401) {
|
||||
throw new z.errors.RefreshAuthError('Session apikey needs refreshing.');
|
||||
}
|
||||
}
|
||||
return response;
|
||||
};
|
||||
|
||||
const getSessionKey = async (z, bundle) => {
|
||||
const getSessionKey = (z, bundle) => {
|
||||
const url = bundle.authData.url + '/api/index.php/login';
|
||||
|
||||
const response = await z.request({
|
||||
url: url,
|
||||
const promise = z.request({
|
||||
method: 'POST',
|
||||
url: url,
|
||||
body: {
|
||||
login: bundle.authData.login,
|
||||
password: bundle.authData.password,
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
// if (response.status === 401) {
|
||||
// throw new Error('The login/password you supplied is invalid');
|
||||
// }
|
||||
const json = JSON.parse(response.content);
|
||||
return {
|
||||
sessionKey: json.success.token || '',
|
||||
};
|
||||
return promise.then((response) => {
|
||||
if (response.status === 401) {
|
||||
throw new Error('The login/password you supplied is invalid');
|
||||
}
|
||||
const json = JSON.parse(response.content);
|
||||
return {
|
||||
sessionKey: json.success.token || 'secret'
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
config: {
|
||||
type: 'session',
|
||||
sessionConfig: {
|
||||
perform: getSessionKey
|
||||
type: 'session',
|
||||
// Define any auth fields your app requires here. The user will be prompted to enter this info when
|
||||
// they connect their account.
|
||||
fields: [
|
||||
{
|
||||
key: 'url',
|
||||
label: 'Url of service',
|
||||
required: true,
|
||||
type: 'string'
|
||||
},
|
||||
// Define any auth fields your app requires here. The user will be prompted to enter this info when
|
||||
// they connect their account.
|
||||
fields: [
|
||||
{
|
||||
key: 'url',
|
||||
label: 'Url of service without trailing-slash',
|
||||
required: true,
|
||||
type: 'string'
|
||||
},
|
||||
{
|
||||
key: 'login',
|
||||
label: 'Login',
|
||||
required: true,
|
||||
type: 'string'
|
||||
},
|
||||
{
|
||||
key: 'password',
|
||||
label: 'Password',
|
||||
required: true,
|
||||
type: 'password'
|
||||
}
|
||||
],
|
||||
// The test method allows Zapier to verify that the credentials a user provides are valid. We'll execute this
|
||||
// method whenever a user connects their account for the first time.
|
||||
test,
|
||||
// The method that will exchange the fields provided by the user for session credentials.
|
||||
// assuming "login" is a key returned from the test
|
||||
connectionLabel: '{{login}}'
|
||||
{
|
||||
key: 'login',
|
||||
label: 'Login',
|
||||
required: true,
|
||||
type: 'string'
|
||||
},
|
||||
{
|
||||
key: 'password',
|
||||
label: 'Password',
|
||||
required: true,
|
||||
type: 'password'
|
||||
}
|
||||
],
|
||||
// The test method allows Zapier to verify that the credentials a user provides are valid. We'll execute this
|
||||
// method whenever a user connects their account for the first time.
|
||||
test: testAuth,
|
||||
// The method that will exchange the fields provided by the user for session credentials.
|
||||
sessionConfig: {
|
||||
perform: getSessionKey
|
||||
},
|
||||
befores: [includeSessionKeyHeader],
|
||||
afters: [sessionRefreshIf401],
|
||||
// assuming "login" is a key returned from the test
|
||||
connectionLabel: '{{login}}'
|
||||
};
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
/*jshint esversion: 6 */
|
||||
// create a particular contact by name
|
||||
const createContact = async (z, bundle) => {
|
||||
const apiurl = bundle.authData.url + '/api/index.php/contacts';
|
||||
|
||||
const response = await z.request({
|
||||
method: 'POST',
|
||||
url: apiurl,
|
||||
body: {
|
||||
name: bundle.inputData.name,
|
||||
name_alias: bundle.inputData.name_alias,
|
||||
ref_ext: bundle.inputData.ref_ext,
|
||||
ref_int: bundle.inputData.ref_int,
|
||||
address: bundle.inputData.address,
|
||||
zip: bundle.inputData.zip,
|
||||
town: bundle.inputData.town,
|
||||
country_code: bundle.inputData.country_code,
|
||||
country_id: bundle.inputData.country_id,
|
||||
country: bundle.inputData.country,
|
||||
phone: bundle.inputData.phone,
|
||||
email: bundle.inputData.email,
|
||||
sens: 'fromzapier'
|
||||
}
|
||||
});
|
||||
const result = z.JSON.parse(response.content);
|
||||
// api returns an integer when ok, a json when ko
|
||||
return result.response || {id: response};
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
key: 'contact',
|
||||
noun: 'Contact',
|
||||
|
||||
display: {
|
||||
label: 'Create Contact',
|
||||
description: 'Creates a contact.'
|
||||
},
|
||||
|
||||
operation: {
|
||||
inputFields: [
|
||||
{key: 'name', required: true},
|
||||
{key: 'name_alias', required: false},
|
||||
{key: 'address', required: false},
|
||||
{key: 'zip', required: false},
|
||||
{key: 'town', required: false},
|
||||
{key: 'email', required: false}
|
||||
],
|
||||
perform: createContact,
|
||||
|
||||
sample: {
|
||||
id: 1,
|
||||
name: 'DUPOND',
|
||||
name_alias: 'DUPOND Ltd',
|
||||
address: 'Rue des Canaries',
|
||||
zip: '34090',
|
||||
town: 'MONTPELLIER',
|
||||
phone: '0123456789',
|
||||
fax: '2345678901',
|
||||
email: 'robot@domain.com'
|
||||
},
|
||||
|
||||
outputFields: [
|
||||
{key: 'id', type: "integer", label: 'ID'},
|
||||
{key: 'name', label: 'Name'},
|
||||
{key: 'name_alias', label: 'Name alias'},
|
||||
{key: 'address', label: 'Address'},
|
||||
{key: 'zip', label: 'Zip'},
|
||||
{key: 'town', label: 'Town'},
|
||||
{key: 'phone', label: 'Phone'},
|
||||
{key: 'fax', label: 'Fax'},
|
||||
{key: 'email', label: 'Email'}
|
||||
]
|
||||
}
|
||||
};
|
||||
@@ -1,74 +0,0 @@
|
||||
/*jshint esversion: 6 */
|
||||
// create a particular member by name
|
||||
const createMember = async (z, bundle) => {
|
||||
const apiurl = bundle.authData.url + '/api/index.php/members';
|
||||
|
||||
const response = await z.request({
|
||||
method: 'POST',
|
||||
url: apiurl,
|
||||
body: {
|
||||
name: bundle.inputData.name,
|
||||
name_alias: bundle.inputData.name_alias,
|
||||
ref_ext: bundle.inputData.ref_ext,
|
||||
ref_int: bundle.inputData.ref_int,
|
||||
address: bundle.inputData.address,
|
||||
zip: bundle.inputData.zip,
|
||||
town: bundle.inputData.town,
|
||||
country_code: bundle.inputData.country_code,
|
||||
country_id: bundle.inputData.country_id,
|
||||
country: bundle.inputData.country,
|
||||
phone: bundle.inputData.phone,
|
||||
email: bundle.inputData.email,
|
||||
sens: 'fromzapier'
|
||||
}
|
||||
});
|
||||
const result = z.JSON.parse(response.content);
|
||||
// api returns an integer when ok, a json when ko
|
||||
return result.response || {id: response};
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
key: 'member',
|
||||
noun: 'Member',
|
||||
|
||||
display: {
|
||||
label: 'Create Member',
|
||||
description: 'Creates a member.'
|
||||
},
|
||||
|
||||
operation: {
|
||||
inputFields: [
|
||||
{key: 'name', required: true},
|
||||
{key: 'name_alias', required: false},
|
||||
{key: 'address', required: false},
|
||||
{key: 'zip', required: false},
|
||||
{key: 'town', required: false},
|
||||
{key: 'email', required: false}
|
||||
],
|
||||
perform: createMember,
|
||||
|
||||
sample: {
|
||||
id: 1,
|
||||
name: 'DUPOND',
|
||||
name_alias: 'DUPOND Ltd',
|
||||
address: 'Rue des Canaries',
|
||||
zip: '34090',
|
||||
town: 'MONTPELLIER',
|
||||
phone: '0123456789',
|
||||
fax: '2345678901',
|
||||
email: 'robot@domain.com'
|
||||
},
|
||||
|
||||
outputFields: [
|
||||
{key: 'id', type: "integer", label: 'ID'},
|
||||
{key: 'name', label: 'Name'},
|
||||
{key: 'name_alias', label: 'Name alias'},
|
||||
{key: 'address', label: 'Address'},
|
||||
{key: 'zip', label: 'Zip'},
|
||||
{key: 'town', label: 'Town'},
|
||||
{key: 'phone', label: 'Phone'},
|
||||
{key: 'fax', label: 'Fax'},
|
||||
{key: 'email', label: 'Email'}
|
||||
]
|
||||
}
|
||||
};
|
||||
@@ -6,7 +6,7 @@ const createThirdparty = async (z, bundle) => {
|
||||
const response = await z.request({
|
||||
method: 'POST',
|
||||
url: apiurl,
|
||||
body: {
|
||||
body: JSON.stringify({
|
||||
name: bundle.inputData.name,
|
||||
name_alias: bundle.inputData.name_alias,
|
||||
ref_ext: bundle.inputData.ref_ext,
|
||||
@@ -24,7 +24,7 @@ const createThirdparty = async (z, bundle) => {
|
||||
code_client: bundle.inputData.code_client,
|
||||
code_fournisseur: bundle.inputData.code_fournisseur,
|
||||
sens: 'fromzapier'
|
||||
}
|
||||
})
|
||||
});
|
||||
const result = z.JSON.parse(response.content);
|
||||
// api returns an integer when ok, a json when ko
|
||||
@@ -72,7 +72,7 @@ module.exports = {
|
||||
},
|
||||
|
||||
outputFields: [
|
||||
{key: 'id', type: "integer", label: 'ID'},
|
||||
{key: 'id', label: 'ID'},
|
||||
{key: 'name', label: 'Name'},
|
||||
{key: 'name_alias', label: 'Name alias'},
|
||||
{key: 'address', label: 'Address'},
|
||||
@@ -81,8 +81,8 @@ module.exports = {
|
||||
{key: 'phone', label: 'Phone'},
|
||||
{key: 'fax', label: 'Fax'},
|
||||
{key: 'email', label: 'Email'},
|
||||
{key: 'client', type: "integer", label: 'Customer/Prospect 0/1/2/3'},
|
||||
{key: 'fournisseur', type: "integer", label: 'Supplier 0/1'},
|
||||
{key: 'client', label: 'Customer/Prospect 0/1/2/3'},
|
||||
{key: 'fournisseur', label: 'Supplier 0/1'},
|
||||
{key: 'code_client', label: 'Customer code'},
|
||||
{key: 'code_fournisseur', label: 'Supplier code'}
|
||||
]
|
||||
|
||||
@@ -1,45 +1,33 @@
|
||||
/*jshint esversion: 6 */
|
||||
const triggerAction = require('./triggers/action');
|
||||
const triggerOrder = require('./triggers/order');
|
||||
const triggerThirdparty = require('./triggers/thirdparty');
|
||||
const triggerContact = require('./triggers/contact');
|
||||
const triggerTicket = require('./triggers/ticket');
|
||||
const triggerUser = require('./triggers/user');
|
||||
const triggerMember = require('./triggers/member');
|
||||
const triggerOrder = require('./triggers/order');
|
||||
const triggerAction = require('./triggers/action');
|
||||
|
||||
const searchThirdparty = require('./searches/thirdparty');
|
||||
const searchContact = require('./searches/contact');
|
||||
const searchMember = require('./searches/member');
|
||||
|
||||
const createThirdparty = require('./creates/thirdparty');
|
||||
const createContact = require('./creates/contact');
|
||||
const createMember = require('./creates/member');
|
||||
|
||||
const {
|
||||
config: authentication,
|
||||
befores = [],
|
||||
afters = [],
|
||||
} = require('./authentication');
|
||||
const authentication = require('./authentication');
|
||||
|
||||
// To include the session key header on all outbound requests, simply define a function here.
|
||||
// It runs runs before each request is sent out, allowing you to make tweaks to the request in a centralized spot
|
||||
// const includeSessionKeyHeader = (request, z, bundle) => {
|
||||
// if (bundle.authData.sessionKey) {
|
||||
// request.headers = request.headers || {};
|
||||
// request.headers['DOLAPIKEY'] = bundle.authData.sessionKey;
|
||||
// }
|
||||
// return request;
|
||||
// };
|
||||
const includeSessionKeyHeader = (request, z, bundle) => {
|
||||
if (bundle.authData.sessionKey) {
|
||||
request.headers = request.headers || {};
|
||||
request.headers['DOLAPIKEY'] = bundle.authData.sessionKey;
|
||||
}
|
||||
return request;
|
||||
};
|
||||
|
||||
// If we get a response and it is a 401, we can raise a special error telling Zapier to retry this after another exchange.
|
||||
// const sessionRefreshIf401 = (response, z, bundle) => {
|
||||
// if (bundle.authData.sessionKey) {
|
||||
// if (response.status === 401) {
|
||||
// throw new z.errors.RefreshAuthError('Session apikey needs refreshing.');
|
||||
// }
|
||||
// }
|
||||
// return response;
|
||||
// };
|
||||
const sessionRefreshIf401 = (response, z, bundle) => {
|
||||
if (bundle.authData.sessionKey) {
|
||||
if (response.status === 401) {
|
||||
throw new z.errors.RefreshAuthError('Session apikey needs refreshing.');
|
||||
}
|
||||
}
|
||||
return response;
|
||||
};
|
||||
|
||||
// We can roll up all our behaviors in an App.
|
||||
const App = {
|
||||
@@ -52,11 +40,11 @@ const App = {
|
||||
|
||||
// beforeRequest & afterResponse are optional hooks into the provided HTTP client
|
||||
beforeRequest: [
|
||||
...befores
|
||||
includeSessionKeyHeader
|
||||
],
|
||||
|
||||
afterResponse: [
|
||||
...afters
|
||||
sessionRefreshIf401
|
||||
],
|
||||
|
||||
// If you want to define optional resources to simplify creation of triggers, searches, creates - do that here!
|
||||
@@ -65,27 +53,19 @@ const App = {
|
||||
|
||||
// If you want your trigger to show up, you better include it here!
|
||||
triggers: {
|
||||
[triggerAction.key]: triggerAction,
|
||||
[triggerOrder.key]: triggerOrder,
|
||||
[triggerThirdparty.key]: triggerThirdparty,
|
||||
[triggerContact.key]: triggerContact,
|
||||
[triggerTicket.key]: triggerTicket,
|
||||
[triggerUser.key]: triggerUser,
|
||||
[triggerMember.key]: triggerMember,
|
||||
[triggerOrder.key]: triggerOrder,
|
||||
[triggerAction.key]: triggerAction
|
||||
},
|
||||
|
||||
// If you want your searches to show up, you better include it here!
|
||||
searches: {
|
||||
[searchThirdparty.key]: searchThirdparty,
|
||||
[searchContact.key]: searchContact,
|
||||
[searchMember.key]: searchMember,
|
||||
},
|
||||
|
||||
// If you want your creates to show up, you better include it here!
|
||||
creates: {
|
||||
[createThirdparty.key]: createThirdparty,
|
||||
[createContact.key]: createContact,
|
||||
[createMember.key]: createMember,
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
405
dev/examples/zapier/package-lock.json
generated
Normal file
405
dev/examples/zapier/package-lock.json
generated
Normal file
@@ -0,0 +1,405 @@
|
||||
{
|
||||
"name": "Dolibarr",
|
||||
"version": "1.0.2",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@types/node": {
|
||||
"version": "8.10.20",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.20.tgz",
|
||||
"integrity": "sha512-M7x8+5D1k/CuA6jhiwuSCmE8sbUWJF0wYsjcig9WrXvwUI5ArEoUBdOXpV4JcEMrLp02/QbDjw+kI+vQeKyQgg==",
|
||||
"optional": true
|
||||
},
|
||||
"asynckit": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
||||
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
|
||||
},
|
||||
"balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
||||
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
|
||||
"dev": true
|
||||
},
|
||||
"bluebird": {
|
||||
"version": "3.5.0",
|
||||
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.0.tgz",
|
||||
"integrity": "sha1-eRQg1/VR7qKJdFOop3ZT+WYG1nw="
|
||||
},
|
||||
"brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
}
|
||||
},
|
||||
"browser-stdout": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz",
|
||||
"integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==",
|
||||
"dev": true
|
||||
},
|
||||
"combined-stream": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz",
|
||||
"integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=",
|
||||
"requires": {
|
||||
"delayed-stream": "~1.0.0"
|
||||
}
|
||||
},
|
||||
"commander": {
|
||||
"version": "2.15.1",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz",
|
||||
"integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==",
|
||||
"dev": true
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
|
||||
"dev": true
|
||||
},
|
||||
"content-disposition": {
|
||||
"version": "0.5.2",
|
||||
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz",
|
||||
"integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ="
|
||||
},
|
||||
"debug": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
|
||||
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ms": "2.0.0"
|
||||
}
|
||||
},
|
||||
"delayed-stream": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
||||
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
|
||||
},
|
||||
"diff": {
|
||||
"version": "3.5.0",
|
||||
"resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
|
||||
"integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
|
||||
"dev": true
|
||||
},
|
||||
"dotenv": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-5.0.1.tgz",
|
||||
"integrity": "sha512-4As8uPrjfwb7VXC+WnLCbXK7y+Ueb2B3zgNCePYfhxS1PYeaO1YTeplffTEcbfLhvFNGLAz90VvJs9yomG7bow=="
|
||||
},
|
||||
"encoding": {
|
||||
"version": "0.1.12",
|
||||
"resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz",
|
||||
"integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=",
|
||||
"requires": {
|
||||
"iconv-lite": "~0.4.13"
|
||||
}
|
||||
},
|
||||
"escape-string-regexp": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
|
||||
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
|
||||
"dev": true
|
||||
},
|
||||
"form-data": {
|
||||
"version": "2.3.2",
|
||||
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz",
|
||||
"integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=",
|
||||
"requires": {
|
||||
"asynckit": "^0.4.0",
|
||||
"combined-stream": "1.0.6",
|
||||
"mime-types": "^2.1.12"
|
||||
}
|
||||
},
|
||||
"fs.realpath": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
|
||||
"dev": true
|
||||
},
|
||||
"glob": {
|
||||
"version": "7.1.2",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
|
||||
"integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
"minimatch": "^3.0.4",
|
||||
"once": "^1.3.0",
|
||||
"path-is-absolute": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"growl": {
|
||||
"version": "1.10.5",
|
||||
"resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz",
|
||||
"integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==",
|
||||
"dev": true
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
|
||||
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
|
||||
"dev": true
|
||||
},
|
||||
"he": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz",
|
||||
"integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=",
|
||||
"dev": true
|
||||
},
|
||||
"iconv-lite": {
|
||||
"version": "0.4.24",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
|
||||
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
|
||||
"requires": {
|
||||
"safer-buffer": ">= 2.1.2 < 3"
|
||||
}
|
||||
},
|
||||
"inflight": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
||||
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"once": "^1.3.0",
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"inherits": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
|
||||
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
|
||||
"dev": true
|
||||
},
|
||||
"is-stream": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
|
||||
"integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ="
|
||||
},
|
||||
"json-tryparse": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/json-tryparse/-/json-tryparse-1.0.5.tgz",
|
||||
"integrity": "sha1-Khy6CLTjEjNo+p+2o01GQwBFeyc="
|
||||
},
|
||||
"jsonschema": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.1.1.tgz",
|
||||
"integrity": "sha1-PO3o4+QR03eHLu+8n98mODy8Ptk="
|
||||
},
|
||||
"lodash": {
|
||||
"version": "4.17.11",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
|
||||
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg=="
|
||||
},
|
||||
"mime-db": {
|
||||
"version": "1.38.0",
|
||||
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz",
|
||||
"integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg=="
|
||||
},
|
||||
"mime-types": {
|
||||
"version": "2.1.22",
|
||||
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz",
|
||||
"integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==",
|
||||
"requires": {
|
||||
"mime-db": "~1.38.0"
|
||||
}
|
||||
},
|
||||
"minimatch": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
}
|
||||
},
|
||||
"minimist": {
|
||||
"version": "0.0.8",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
|
||||
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
|
||||
"dev": true
|
||||
},
|
||||
"mkdirp": {
|
||||
"version": "0.5.1",
|
||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
|
||||
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"minimist": "0.0.8"
|
||||
}
|
||||
},
|
||||
"mocha": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz",
|
||||
"integrity": "sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"browser-stdout": "1.3.1",
|
||||
"commander": "2.15.1",
|
||||
"debug": "3.1.0",
|
||||
"diff": "3.5.0",
|
||||
"escape-string-regexp": "1.0.5",
|
||||
"glob": "7.1.2",
|
||||
"growl": "1.10.5",
|
||||
"he": "1.1.1",
|
||||
"minimatch": "3.0.4",
|
||||
"mkdirp": "0.5.1",
|
||||
"supports-color": "5.4.0"
|
||||
}
|
||||
},
|
||||
"ms": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
|
||||
"dev": true
|
||||
},
|
||||
"node-fetch": {
|
||||
"version": "1.7.1",
|
||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.1.tgz",
|
||||
"integrity": "sha512-j8XsFGCLw79vWXkZtMSmmLaOk9z5SQ9bV/tkbZVCqvgwzrjAGq66igobLofHtF63NvMTp2WjytpsNTGKa+XRIQ==",
|
||||
"requires": {
|
||||
"encoding": "^0.1.11",
|
||||
"is-stream": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"oauth-sign": {
|
||||
"version": "0.9.0",
|
||||
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
|
||||
"integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ=="
|
||||
},
|
||||
"once": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"path-is-absolute": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
|
||||
"dev": true
|
||||
},
|
||||
"safer-buffer": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
||||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
||||
},
|
||||
"semver": {
|
||||
"version": "5.6.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz",
|
||||
"integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg=="
|
||||
},
|
||||
"should": {
|
||||
"version": "13.2.3",
|
||||
"resolved": "https://registry.npmjs.org/should/-/should-13.2.3.tgz",
|
||||
"integrity": "sha512-ggLesLtu2xp+ZxI+ysJTmNjh2U0TsC+rQ/pfED9bUZZ4DKefP27D+7YJVVTvKsmjLpIi9jAa7itwDGkDDmt1GQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"should-equal": "^2.0.0",
|
||||
"should-format": "^3.0.3",
|
||||
"should-type": "^1.4.0",
|
||||
"should-type-adaptors": "^1.0.1",
|
||||
"should-util": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"should-equal": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/should-equal/-/should-equal-2.0.0.tgz",
|
||||
"integrity": "sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"should-type": "^1.4.0"
|
||||
}
|
||||
},
|
||||
"should-format": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/should-format/-/should-format-3.0.3.tgz",
|
||||
"integrity": "sha1-m/yPdPo5IFxT04w01xcwPidxJPE=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"should-type": "^1.3.0",
|
||||
"should-type-adaptors": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"should-type": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/should-type/-/should-type-1.4.0.tgz",
|
||||
"integrity": "sha1-B1bYzoRt/QmEOmlHcZ36DUz/XPM=",
|
||||
"dev": true
|
||||
},
|
||||
"should-type-adaptors": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz",
|
||||
"integrity": "sha512-JA4hdoLnN+kebEp2Vs8eBe9g7uy0zbRo+RMcU0EsNy+R+k049Ki+N5tT5Jagst2g7EAja+euFuoXFCa8vIklfA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"should-type": "^1.3.0",
|
||||
"should-util": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"should-util": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/should-util/-/should-util-1.0.0.tgz",
|
||||
"integrity": "sha1-yYzaN0qmsZDfi6h8mInCtNtiAGM=",
|
||||
"dev": true
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "5.4.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz",
|
||||
"integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"has-flag": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
|
||||
"dev": true
|
||||
},
|
||||
"zapier-platform-core": {
|
||||
"version": "8.0.1",
|
||||
"resolved": "https://registry.npmjs.org/zapier-platform-core/-/zapier-platform-core-8.0.1.tgz",
|
||||
"integrity": "sha512-vuAe7JkFQ88AeQ//NwwNEh8ZjiZr30GRWtwYo7Wo/nx1cqZwq+CRc9zJU2WRrhJfJOtOOTUF6w+pArBTtMOC5A==",
|
||||
"requires": {
|
||||
"@types/node": "8.10.20",
|
||||
"bluebird": "3.5.0",
|
||||
"content-disposition": "0.5.2",
|
||||
"dotenv": "5.0.1",
|
||||
"form-data": "2.3.2",
|
||||
"lodash": "4.17.11",
|
||||
"node-fetch": "1.7.1",
|
||||
"oauth-sign": "0.9.0",
|
||||
"semver": "5.6.0",
|
||||
"zapier-platform-schema": "8.0.1"
|
||||
}
|
||||
},
|
||||
"zapier-platform-schema": {
|
||||
"version": "8.0.1",
|
||||
"resolved": "https://registry.npmjs.org/zapier-platform-schema/-/zapier-platform-schema-8.0.1.tgz",
|
||||
"integrity": "sha512-97KJ0xVLtpU4BiXVaMTPQpiA0T6CQIEzWfzAWwJAWbu5336+6DMFUzDWN4bANBeD3CIsRHHPcZkP8n/17U05ag==",
|
||||
"requires": {
|
||||
"jsonschema": "1.1.1",
|
||||
"lodash": "4.17.10"
|
||||
},
|
||||
"dependencies": {
|
||||
"lodash": {
|
||||
"version": "4.17.10",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz",
|
||||
"integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg=="
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"name": "dolibarr",
|
||||
"version": "1.14.0",
|
||||
"name": "Dolibarr",
|
||||
"version": "1.0.0",
|
||||
"description": "An app for connecting Dolibarr to the Zapier platform.",
|
||||
"repository": "Dolibarr/dolibarr",
|
||||
"homepage": "https://www.dolibarr.org/",
|
||||
"homepage": "https://www.dolibarr.fr/",
|
||||
"author": "Frédéric France <frederic.france@netlogic.fr>",
|
||||
"license": "BSD-3-Clause",
|
||||
"main": "index.js",
|
||||
@@ -11,11 +11,11 @@
|
||||
"test": "mocha --recursive"
|
||||
},
|
||||
"engines": {
|
||||
"node": "14.0.0",
|
||||
"node": "8.10.0",
|
||||
"npm": ">=5.6.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"zapier-platform-core": "11.3.1"
|
||||
"zapier-platform-core": "8.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mocha": "^5.2.0",
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
module.exports = {
|
||||
key: 'contact',
|
||||
|
||||
// You'll want to provide some helpful display labels and descriptions
|
||||
// for users. Zapier will put them into the UX.
|
||||
noun: 'Contact',
|
||||
display: {
|
||||
label: 'Find a Contact',
|
||||
description: 'Search for contact.'
|
||||
},
|
||||
|
||||
// `operation` is where we make the call to your API to do the search
|
||||
operation: {
|
||||
// This search only has one search field. Your searches might have just one, or many
|
||||
// search fields.
|
||||
inputFields: [
|
||||
{
|
||||
key: 'lastname',
|
||||
type: 'string',
|
||||
label: 'Lastname',
|
||||
helpText: 'Lastname to limit to the search to (i.e. The company or %company%).'
|
||||
},
|
||||
{
|
||||
key: 'email',
|
||||
type: 'string',
|
||||
label: 'Email',
|
||||
helpText: 'Email to limit to the search to.'
|
||||
}
|
||||
],
|
||||
|
||||
perform: async (z, bundle) => {
|
||||
const url = bundle.authData.url + '/api/index.php/contacts/';
|
||||
|
||||
// Put the search value in a query param. The details of how to build
|
||||
// a search URL will depend on how your API works.
|
||||
let filter = '';
|
||||
if (bundle.inputData.lastname) {
|
||||
filter = "t.lastname like \'%"+bundle.inputData.name+"%\'";
|
||||
}
|
||||
if (bundle.inputData.email) {
|
||||
if (bundle.inputData.lastname) {
|
||||
filter += " and ";
|
||||
}
|
||||
filter += "t.email like \'"+bundle.inputData.email+"\'";
|
||||
}
|
||||
const response = await z.request({
|
||||
url: url,
|
||||
// this parameter avoid throwing errors and let us manage them
|
||||
skipThrowForStatus: true,
|
||||
params: {
|
||||
sqlfilters: filter
|
||||
}
|
||||
});
|
||||
//z.console.log(response);
|
||||
if (response.status != 200) {
|
||||
return [];
|
||||
}
|
||||
return response.json;
|
||||
},
|
||||
|
||||
// In cases where Zapier needs to show an example record to the user, but we are unable to get a live example
|
||||
// from the API, Zapier will fallback to this hard-coded sample. It should reflect the data structure of
|
||||
// returned records, and have obviously dummy values that we can show to any user.
|
||||
sample: {
|
||||
id: 1,
|
||||
createdAt: 1472069465,
|
||||
name: 'DOE',
|
||||
firstname: 'John',
|
||||
authorId: 1,
|
||||
directions: '1. Boil Noodles\n2.Serve with sauce',
|
||||
style: 'italian'
|
||||
},
|
||||
|
||||
// If the resource can have fields that are custom on a per-user basis, define a function to fetch the custom
|
||||
// field definitions. The result will be used to augment the sample.
|
||||
// outputFields: () => { return []; }
|
||||
// Alternatively, a static field definition should be provided, to specify labels for the fields
|
||||
outputFields: [
|
||||
{
|
||||
key: 'id',
|
||||
type: "integer",
|
||||
label: 'ID'
|
||||
},
|
||||
{key: 'createdAt', type: "integer", label: 'Created At'},
|
||||
{key: 'name', label: 'Name'},
|
||||
{key: 'firstname', label: 'Firstname'},
|
||||
{key: 'directions', label: 'Directions'},
|
||||
{key: 'authorId', type: "integer", label: 'Author ID'},
|
||||
{
|
||||
key: 'style',
|
||||
label: 'Style'
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
@@ -1,88 +0,0 @@
|
||||
module.exports = {
|
||||
key: 'member',
|
||||
|
||||
// You'll want to provide some helpful display labels and descriptions
|
||||
// for users. Zapier will put them into the UX.
|
||||
noun: 'Member',
|
||||
display: {
|
||||
label: 'Find a Member',
|
||||
description: 'Search for member.'
|
||||
},
|
||||
|
||||
// `operation` is where we make the call to your API to do the search
|
||||
operation: {
|
||||
// This search only has one search field. Your searches might have just one, or many
|
||||
// search fields.
|
||||
inputFields: [
|
||||
{
|
||||
key: 'lastname',
|
||||
type: 'string',
|
||||
label: 'Lastname',
|
||||
helpText: 'Lastname to limit to the search to (i.e. The company or %company%).'
|
||||
},
|
||||
{
|
||||
key: 'email',
|
||||
type: 'string',
|
||||
label: 'Email',
|
||||
helpText: 'Email to limit to the search to.'
|
||||
}
|
||||
],
|
||||
|
||||
perform: async (z, bundle) => {
|
||||
const url = bundle.authData.url + '/api/index.php/members/';
|
||||
|
||||
// Put the search value in a query param. The details of how to build
|
||||
// a search URL will depend on how your API works.
|
||||
let filter = '';
|
||||
if (bundle.inputData.lastname) {
|
||||
filter = "t.lastname like \'%" + bundle.inputData.name + "%\'";
|
||||
}
|
||||
if (bundle.inputData.email) {
|
||||
if (bundle.inputData.lastname) {
|
||||
filter += " and ";
|
||||
}
|
||||
filter += "t.email like \'" + bundle.inputData.email + "\'";
|
||||
}
|
||||
const response = await z.request({
|
||||
url: url,
|
||||
// this parameter avoid throwing errors and let us manage them
|
||||
skipThrowForStatus: true,
|
||||
params: {
|
||||
sqlfilters: filter
|
||||
}
|
||||
});
|
||||
//z.console.log(response);
|
||||
if (response.status != 200) {
|
||||
return [];
|
||||
}
|
||||
return response.json;
|
||||
},
|
||||
|
||||
// In cases where Zapier needs to show an example record to the user, but we are unable to get a live example
|
||||
// from the API, Zapier will fallback to this hard-coded sample. It should reflect the data structure of
|
||||
// returned records, and have obviously dummy values that we can show to any user.
|
||||
sample: {
|
||||
id: 1,
|
||||
createdAt: 1472069465,
|
||||
name: 'DOE',
|
||||
firstname: 'John',
|
||||
authorId: 1,
|
||||
},
|
||||
|
||||
// If the resource can have fields that are custom on a per-user basis, define a function to fetch the custom
|
||||
// field definitions. The result will be used to augment the sample.
|
||||
// outputFields: () => { return []; }
|
||||
// Alternatively, a static field definition should be provided, to specify labels for the fields
|
||||
outputFields: [
|
||||
{
|
||||
key: 'id',
|
||||
type: "integer",
|
||||
label: 'ID'
|
||||
},
|
||||
{ key: 'createdAt', type: "integer", label: 'Created At' },
|
||||
{ key: 'name', label: 'Name' },
|
||||
{ key: 'firstname', label: 'Firstname' },
|
||||
{ key: 'authorId', type: "integer", label: 'Author ID' },
|
||||
]
|
||||
}
|
||||
};
|
||||
@@ -19,43 +19,21 @@ module.exports = {
|
||||
type: 'string',
|
||||
label: 'Name',
|
||||
helpText: 'Name to limit to the search to (i.e. The company or %company%).'
|
||||
},
|
||||
{
|
||||
key: 'email',
|
||||
type: 'string',
|
||||
label: 'Email',
|
||||
helpText: 'Email to limit to the search to.'
|
||||
}
|
||||
],
|
||||
|
||||
perform: async (z, bundle) => {
|
||||
perform: (z, bundle) => {
|
||||
const url = bundle.authData.url + '/api/index.php/thirdparties/';
|
||||
|
||||
// Put the search value in a query param. The details of how to build
|
||||
// a search URL will depend on how your API works.
|
||||
let filter = '';
|
||||
if (bundle.inputData.name) {
|
||||
filter = "t.nom like \'%"+bundle.inputData.name+"%\'";
|
||||
}
|
||||
if (bundle.inputData.email) {
|
||||
if (bundle.inputData.name) {
|
||||
filter += " and ";
|
||||
}
|
||||
filter += "t.email like \'"+bundle.inputData.email+"\'";
|
||||
}
|
||||
const response = await z.request({
|
||||
url: url,
|
||||
// this parameter avoid throwing errors and let us manage them
|
||||
skipThrowForStatus: true,
|
||||
const options = {
|
||||
params: {
|
||||
sqlfilters: filter
|
||||
sqlfilters: "t.nom like \'%"+bundle.inputData.name+"%\'"
|
||||
}
|
||||
});
|
||||
//z.console.log(response);
|
||||
if (response.status != 200) {
|
||||
return [];
|
||||
}
|
||||
return response.json;
|
||||
};
|
||||
|
||||
return z.request(url, options).then(response => JSON.parse(response.content));
|
||||
},
|
||||
|
||||
// In cases where Zapier needs to show an example record to the user, but we are unable to get a live example
|
||||
@@ -76,20 +54,13 @@ module.exports = {
|
||||
// outputFields: () => { return []; }
|
||||
// Alternatively, a static field definition should be provided, to specify labels for the fields
|
||||
outputFields: [
|
||||
{
|
||||
key: 'id',
|
||||
type: "integer",
|
||||
label: 'ID'
|
||||
},
|
||||
{key: 'createdAt', type: "integer", label: 'Created At'},
|
||||
{key: 'id', label: 'ID'},
|
||||
{key: 'createdAt', label: 'Created At'},
|
||||
{key: 'name', label: 'Name'},
|
||||
{key: 'firstname', label: 'Firstname'},
|
||||
{key: 'directions', label: 'Directions'},
|
||||
{key: 'authorId', type: "integer", label: 'Author ID'},
|
||||
{
|
||||
key: 'style',
|
||||
label: 'Style'
|
||||
}
|
||||
{key: 'authorId', label: 'Author ID'},
|
||||
{key: 'style', label: 'Style'}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
@@ -10,14 +10,14 @@ const subscribeHook = (z, bundle) => {
|
||||
action: bundle.inputData.action
|
||||
};
|
||||
|
||||
const url = bundle.authData.url + '/api/index.php/zapierapi/hook';
|
||||
const url = bundle.authData.url + '/api/index.php/zapierapi/hook';
|
||||
|
||||
// You can build requests and our client will helpfully inject all the variables
|
||||
// you need to complete. You can also register middleware to control this.
|
||||
const options = {
|
||||
url: url,
|
||||
method: 'POST',
|
||||
body: data,
|
||||
body: JSON.stringify(data)
|
||||
};
|
||||
|
||||
// You may return a promise or a normal data structure from any perform method.
|
||||
@@ -32,7 +32,7 @@ const unsubscribeHook = (z, bundle) => {
|
||||
// You can build requests and our client will helpfully inject all the variables
|
||||
// you need to complete. You can also register middleware to control this.
|
||||
const options = {
|
||||
url: bundle.authData.url + '/api/index.php/zapierapi/hook/' + bundle.subscribeData.id,
|
||||
url: bundle.authData.url + '/api/index.php/zapierapi/hook/' + bundle.subscribeData.id,
|
||||
method: 'DELETE',
|
||||
};
|
||||
|
||||
@@ -74,7 +74,7 @@ const getFallbackRealAction = (z, bundle) => {
|
||||
// For the test poll, you should get some real data, to aid the setup process.
|
||||
const module = bundle.inputData.module;
|
||||
const options = {
|
||||
url: bundle.authData.url + '/api/index.php/agendaevents/0',
|
||||
url: bundle.authData.url + '/api/index.php/agendaevents/0',
|
||||
};
|
||||
|
||||
return z.request(options).then((response) => [JSON.parse(response.content)]);
|
||||
@@ -100,7 +100,7 @@ module.exports = {
|
||||
noun: 'Action',
|
||||
display: {
|
||||
label: 'New Agenda',
|
||||
description: 'Triggers when a new agenda with action is done in Dolibarr.'
|
||||
description: 'Trigger when a new agenda with action is done in Dolibarr.'
|
||||
},
|
||||
|
||||
// `operation` is where the business logic goes.
|
||||
@@ -111,7 +111,6 @@ module.exports = {
|
||||
inputFields: [
|
||||
{
|
||||
key: 'action',
|
||||
required: true,
|
||||
type: 'string',
|
||||
helpText: 'Which action of agenda this should trigger on.',
|
||||
choices: {
|
||||
@@ -146,33 +145,12 @@ module.exports = {
|
||||
// outputFields: () => { return []; }
|
||||
// Alternatively, a static field definition should be provided, to specify labels for the fields
|
||||
outputFields: [
|
||||
{
|
||||
key: 'id',
|
||||
type: "integer",
|
||||
label: 'ID'
|
||||
},
|
||||
{
|
||||
key: 'createdAt',
|
||||
type: "integer",
|
||||
label: 'Created At'
|
||||
},
|
||||
{
|
||||
key: 'name',
|
||||
label: 'Name'
|
||||
},
|
||||
{
|
||||
key: 'usertodo__name',
|
||||
label: 'UserToDo Name'
|
||||
},
|
||||
{
|
||||
key: 'authorId',
|
||||
type: "integer",
|
||||
label: 'Author ID'
|
||||
},
|
||||
{
|
||||
key: 'action',
|
||||
label: 'Action'
|
||||
}
|
||||
{key: 'id', label: 'ID'},
|
||||
{key: 'createdAt', label: 'Created At'},
|
||||
{key: 'name', label: 'Name'},
|
||||
{key: 'usertodo__name', label: 'UserToDo Name'},
|
||||
{key: 'authorId', label: 'Author ID'},
|
||||
{key: 'action', label: 'Action'}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,171 +0,0 @@
|
||||
const subscribeHook = (z, bundle) => {
|
||||
// `z.console.log()` is similar to `console.log()`.
|
||||
z.console.log('suscribing hook!');
|
||||
|
||||
// bundle.targetUrl has the Hook URL this app should call when an action is created.
|
||||
const data = {
|
||||
url: bundle.targetUrl,
|
||||
event: bundle.event,
|
||||
module: 'contact',
|
||||
action: bundle.inputData.action
|
||||
};
|
||||
|
||||
const url = bundle.authData.url + '/api/index.php/zapierapi/hook';
|
||||
|
||||
// You can build requests and our client will helpfully inject all the variables
|
||||
// you need to complete. You can also register middleware to control this.
|
||||
const options = {
|
||||
url: url,
|
||||
method: 'POST',
|
||||
body: data,
|
||||
};
|
||||
|
||||
// You may return a promise or a normal data structure from any perform method.
|
||||
return z.request(options).then((response) => JSON.parse(response.content));
|
||||
};
|
||||
|
||||
const unsubscribeHook = (z, bundle) => {
|
||||
// bundle.subscribeData contains the parsed response JSON from the subscribe
|
||||
// request made initially.
|
||||
z.console.log('unsuscribing hook!');
|
||||
|
||||
// You can build requests and our client will helpfully inject all the variables
|
||||
// you need to complete. You can also register middleware to control this.
|
||||
const options = {
|
||||
url: bundle.authData.url + '/api/index.php/zapierapi/hook/' + bundle.subscribeData.id,
|
||||
method: 'DELETE',
|
||||
};
|
||||
|
||||
// You may return a promise or a normal data structure from any perform method.
|
||||
return z.request(options).then((response) => JSON.parse(response.content));
|
||||
};
|
||||
|
||||
const getContact = (z, bundle) => {
|
||||
// bundle.cleanedRequest will include the parsed JSON object (if it's not a
|
||||
// test poll) and also a .querystring property with the URL's query string.
|
||||
const contact = {
|
||||
id: bundle.cleanedRequest.id,
|
||||
name: bundle.cleanedRequest.name,
|
||||
name_alias: bundle.cleanedRequest.name_alias,
|
||||
firstname: bundle.cleanedRequest.firstname,
|
||||
address: bundle.cleanedRequest.address,
|
||||
zip: bundle.cleanedRequest.zip,
|
||||
town: bundle.cleanedRequest.town,
|
||||
email: bundle.cleanedRequest.email,
|
||||
phone_pro: bundle.cleanedRequest.phone_pro,
|
||||
phone_perso: bundle.cleanedRequest.phone_perso,
|
||||
phone_mobile: bundle.cleanedRequest.phone_mobile,
|
||||
authorId: bundle.cleanedRequest.authorId,
|
||||
createdAt: bundle.cleanedRequest.createdAt,
|
||||
action: bundle.cleanedRequest.action
|
||||
};
|
||||
|
||||
return [contact];
|
||||
};
|
||||
|
||||
const getFallbackRealContact = (z, bundle) => {
|
||||
// For the test poll, you should get some real data, to aid the setup process.
|
||||
const module = bundle.inputData.module;
|
||||
const options = {
|
||||
url: bundle.authData.url + '/api/index.php/contacts/0',
|
||||
};
|
||||
|
||||
return z.request(options).then((response) => [JSON.parse(response.content)]);
|
||||
};
|
||||
|
||||
// const getModulesChoices = (z/*, bundle*/) => {
|
||||
// // For the test poll, you should get some real data, to aid the setup process.
|
||||
// const options = {
|
||||
// url: bundle.authData.url + '/api/index.php/zapierapi/getmoduleschoices',
|
||||
// };
|
||||
|
||||
// return z.request(options).then((response) => JSON.parse(response.content));
|
||||
// };
|
||||
// const getModulesChoices = () => {
|
||||
// return {
|
||||
// orders: "Order",
|
||||
// invoices: "Invoice",
|
||||
// contacts: "Contact",
|
||||
// contacts: "Contacts"
|
||||
// };
|
||||
// };
|
||||
|
||||
// const getActionsChoices = (z, bundle) => {
|
||||
// // For the test poll, you should get some real data, to aid the setup process.
|
||||
// const module = bundle.inputData.module;
|
||||
// const options = {
|
||||
// url: url: bundle.authData.url + '/api/index.php/zapierapi/getactionschoices/thirparty`,
|
||||
// };
|
||||
|
||||
// return z.request(options).then((response) => JSON.parse(response.content));
|
||||
// };
|
||||
|
||||
// We recommend writing your triggers separate like this and rolling them
|
||||
// into the App definition at the end.
|
||||
module.exports = {
|
||||
key: 'contact',
|
||||
|
||||
// You'll want to provide some helpful display labels and descriptions
|
||||
// for users. Zapier will put them into the UX.
|
||||
noun: 'Contact',
|
||||
display: {
|
||||
label: 'New Contact',
|
||||
description: 'Triggers when a new contact action is done in Dolibarr.'
|
||||
},
|
||||
|
||||
// `operation` is where the business logic goes.
|
||||
operation: {
|
||||
|
||||
// `inputFields` can define the fields a user could provide,
|
||||
// we'll pass them in as `bundle.inputData` later.
|
||||
inputFields: [
|
||||
{
|
||||
key: 'action',
|
||||
required: true,
|
||||
type: 'string',
|
||||
helpText: 'Which action of contact this should trigger on.',
|
||||
choices: {
|
||||
create: "Create",
|
||||
modify: "Modify",
|
||||
validate: "Validate",
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
type: 'hook',
|
||||
|
||||
performSubscribe: subscribeHook,
|
||||
performUnsubscribe: unsubscribeHook,
|
||||
|
||||
perform: getContact,
|
||||
performList: getFallbackRealContact,
|
||||
|
||||
// In cases where Zapier needs to show an example record to the user, but we are unable to get a live example
|
||||
// from the API, Zapier will fallback to this hard-coded sample. It should reflect the data structure of
|
||||
// returned records, and have obviously dummy values that we can show to any user.
|
||||
sample: {
|
||||
id: 1,
|
||||
createdAt: 1472069465,
|
||||
lastname: 'DOE',
|
||||
firstname: 'John',
|
||||
authorId: 1,
|
||||
action: 'create'
|
||||
},
|
||||
|
||||
// If the resource can have fields that are custom on a per-user basis, define a function to fetch the custom
|
||||
// field definitions. The result will be used to augment the sample.
|
||||
// outputFields: () => { return []; }
|
||||
// Alternatively, a static field definition should be provided, to specify labels for the fields
|
||||
outputFields: [
|
||||
{key: 'id', type: "integer", label: 'ID'},
|
||||
{key: 'createdAt', label: 'Created At'},
|
||||
{key: 'lastname', label: 'Lastname'},
|
||||
{key: 'firstname', label: 'Firstname'},
|
||||
{key: 'phone', label: 'Phone pro'},
|
||||
{key: 'phone_perso', label: 'Phone perso'},
|
||||
{key: 'phone_mobile', label: 'Phone mobile'},
|
||||
{key: 'authorId', type: "integer", label: 'Author ID'},
|
||||
{key: 'action', label: 'Action'}
|
||||
]
|
||||
}
|
||||
};
|
||||
@@ -1,171 +0,0 @@
|
||||
const subscribeHook = (z, bundle) => {
|
||||
// `z.console.log()` is similar to `console.log()`.
|
||||
z.console.log('suscribing hook!');
|
||||
|
||||
// bundle.targetUrl has the Hook URL this app should call when an action is created.
|
||||
const data = {
|
||||
url: bundle.targetUrl,
|
||||
event: bundle.event,
|
||||
module: 'member',
|
||||
action: bundle.inputData.action
|
||||
};
|
||||
|
||||
const url = bundle.authData.url + '/api/index.php/zapierapi/hook';
|
||||
|
||||
// You can build requests and our client will helpfully inject all the variables
|
||||
// you need to complete. You can also register middleware to control this.
|
||||
const options = {
|
||||
url: url,
|
||||
method: 'POST',
|
||||
body: data,
|
||||
};
|
||||
|
||||
// You may return a promise or a normal data structure from any perform method.
|
||||
return z.request(options).then((response) => JSON.parse(response.content));
|
||||
};
|
||||
|
||||
const unsubscribeHook = (z, bundle) => {
|
||||
// bundle.subscribeData contains the parsed response JSON from the subscribe
|
||||
// request made initially.
|
||||
z.console.log('unsuscribing hook!');
|
||||
|
||||
// You can build requests and our client will helpfully inject all the variables
|
||||
// you need to complete. You can also register middleware to control this.
|
||||
const options = {
|
||||
url: bundle.authData.url + '/api/index.php/zapierapi/hook/' + bundle.subscribeData.id,
|
||||
method: 'DELETE',
|
||||
};
|
||||
|
||||
// You may return a promise or a normal data structure from any perform method.
|
||||
return z.request(options).then((response) => JSON.parse(response.content));
|
||||
};
|
||||
|
||||
const getMember = (z, bundle) => {
|
||||
// bundle.cleanedRequest will include the parsed JSON object (if it's not a
|
||||
// test poll) and also a .querystring property with the URL's query string.
|
||||
const member = {
|
||||
id: bundle.cleanedRequest.id,
|
||||
name: bundle.cleanedRequest.name,
|
||||
name_alias: bundle.cleanedRequest.name_alias,
|
||||
firstname: bundle.cleanedRequest.firstname,
|
||||
address: bundle.cleanedRequest.address,
|
||||
zip: bundle.cleanedRequest.zip,
|
||||
town: bundle.cleanedRequest.town,
|
||||
email: bundle.cleanedRequest.email,
|
||||
phone_pro: bundle.cleanedRequest.phone_pro,
|
||||
phone_perso: bundle.cleanedRequest.phone_perso,
|
||||
phone_mobile: bundle.cleanedRequest.phone_mobile,
|
||||
authorId: bundle.cleanedRequest.authorId,
|
||||
createdAt: bundle.cleanedRequest.createdAt,
|
||||
action: bundle.cleanedRequest.action
|
||||
};
|
||||
|
||||
return [member];
|
||||
};
|
||||
|
||||
const getFallbackRealMember = (z, bundle) => {
|
||||
// For the test poll, you should get some real data, to aid the setup process.
|
||||
const module = bundle.inputData.module;
|
||||
const options = {
|
||||
url: bundle.authData.url + '/api/index.php/members/0',
|
||||
};
|
||||
|
||||
return z.request(options).then((response) => [JSON.parse(response.content)]);
|
||||
};
|
||||
|
||||
// const getModulesChoices = (z/*, bundle*/) => {
|
||||
// // For the test poll, you should get some real data, to aid the setup process.
|
||||
// const options = {
|
||||
// url: bundle.authData.url + '/api/index.php/zapierapi/getmoduleschoices',
|
||||
// };
|
||||
|
||||
// return z.request(options).then((response) => JSON.parse(response.content));
|
||||
// };
|
||||
// const getModulesChoices = () => {
|
||||
// return {
|
||||
// orders: "Order",
|
||||
// invoices: "Invoice",
|
||||
// members: "Member",
|
||||
// members: "Members"
|
||||
// };
|
||||
// };
|
||||
|
||||
// const getActionsChoices = (z, bundle) => {
|
||||
// // For the test poll, you should get some real data, to aid the setup process.
|
||||
// const module = bundle.inputData.module;
|
||||
// const options = {
|
||||
// url: url: bundle.authData.url + '/api/index.php/zapierapi/getactionschoices/thirparty`,
|
||||
// };
|
||||
|
||||
// return z.request(options).then((response) => JSON.parse(response.content));
|
||||
// };
|
||||
|
||||
// We recommend writing your triggers separate like this and rolling them
|
||||
// into the App definition at the end.
|
||||
module.exports = {
|
||||
key: 'member',
|
||||
|
||||
// You'll want to provide some helpful display labels and descriptions
|
||||
// for users. Zapier will put them into the UX.
|
||||
noun: 'Member',
|
||||
display: {
|
||||
label: 'New Member',
|
||||
description: 'Triggers when a new member action is done in Dolibarr.'
|
||||
},
|
||||
|
||||
// `operation` is where the business logic goes.
|
||||
operation: {
|
||||
|
||||
// `inputFields` can define the fields a user could provide,
|
||||
// we'll pass them in as `bundle.inputData` later.
|
||||
inputFields: [
|
||||
{
|
||||
key: 'action',
|
||||
required: true,
|
||||
type: 'string',
|
||||
helpText: 'Which action of member this should trigger on.',
|
||||
choices: {
|
||||
create: "Create",
|
||||
modify: "Modify",
|
||||
validate: "Validate",
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
type: 'hook',
|
||||
|
||||
performSubscribe: subscribeHook,
|
||||
performUnsubscribe: unsubscribeHook,
|
||||
|
||||
perform: getMember,
|
||||
performList: getFallbackRealMember,
|
||||
|
||||
// In cases where Zapier needs to show an example record to the user, but we are unable to get a live example
|
||||
// from the API, Zapier will fallback to this hard-coded sample. It should reflect the data structure of
|
||||
// returned records, and have obviously dummy values that we can show to any user.
|
||||
sample: {
|
||||
id: 1,
|
||||
createdAt: 1472069465,
|
||||
lastname: 'DOE',
|
||||
firstname: 'John',
|
||||
authorId: 1,
|
||||
action: 'create'
|
||||
},
|
||||
|
||||
// If the resource can have fields that are custom on a per-user basis, define a function to fetch the custom
|
||||
// field definitions. The result will be used to augment the sample.
|
||||
// outputFields: () => { return []; }
|
||||
// Alternatively, a static field definition should be provided, to specify labels for the fields
|
||||
outputFields: [
|
||||
{key: 'id', type: "integer", label: 'ID'},
|
||||
{key: 'createdAt', label: 'Created At'},
|
||||
{key: 'lastname', label: 'Lastname'},
|
||||
{key: 'firstname', label: 'Firstname'},
|
||||
{key: 'phone', label: 'Phone pro'},
|
||||
{key: 'phone_perso', label: 'Phone perso'},
|
||||
{key: 'phone_mobile', label: 'Phone mobile'},
|
||||
{key: 'authorId', type: "integer", label: 'Author ID'},
|
||||
{key: 'action', label: 'Action'}
|
||||
]
|
||||
}
|
||||
};
|
||||
@@ -17,7 +17,7 @@ const subscribeHook = (z, bundle) => {
|
||||
const options = {
|
||||
url: url,
|
||||
method: 'POST',
|
||||
body: data,
|
||||
body: JSON.stringify(data)
|
||||
};
|
||||
|
||||
// You may return a promise or a normal data structure from any perform method.
|
||||
@@ -90,7 +90,7 @@ module.exports = {
|
||||
noun: 'Order',
|
||||
display: {
|
||||
label: 'New Order',
|
||||
description: 'Triggers when a new order with action is done in Dolibarr.'
|
||||
description: 'Trigger when a new order with action is done in Dolibarr.'
|
||||
},
|
||||
|
||||
// `operation` is where the business logic goes.
|
||||
@@ -101,7 +101,6 @@ module.exports = {
|
||||
inputFields: [
|
||||
{
|
||||
key: 'action',
|
||||
required: true,
|
||||
type: 'string',
|
||||
helpText: 'Which action of order this should trigger on.',
|
||||
choices: {
|
||||
@@ -137,11 +136,11 @@ module.exports = {
|
||||
// outputFields: () => { return []; }
|
||||
// Alternatively, a static field definition should be provided, to specify labels for the fields
|
||||
outputFields: [
|
||||
{key: 'id', type: "integer", label: 'ID'},
|
||||
{key: 'createdAt', type: "integer", label: 'Created At'},
|
||||
{key: 'id', label: 'ID'},
|
||||
{key: 'createdAt', label: 'Created At'},
|
||||
{key: 'name', label: 'Name'},
|
||||
{key: 'directions', label: 'Directions'},
|
||||
{key: 'authorId', type: "integer", label: 'Author ID'},
|
||||
{key: 'authorId', label: 'Author ID'},
|
||||
{key: 'module', label: 'Module'},
|
||||
{key: 'action', label: 'Action'}
|
||||
]
|
||||
|
||||
@@ -17,7 +17,7 @@ const subscribeHook = (z, bundle) => {
|
||||
const options = {
|
||||
url: url,
|
||||
method: 'POST',
|
||||
body: data,
|
||||
body: JSON.stringify(data)
|
||||
};
|
||||
|
||||
// You may return a promise or a normal data structure from any perform method.
|
||||
@@ -56,12 +56,6 @@ const getThirdparty = (z, bundle) => {
|
||||
fournisseur: bundle.cleanedRequest.fournisseur,
|
||||
code_client: bundle.cleanedRequest.code_client,
|
||||
code_fournisseur: bundle.cleanedRequest.code_fournisseur,
|
||||
idprof1: bundle.cleanedRequest.idprof1,
|
||||
idprof2: bundle.cleanedRequest.idprof2,
|
||||
idprof3: bundle.cleanedRequest.idprof3,
|
||||
idprof4: bundle.cleanedRequest.idprof4,
|
||||
idprof5: bundle.cleanedRequest.idprof5,
|
||||
idprof6: bundle.cleanedRequest.idprof6,
|
||||
authorId: bundle.cleanedRequest.authorId,
|
||||
createdAt: bundle.cleanedRequest.createdAt,
|
||||
action: bundle.cleanedRequest.action
|
||||
@@ -118,7 +112,7 @@ module.exports = {
|
||||
noun: 'Thirdparty',
|
||||
display: {
|
||||
label: 'New Thirdparty',
|
||||
description: 'Triggers when a new thirdparty action is done in Dolibarr.'
|
||||
description: 'Trigger when a new thirdpaty action is done in Dolibarr.'
|
||||
},
|
||||
|
||||
// `operation` is where the business logic goes.
|
||||
@@ -129,7 +123,6 @@ module.exports = {
|
||||
inputFields: [
|
||||
{
|
||||
key: 'action',
|
||||
required: true,
|
||||
type: 'string',
|
||||
helpText: 'Which action of thirdparty this should trigger on.',
|
||||
choices: {
|
||||
@@ -166,23 +159,17 @@ module.exports = {
|
||||
// outputFields: () => { return []; }
|
||||
// Alternatively, a static field definition should be provided, to specify labels for the fields
|
||||
outputFields: [
|
||||
{key: 'id', type: "integer", label: 'ID'},
|
||||
{key: 'id', label: 'ID'},
|
||||
{key: 'createdAt', label: 'Created At'},
|
||||
{key: 'name', label: 'Name'},
|
||||
{key: 'name_alias', label: 'Name alias'},
|
||||
{key: 'firstname', label: 'Firstname'},
|
||||
{key: 'authorId', type: "integer", label: 'Author ID'},
|
||||
{key: 'firstname', label: 'Firstame'},
|
||||
{key: 'authorId', label: 'Author ID'},
|
||||
{key: 'action', label: 'Action'},
|
||||
{key: 'client', label: 'Customer/Prospect 0/1/2/3'},
|
||||
{key: 'fournisseur', label: 'Supplier 0/1'},
|
||||
{key: 'code_client', label: 'Customer code'},
|
||||
{key: 'code_fournisseur', label: 'Supplier code'},
|
||||
{key: 'idprof1', label: 'Id Prof 1'},
|
||||
{key: 'idprof2', label: 'Id Prof 2'},
|
||||
{key: 'idprof3', label: 'Id Prof 3'},
|
||||
{key: 'idprof4', label: 'Id Prof 4'},
|
||||
{key: 'idprof5', label: 'Id Prof 5'},
|
||||
{key: 'idprof6', label: 'Id Prof 6'}
|
||||
{key: 'code_fournisseur', label: 'Supplier code'}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,237 +0,0 @@
|
||||
const subscribeHook = (z, bundle) => {
|
||||
// `z.console.log()` is similar to `console.log()`.
|
||||
z.console.log('suscribing hook!');
|
||||
|
||||
// bundle.targetUrl has the Hook URL this app should call when an action is created.
|
||||
const data = {
|
||||
url: bundle.targetUrl,
|
||||
event: bundle.event,
|
||||
module: 'ticket',
|
||||
action: bundle.inputData.action
|
||||
};
|
||||
|
||||
const url = bundle.authData.url + '/api/index.php/zapierapi/hook';
|
||||
|
||||
// You can build requests and our client will helpfully inject all the variables
|
||||
// you need to complete. You can also register middleware to control this.
|
||||
const options = {
|
||||
url: url,
|
||||
method: 'POST',
|
||||
body: data,
|
||||
};
|
||||
|
||||
// You may return a promise or a normal data structure from any perform method.
|
||||
return z.request(options).then((response) => JSON.parse(response.content));
|
||||
};
|
||||
|
||||
const unsubscribeHook = (z, bundle) => {
|
||||
// bundle.subscribeData contains the parsed response JSON from the subscribe
|
||||
// request made initially.
|
||||
z.console.log('unsuscribing hook!');
|
||||
|
||||
// You can build requests and our client will helpfully inject all the variables
|
||||
// you need to complete. You can also register middleware to control this.
|
||||
const options = {
|
||||
url: bundle.authData.url + '/api/index.php/zapierapi/hook/' + bundle.subscribeData.id,
|
||||
method: 'DELETE',
|
||||
};
|
||||
|
||||
// You may return a promise or a normal data structure from any perform method.
|
||||
return z.request(options).then((response) => JSON.parse(response.content));
|
||||
};
|
||||
|
||||
const getTicket = (z, bundle) => {
|
||||
// bundle.cleanedRequest will include the parsed JSON object (if it's not a
|
||||
// test poll) and also a .querystring property with the URL's query string.
|
||||
const ticket = {
|
||||
id: bundle.cleanedRequest.id,
|
||||
track_id: bundle.cleanedRequest.track_id,
|
||||
subject: bundle.cleanedRequest.subject,
|
||||
message: bundle.cleanedRequest.message,
|
||||
lastname: bundle.cleanedRequest.lastname,
|
||||
firstname: bundle.cleanedRequest.firstname,
|
||||
address: bundle.cleanedRequest.address,
|
||||
zip: bundle.cleanedRequest.zip,
|
||||
town: bundle.cleanedRequest.town,
|
||||
email_from: bundle.cleanedRequest.email_from,
|
||||
login: bundle.cleanedRequest.login,
|
||||
authorId: bundle.cleanedRequest.authorId,
|
||||
createdAt: bundle.cleanedRequest.createdAt,
|
||||
action: bundle.cleanedRequest.action
|
||||
};
|
||||
|
||||
return [ticket];
|
||||
};
|
||||
|
||||
const getFallbackRealTicket = (z, bundle) => {
|
||||
// For the test poll, you should get some real data, to aid the setup process.
|
||||
const module = bundle.inputData.module;
|
||||
const options = {
|
||||
url: bundle.authData.url + '/api/index.php/tickets/0',
|
||||
};
|
||||
|
||||
return z.request(options).then((response) => [JSON.parse(response.content)]);
|
||||
};
|
||||
|
||||
// const getModulesChoices = (z/*, bundle*/) => {
|
||||
// // For the test poll, you should get some real data, to aid the setup process.
|
||||
// const options = {
|
||||
// url: bundle.authData.url + '/api/index.php/zapierapi/getmoduleschoices',
|
||||
// };
|
||||
|
||||
// return z.request(options).then((response) => JSON.parse(response.content));
|
||||
// };
|
||||
// const getModulesChoices = () => {
|
||||
|
||||
// return {
|
||||
// orders: "Order",
|
||||
// invoices: "Invoice",
|
||||
// thirdparties: "Thirdparty",
|
||||
// users: "User",
|
||||
// tickets: "Ticket",
|
||||
// contacts: "Contacts"
|
||||
// };
|
||||
// };
|
||||
|
||||
// const getActionsChoices = (z, bundle) => {
|
||||
// // For the test poll, you should get some real data, to aid the setup process.
|
||||
// const module = bundle.inputData.module;
|
||||
// const options = {
|
||||
// url: url: bundle.authData.url + '/api/index.php/zapierapi/getactionschoices/thirparty`,
|
||||
// };
|
||||
|
||||
// return z.request(options).then((response) => JSON.parse(response.content));
|
||||
// };
|
||||
|
||||
// We recommend writing your triggers separate like this and rolling them
|
||||
// into the App definition at the end.
|
||||
module.exports = {
|
||||
key: 'ticket',
|
||||
|
||||
// You'll want to provide some helpful display labels and descriptions
|
||||
// for tickets. Zapier will put them into the UX.
|
||||
noun: 'Ticket',
|
||||
display: {
|
||||
label: 'New Ticket',
|
||||
description: 'Triggers when a new ticket action is done in Dolibarr.'
|
||||
},
|
||||
|
||||
// `operation` is where the business logic goes.
|
||||
operation: {
|
||||
|
||||
// `inputFields` can define the fields a ticket could provide,
|
||||
// we'll pass them in as `bundle.inputData` later.
|
||||
inputFields: [
|
||||
{
|
||||
key: 'action',
|
||||
type: 'string',
|
||||
required: true,
|
||||
helpText: 'Which action of ticket this should trigger on.',
|
||||
choices: {
|
||||
create: "Create",
|
||||
modify: "Modify",
|
||||
validate: "Validate",
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
type: 'hook',
|
||||
|
||||
performSubscribe: subscribeHook,
|
||||
performUnsubscribe: unsubscribeHook,
|
||||
|
||||
perform: getTicket,
|
||||
performList: getFallbackRealTicket,
|
||||
|
||||
// In cases where Zapier needs to show an example record to the user, but we are unable to get a live example
|
||||
// from the API, Zapier will fallback to this hard-coded sample. It should reflect the data structure of
|
||||
// returned records, and have obviously dummy values that we can show to any user.
|
||||
sample: {
|
||||
id: 1,
|
||||
track_id: 'Xaz123er',
|
||||
subject: 'Subject',
|
||||
message: 'Message',
|
||||
createdAt: 1472069465,
|
||||
lastname: 'DOE',
|
||||
firstname: 'John',
|
||||
email: 'john@doe.com',
|
||||
address: 'Park Avenue',
|
||||
zip: '12345',
|
||||
town: 'NEW-YORK',
|
||||
email_from: 'doe.john@example;com',
|
||||
authorId: 1,
|
||||
action: 'create'
|
||||
},
|
||||
|
||||
// If the resource can have fields that are custom on a per-user basis, define a function to fetch the custom
|
||||
// field definitions. The result will be used to augment the sample.
|
||||
// outputFields: () => { return []; }
|
||||
// Alternatively, a static field definition should be provided, to specify labels for the fields
|
||||
outputFields: [
|
||||
{
|
||||
key: 'id',
|
||||
type: "integer",
|
||||
label: 'ID'
|
||||
},
|
||||
{
|
||||
key: 'track_id',
|
||||
type: "string",
|
||||
label: 'TrackID'
|
||||
},
|
||||
{
|
||||
key: 'subject',
|
||||
type: "string",
|
||||
label: 'Subject'
|
||||
},
|
||||
{
|
||||
key: 'message',
|
||||
type: "string",
|
||||
label: 'Message'
|
||||
},
|
||||
{
|
||||
key: 'createdAt',
|
||||
type: "integer",
|
||||
label: 'Created At'
|
||||
},
|
||||
{
|
||||
key: 'lastname',
|
||||
label: 'Lastname'
|
||||
},
|
||||
{
|
||||
key: 'firstname',
|
||||
label: 'Firstname'
|
||||
},
|
||||
{
|
||||
key: 'email',
|
||||
label: 'Email'
|
||||
},
|
||||
{
|
||||
key: 'address',
|
||||
label: 'Address'
|
||||
},
|
||||
{
|
||||
key: 'zip',
|
||||
label: 'Zip'
|
||||
},
|
||||
{
|
||||
key: 'town',
|
||||
label: 'Town'
|
||||
},
|
||||
{
|
||||
key: 'email_from',
|
||||
type: 'string',
|
||||
label: 'Email from'
|
||||
},
|
||||
{
|
||||
key: 'authorId',
|
||||
type: "integer",
|
||||
label: 'Author ID'
|
||||
},
|
||||
{
|
||||
key: 'action',
|
||||
type: 'string',
|
||||
label: 'Action'
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
@@ -1,177 +0,0 @@
|
||||
const subscribeHook = (z, bundle) => {
|
||||
// `z.console.log()` is similar to `console.log()`.
|
||||
z.console.log('suscribing hook!');
|
||||
|
||||
// bundle.targetUrl has the Hook URL this app should call when an action is created.
|
||||
const data = {
|
||||
url: bundle.targetUrl,
|
||||
event: bundle.event,
|
||||
module: 'user',
|
||||
action: bundle.inputData.action
|
||||
};
|
||||
|
||||
const url = bundle.authData.url + '/api/index.php/zapierapi/hook';
|
||||
|
||||
// You can build requests and our client will helpfully inject all the variables
|
||||
// you need to complete. You can also register middleware to control this.
|
||||
const options = {
|
||||
url: url,
|
||||
method: 'POST',
|
||||
body: data,
|
||||
};
|
||||
|
||||
// You may return a promise or a normal data structure from any perform method.
|
||||
return z.request(options).then((response) => JSON.parse(response.content));
|
||||
};
|
||||
|
||||
const unsubscribeHook = (z, bundle) => {
|
||||
// bundle.subscribeData contains the parsed response JSON from the subscribe
|
||||
// request made initially.
|
||||
z.console.log('unsuscribing hook!');
|
||||
|
||||
// You can build requests and our client will helpfully inject all the variables
|
||||
// you need to complete. You can also register middleware to control this.
|
||||
const options = {
|
||||
url: bundle.authData.url + '/api/index.php/zapierapi/hook/' + bundle.subscribeData.id,
|
||||
method: 'DELETE',
|
||||
};
|
||||
|
||||
// You may return a promise or a normal data structure from any perform method.
|
||||
return z.request(options).then((response) => JSON.parse(response.content));
|
||||
};
|
||||
|
||||
const getUser = (z, bundle) => {
|
||||
// bundle.cleanedRequest will include the parsed JSON object (if it's not a
|
||||
// test poll) and also a .querystring property with the URL's query string.
|
||||
const user = {
|
||||
id: bundle.cleanedRequest.id,
|
||||
lastname: bundle.cleanedRequest.lastname,
|
||||
firstname: bundle.cleanedRequest.firstname,
|
||||
address: bundle.cleanedRequest.address,
|
||||
zip: bundle.cleanedRequest.zip,
|
||||
town: bundle.cleanedRequest.town,
|
||||
email: bundle.cleanedRequest.email,
|
||||
login: bundle.cleanedRequest.login,
|
||||
authorId: bundle.cleanedRequest.authorId,
|
||||
createdAt: bundle.cleanedRequest.createdAt,
|
||||
action: bundle.cleanedRequest.action
|
||||
};
|
||||
|
||||
return [user];
|
||||
};
|
||||
|
||||
const getFallbackRealUser = (z, bundle) => {
|
||||
// For the test poll, you should get some real data, to aid the setup process.
|
||||
const module = bundle.inputData.module;
|
||||
const options = {
|
||||
url: bundle.authData.url + '/api/index.php/users/0',
|
||||
};
|
||||
|
||||
return z.request(options).then((response) => [JSON.parse(response.content)]);
|
||||
};
|
||||
|
||||
// const getModulesChoices = (z/*, bundle*/) => {
|
||||
// // For the test poll, you should get some real data, to aid the setup process.
|
||||
// const options = {
|
||||
// url: bundle.authData.url + '/api/index.php/zapierapi/getmoduleschoices',
|
||||
// };
|
||||
|
||||
// return z.request(options).then((response) => JSON.parse(response.content));
|
||||
// };
|
||||
// const getModulesChoices = () => {
|
||||
|
||||
// return {
|
||||
// orders: "Order",
|
||||
// invoices: "Invoice",
|
||||
// thirdparties: "Thirdparty",
|
||||
// users: "User",
|
||||
// contacts: "Contacts"
|
||||
// };
|
||||
// };
|
||||
|
||||
// const getActionsChoices = (z, bundle) => {
|
||||
// // For the test poll, you should get some real data, to aid the setup process.
|
||||
// const module = bundle.inputData.module;
|
||||
// const options = {
|
||||
// url: url: bundle.authData.url + '/api/index.php/zapierapi/getactionschoices/thirparty`,
|
||||
// };
|
||||
|
||||
// return z.request(options).then((response) => JSON.parse(response.content));
|
||||
// };
|
||||
|
||||
// We recommend writing your triggers separate like this and rolling them
|
||||
// into the App definition at the end.
|
||||
module.exports = {
|
||||
key: 'user',
|
||||
|
||||
// You'll want to provide some helpful display labels and descriptions
|
||||
// for users. Zapier will put them into the UX.
|
||||
noun: 'User',
|
||||
display: {
|
||||
label: 'New User',
|
||||
description: 'Triggers when a new user action is done in Dolibarr.'
|
||||
},
|
||||
|
||||
// `operation` is where the business logic goes.
|
||||
operation: {
|
||||
|
||||
// `inputFields` can define the fields a user could provide,
|
||||
// we'll pass them in as `bundle.inputData` later.
|
||||
inputFields: [
|
||||
{
|
||||
key: 'action',
|
||||
required: true,
|
||||
type: 'string',
|
||||
helpText: 'Which action of user this should trigger on.',
|
||||
choices: {
|
||||
create: "Create",
|
||||
modify: "Modify",
|
||||
validate: "Validate",
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
type: 'hook',
|
||||
|
||||
performSubscribe: subscribeHook,
|
||||
performUnsubscribe: unsubscribeHook,
|
||||
|
||||
perform: getUser,
|
||||
performList: getFallbackRealUser,
|
||||
|
||||
// In cases where Zapier needs to show an example record to the user, but we are unable to get a live example
|
||||
// from the API, Zapier will fallback to this hard-coded sample. It should reflect the data structure of
|
||||
// returned records, and have obviously dummy values that we can show to any user.
|
||||
sample: {
|
||||
id: 1,
|
||||
createdAt: 1472069465,
|
||||
lastname: 'DOE',
|
||||
firstname: 'John',
|
||||
email: 'john@doe.com',
|
||||
address: 'Park Avenue',
|
||||
zip: '12345',
|
||||
town: 'NEW-YORK',
|
||||
login: 'doe.john',
|
||||
authorId: 1,
|
||||
action: 'create'
|
||||
},
|
||||
|
||||
// If the resource can have fields that are custom on a per-user basis, define a function to fetch the custom
|
||||
// field definitions. The result will be used to augment the sample.
|
||||
// outputFields: () => { return []; }
|
||||
// Alternatively, a static field definition should be provided, to specify labels for the fields
|
||||
outputFields: [
|
||||
{key: 'id', type: "integer", label: 'ID'},
|
||||
{key: 'createdAt', type: "integer", label: 'Created At'},
|
||||
{key: 'lastname', label: 'Lastname'},
|
||||
{key: 'firstname', label: 'Firstname'},
|
||||
{key: 'email', label: 'Email'},
|
||||
{key: 'address', label: 'Address'},
|
||||
{key: 'zip', label: 'Zip'},
|
||||
{key: 'town', label: 'Town'},
|
||||
{key: 'login', label: 'Login'},
|
||||
{key: 'authorId', type: "integer", label: 'Author ID'},
|
||||
{key: 'action', label: 'Action'}
|
||||
]
|
||||
}
|
||||
};
|
||||
231
dev/initdata/dbf/import-dbf.php
Normal file
231
dev/initdata/dbf/import-dbf.php
Normal file
@@ -0,0 +1,231 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* WARNING, THIS WILL LOAD MASS DATA ON YOUR INSTANCE
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file dev/initdata/import-dbf.php
|
||||
* \brief Script example to create a table from a large DBF file (openoffice)
|
||||
* To purge data, you can have a look at purge-data.php
|
||||
*/
|
||||
// Test si mode batch
|
||||
$sapi_type = php_sapi_name();
|
||||
$script_file = basename(__FILE__);
|
||||
|
||||
$path = dirname(__FILE__) . '/';
|
||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
// Recupere root dolibarr
|
||||
$path = dirname($_SERVER["PHP_SELF"]);
|
||||
require $path . "./../htdocs/master.inc.php";
|
||||
require $path . "/includes/dbase.class.php";
|
||||
|
||||
// Global variables
|
||||
$version = DOL_VERSION;
|
||||
$confirmed = 1;
|
||||
$error = 0;
|
||||
|
||||
|
||||
/*
|
||||
* Main
|
||||
*/
|
||||
|
||||
@set_time_limit(0);
|
||||
print "***** " . $script_file . " (" . $version . ") pid=" . dol_getmypid() . " *****\n";
|
||||
dol_syslog($script_file . " launched with arg " . implode(',', $argv));
|
||||
|
||||
|
||||
$filepath = $argv[1];
|
||||
$filepatherr = $filepath . '.err';
|
||||
$startchar = empty($argv[2]) ? 0 : (int) $argv[2];
|
||||
$deleteTable = empty($argv[3]) ? 1 : 0;
|
||||
$startlinenb = empty($argv[3]) ? 1 : (int) $argv[3];
|
||||
$endlinenb = empty($argv[4]) ? 0 : (int) $argv[4];
|
||||
|
||||
if (empty($filepath)) {
|
||||
print "Usage: php $script_file myfilepath.dbf [removeChatColumnName] [startlinenb] [endlinenb]\n";
|
||||
print "Example: php $script_file myfilepath.dbf 0 2 1002\n";
|
||||
print "\n";
|
||||
exit(-1);
|
||||
}
|
||||
if (!file_exists($filepath)) {
|
||||
print "Error: File " . $filepath . " not found.\n";
|
||||
print "\n";
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
$ret = $user->fetch('', 'admin');
|
||||
if (!$ret > 0) {
|
||||
print 'A user with login "admin" and all permissions must be created to use this script.' . "\n";
|
||||
exit;
|
||||
}
|
||||
$user->getrights();
|
||||
|
||||
// Ask confirmation
|
||||
if (!$confirmed) {
|
||||
print "Hit Enter to continue or CTRL+C to stop...\n";
|
||||
$input = trim(fgets(STDIN));
|
||||
}
|
||||
|
||||
// Open input and output files
|
||||
$fhandle = dbase_open($filepath, 0);
|
||||
if (!$fhandle) {
|
||||
print 'Error: Failed to open file ' . $filepath . "\n";
|
||||
exit(1);
|
||||
}
|
||||
$fhandleerr = fopen($filepatherr, 'w');
|
||||
if (!$fhandleerr) {
|
||||
print 'Error: Failed to open file ' . $filepatherr . "\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$langs->setDefaultLang($defaultlang);
|
||||
|
||||
$record_numbers = dbase_numrecords($fhandle);
|
||||
$table_name = substr(basename($filepath), 0, strpos(basename($filepath), '.'));
|
||||
print 'Info: ' . $record_numbers . " lines in file \n";
|
||||
$header = dbase_get_header_info($fhandle);
|
||||
if ($deleteTable) {
|
||||
$db->query("DROP TABLE IF EXISTS `$table_name`");
|
||||
}
|
||||
$sqlCreate = "CREATE TABLE IF NOT EXISTS `$table_name` ( `id` INT(11) NOT NULL AUTO_INCREMENT ";
|
||||
$fieldArray = array("`id`");
|
||||
foreach ($header as $value) {
|
||||
$fieldName = substr(str_replace('_', '', $value['name']), $startchar);
|
||||
$fieldArray[] = "`$fieldName`";
|
||||
$sqlCreate .= ", `" . $fieldName . "` VARCHAR({$value['length']}) NULL DEFAULT NULL ";
|
||||
}
|
||||
$sqlCreate .= ", PRIMARY KEY (`id`)) ENGINE = InnoDB";
|
||||
$resql = $db->query($sqlCreate);
|
||||
if ($resql !== false) {
|
||||
print "Table $table_name created\n";
|
||||
} else {
|
||||
var_dump($db->errno());
|
||||
print "Impossible : " . $sqlCreate . "\n";
|
||||
die();
|
||||
}
|
||||
|
||||
$i = 0;
|
||||
$nboflines++;
|
||||
|
||||
$fields = implode(',', $fieldArray);
|
||||
//var_dump($fieldArray);die();
|
||||
$maxLength = 0;
|
||||
for ($i = 1; $i <= $record_numbers; $i++) {
|
||||
if ($startlinenb && $i < $startlinenb)
|
||||
continue;
|
||||
if ($endlinenb && $i > $endlinenb)
|
||||
continue;
|
||||
$row = dbase_get_record_with_names($fhandle, $i);
|
||||
if ($row === false || (isset($row["deleted"]) && $row["deleted"] == '1'))
|
||||
continue;
|
||||
$sqlInsert = "INSERT INTO `$table_name`($fields) VALUES (null,";
|
||||
array_shift($row); // remove delete column
|
||||
foreach ($row as $value) {
|
||||
$sqlInsert .= "'" . $db->escape(utf8_encode($value)) . "', ";
|
||||
}
|
||||
replaceable_echo(implode("\t", $row));
|
||||
$sqlInsert = rtrim($sqlInsert, ', ');
|
||||
$sqlInsert .= ")";
|
||||
$resql = $db->query($sqlInsert);
|
||||
if ($resql === false) {
|
||||
print "Impossible : " . $sqlInsert . "\n";
|
||||
var_dump($row, $db->errno());
|
||||
die();
|
||||
}
|
||||
// $fields = (object) $row;
|
||||
// var_dump($fields);
|
||||
continue;
|
||||
}
|
||||
die();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// commit or rollback
|
||||
print "Nb of lines qualified: " . $nboflines . "\n";
|
||||
print "Nb of errors: " . $error . "\n";
|
||||
if ($mode != 'confirmforced' && ($error || $mode != 'confirm')) {
|
||||
print "Rollback any changes.\n";
|
||||
$db->rollback();
|
||||
} else {
|
||||
print "Commit all changes.\n";
|
||||
$db->commit();
|
||||
}
|
||||
|
||||
$db->close();
|
||||
fclose($fhandle);
|
||||
fclose($fhandleerr);
|
||||
|
||||
exit($error);
|
||||
|
||||
|
||||
/**
|
||||
* replaceable_echo
|
||||
*
|
||||
* @param string $message Message
|
||||
* @param int $force_clear_lines Force clear messages
|
||||
* @return void
|
||||
*/
|
||||
function replaceable_echo($message, $force_clear_lines = null)
|
||||
{
|
||||
static $last_lines = 0;
|
||||
|
||||
if (!is_null($force_clear_lines)) {
|
||||
$last_lines = $force_clear_lines;
|
||||
}
|
||||
|
||||
$toss = array();
|
||||
$status = 0;
|
||||
$term_width = exec('tput cols', $toss, $status);
|
||||
if ($status) {
|
||||
$term_width = 64; // Arbitrary fall-back term width.
|
||||
}
|
||||
|
||||
$line_count = 0;
|
||||
foreach (explode("\n", $message) as $line) {
|
||||
$line_count += count(str_split($line, $term_width));
|
||||
}
|
||||
|
||||
// Erasure MAGIC: Clear as many lines as the last output had.
|
||||
for ($i = 0; $i < $last_lines; $i++) {
|
||||
// Return to the beginning of the line
|
||||
echo "\r";
|
||||
// Erase to the end of the line
|
||||
echo "\033[K";
|
||||
// Move cursor Up a line
|
||||
echo "\033[1A";
|
||||
// Return to the beginning of the line
|
||||
echo "\r";
|
||||
// Erase to the end of the line
|
||||
echo "\033[K";
|
||||
// Return to the beginning of the line
|
||||
echo "\r";
|
||||
// Can be consolodated into
|
||||
// echo "\r\033[K\033[1A\r\033[K\r";
|
||||
}
|
||||
|
||||
$last_lines = $line_count;
|
||||
|
||||
echo $message . "\n";
|
||||
}
|
||||
241
dev/initdata/dbf/importdb-products.php
Normal file
241
dev/initdata/dbf/importdb-products.php
Normal file
@@ -0,0 +1,241 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* WARNING, THIS WILL LOAD MASS DATA ON YOUR INSTANCE
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file dev/initdata/import-product.php
|
||||
* \brief Script example to insert products from a csv file.
|
||||
* To purge data, you can have a look at purge-data.php
|
||||
*/
|
||||
// Test si mode batch
|
||||
$sapi_type = php_sapi_name();
|
||||
$script_file = basename(__FILE__);
|
||||
$path = dirname(__FILE__) . '/';
|
||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
// Recupere root dolibarr
|
||||
$path = preg_replace('/importdb-products.php/i', '', $_SERVER["PHP_SELF"]);
|
||||
require $path . "../../htdocs/master.inc.php";
|
||||
require $path . "includes/dbase.class.php";
|
||||
include_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
|
||||
|
||||
//$delimiter = ',';
|
||||
//$enclosure = '"';
|
||||
//$linelength = 10000;
|
||||
//$escape = '/';
|
||||
// Global variables
|
||||
$version = DOL_VERSION;
|
||||
$confirmed = 1;
|
||||
$error = 0;
|
||||
|
||||
$tvas = [
|
||||
'1' => "20.00",
|
||||
'2' => "5.50",
|
||||
'3' => "0.00",
|
||||
'4' => "20.60",
|
||||
'5' => "19.60",
|
||||
];
|
||||
$tvasD = [
|
||||
'1' => "20",
|
||||
'2' => "5.5",
|
||||
'3' => "0",
|
||||
'4' => "20",
|
||||
'5' => "20",
|
||||
];
|
||||
|
||||
/*
|
||||
* Main
|
||||
*/
|
||||
|
||||
@set_time_limit(0);
|
||||
print "***** " . $script_file . " (" . $version . ") pid=" . dol_getmypid() . " *****\n";
|
||||
dol_syslog($script_file . " launched with arg " . implode(',', $argv));
|
||||
|
||||
$table = $argv[1];
|
||||
|
||||
if (empty($argv[1])) {
|
||||
print "Error: Which table ?\n";
|
||||
print "\n";
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
$ret = $user->fetch('', 'admin');
|
||||
if (!$ret > 0) {
|
||||
print 'A user with login "admin" and all permissions must be created to use this script.' . "\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
$sql = "SELECT * FROM `$table` WHERE 1";
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
while ($fields = $db->fetch_array($resql)) {
|
||||
$errorrecord = 0;
|
||||
if ($fields === false)
|
||||
continue;
|
||||
$nboflines++;
|
||||
|
||||
$produit = new Product($db);
|
||||
$produit->type = 0;
|
||||
$produit->status = 1;
|
||||
$produit->ref = trim($fields['REF']);
|
||||
if ($produit->ref == '')
|
||||
continue;
|
||||
print "Process line nb " . $j . ", ref " . $produit->ref;
|
||||
$produit->label = trim($fields['LIBELLE']);
|
||||
if ($produit->label == '')
|
||||
$produit->label = $produit->ref;
|
||||
if (empty($produit->label))
|
||||
continue;
|
||||
//$produit->description = trim($fields[4] . "\n" . ($fields[5] ? $fields[5] . ' x ' . $fields[6] . ' x ' . $fields[7] : ''));
|
||||
// $produit->volume = price2num($fields[8]);
|
||||
// $produit->volume_unit = 0;
|
||||
$produit->weight = price2num($fields['MASSE']);
|
||||
$produit->weight_units = 0; // -3 = g
|
||||
//$produit->customcode = $fields[10];
|
||||
$produit->barcode = str_pad($fields['CODE'], 12, "0", STR_PAD_LEFT);
|
||||
$produit->barcode_type = '2';
|
||||
$produit->import_key = $fields['CODE'];
|
||||
|
||||
$produit->status = 1;
|
||||
$produit->status_buy = 1;
|
||||
|
||||
$produit->finished = 1;
|
||||
|
||||
// $produit->multiprices[0] = price2num($fields['TARIF0']);
|
||||
// $produit->multiprices[1] = price2num($fields['TARIF1']);
|
||||
// $produit->multiprices[2] = price2num($fields['TARIF2']);
|
||||
// $produit->multiprices[3] = price2num($fields['TARIF3']);
|
||||
// $produit->multiprices[4] = price2num($fields['TARIF4']);
|
||||
// $produit->multiprices[5] = price2num($fields['TARIF5']);
|
||||
// $produit->multiprices[6] = price2num($fields['TARIF6']);
|
||||
// $produit->multiprices[7] = price2num($fields['TARIF7']);
|
||||
// $produit->multiprices[8] = price2num($fields['TARIF8']);
|
||||
// $produit->multiprices[9] = price2num($fields['TARIF9']);
|
||||
// $produit->price_min = null;
|
||||
// $produit->price_min_ttc = null;
|
||||
// $produit->price = price2num($fields[11]);
|
||||
// $produit->price_ttc = price2num($fields[12]);
|
||||
// $produit->price_base_type = 'TTC';
|
||||
// $produit->tva_tx = price2num($fields[13]);
|
||||
$produit->tva_tx = (int) ($tvas[$fields['CODTVA']]);
|
||||
$produit->tva_npr = 0;
|
||||
// $produit->cost_price = price2num($fields[16]);
|
||||
//compta
|
||||
|
||||
$produit->accountancy_code_buy = trim($fields['COMACH']);
|
||||
$produit->accountancy_code_sell = trim($fields['COMVEN']);
|
||||
// $produit->accountancy_code_sell_intra=trim($fields['COMVEN']);
|
||||
// $produit->accountancy_code_sell_export=trim($fields['COMVEN']);
|
||||
// Extrafields
|
||||
// $produit->array_options['options_ecotaxdeee'] = price2num($fields[17]);
|
||||
|
||||
$produit->seuil_stock_alerte = $fields['STALERTE'];
|
||||
$ret = $produit->create($user, 0);
|
||||
if ($ret < 0) {
|
||||
print " - Error in create result code = " . $ret . " - " . $produit->errorsToString();
|
||||
$errorrecord++;
|
||||
} else {
|
||||
print " - Creation OK with ref " . $produit->ref . " - id = " . $ret;
|
||||
}
|
||||
|
||||
dol_syslog("Add prices");
|
||||
|
||||
// If we use price level, insert price for each level
|
||||
if (!$errorrecord && 1) {
|
||||
//$ret1 = $produit->updatePrice($produit->price_ttc, $produit->price_base_type, $user, $produit->tva_tx, $produit->price_min, 1, $produit->tva_npr, 0, 0, array());
|
||||
$ret1 = false;
|
||||
for ($i = 0; $i < 10; $i++) {
|
||||
if ($fields['TARIF' . ($i)] == 0)
|
||||
continue;
|
||||
$ret1 = $ret1 || $produit->updatePrice(price2num($fields['TARIF' . ($i)]), 'HT', $user, $produit->tva_tx, $produit->price_min, $i + 1, $produit->tva_npr, 0, 0, array()) < 0;
|
||||
}
|
||||
if ($ret1) {
|
||||
print " - Error in updatePrice result " . $produit->errorsToString();
|
||||
$errorrecord++;
|
||||
} else {
|
||||
print " - updatePrice OK";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// dol_syslog("Add multilangs");
|
||||
// Add alternative languages
|
||||
// if (!$errorrecord && 1) {
|
||||
// $produit->multilangs['fr_FR'] = array('label' => $produit->label, 'description' => $produit->description, 'note' => $produit->note_private);
|
||||
// $produit->multilangs['en_US'] = array('label' => $fields[3], 'description' => $produit->description, 'note' => $produit->note_private);
|
||||
//
|
||||
// $ret = $produit->setMultiLangs($user);
|
||||
// if ($ret < 0) {
|
||||
// print " - Error in setMultiLangs result code = " . $ret . " - " . $produit->errorsToString();
|
||||
// $errorrecord++;
|
||||
// } else {
|
||||
// print " - setMultiLangs OK";
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
dol_syslog("Add stocks");
|
||||
// stocks
|
||||
if (!$errorrecord && $fields['STOCK'] != 0) {
|
||||
$rets = $produit->correct_stock($user, 1, $fields['STOCK'], 0, 'Stock importé');
|
||||
if ($rets < 0) {
|
||||
print " - Error in correct_stock result " . $produit->errorsToString();
|
||||
$errorrecord++;
|
||||
} else {
|
||||
print " - correct_stock OK";
|
||||
}
|
||||
}
|
||||
|
||||
//update date créa
|
||||
if (!$errorrecord) {
|
||||
$date = substr($fields['DATCREA'], 0, 4) . '-' . substr($fields['DATCREA'], 4, 2) . '-' . substr($fields['DATCREA'], 6, 2);
|
||||
$retd = $db->query("UPDATE `llx_product` SET `datec` = '$date 00:00:00' WHERE `llx_product`.`rowid` = $produit->id");
|
||||
if ($retd < 1) {
|
||||
print " - Error in update date créa result " . $produit->errorsToString();
|
||||
$errorrecord++;
|
||||
} else {
|
||||
print " - update date créa OK";
|
||||
}
|
||||
}
|
||||
print "\n";
|
||||
|
||||
if ($errorrecord) {
|
||||
print( 'Error on record nb ' . $i . " - " . $produit->errorsToString() . "\n");
|
||||
var_dump($db);
|
||||
die();
|
||||
$error++; // $errorrecord will be reset
|
||||
}
|
||||
$j++;
|
||||
} else
|
||||
die("error : $sql");
|
||||
|
||||
|
||||
|
||||
|
||||
// commit or rollback
|
||||
print "Nb of lines qualified: " . $nboflines . "\n";
|
||||
print "Nb of errors: " . $error . "\n";
|
||||
$db->close();
|
||||
|
||||
exit($error);
|
||||
355
dev/initdata/dbf/importdb-thirdparties.php
Normal file
355
dev/initdata/dbf/importdb-thirdparties.php
Normal file
@@ -0,0 +1,355 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* WARNING, THIS WILL LOAD MASS DATA ON YOUR INSTANCE
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file dev/initdata/import-product.php
|
||||
* \brief Script example to insert products from a csv file.
|
||||
* To purge data, you can have a look at purge-data.php
|
||||
*/
|
||||
// Test si mode batch
|
||||
$sapi_type = php_sapi_name();
|
||||
$script_file = basename(__FILE__);
|
||||
$path = dirname(__FILE__) . '/';
|
||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
// Recupere root dolibarr
|
||||
$path = preg_replace('/importdb-thirdparties.php/i', '', $_SERVER["PHP_SELF"]);
|
||||
require $path . "../../htdocs/master.inc.php";
|
||||
require $path . "includes/dbase.class.php";
|
||||
include_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
|
||||
|
||||
//$delimiter = ',';
|
||||
//$enclosure = '"';
|
||||
//$linelength = 10000;
|
||||
//$escape = '/';
|
||||
// Global variables
|
||||
$version = DOL_VERSION;
|
||||
$confirmed = 1;
|
||||
$error = 0;
|
||||
|
||||
$civilPrivate = array("MLLE",
|
||||
"MM",
|
||||
"MM/MADAME",
|
||||
"MME",
|
||||
"MME.",
|
||||
"MME²",
|
||||
"MMONSIEUR",
|
||||
"MMR",
|
||||
"MOBNSIEUR",
|
||||
"MOMSIEUR",
|
||||
"MON SIEUR",
|
||||
"MONDIAL",
|
||||
"MONIEUR",
|
||||
"MONJSIEUR",
|
||||
"MONNSIEUR",
|
||||
"MONRIEUR",
|
||||
"MONS",
|
||||
"MONSIEÕR",
|
||||
"MONSIER",
|
||||
"MONSIERU",
|
||||
"MONSIEU",
|
||||
"monsieue",
|
||||
"MONSIEUR",
|
||||
"Monsieur \"",
|
||||
"MONSIEUR \"",
|
||||
"MONSIEUR E",
|
||||
"MONSIEUR DENIS",
|
||||
"MONSIEUR ET MME",
|
||||
"MONSIEUR!",
|
||||
"MONSIEUR.",
|
||||
"MONSIEUR.MADAME",
|
||||
"MONSIEUR3",
|
||||
"MONSIEURN",
|
||||
"MONSIEURT",
|
||||
"MONSIEUR£",
|
||||
"MONSIEYR",
|
||||
"Monsigur",
|
||||
"MONSIIEUR",
|
||||
"MONSIUER",
|
||||
"MONSIZEUR",
|
||||
"MOPNSIEUR",
|
||||
"MOSIEUR",
|
||||
"MR",
|
||||
"Mr Mme",
|
||||
"Mr - MME",
|
||||
"MR BLANC",
|
||||
"MR ET MME",
|
||||
"mr mm",
|
||||
"MR OU MME",
|
||||
"Mr.",
|
||||
"MR/MME",
|
||||
"MRME",
|
||||
"MRR",
|
||||
"Mrs",
|
||||
"Mademoiselle",
|
||||
"MADAOME",
|
||||
"madamme",
|
||||
"MADAME",
|
||||
"M0NSIEUR",
|
||||
"M.et Madame",
|
||||
"M. ET MR",
|
||||
"M.",
|
||||
"M%",
|
||||
"M MME",
|
||||
"M ET MME",
|
||||
"M",
|
||||
"M CROCE",
|
||||
"M DIEVART",
|
||||
);
|
||||
|
||||
/*
|
||||
* Main
|
||||
*/
|
||||
|
||||
@set_time_limit(0);
|
||||
print "***** " . $script_file . " (" . $version . ") pid=" . dol_getmypid() . " *****\n";
|
||||
dol_syslog($script_file . " launched with arg " . implode(',', $argv));
|
||||
|
||||
$table = $argv[1];
|
||||
|
||||
if (empty($argv[1])) {
|
||||
print "Error: Quelle table ?\n";
|
||||
print "\n";
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
$ret = $user->fetch('', 'admin');
|
||||
if (!$ret > 0) {
|
||||
print 'A user with login "admin" and all permissions must be created to use this script.' . "\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
$sql = "SELECT * FROM `$table` WHERE 1 "; //ORDER BY REMISE DESC,`LCIVIL` DESC";
|
||||
$resql = $db->query($sql);
|
||||
//$db->begin();
|
||||
if ($resql)
|
||||
while ($fields = $db->fetch_array($resql)) {
|
||||
$i++;
|
||||
$errorrecord = 0;
|
||||
|
||||
if ($startlinenb && $i < $startlinenb)
|
||||
continue;
|
||||
if ($endlinenb && $i > $endlinenb)
|
||||
continue;
|
||||
|
||||
$nboflines++;
|
||||
|
||||
$object = new Societe($db);
|
||||
$object->import_key = $fields['CODE'];
|
||||
$object->state = 1;
|
||||
$object->client = 3;
|
||||
$object->fournisseur = 0;
|
||||
|
||||
$object->name = $fields['FCIVIL'] . ' ' . $fields['FNOM'];
|
||||
//$object->name_alias = $fields[0] != $fields[13] ? trim($fields[0]) : '';
|
||||
|
||||
$date = $fields['DATCREA'] ? $fields['DATCREA'] : ($fields['DATMOD'] ? $fields['DATMOD'] : '20200101');
|
||||
$object->code_client = 'CU' . substr($date, 2, 2) . substr($date, 4, 2) . '-' . str_pad(substr($fields['CODE'], 0, 5), 5, "0", STR_PAD_LEFT);
|
||||
|
||||
|
||||
$object->address = trim($fields['FADR1']);
|
||||
if ($fields['FADR2'])
|
||||
$object->address .= "\n" . trim($fields['FADR2']);
|
||||
if ($fields['FADR3'])
|
||||
$object->address .= "\n" . trim($fields['FADR3']);
|
||||
|
||||
$object->zip = trim($fields['FPOSTE']);
|
||||
$object->town = trim($fields['FVILLE']);
|
||||
if ($fields['FPAYS'])
|
||||
$object->country_id = dol_getIdFromCode($db, trim(ucwords(strtolower($fields['FPAYS']))), 'c_country', 'label', 'rowid');
|
||||
else
|
||||
$object->country_id = 1;
|
||||
$object->phone = trim($fields['FTEL']) ? trim($fields['FTEL']) : trim($fields['FCONTACT']);
|
||||
$object->phone = substr($object->phone, 0, 20);
|
||||
$object->fax = trim($fields['FFAX']) ? trim($fields['FFAX']) : trim($fields['FCONTACT']);
|
||||
$object->fax = substr($object->fax, 0, 20);
|
||||
$object->email = trim($fields['FMAIL']);
|
||||
// $object->idprof2 = trim($fields[29]);
|
||||
$object->tva_intra = str_replace(['.', ' '], '', $fields['TVAINTRA']);
|
||||
$object->tva_intra = substr($object->tva_intra, 0, 20);
|
||||
$object->default_lang = 'fr_FR';
|
||||
|
||||
$object->cond_reglement_id = dol_getIdFromCode($db, 'PT_ORDER', 'c_payment_term', 'code', 'rowid', 1);
|
||||
$object->multicurrency_code = 'EUR';
|
||||
|
||||
if ($fields['REMISE'] != '0.00') {
|
||||
$object->remise_percent = abs($fields['REMISE']);
|
||||
}
|
||||
|
||||
// $object->code_client = $fields[9];
|
||||
// $object->code_fournisseur = $fields[10];
|
||||
|
||||
|
||||
if ($fields['FCIVIL']) {
|
||||
$labeltype = in_array($fields['FCIVIL'], $civilPrivate) ? 'TE_PRIVATE' : 'TE_SMALL';
|
||||
$object->typent_id = dol_getIdFromCode($db, $labeltype, 'c_typent', 'code');
|
||||
}
|
||||
|
||||
// Set price level
|
||||
$object->price_level = $fields['TARIF'] + 1;
|
||||
// if ($labeltype == 'Revendeur')
|
||||
// $object->price_level = 2;
|
||||
|
||||
print "Process line nb " . $i . ", code " . $fields['CODE'] . ", name " . $object->name;
|
||||
|
||||
|
||||
// Extrafields
|
||||
$object->array_options['options_banque'] = $fields['BANQUE'];
|
||||
$object->array_options['options_banque2'] = $fields['BANQUE2'];
|
||||
$object->array_options['options_banquevalid'] = $fields['VALID'];
|
||||
|
||||
if (!$errorrecord) {
|
||||
$ret = $object->create($user);
|
||||
if ($ret < 0) {
|
||||
print " - Error in create result code = " . $ret . " - " . $object->errorsToString();
|
||||
$errorrecord++;
|
||||
var_dump($object->code_client, $db);
|
||||
die();
|
||||
} else {
|
||||
print " - Creation OK with name " . $object->name . " - id = " . $ret;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$errorrecord) {
|
||||
dol_syslog("Set price level");
|
||||
$object->set_price_level($object->price_level, $user);
|
||||
}
|
||||
if (!$errorrecord && @$object->remise_percent) {
|
||||
dol_syslog("Set remise client");
|
||||
$object->set_remise_client($object->remise_percent, 'Importé', $user);
|
||||
}
|
||||
|
||||
dol_syslog("Add contact");
|
||||
// Insert an invoice contact if there is an invoice email != standard email
|
||||
if (!$errorrecord && ($fields['LCIVIL'] || $fields['LNOM'])) {
|
||||
$madame = array("MADAME",
|
||||
"MADEMOISELLE",
|
||||
"MELLE",
|
||||
"MLLE",
|
||||
"MM",
|
||||
"Mme",
|
||||
"MNE",
|
||||
);
|
||||
$monsieur = array("M",
|
||||
"M ET MME",
|
||||
"M MME",
|
||||
"M.",
|
||||
"M. MME",
|
||||
"M. OU Mme",
|
||||
"M.ou Madame",
|
||||
"MONSEUR",
|
||||
"MONSIER",
|
||||
"MONSIEU",
|
||||
"MONSIEUR",
|
||||
"monsieur:mme",
|
||||
"MONSIEUR¨",
|
||||
"MONSIEZUR",
|
||||
"MONSIUER",
|
||||
"MONSKIEUR",
|
||||
"MR",
|
||||
);
|
||||
$ret1 = $ret2 = 0;
|
||||
|
||||
$contact = new Contact($db);
|
||||
if (in_array($fields['LCIVIL'], $madame)) {
|
||||
// une dame
|
||||
$contact->civility_id = 'MME';
|
||||
$contact->lastname = $fields['LNOM'];
|
||||
} elseif (in_array($fields['LCIVIL'], $monsieur)) {
|
||||
// un monsieur
|
||||
$contact->civility_id = 'MR';
|
||||
$contact->lastname = $fields['LNOM'];
|
||||
} elseif (in_array($fields['LCIVIL'], ['DOCTEUR'])) {
|
||||
// un monsieur
|
||||
$contact->civility_id = 'DR';
|
||||
$contact->lastname = $fields['LNOM'];
|
||||
} else {
|
||||
// un a rattraper
|
||||
$contact->lastname = $fields['LCIVIL'] . " " . $fields['LNOM'];
|
||||
}
|
||||
$contact->address = trim($fields['LADR1']);
|
||||
if ($fields['LADR2'])
|
||||
$contact->address .= "\n" . trim($fields['LADR2']);
|
||||
if ($fields['LADR3'])
|
||||
$contact->address .= "\n" . trim($fields['LADR3']);
|
||||
|
||||
$contact->zip = trim($fields['LPOSTE']);
|
||||
$contact->town = trim($fields['LVILLE']);
|
||||
if ($fields['FPAYS'])
|
||||
$contact->country_id = dol_getIdFromCode($db, trim(ucwords(strtolower($fields['LPAYS']))), 'c_country', 'label', 'rowid');
|
||||
else
|
||||
$contact->country_id = 1;
|
||||
$contact->email = $fields['LMAIL'];
|
||||
$contact->phone = trim($fields['LTEL']) ? trim($fields['LTEL']) : trim($fields['LCONTACT']);
|
||||
$contact->fax = trim($fields['LFAX']) ? trim($fields['LFAX']) : trim($fields['LCONTACT']);
|
||||
$contact->socid = $object->id;
|
||||
|
||||
$ret1 = $contact->create($user);
|
||||
if ($ret1 > 0) {
|
||||
//$ret2=$contact->add_contact($object->id, 'BILLING');
|
||||
}
|
||||
if ($ret1 < 0 || $ret2 < 0) {
|
||||
print " - Error in create contact result code = " . $ret1 . " " . $ret2 . " - " . $contact->errorsToString();
|
||||
$errorrecord++;
|
||||
} else {
|
||||
print " - create contact OK";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//update date créa
|
||||
if (!$errorrecord) {
|
||||
$datec = substr($date, 0, 4) . '-' . substr($date, 4, 2) . '-' . substr($date, 6, 2);
|
||||
$retd = $db->query("UPDATE `llx_societe` SET `datec` = '$datec 00:00:00' WHERE `rowid` = $object->id");
|
||||
if ($retd < 1) {
|
||||
print " - Error in update date créa result " . $object->errorsToString();
|
||||
$errorrecord++;
|
||||
} else {
|
||||
print " - update date créa OK";
|
||||
}
|
||||
}
|
||||
print "\n";
|
||||
|
||||
if ($errorrecord) {
|
||||
print( 'Error on record nb ' . $i . " - " . $object->errorsToString() . "\n");
|
||||
var_dump($db, $object, $contact);
|
||||
// $db->rollback();
|
||||
die();
|
||||
$error++; // $errorrecord will be reset
|
||||
}
|
||||
$j++;
|
||||
} else
|
||||
die("error : $sql");
|
||||
|
||||
$db->commit();
|
||||
|
||||
|
||||
|
||||
// commit or rollback
|
||||
print "Nb of lines qualified: " . $nboflines . "\n";
|
||||
print "Nb of errors: " . $error . "\n";
|
||||
$db->close();
|
||||
|
||||
exit($error);
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user