diff --git a/.gitattributes b/.gitattributes
index c5785ace780..4b0ed3d14b5 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -31,3 +31,22 @@
*.frm binary
*.MYD binary
*.MYI binary
+
+# Export ignores to generate clean production tarballs
+/build export-ignore
+/dev export-ignore
+/doc export-ignore
+/test export-ignore
+.buildpath export-ignore
+/build.xml export-ignore
+.codeclimate.yml export-ignore
+Dockerfile export-ignore
+.dockerignore export-ignore
+.editorconfig export-ignore
+.gitattributes export-ignore
+.gitignore export-ignore
+.mailmap export-ignore
+.scrutinizer.yml export-ignore
+.settings export-ignore
+.travis.yml export-ignore
+.tx export-ignore
diff --git a/.travis.yml b/.travis.yml
index 426c6b97d74..bb6b774d9ab 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -113,6 +113,7 @@ before_script:
echo Start travis
echo Current dir is `pwd`
echo Home dir is `echo ~`
+ echo TRAVIS_BUILD_DIR is $TRAVIS_BUILD_DIR
- |
echo "Re-enabling Xdebug for PHP CodeSniffer and PHP Unit"
@@ -154,7 +155,7 @@ before_script:
mysql -e "SELECT VERSION();"
echo
fi
-
+
- |
echo "Setting up database"
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then
@@ -171,8 +172,8 @@ before_script:
echo
- |
- echo "Setting up Dolibarr"
export CONF_FILE=htdocs/conf/conf.php
+ echo "Setting up Dolibarr $CONF_FILE"
echo ' $CONF_FILE
echo '$'dolibarr_main_url_root=\'http://127.0.0.1\'';' >> $CONF_FILE
echo '$'dolibarr_main_document_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $CONF_FILE
@@ -189,15 +190,9 @@ before_script:
#fi
# TODO: SQLite
echo '$'dolibarr_main_authentication=\'dolibarr\'';' >> $CONF_FILE
+ cat $CONF_FILE
echo
-- |
- if [ "$DEBUG" = true ]; then
- echo "Debugging informations"
- cat $CONF_FILE
- echo
- fi
-
- |
echo "Create documents directory and set permissions"
# and admin/temp subdirectory needed for unit tests
@@ -274,12 +269,16 @@ script:
cd htdocs/install
php upgrade.php 3.5.0 3.6.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade350360.log
php upgrade2.php 3.5.0 3.6.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade350360-2.log
+ php step5.php 3.5.0 3.6.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade350360-3.log
php upgrade.php 3.6.0 3.7.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade360370.log
php upgrade2.php 3.6.0 3.7.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade360370-2.log
+ php step5.php 3.6.0 3.7.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade360370-3.log
php upgrade.php 3.7.0 3.8.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade370380.log
php upgrade2.php 3.7.0 3.8.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade370380-2.log
+ php step5.php 3.7.0 3.8.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade370380-3.log
php upgrade.php 3.8.0 3.9.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade380390.log
php upgrade2.php 3.8.0 3.9.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade380390-2.log
+ php step5.php 3.8.0 3.9.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade380390-3.log
cd -
set +e
echo
@@ -311,3 +310,4 @@ after_failure:
fi
after_script:
+
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index ab328c8e785..6a188d04abb 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -76,7 +76,7 @@ Feel free to express technical details, use cases or anything relevant to the cu
This section can span multiple lines.
-Try to keep lines under 72 characters.
+Try to keep lines under 120 characters.
#### Samples
diff --git a/COPYRIGHT b/COPYRIGHT
index 191639ed001..6c2dab9444a 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -14,7 +14,7 @@ Component Version License GPL Compatible
PHP libraries:
AdoDb-Date 0.36 Modified BSD License Yes Date convertion (not into rpm package)
ChromePHP 4.1.0 Apache Software License 2.0 Yes Return server log to chrome browser console
-CKEditor 4.3.3 LGPL-2.1+ Yes Editor WYSIWYG
+CKEditor 4.5.6 LGPL-2.1+ Yes Editor WYSIWYG
EvalMath 1.0 BSD Yes Safe math expressions evaluation
Escpos-php MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers
FPDI 1.5.2 Apache Software License 2.0 Yes PDF templates management
diff --git a/ChangeLog b/ChangeLog
index d2b0d63216a..439ae83b35d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -26,7 +26,6 @@ NEW: Add a tab "document" in donation card
NEW: Add cancel button on thirdparty create page
NEW: Add chart of product statistics
NEW: Add color on categories
-NEW: Add css class and ids on column of detail lines to allow module to easily manipulate fields.
NEW: Add date value filter on account records list
NEW: Add __PROJECT_NAME__ tag for customer invoice emails
NEW: Add option PDF_ALLOW_HTML_FOR_FREE_TEXT to be able to enter pdf footer text with wysiwyg editor.
@@ -36,99 +35,89 @@ NEW: Add filter on status on shipments
NEW: Add gender property managed on user card FIX: Better error messages when uploading photo of user when permission to write are not granted
NEW: Add help tooltips on fields of dictionary edit pages.
NEW: Add hidden option MAIN_MAILFORM_DISABLE_ENTERKEY to disable the key enter into the form to send email.
-NEW: Add hook in send mail
-NEW: Add hooks on list of members to allow an external module to add more fields into list view.
-NEW: Add hooks to allow an external module to complete list of events into calendar views.
NEW: Add $ID$ into extrafields management to allow use of current object id on filter for select list from table and checkbox list from table
NEW: Add info page on product card
NEW: Add into about page, a sample text to use to promote new version release (visible only if version is last stable)
NEW: Add none/all selection into list of files for FTP browser module
NEW: Add opportunity amount on project card.
-NEW: Add parameter to add a link to use "date of invoice" in one click when fille a payment card.
+NEW: Add link "date of invoice" to select date of invoice when creating a payment in one click.
NEW: Add planned workload and declared progress on project summary list on project home page (data aggregated from tasks of project)
-NEW: Add "productpricecard" hook and uniformize code
NEW: Add ref and label of project into export
NEW: Add status into filters of graph
NEW: Add tab document on salaries payment
-NEW: Add thumb of users into thumbs stats on home page
-NEW: A link to the bugtracker can be enabled in the GUI
+NEW: Add thumb of users into stats box on home page
+NEW: A link to the bugtracker report tool can be enabled in the GUI
NEW: Better look for POS. More responsive design.
NEW: Can add project search on left menu search area
-NEW: Can assign a task to yourself to have it appear on timesheet
-NEW: Can choose fields to show on project list
+NEW: Can assign a task to yourself to have it appear on timesheet.
NEW: Can close a project that has draft status with no need to switch it to validate status before.
NEW: Can edit Background color for Top menu and Background color for table title line.
-NEW: Can edit email template using WYSIWYG editor
-NEW: Can edit list of prospect status for customers/prospects. Add a new entry into dictionary table to manage list fo status. Removed deprecated files.
+NEW: Can edit email templates using WYSIWYG editor.
+NEW: Can edit list of prospect status for customers/prospects. Add a new entry into dictionary table to manage list fo status.
NEW: Can filter on contact status in prospect list. Removed deprecated menu entry.
-NEW: Can filter proposal on a tag of a product Enhance also the prototype test_arrays to include select form before table.
+NEW: Can filter proposal on a tag of a product.
NEW: Can filter proposal, orders or invoices with criteria "contain at least one product with following tag"
-NEW: Can select fields to show in product list. Extrafields are also supported.
-NEW: Can select fields to show into the contact list. Extrafields are also supported.
-NEW: Can select which field to show into list of users. Extrafields are also supported.
-NEW: Can set default value of event type when creating an event (if type of event option is used).
+NEW: Can choose fields to show on project list.
+NEW: Can choose fields to show in product list. Extrafields are also supported.
+NEW: Can choose fields to show into the contact list. Extrafields are also supported.
+NEW: Can choose fields to show into list of users. Extrafields are also supported.
+NEW: Can set default value of event type when creating an event (if option "manage type of event" is used).
NEW: Can upload files on leave requests. Use more standard permissions.
-NEW: Can use a "|" to make a OR search on several different criterias into text filters of tables.
-NEW: Can use the * as a joker characters into search boxes of lists
-NEW: Clean code into salary module, debug and add indexes NEW: Can filter on user list and salary payments on user with naural search.
-NEW: clone action on agenda events
+NEW: Can use a "|" to make a OR search on several different criterias into search text filters of tables.
+NEW: Can use the * as a joker characters into search boxes of lists.
+NEW: Clean code into salary module, debug and add indexes
+NEW: Can filter on user list and salary payments on user with naural search.
+NEW: Can clone agenda events.
NEW: Color category is visible onto the thumb of tags on thirdparty, or products cards.
-NEW: conf to use next product/service ref when we clone a product/service
+NEW: Conf to use next product/service ref when we clone a product/service
NEW: Contract module can be used to follow both sold and bought contracts/recurring subscriptions.
-NEW: Enhance prototype, project list and proposal list with new hooks to have an external module able to add more fields.
-NEW: Enhance style engine. Add option to set color of links.
-NEW: Enter amount for withdraws requests
+NEW: Can change amount when creating withdraws requests.
NEW: FEATURE PROPOSAL: on proposal, order or invoice creation from scratch, reload page after customer selection so its informations can be loaded
NEW: Filter "active" by default on user list. Fix label of permission of project module.
-NEW: Forms are using the tab look, even in creation mode.
+NEW: Forms are using the "tab look", even in creation mode.
NEW: Free text for cheque deposit receipt can be HTML content.
NEW: Hidden option THEME_ELDY_USE_HOVER is stable enough to become officialy visible into setup.
-NEW: If module salaries is on, you can set a hourly value for time consumed by users. Each time a user enter its time consumed on a project, a calculation is done to provide the cost for human services. This value appears into the "Transversal view" of project.
-NEW: Import Sales representatives of third parties
+NEW: If module salaries is on, you can set a hourly value for time consumed by users. When a user enter its time consumed on a project, a calculation is done to provide the cost for human services. This value appears into the "Overview" of project.
+NEW: Add import profile to import sales representatives of third parties.
NEW: Increase length of bank code to 128 char #3704
-NEW: info function for product card
NEW: Into the overview of projects, the name of thirdparty appears into combo lists of elements to link to project.
-NEW: Introduce a "code" into fiels to describe vat. This will allow to suggest different vat lines with same value with ability to differentiate them.
-NEW: Introduce cost price on product.
+NEW: Introduce a "code" into table of vats to describe VAT. This will allow to suggest different vat lines with same value with ability to differentiate them.
+NEW: Introduce cost price on products.
NEW: Introduce hidden option MAIN_LANDING_PAGE to decide the home page visible just after login.
-NEW: Introduce hidden option MAIN_REPLACE_TRANS_xx_XX to allow simple replacement of translated string on the fly.
+NEW: Introduce hidden option MAIN_REPLACE_TRANS_xx_XX to allow simple replacement of translated string on the fly. Prefer to use next method.
NEW: Introduce table llx_overwrite_trans to be able to overwrite translations by simple database edition.
-NEW: Introduce use of cache for thumbs images of users
-NEW: Experimental level multiprice generator based on per cent variations over base price
-NEW: List of projects of a thirdparty are visible on a project tab
+NEW: Introduce use of cache for thumbs images of users to save bandwith.
+NEW: Experimental level multiprice generator based on per cent variations over base price.
+NEW: List of projects of a thirdparty are visible on a project tab for the thirdparty.
NEW: Merge all left menu search boxes into one.
-NEW: Merge all search fields of an area page into one search box
-NEW: next ref on clone doesn't need conf, it's used if mask exists
-NEW: ODT generators can set meta properties of ODT file
-NEW: On list of thirdparties, user can select fields to show. Make phpunit test working again localy. Add missing columns into llx_expedition.
-NEW: Only arrow of current sorted field is visible into table views. This save a lot of spaces. You can click on the column title to sort. This make clickable area larger and click to sort is easier.
+NEW: Merge all search fields of an area page into one search box.
+NEW: Next ref on clone doesn't need conf, it's used if mask exists.
+NEW: Only arrow of current sorted field is visible into table views. This save a lot of space. You can click on the column title to sort. This make clickable area larger and click to sort is easier.
NEW: On page to see/edit contact of an ojbect, the status of contact is visible (for both external and internal users).
-NEW: Option encrypt password into databae is set to on by default on first install.
-NEW: print event type on third party card tab agenda list (only if AGENDA_USE_EVENT_TYPE = 1)
+NEW: Option "encrypt password" into database is set to on by default on first install.
+NEW: Print event type on third party card tab agenda list (only if AGENDA_USE_EVENT_TYPE = 1)
NEW: Provide an easier way to understand if an order can be shipped.
-NEW: Quick searh filter works on invoice, proposal, order, intervention, contract
-NEW: Rename install "etape" into english "step"
+NEW: Quick search filter works also on invoice, proposal, order, intervention, contract and expense reports.
NEW: Replace category edition page on members with new select2 component.
-NEW: Show photo of logged user into login top right block. NEW: If no photo is available for user, we show a generic photo depending on gender
-NEW: Show photo of user into user list. A new function getImageFileNameForSize was also introduced to choose image best size according to usage to save bandwith.
-NEW: Show which fields are used for search when doing a generic search from the quick search form.
+NEW: Show photo of logged user into login top right block.
+NEW: If no photo is available for user, we show a generic photo depending on gender.
+NEW: Show photo of user into user list.
+NEW: Show which fields were used for search when doing a "generic search" from the "quick search" form on left menu.
NEW: Statistic graphs on products offer a filter on product type (product / service or both)
-NEW: Support logging to a Sentry server
NEW: Syslog displays configuration errors
NEW: The clicktodial module is now able to provide link "tel:" on phone numbers. So it is also possible to use clicktodial with a client solution like the "xivo" local client.
NEW: The conditional IF into ODT templates works also on not defined var so we can show data only if defined. Close #3819
-NEW: The free text in PDF footer can now be a HTML content. So the WYSIWYG editor is on by default to edit it into module setup.
-NEW: The quick search box on left menu can also search into expense reports.
-NEW: The search box and the bookmarks are now rendered by the menu manager.
-NEW: The thirdparties tabs, the contacts tabs and the members tabs are now presented using a new top banner, saving space and using a same way to show address, status and navigation arrows.
+NEW: The free text in PDF footers can now be a HTML content. So the WYSIWYG editor is on by default to edit it into module setup.
+NEW: The thirdparties tabs, the contacts tabs and the members tabs are now presented using a new "top banner", saving space and using a same way to show address, status and navigation arrows.
NEW: Thumbs for statistics on main page are fully clicable (not only link inside the thumb)
-NEW: Translate extrafield's labels
-NEW: Uniformize way of working for search filters. One filter per object.
-NEW: Used matching icons for Material Design theme
+NEW: Translate extrafield's labels.
NEW: Use new select2 component for juridical status, country and state selection.
-NEW: When creating order, proposal or invoice from thirdparty card, the project is asked during creation. A link to create project if it does not exists is also available. NEW: Uniformize form creation of proposal to add public and private notes during creation like done for order and invoice.
+NEW: When creating order, proposal or invoice from thirdparty card, the project is asked during creation. A link to create project if it does not exists is also available.
+NEW: Uniformize form creation of proposal to add public and private notes during creation like for order and invoice.
+NEW: More robust antiXSS engine.
For developers:
+NEW: The search box and the bookmarks are now rendered by the menu manager.
NEW: Add a new widget $form->selectArrayAjax() to use combo list with content coming from an Ajax URL.
NEW: Add doActions hook method call in contract card
NEW: Added doActions hooks to user cards
@@ -144,10 +133,26 @@ NEW: A module can add its entries into cron module.
NEW: Framework feature. To have a page being loaded at same scrollbar level after a click on a href link, just add the class "reposition" on this link.
NEW: Add exemple of setup for multitail to render dolibarr log files
NEW: Add restler framework. First step to build REST API into Dolibarr.
-
+NEW: Add css class and ids on column of detail lines to allow module to easily manipulate fields.
+NEW: Add hook in send mail
+NEW: Add hooks on list of members to allow an external module to add more fields into list view.
+NEW: Add hooks to allow an external module to complete list of events into calendar views.
+NEW: Add "productpricecard" hook and uniformize code
+NEW: Enhance also the prototype test_arrays to include select form before table.
+NEW: Enhance prototype, project list and proposal list with new hooks to have an external module able to add more fields.
+NEW: Enhance style engine. Add option to set color of links.
+NEW: ODT generators can now also set meta properties of ODT file.
+NEW: Add missing columns into llx_expedition to match other tables.
+NEW: A new function getImageFileNameForSize was also introduced to choose image best size according to usage to save bandwith.
+NEW: Support logging to a Sentry server
+NEW: Prepare database to have agenda able to store more detailed emails events.
WARNING:
+Dolibarr 3.9 is not yet fully compatible with PHP 7 even if most features seems to work.
+
+Mysql minimum version is now 5.0.3
+
Following changes may create regression for some external modules, but were necessary to make
Dolibarr better:
- Deprecated Product::setPriceExpression. Use Product::update instead
@@ -165,6 +170,84 @@ This is list of hooks modified:
+***** ChangeLog for 3.8.3 compared to 3.8.2 *****
+FIX: #3805
+FIX: #3231 [Members] Public subscription page displays GeoIP error
+FIX: #3240
+FIX: #3293 Login page form icons not shown
+FIX: #3508 Useless tooltip in 3.8 boxes
+FIX: #3661 Margin is not selected correctly when adding a product
+FIX: #3679 Error when deleting a Localtax2 special payment
+FIX: #3707 Thirdparty bank account page table has a glitch
+FIX: #3726 When upload file, don't test if PRODUCT_USE_OLD_PATH_FOR_PHOTO variable is empty or not
+FIX: #3734 Do not show empty links of deleted source objects in stock movement list
+FIX: #3836 Unable to upload a document to an invoice under some circunstances
+FIX: #3878 Storing and deleting files on emailing was done at wrong place
+FIX: #3880
+FIX: #3882
+FIX: #3890 Expected transactions bank account page, shows negative numbers
+FIX: #3912
+FIX: #3928 Creating a Customer order and a Customer invoice from a project, does not inherit payment conditions and method of payment of customer card
+FIX: #3953 Don't round supplier price
+FIX: #3953 rounding of buying price
+FIX: #3980 Search field in "product by supplier" list sends empty result 3.8 and 3.7
+FIX: #3987 Undefined variable $newref in CommandeFournisseur::approve
+FIX: #3988 Undefined variable $conf and $error in CommandeFournisseur::addline
+FIX: #3989 Undefined variable $conf in CommandeFournisseur::getNomUrl
+FIX: #3990
+FIX: #3992 CommandeFournisseur::ref is marked as deprecated and it shouldn't be
+FIX: #3996 Dictionnary hooks are not working in 3.8
+FIX: #3997 Wrong permission key used for Margins > Read all
+FIX: #4016 User link is not correctly formed in emailing receivers
+FIX: #4018 SQL error if trying to access the mailing/card.php page without an ID defined
+FIX: #4036 Direct printing module without any driver configured, shows an unformatted error message
+FIX: #4043 Incorrect translation in error mesage in menu creation admin page
+FIX: #4049 PHP warning when trying to access a non-existing product/service
+FIX: #4055 SQL error when trying to access a non-existing expedition
+FIX: #4081 Added missing translation
+FIX: #4097 Public holiday calculation
+FIX: #4182 SQL error when deleting an unexisting bank entry
+FIX: #4242 Allow disabling dashes in documents
+FIX: #4243 sql injection
+FIX: #4281
+FIX: #4282 Defined shipping time were not shown in Customer order's PDF documents
+FIX: #4285 SQL query shown when accessing an unexisting invoice
+FIX: #4287 SQL error when accessing an unexisting proposal
+FIX: #4302 Undefined variable $conf in Commande::LibStatut
+FIX: Allow to search on alias name into select
+FIX: Add a protection to not make release if ChangeLog was not generated.
+FIX: autofocus on input search product
+FIX: bad calculation for stock value
+FIX: Better compatibility for users that used the not supported option MAIN_USE_JQUERY_MULTISELECT set to 1.
+FIX: Bug: $this is not accessible in static context in Mailing::libStatutDest #4050
+FIX: can not have access to the new ids or propal lines on PROPAL_CLONE
+FIX: Can't update line's duration
+FIX: Can use formated float number on old expense report module.
+FIX: change object statut on close shipping and remove erratic db commit
+FIX: change order date on clone (as everywhere else)
+FIX: event's data lost on user assign update
+FIX: export propal and order with extrafields
+FIX: export with category contact extrafields
+FIX: jquery select of project generate js error on change event
+FIX: label of line is set in description field if empty
+FIX: loss data also if update was cancel by error of ended state with no end date, try a generic patch
+FIX: mail isn't display in title on event in mode view
+FIX: Missing to set context into workflow actions, so triggers can't know we are creating an invoice from order or an order from a proposal.
+FIX: NB task and percent progress in box project
+FIX: Not delete a product when have customer price
+FIX: Not deleting contrats on element_element table
+FIX: Not use localtaxes when invoice some orders
+FIX: only active customer should be available into select list thirdparty on invoice creation
+FIX: only active customer should be return into new invoice creation select list
+FIX: AWP calculation
+FIX: product link in project box
+FIX: Remove column creation for table llx_product_fournisseur_price, the column use un calss is fk_supplier_price_expression, and fk_price_expression does not exist into lx_product_fournisseur_price sql file declaration
+FIX: Show category selector if we have permission to view products or services
+FIX: showrefnav htmlspecialchar instead of < >
+FIX: The label hidden was not supported when using jmobile
+FIX: Too many information were hidden. A lot of users still need bank account on PDF.
+FIX: Use "WHERE true" instead of "WHERE 1" #4132
+
***** ChangeLog for 3.8.2 compared to 3.8.1 *****
FIX: Add a protection to not make release if ChangeLog was not generated.
FIX: 1/ update_extra() function must not be in "if(!empty(MAIN_DISABLE_CONTACTS_TAB)" test. 2/ Reindented code
@@ -509,6 +592,25 @@ Dolibarr better:
- Function get_exdir require now 6 parameters. This is to prepare a future feature.
+***** ChangeLog for 3.7.3 compared to 3.7.2 *****
+FIX: #3734 Do not show empty links of deleted source objects in stock movement list
+FIX: #3890 Expected transactions bank account page, shows negative numbers
+FIX: #3928 Creating a Customer order and a Customer invoice from a project, does not inherit payment conditions and method of payment of customer card
+FIX: #3980 Search field in "product by supplier" list sends empty result 3.8 and 3.7
+FIX: #4081 Added missing translation
+FIX: #4097 Public holiday calculation
+FIX: #4242 Allow disabling dashes in documents
+FIX: #4243 sql injection
+FIX: Can use formated float number on old expense report module.
+FIX: Change object statut when closing shipment and remove erratic db commit
+FIX: Export with category contact extrafields
+FIX: NB task and percent progress in box project
+FIX: Not delete a product when have customer price
+FIX: Not deleting contrats on element_element table
+FIX: Not use localtaxes when invoice some orders
+FIX: Product link in project box
+FIX: Use "WHERE true" instead of "WHERE 1" #4132
+
***** ChangeLog for 3.7.2 compared to 3.7.1 *****
FIX: #2957 : missing $langs object for trigger
FIX: #2983 Load gravatar avatar images securely over HTTPS
@@ -822,6 +924,17 @@ Dolibarr better:
- Replaced USER_UPDATE_SESSION trigger with an updateSession hook may break modules using it.
+***** ChangeLog for 3.6.6 compared to 3.6.5 *****
+FIX: #3734 Do not show empty links of deleted source objects in stock movement list
+FIX: #4081 Added missing translation
+FIX: #4097 Public holiday calculation
+FIX: #4242 Allow disabling dashes in documents
+FIX: #4243 sql injection
+FIX: Add a protection to not make release if ChangeLog was not generated. Prepare package 3.6.5
+FIX: export with category contact extrafields
+FIX: Not delete a product when have customer price
+FIX: Not deleting contrats on element_element table
+
***** ChangeLog for 3.6.5 compared to 3.6.4 *****
FIX: #2957 : missing $langs object for trigger
FIX: #2983 Load gravatar avatar images securely over HTTPS
diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl
index 8fc8e49aaf8..ac5529d7d8f 100755
--- a/build/makepack-dolibarr.pl
+++ b/build/makepack-dolibarr.pl
@@ -495,6 +495,8 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/cabinetmed*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/calling*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/bootstrap*`;
+ $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/dolimed*`;
+ $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/dolimod*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/factory*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/lead*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/management*`;
@@ -505,7 +507,10 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/pos*`;
$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/accountingexport*`;
$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/themes/eldy/*.new`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/api/explorer`; # This is a dev tool
diff --git a/composer.json b/composer.json
index 583e08078af..f4ea5de0c73 100644
--- a/composer.json
+++ b/composer.json
@@ -16,13 +16,19 @@
"php": ">=5.3.0",
"ext-curl": "*",
"ccampbell/chromephp": "^4.1",
- "ckeditor/ckeditor": "dev-full/4.3.x#0b7c3f1",
+ "ckeditor/ckeditor": "dev-full/stable",
"mike42/escpos-php": "dev-master",
"mobiledetect/mobiledetectlib": "2.8.17",
"phpoffice/phpexcel": "1.8.1",
"restler/framework": "^3.0",
"tecnickcom/tcpdf": "6.2.12"
},
+ "require-dev": {
+ "jakub-onderka/php-parallel-lint": "^0",
+ "jakub-onderka/php-console-highlighter": "^0",
+ "phpunit/phpunit": "^4",
+ "squizlabs/php_codesniffer": "^2"
+ },
"suggest": {
"ext-mysqlnd": "To use with MySQL or MariaDB",
"ext-mysqli": "To use with MySQL or MariaDB",
diff --git a/composer.lock b/composer.lock
index da19c20fbc5..2ccd1f616a5 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,8 +4,8 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
- "hash": "d8229cbb9aea945c9ca803bbe54d7aa7",
- "content-hash": "47929ed42fb67e5159ccec6a3a5a45eb",
+ "hash": "4a06567f53c5f081f9c961a0b3093da3",
+ "content-hash": "265061f1a1056df2e8c5184841993d0f",
"packages": [
{
"name": "ccampbell/chromephp",
@@ -52,16 +52,16 @@
},
{
"name": "ckeditor/ckeditor",
- "version": "dev-full/4.3.x",
+ "version": "dev-full/stable",
"source": {
"type": "git",
"url": "https://github.com/ckeditor/ckeditor-releases.git",
- "reference": "0b7c3f1"
+ "reference": "c1cefe7341e6910a1e6cb2f3f024bbdaf6cd1d4d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/ckeditor/ckeditor-releases/zipball/252e512e911f21d880ea542fe162c4643885b317",
- "reference": "0b7c3f1",
+ "url": "https://api.github.com/repos/ckeditor/ckeditor-releases/zipball/c1cefe7341e6910a1e6cb2f3f024bbdaf6cd1d4d",
+ "reference": "c1cefe7341e6910a1e6cb2f3f024bbdaf6cd1d4d",
"shasum": ""
},
"type": "library",
@@ -89,7 +89,7 @@
"text",
"wysiwyg"
],
- "time": "2014-02-26 15:43:10"
+ "time": "2015-12-09 15:49:34"
},
{
"name": "mike42/escpos-php",
@@ -398,7 +398,1119 @@
"time": "2015-09-12 10:08:34"
}
],
- "packages-dev": [],
+ "packages-dev": [
+ {
+ "name": "doctrine/instantiator",
+ "version": "1.0.5",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/instantiator.git",
+ "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d",
+ "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3,<8.0-DEV"
+ },
+ "require-dev": {
+ "athletic/athletic": "~0.1.8",
+ "ext-pdo": "*",
+ "ext-phar": "*",
+ "phpunit/phpunit": "~4.0",
+ "squizlabs/php_codesniffer": "~2.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Marco Pivetta",
+ "email": "ocramius@gmail.com",
+ "homepage": "http://ocramius.github.com/"
+ }
+ ],
+ "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
+ "homepage": "https://github.com/doctrine/instantiator",
+ "keywords": [
+ "constructor",
+ "instantiate"
+ ],
+ "time": "2015-06-14 21:17:01"
+ },
+ {
+ "name": "myclabs/deep-copy",
+ "version": "1.5.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/myclabs/DeepCopy.git",
+ "reference": "e3abefcd7f106677fd352cd7c187d6c969aa9ddc"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/e3abefcd7f106677fd352cd7c187d6c969aa9ddc",
+ "reference": "e3abefcd7f106677fd352cd7c187d6c969aa9ddc",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.4.0"
+ },
+ "require-dev": {
+ "doctrine/collections": "1.*",
+ "phpunit/phpunit": "~4.1"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "DeepCopy\\": "src/DeepCopy/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "Create deep copies (clones) of your objects",
+ "homepage": "https://github.com/myclabs/DeepCopy",
+ "keywords": [
+ "clone",
+ "copy",
+ "duplicate",
+ "object",
+ "object graph"
+ ],
+ "time": "2015-11-07 22:20:37"
+ },
+ {
+ "name": "phpdocumentor/reflection-docblock",
+ "version": "2.0.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
+ "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8",
+ "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.0"
+ },
+ "suggest": {
+ "dflydev/markdown": "~1.0",
+ "erusev/parsedown": "~1.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "phpDocumentor": [
+ "src/"
+ ]
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Mike van Riel",
+ "email": "mike.vanriel@naenius.com"
+ }
+ ],
+ "time": "2015-02-03 12:10:50"
+ },
+ {
+ "name": "phpspec/prophecy",
+ "version": "v1.5.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpspec/prophecy.git",
+ "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4745ded9307786b730d7a60df5cb5a6c43cf95f7",
+ "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7",
+ "shasum": ""
+ },
+ "require": {
+ "doctrine/instantiator": "^1.0.2",
+ "phpdocumentor/reflection-docblock": "~2.0",
+ "sebastian/comparator": "~1.1"
+ },
+ "require-dev": {
+ "phpspec/phpspec": "~2.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.4.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Prophecy\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Konstantin Kudryashov",
+ "email": "ever.zet@gmail.com",
+ "homepage": "http://everzet.com"
+ },
+ {
+ "name": "Marcello Duarte",
+ "email": "marcello.duarte@gmail.com"
+ }
+ ],
+ "description": "Highly opinionated mocking framework for PHP 5.3+",
+ "homepage": "https://github.com/phpspec/prophecy",
+ "keywords": [
+ "Double",
+ "Dummy",
+ "fake",
+ "mock",
+ "spy",
+ "stub"
+ ],
+ "time": "2015-08-13 10:07:40"
+ },
+ {
+ "name": "phpunit/php-code-coverage",
+ "version": "3.0.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
+ "reference": "f7bb5cddf4ffe113eeb737b05241adb947b43f9d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f7bb5cddf4ffe113eeb737b05241adb947b43f9d",
+ "reference": "f7bb5cddf4ffe113eeb737b05241adb947b43f9d",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.6",
+ "phpunit/php-file-iterator": "~1.3",
+ "phpunit/php-text-template": "~1.2",
+ "phpunit/php-token-stream": "~1.3",
+ "sebastian/environment": "^1.3.2",
+ "sebastian/version": "~1.0"
+ },
+ "require-dev": {
+ "ext-xdebug": ">=2.1.4",
+ "phpunit/phpunit": "~5"
+ },
+ "suggest": {
+ "ext-dom": "*",
+ "ext-xdebug": ">=2.2.1",
+ "ext-xmlwriter": "*"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.0.x-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sb@sebastian-bergmann.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
+ "homepage": "https://github.com/sebastianbergmann/php-code-coverage",
+ "keywords": [
+ "coverage",
+ "testing",
+ "xunit"
+ ],
+ "time": "2015-11-12 21:08:20"
+ },
+ {
+ "name": "phpunit/php-file-iterator",
+ "version": "1.4.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
+ "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0",
+ "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.4.x-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sb@sebastian-bergmann.de",
+ "role": "lead"
+ }
+ ],
+ "description": "FilterIterator implementation that filters files based on a list of suffixes.",
+ "homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
+ "keywords": [
+ "filesystem",
+ "iterator"
+ ],
+ "time": "2015-06-21 13:08:43"
+ },
+ {
+ "name": "phpunit/php-text-template",
+ "version": "1.2.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/php-text-template.git",
+ "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
+ "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "type": "library",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Simple template engine.",
+ "homepage": "https://github.com/sebastianbergmann/php-text-template/",
+ "keywords": [
+ "template"
+ ],
+ "time": "2015-06-21 13:50:34"
+ },
+ {
+ "name": "phpunit/php-timer",
+ "version": "1.0.7",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/php-timer.git",
+ "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3e82f4e9fc92665fafd9157568e4dcb01d014e5b",
+ "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "type": "library",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sb@sebastian-bergmann.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Utility class for timing",
+ "homepage": "https://github.com/sebastianbergmann/php-timer/",
+ "keywords": [
+ "timer"
+ ],
+ "time": "2015-06-21 08:01:12"
+ },
+ {
+ "name": "phpunit/php-token-stream",
+ "version": "1.4.8",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/php-token-stream.git",
+ "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da",
+ "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da",
+ "shasum": ""
+ },
+ "require": {
+ "ext-tokenizer": "*",
+ "php": ">=5.3.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.2"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.4-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ }
+ ],
+ "description": "Wrapper around PHP's tokenizer extension.",
+ "homepage": "https://github.com/sebastianbergmann/php-token-stream/",
+ "keywords": [
+ "tokenizer"
+ ],
+ "time": "2015-09-15 10:49:45"
+ },
+ {
+ "name": "phpunit/phpunit",
+ "version": "5.1.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/phpunit.git",
+ "reference": "c047ff05d2279404af9a7e89e2a7151c32c88022"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c047ff05d2279404af9a7e89e2a7151c32c88022",
+ "reference": "c047ff05d2279404af9a7e89e2a7151c32c88022",
+ "shasum": ""
+ },
+ "require": {
+ "ext-dom": "*",
+ "ext-json": "*",
+ "ext-pcre": "*",
+ "ext-reflection": "*",
+ "ext-spl": "*",
+ "myclabs/deep-copy": "~1.3",
+ "php": ">=5.6",
+ "phpspec/prophecy": "^1.3.1",
+ "phpunit/php-code-coverage": "~3.0",
+ "phpunit/php-file-iterator": "~1.4",
+ "phpunit/php-text-template": "~1.2",
+ "phpunit/php-timer": ">=1.0.6",
+ "phpunit/phpunit-mock-objects": ">=3.0.5",
+ "sebastian/comparator": "~1.1",
+ "sebastian/diff": "~1.2",
+ "sebastian/environment": "~1.3",
+ "sebastian/exporter": "~1.2",
+ "sebastian/global-state": "~1.0",
+ "sebastian/resource-operations": "~1.0",
+ "sebastian/version": "~1.0",
+ "symfony/yaml": "~2.1|~3.0"
+ },
+ "suggest": {
+ "phpunit/php-invoker": "~1.1"
+ },
+ "bin": [
+ "phpunit"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "5.1.x-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "The PHP Unit Testing framework.",
+ "homepage": "https://phpunit.de/",
+ "keywords": [
+ "phpunit",
+ "testing",
+ "xunit"
+ ],
+ "time": "2015-12-10 07:54:54"
+ },
+ {
+ "name": "phpunit/phpunit-mock-objects",
+ "version": "3.0.6",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
+ "reference": "49bc700750196c04dd6bc2c4c99cb632b893836b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/49bc700750196c04dd6bc2c4c99cb632b893836b",
+ "reference": "49bc700750196c04dd6bc2c4c99cb632b893836b",
+ "shasum": ""
+ },
+ "require": {
+ "doctrine/instantiator": "^1.0.2",
+ "php": ">=5.6",
+ "phpunit/php-text-template": "~1.2",
+ "sebastian/exporter": "~1.2"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~5"
+ },
+ "suggest": {
+ "ext-soap": "*"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.0.x-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sb@sebastian-bergmann.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Mock Object library for PHPUnit",
+ "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
+ "keywords": [
+ "mock",
+ "xunit"
+ ],
+ "time": "2015-12-08 08:47:06"
+ },
+ {
+ "name": "sebastian/comparator",
+ "version": "1.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/comparator.git",
+ "reference": "937efb279bd37a375bcadf584dec0726f84dbf22"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22",
+ "reference": "937efb279bd37a375bcadf584dec0726f84dbf22",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3",
+ "sebastian/diff": "~1.2",
+ "sebastian/exporter": "~1.2"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.4"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.2.x-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Jeff Welch",
+ "email": "whatthejeff@gmail.com"
+ },
+ {
+ "name": "Volker Dusch",
+ "email": "github@wallbash.com"
+ },
+ {
+ "name": "Bernhard Schussek",
+ "email": "bschussek@2bepublished.at"
+ },
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ }
+ ],
+ "description": "Provides the functionality to compare PHP values for equality",
+ "homepage": "http://www.github.com/sebastianbergmann/comparator",
+ "keywords": [
+ "comparator",
+ "compare",
+ "equality"
+ ],
+ "time": "2015-07-26 15:48:44"
+ },
+ {
+ "name": "sebastian/diff",
+ "version": "1.4.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/diff.git",
+ "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e",
+ "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.8"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.4-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Kore Nordmann",
+ "email": "mail@kore-nordmann.de"
+ },
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ }
+ ],
+ "description": "Diff implementation",
+ "homepage": "https://github.com/sebastianbergmann/diff",
+ "keywords": [
+ "diff"
+ ],
+ "time": "2015-12-08 07:14:41"
+ },
+ {
+ "name": "sebastian/environment",
+ "version": "1.3.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/environment.git",
+ "reference": "6e7133793a8e5a5714a551a8324337374be209df"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6e7133793a8e5a5714a551a8324337374be209df",
+ "reference": "6e7133793a8e5a5714a551a8324337374be209df",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.4"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.3.x-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ }
+ ],
+ "description": "Provides functionality to handle HHVM/PHP environments",
+ "homepage": "http://www.github.com/sebastianbergmann/environment",
+ "keywords": [
+ "Xdebug",
+ "environment",
+ "hhvm"
+ ],
+ "time": "2015-12-02 08:37:27"
+ },
+ {
+ "name": "sebastian/exporter",
+ "version": "1.2.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/exporter.git",
+ "reference": "7ae5513327cb536431847bcc0c10edba2701064e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7ae5513327cb536431847bcc0c10edba2701064e",
+ "reference": "7ae5513327cb536431847bcc0c10edba2701064e",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3",
+ "sebastian/recursion-context": "~1.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.4"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.2.x-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Jeff Welch",
+ "email": "whatthejeff@gmail.com"
+ },
+ {
+ "name": "Volker Dusch",
+ "email": "github@wallbash.com"
+ },
+ {
+ "name": "Bernhard Schussek",
+ "email": "bschussek@2bepublished.at"
+ },
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ },
+ {
+ "name": "Adam Harvey",
+ "email": "aharvey@php.net"
+ }
+ ],
+ "description": "Provides the functionality to export PHP variables for visualization",
+ "homepage": "http://www.github.com/sebastianbergmann/exporter",
+ "keywords": [
+ "export",
+ "exporter"
+ ],
+ "time": "2015-06-21 07:55:53"
+ },
+ {
+ "name": "sebastian/global-state",
+ "version": "1.1.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/global-state.git",
+ "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4",
+ "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.2"
+ },
+ "suggest": {
+ "ext-uopz": "*"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ }
+ ],
+ "description": "Snapshotting of global state",
+ "homepage": "http://www.github.com/sebastianbergmann/global-state",
+ "keywords": [
+ "global state"
+ ],
+ "time": "2015-10-12 03:26:01"
+ },
+ {
+ "name": "sebastian/recursion-context",
+ "version": "1.0.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/recursion-context.git",
+ "reference": "913401df809e99e4f47b27cdd781f4a258d58791"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791",
+ "reference": "913401df809e99e4f47b27cdd781f4a258d58791",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.4"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Jeff Welch",
+ "email": "whatthejeff@gmail.com"
+ },
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ },
+ {
+ "name": "Adam Harvey",
+ "email": "aharvey@php.net"
+ }
+ ],
+ "description": "Provides functionality to recursively process PHP variables",
+ "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
+ "time": "2015-11-11 19:50:13"
+ },
+ {
+ "name": "sebastian/resource-operations",
+ "version": "1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/resource-operations.git",
+ "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52",
+ "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.6.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ }
+ ],
+ "description": "Provides a list of PHP built-in functions that operate on resources",
+ "homepage": "https://www.github.com/sebastianbergmann/resource-operations",
+ "time": "2015-07-28 20:34:47"
+ },
+ {
+ "name": "sebastian/version",
+ "version": "1.0.6",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/version.git",
+ "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6",
+ "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6",
+ "shasum": ""
+ },
+ "type": "library",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Library that helps with managing the version number of Git-hosted PHP projects",
+ "homepage": "https://github.com/sebastianbergmann/version",
+ "time": "2015-06-21 13:59:46"
+ },
+ {
+ "name": "squizlabs/php_codesniffer",
+ "version": "2.4.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
+ "reference": "32a879f4f35019d78d568db2885d7779ca084a33"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/32a879f4f35019d78d568db2885d7779ca084a33",
+ "reference": "32a879f4f35019d78d568db2885d7779ca084a33",
+ "shasum": ""
+ },
+ "require": {
+ "ext-tokenizer": "*",
+ "ext-xmlwriter": "*",
+ "php": ">=5.1.2"
+ },
+ "bin": [
+ "scripts/phpcs",
+ "scripts/phpcbf"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0.x-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "CodeSniffer.php",
+ "CodeSniffer/CLI.php",
+ "CodeSniffer/Exception.php",
+ "CodeSniffer/File.php",
+ "CodeSniffer/Fixer.php",
+ "CodeSniffer/Report.php",
+ "CodeSniffer/Reporting.php",
+ "CodeSniffer/Sniff.php",
+ "CodeSniffer/Tokens.php",
+ "CodeSniffer/Reports/",
+ "CodeSniffer/Tokenizers/",
+ "CodeSniffer/DocGenerators/",
+ "CodeSniffer/Standards/AbstractPatternSniff.php",
+ "CodeSniffer/Standards/AbstractScopeSniff.php",
+ "CodeSniffer/Standards/AbstractVariableSniff.php",
+ "CodeSniffer/Standards/IncorrectPatternException.php",
+ "CodeSniffer/Standards/Generic/Sniffs/",
+ "CodeSniffer/Standards/MySource/Sniffs/",
+ "CodeSniffer/Standards/PEAR/Sniffs/",
+ "CodeSniffer/Standards/PSR1/Sniffs/",
+ "CodeSniffer/Standards/PSR2/Sniffs/",
+ "CodeSniffer/Standards/Squiz/Sniffs/",
+ "CodeSniffer/Standards/Zend/Sniffs/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Greg Sherwood",
+ "role": "lead"
+ }
+ ],
+ "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
+ "homepage": "http://www.squizlabs.com/php-codesniffer",
+ "keywords": [
+ "phpcs",
+ "standards"
+ ],
+ "time": "2015-11-23 21:30:59"
+ },
+ {
+ "name": "symfony/yaml",
+ "version": "v3.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/yaml.git",
+ "reference": "177a015cb0e19ff4a49e0e2e2c5fc1c1bee07002"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/177a015cb0e19ff4a49e0e2e2c5fc1c1bee07002",
+ "reference": "177a015cb0e19ff4a49e0e2e2c5fc1c1bee07002",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.5.9"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.0-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Yaml\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony Yaml Component",
+ "homepage": "https://symfony.com",
+ "time": "2015-11-30 12:36:17"
+ }
+ ],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": {
diff --git a/dev/codesniffer/ruleset.xml b/dev/codesniffer/ruleset.xml
index 64194c7b756..7b887113d90 100644
--- a/dev/codesniffer/ruleset.xml
+++ b/dev/codesniffer/ruleset.xml
@@ -124,7 +124,7 @@
-
+
diff --git a/dev/dolibarr_changes.txt b/dev/dolibarr_changes.txt
index c7b5e0cd8fc..c5487f67273 100644
--- a/dev/dolibarr_changes.txt
+++ b/dev/dolibarr_changes.txt
@@ -62,6 +62,13 @@ In htdocs/includes/tcpdf/tcpdf.php
* Renamed getmypid into dol_getmypid().
+To avoid to have QRcode changed because generated with a random mask, replace
+define('QR_FIND_FROM_RANDOM', 2);
+with
+define('QR_FIND_FROM_RANDOM', false);
+
+
+
TCPDI:
------
Add fpdf_tpl.php 1.2
diff --git a/htdocs/.gitignore b/htdocs/.gitignore
index bf6a1487ea6..050707daf91 100644
--- a/htdocs/.gitignore
+++ b/htdocs/.gitignore
@@ -20,4 +20,5 @@
/allscreens*
/ecommerce/
/cabinetmed*
-/conf/conf.php
\ No newline at end of file
+/conf/conf.php
+/webmail*
diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php
index d1c4ef409b4..8213fed9d48 100644
--- a/htdocs/accountancy/admin/account.php
+++ b/htdocs/accountancy/admin/account.php
@@ -49,7 +49,7 @@ if (!$user->admin)
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'sortorder');
-$limit = $conf->liste_limit;
+$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
$page = GETPOST("page", 'int');
if ($page == - 1) {
$page = 0;
diff --git a/htdocs/accountancy/admin/card.php b/htdocs/accountancy/admin/card.php
index dc8dac4f959..1440a515794 100644
--- a/htdocs/accountancy/admin/card.php
+++ b/htdocs/accountancy/admin/card.php
@@ -148,14 +148,14 @@ if ($action == 'create')
dol_fiche_head();
print '
';
}
}
@@ -147,13 +150,6 @@ if ($action == 'update') {
}
}
-// Security check
-if ($user->societe_id > 0)
- accessforbidden();
- // TODO after adding menu
- // if (! $user->rights->accounting->ventilation->dispatch)
- // accessforbidden();
-
$form = new FormVentilation($db);
// Defaut AccountingAccount RowId Product / Service
@@ -179,13 +175,12 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both
$search_desc = '';
}
-// debug move header to top
-llxHeader('', $langs->trans("Accounts"));
-
/*
* View
*/
+llxHeader('', $langs->trans("Accounts"));
+
print '';
@@ -231,7 +232,7 @@ class box_actions extends ModeleBoxes
else
{
print '';
}
}
diff --git a/htdocs/core/boxes/box_task.php b/htdocs/core/boxes/box_task.php
index 384e30f8b12..d314af73cd1 100644
--- a/htdocs/core/boxes/box_task.php
+++ b/htdocs/core/boxes/box_task.php
@@ -25,6 +25,7 @@
include_once(DOL_DOCUMENT_ROOT."/core/boxes/modules_boxes.php");
require_once(DOL_DOCUMENT_ROOT."/core/lib/date.lib.php");
+
/**
* Class to manage the box to show last task
*/
@@ -36,6 +37,7 @@ class box_task extends ModeleBoxes
//var $depends = array("projet");
var $db;
var $param;
+ var $enabled = 0; // Disabled because bugged.
var $info_box_head = array();
var $info_box_contents = array();
@@ -79,8 +81,8 @@ class box_task extends ModeleBoxes
// list the summary of the orders
if ($user->rights->projet->lire) {
-
- $sql = "SELECT pt.fk_statut, count(pt.rowid) as nb, sum(ptt.task_duration) as durationtot, sum(pt.planned_workload) as plannedtot";
+ // FIXME fk_statut on a task is not be used. We use the percent. This means this box is useless.
+ $sql = "SELECT pt.fk_statut, count(DISTINCT pt.rowid) as nb, sum(ptt.task_duration) as durationtot, sum(pt.planned_workload) as plannedtot";
$sql.= " FROM ".MAIN_DB_PREFIX."projet_task as pt, ".MAIN_DB_PREFIX."projet_task_time as ptt";
$sql.= " WHERE pt.datec BETWEEN '".$this->db->idate(dol_get_first_day(date("Y"), 1))."' AND '".$this->db->idate(dol_get_last_day(date("Y"), 12))."'";
$sql.= " AND pt.rowid = ptt.fk_task";
diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php
index c2634cbaaed..5804ab4cf9f 100644
--- a/htdocs/core/class/commondocgenerator.class.php
+++ b/htdocs/core/class/commondocgenerator.class.php
@@ -1,9 +1,10 @@
- * Copyright (C) 2004-2010 Laurent Destailleur
- * Copyright (C) 2004 Eric Seigne
- * Copyright (C) 2005-2012 Regis Houssin
- * Copyright (C) 2015 Marcos García
+ * Copyright (C) 2004-2010 Laurent Destailleur
+ * Copyright (C) 2004 Eric Seigne
+ * Copyright (C) 2005-2012 Regis Houssin
+ * Copyright (C) 2015 Marcos García
+ * Copyright (C) 2016 Charlie Benke
*
* 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
@@ -560,7 +561,7 @@ abstract class CommonDocGenerator
* @param Object $object Object with extrafields (must have $object->array_options filled)
* @param array $array_to_fill Substitution array
* @param Extrafields $extrafields Extrafields object
- * @param string $array_key Name of the key for return array
+ * @param string $array_key Prefix for name of the keys into returned array
* @param Translate $outputlangs Lang object to use for output
* @return array Substitution array
*/
@@ -581,12 +582,25 @@ abstract class CommonDocGenerator
$object->array_options['options_'.$key] = $extrafields->attribute_param[$key]['options'][$object->array_options['options_'.$key]];
}
else if($extrafields->attribute_type[$key] == 'date')
- {
- $object->array_options['options_'.$key] = (strlen($object->array_options['options_'.$key])>0?dol_print_date($object->array_options['options_'.$key],'day'):'');
+ {
+ if (strlen($object->array_options['options_'.$key])>0)
+ {
+ $object->array_options['options_'.$key] = dol_print_date($object->array_options['options_'.$key],'day'); // using company output language
+ $object->array_options['options_'.$key.'_locale'] = dol_print_date($object->array_options['options_'.$key],'day','tzserver',$outputlangs); // using output language format
+ $object->array_options['options_'.$key.'_rfc'] = dol_print_date($object->array_options['options_'.$key],'dayrfc'); // international format
+ }
+ else
+ {
+ $object->array_options['options_'.$key] = '';
+ $object->array_options['options_'.$key.'_locale'] = '';
+ $object->array_options['options_'.$key.'_rfc'] = '';
+ }
}
else if($extrafields->attribute_type[$key] == 'datetime')
{
- $object->array_options['options_'.$key] = ($object->array_options['options_'.$key]!="0000-00-00 00:00:00"?dol_print_date($object->array_options['options_'.$key],'dayhour'):'');
+ $object->array_options['options_'.$key] = ($object->array_options['options_'.$key]!="0000-00-00 00:00:00"?dol_print_date($object->array_options['options_'.$key],'dayhour'):''); // using company output language
+ $object->array_options['options_'.$key.'_locale'] = ($object->array_options['options_'.$key]!="0000-00-00 00:00:00"?dol_print_date($object->array_options['options_'.$key],'dayhour','tzserver',$outputlangs):''); // using output language format
+ $object->array_options['options_'.$key.'_rfc'] = ($object->array_options['options_'.$key]!="0000-00-00 00:00:00"?dol_print_date($object->array_options['options_'.$key],'dayhourrfc'):''); // international format
}
$array_to_fill=array_merge($array_to_fill,array($array_key.'_options_'.$key => $object->array_options['options_'.$key]));
}
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 659ff4d3c5a..2929b66e80c 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -2054,7 +2054,7 @@ abstract class CommonObject
$forcedroundingmode=$roundingadjust;
if ($forcedroundingmode == 'auto' && isset($conf->global->MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND)) $forcedroundingmode=$conf->global->MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND;
- if ($forcedroundingmode == 'auto') $forcedroundingmode='0';
+ elseif ($forcedroundingmode == 'auto') $forcedroundingmode='0';
$error=0;
diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php
index 7adcd79d364..34fc77bbc34 100644
--- a/htdocs/core/class/conf.class.php
+++ b/htdocs/core/class/conf.class.php
@@ -205,6 +205,17 @@ class Conf
$db->free($resql);
}
+ // Include local constants files and fetch their values to the corresponding database constants
+ if(! empty($this->global->LOCAL_CONSTS_FILES)) {
+ $filesList = explode(":", $this->global->LOCAL_CONSTS_FILES);
+ foreach ($filesList as $file) {
+ $file=dol_sanitizeFileName($file);
+ include_once DOL_DOCUMENT_ROOT . "/$file/{$file}_consts.php";
+ foreach ($file2bddconsts as $key=>$value) {
+ $conf->global->$key=constant($value);
+ }
+ }
+ }
//var_dump($this->modules);
//var_dump($this->modules_parts['theme']);
diff --git a/htdocs/core/class/doleditor.class.php b/htdocs/core/class/doleditor.class.php
index 60d24558d86..35c3b3909ef 100644
--- a/htdocs/core/class/doleditor.class.php
+++ b/htdocs/core/class/doleditor.class.php
@@ -60,7 +60,7 @@ class DolEditor
* @param int $uselocalbrowser Enabled to add links to local object with local browser. If false, only external images can be added in content.
* @param int $okforextendededitor True=Allow usage of extended editor tool (like fckeditor)
* @param int $rows Size of rows for textarea tool
- * @param int $cols Size of cols for textarea tool (textarea number of cols or %)
+ * @param string $cols Size of cols for textarea tool (textarea number of cols '70' or percent 'x%')
* @param int $readonly 0=Read/Edit, 1=Read only
*/
function __construct($htmlname,$content,$width='',$height=200,$toolbarname='Basic',$toolbarlocation='In',$toolbarstartexpanded=false,$uselocalbrowser=true,$okforextendededitor=true,$rows=0,$cols=0,$readonly=0)
diff --git a/htdocs/core/class/dolprintipp.class.php b/htdocs/core/class/dolprintipp.class.php
index fdd0fc2732c..869b26e2f75 100644
--- a/htdocs/core/class/dolprintipp.class.php
+++ b/htdocs/core/class/dolprintipp.class.php
@@ -66,7 +66,7 @@ class dolprintIPP
*/
function list_jobs($module)
{
- global $conf, $db, $bc;
+ global $conf, $db, $bc, $langs;
include_once DOL_DOCUMENT_ROOT.'/includes/printipp/CupsPrintIPP.php';
$ipp = new CupsPrintIPP();
$ipp->setLog(DOL_DATA_ROOT.'/printipp.log','file',3); // logging very verbose
@@ -96,7 +96,8 @@ class dolprintIPP
}
catch(Exception $e)
{
- print $e->getMessage();
+ setEventMessage('[printipp] '.$langs->trans('CoreErrorMessage'), 'errors');
+ dol_syslog($e->getMessage(), LOG_ERR);
}
print '
';
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index a5643c26dc5..62ebd0589c0 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -898,9 +898,10 @@ class Form
* @param array $events Ajax event options to run on change. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
* @param int $limit Maximum number of elements
* @param string $morecss Add more css styles to the SELECT component
+ * @param string $moreparam Add more parameters onto the select tag. For example 'style="width: 95%"' to avoid select2 component to go over parent container
* @return string HTML string with select box for thirdparty.
*/
- function select_company($selected='', $htmlname='socid', $filter='', $showempty=0, $showtype=0, $forcecombo=0, $events=array(), $limit=0, $morecss='minwidth100')
+ function select_company($selected='', $htmlname='socid', $filter='', $showempty=0, $showtype=0, $forcecombo=0, $events=array(), $limit=0, $morecss='minwidth100', $moreparam='')
{
$out='';
@@ -934,7 +935,7 @@ class Form
}
else
{*/
- $out.=$this->select_thirdparty_list($selected, $htmlname, $filter, $showempty, $showtype, $forcecombo, $events, '', 0, $limit, $morecss);
+ $out.=$this->select_thirdparty_list($selected, $htmlname, $filter, $showempty, $showtype, $forcecombo, $events, '', 0, $limit, $morecss, $moreparam);
//}
return $out;
@@ -954,9 +955,10 @@ class Form
* @param int $outputmode 0=HTML select string, 1=Array
* @param int $limit Limit number of answers
* @param string $morecss Add more css styles to the SELECT component
+ * @param string $moreparam Add more parameters onto the select tag. For example 'style="width: 95%"' to avoid select2 component to go over parent container
* @return string HTML string with
*/
- function select_thirdparty_list($selected='',$htmlname='socid',$filter='',$showempty=0, $showtype=0, $forcecombo=0, $events=array(), $filterkey='', $outputmode=0, $limit=0, $morecss='minwidth100')
+ function select_thirdparty_list($selected='',$htmlname='socid',$filter='',$showempty=0, $showtype=0, $forcecombo=0, $events=array(), $filterkey='', $outputmode=0, $limit=0, $morecss='minwidth100', $moreparam='')
{
global $conf,$user,$langs;
@@ -1010,12 +1012,13 @@ class Form
}
// Construct $out and $outarray
- $out.= '