Commit Graph
8249 Commits
Author SHA1 Message Date
Michael Brohl cd6eedc2c3 Applied patch for OFBIZ-6632: Incorrect comparison in TemporalExpressionWorker.java
This patch introduces some constants for the expression types and corrects the wrong comparison.

Thanks Vyom Jain for spotting this issue and Martin Becker for providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1704043 13f79535-47bb-0310-9956-ffa450edef68
2015-09-19 14:27:54 +00:00
Michael Brohl b9816d1d5d Applied patch for OFBIZ-6594: Wrong Documentation for Temporal Expressions.
The integer value representing the HOUR was wrong in the documentation.

Thanks Mirco Vogelsmeier for spotting this and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1703965 13f79535-47bb-0310-9956-ffa450edef68
2015-09-19 09:14:48 +00:00
Michael Brohl 82b7386e3d Applied patch for OFBIZ-6621: MapContext.entrySet() slows down when ByteBuffer objects are in the context.
Introduces a private inner class ListSet representing a Set backed by a List instead of the HashSet implementation.

Thanks Gareth Carter for spotting this and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1703954 13f79535-47bb-0310-9956-ffa450edef68
2015-09-19 08:43:40 +00:00
Jacques Le Roux f98543b1ff A patch from Gaudin Pierre for "error in isValidEan util" https://issues.apache.org/jira/browse/OFBIZ-6624
There is an error in isValidEan util. It should be 12 and not 13 in the methods charAt and calcChecksum  because they start at 0.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1703586 13f79535-47bb-0310-9956-ffa450edef68
2015-09-17 12:05:19 +00:00
Jacques Le Roux 32b4877639 A patch from Gareth Carter for "PurgeJob.java does not delete RecurrenceRule because it is still referenced by RecurrenceInfo" https://issues.apache.org/jira/browse/OFBIZ-6619
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1703121 13f79535-47bb-0310-9956-ffa450edef68
2015-09-15 08:34:41 +00:00
Jacques Le Roux d2ab653ea7 A patch from Wei Zhang for "The EntityListIterator must be closed in EntityQuery.query()" https://issues.apache.org/jira/browse/OFBIZ-6615
jleroux: The EntityListIterator at line 453 is now closed (dynamicViewEntity complete list retrieved once, eg: agreementServices.getCommissionForProduct())

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1702548 13f79535-47bb-0310-9956-ffa450edef68
2015-09-11 20:49:42 +00:00
Jacques Le Roux c04f6e84c9 A completed patch from Oleg Andreyev for "Using official content type for json requests" https://issues.apache.org/jira/browse/OFBIZ-6608
I suggest using application/json instead of application/x-json as it is official content type. It seems x-json does not cause any problem for the time being but browsers will load json responses correctly without asking for download. It's handy in development time. It also matches JQuery Accept header.

jleroux: I also used it in Solr




git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1701915 13f79535-47bb-0310-9956-ffa450edef68
2015-09-09 07:16:18 +00:00
Jacopo Cappellato 02415d77ea Upgraded Apache Tomcat to the latest bug fix release of the 7 series: 7.0.64
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1701164 13f79535-47bb-0310-9956-ffa450edef68
2015-09-04 06:56:13 +00:00
Jacques Le Roux faed9fe69d A patch from Pierre Smits for "Update site-conf.xsd to prioritise Groovy over BSF" https://issues.apache.org/jira/browse/OFBIZ-6597
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1701150 13f79535-47bb-0310-9956-ffa450edef68
2015-09-04 03:51:55 +00:00
Adrian Crum 6066e4e42f Make primitive initialization explicit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1700864 13f79535-47bb-0310-9956-ffa450edef68
2015-09-02 18:43:41 +00:00
Adrian Crum 26198405b9 Added a FIXME comment. No functional change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1698406 13f79535-47bb-0310-9956-ffa450edef68
2015-08-28 20:26:01 +00:00
Deepak Dixit 23d692dd3f (OFBIZ-6563) Fixed lookup party search form, used correct name for groupName field. Fix the focus-field-name from partyName to partyId as partyName is not a valid field on lookup party form. Used correct jQuery.each method in for paginationMenus. Now lookup party is working fine.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1697674 13f79535-47bb-0310-9956-ffa450edef68
2015-08-25 13:43:12 +00:00
Jacopo Cappellato 6b36022817 Reverted 1530237: the sql type for Postgres for "comments" and "description" fields was changed from VARCHAR(255) to TEXT; the new TEXT type allows strings of any length; however all other types definitions (MySQL, Derby etc...) are using VARCHAR(255) thus limiting the length of "comments" and "description" fields to 255 characters.
By reverting this change we make sure that the Postgres db will be consistent with the other dbs.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1697590 13f79535-47bb-0310-9956-ffa450edef68
2015-08-25 07:46:31 +00:00
Shi Jinghai 85ab0e0eff OFBIZ-4154 Use ZXing to generate QR 2d barcode.
1. Add zxing-core-3.2.0.jar to framework/base/lib and .classpath.
2. Add services_qrcode.xml and QRCodeService.java in framework/common/.
3. Add qrcode request in common-controller.xml and QRCodeEvents.java under framework/common/.
4. Add qrcode.properties and QRCodeUiLabels.xml under framework/common/.
5. Add a barcode example page in specialpurpose/example, entry is on page: /example/control/EditExample?exampleId=EX01, the example can be seen on page: /example/control/ExampleReportPdfBarcode?exampleId=EX01

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1696921 13f79535-47bb-0310-9956-ffa450edef68
2015-08-21 10:03:11 +00:00
Deepak Dixit 509727e6a1 Applied patch from jira issue - OFBIZ-6566 -SecurityGroup doesn't get removed from a Party.
Thanks Pierre Smits for reporting the issue and thanks  Neeraj Kumawat for providing the patch for the same.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1696234 13f79535-47bb-0310-9956-ffa450edef68
2015-08-17 10:53:20 +00:00
Jacques Le Roux 067df90ae1 After r1695126, I found that most of the Java files have svn:eol-style=native. So only 116 Java files were missing svn:eol-style=native. I guess those have been added by committers who are not using the OFBiz svn config file on their machines. So rather than removing svn:eol-style=native, this commits add the property to the files which miss it. Here 116+89=205 files have their svn:eol-style property changed to native.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1695129 13f79535-47bb-0310-9956-ffa450edef68
2015-08-10 16:33:23 +00:00
Jacques Le Roux dca48b0893 Reverts r1044202. No functional change.
This reverts svn:eol-style=native on Java files which were forced by r1044202n, 89 Java files are concerned. This commit hopefully makes things more consistent. 
It's indeed hard to see the impact of this change before it's committed. I'll check once done, I already found 116 Java files w/o svn:eol-style=native but there are 1231 Java files at all, so not sure how most are set...


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1695126 13f79535-47bb-0310-9956-ffa450edef68
2015-08-10 16:15:37 +00:00
Deepak Dixit b43c43d7d2 (OFBIZ-6572) Fixed character encoding issue if multitenant is set to Y, move the setCharacterEncoding and setAttributesFromRequestBody method before the multitenant block in ContextFilter, as multitenant block reading the tenatId form request parameter.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1695017 13f79535-47bb-0310-9956-ffa450edef68
2015-08-10 10:45:49 +00:00
Jacques Le Roux 9e85e905ad Fixes the indent, thanks to Gil's reports
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1693864 13f79535-47bb-0310-9956-ffa450edef68
2015-08-03 08:55:56 +00:00
Jacques Le Roux 465a25f631 Based on recent Moqui addition, adds description and geoPointTypeEnumId to GeoPoint entity, see https://github.com/sssonline/moqui/commit/39a12eaedcc8e8d134457f6a38146737728bda24 for details
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1693799 13f79535-47bb-0310-9956-ffa450edef68
2015-08-02 09:40:02 +00:00
Deepak Dixit aafe193fbd (OFBIZ-6561) Reverted r#1668267 and related changes done in r1674064, 1669537 to fix the cache issue,
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1693701 13f79535-47bb-0310-9956-ffa450edef68
2015-08-01 10:12:39 +00:00
Jacques Le Roux c9bfd92ad0 A solution from Gareth Carter for "Wrong percent encoding in Webtool/SQL Processor" https://issues.apache.org/jira/browse/OFBIZ-6567
This was reported by Gareth Carter;

If for instance you use this SQL expression
    select * from Party_Role where role_Type_Id LIKE  '%CA%'
It will be interpreted (and returned to UI) as
   select * from Party_Role where role_Type_Id LIKE  'Ê%'
And no result will be returned when OOTB there is  6 <PartyRole partyId="***" roleTypeId="CARRIER"/> entities

The solution is to keep the SQL expression string from the context at the top of the EntitySQLProcessor.groovy script and put it back in context after the request call (at bottom)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1693579 13f79535-47bb-0310-9956-ffa450edef68
2015-07-31 11:56:58 +00:00
Shi Jinghai e173523638 Comment out
Debug.logInfo("======save last view: " + session.getAttribute("_LAST_VIEW_NAME_"));


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1693417 13f79535-47bb-0310-9956-ffa450edef68
2015-07-30 12:33:05 +00:00
Jacques Le Roux 1310a182cc Document to makes the changes for OFBIZ-6504 more clear
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1693400 13f79535-47bb-0310-9956-ffa450edef68
2015-07-30 09:26:20 +00:00
Deepak Dixit cc7d7333c1 (OFBIZ-6562) Used getCombinedMap instead of getParameterMap while preparing param map for string-map-prefix. Now string-map-prefix will work fine in case of ajax call as well.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1693393 13f79535-47bb-0310-9956-ffa450edef68
2015-07-30 08:07:20 +00:00
Jacques Le Roux 9f00d68173 Fixes an issue crossed while checking OFBIZ-6504 - how to Create PDF with password Protected in Ofbiz
There was still an issue in normal (not PDF) mode, I thought I had just to replace \' by void, but I got fooled, because \' already transformed in Unicode characters (&#x5c;&#x27;) at this stage. So I replaced "&#x5c;&#x27;" by "&#x27;"

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1693258 13f79535-47bb-0310-9956-ffa450edef68
2015-07-29 13:33:12 +00:00
Shi Jinghai 8f3c4a1bda OFBIZ-6504.
In ScreenFopViewHandler.java, removed a line:
            pdfEncryptionParams.setEncryptionLengthInBits(256);
it's redundant to the line
            pdfEncryptionParams.setEncryptionLengthInBits(encryptionLength);


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1693243 13f79535-47bb-0310-9956-ffa450edef68
2015-07-29 11:58:48 +00:00
Jacques Le Roux 06a06feb14 Fixes an issue crossed while checking OFBIZ-6504 - how to Create PDF with password Protected in Ofbiz
When a description used in a drop-down comes from a localised label in CommonEntityLabels.xml and contains a single quote (') this single quote must be escaped to allow the rendering. Else it's a single quote inside 2 single quotes for the option like:
{'key':'EXST_CANCELLED','description':'Annuler l'exemple (En projet)'}
with he percent encoding there is no issue:
{'key':'EXST_CANCELLED','description':'Annuler l%27exemple (En projet)'}

We noted, with Jinghai, that using html entities does not work. I guess due to another encoding further in the chain. I also tried to percent encoding but was unable to find how to replace a % in Freemarker. Thanks to Gareth's suggestion I finally escaped the quote. Also to escape the quote with replaceAll() in Java you have to put 5 \,  small but weird issues ;) I hope nothing else somewhere already escape the quote, we will see anyway...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1693242 13f79535-47bb-0310-9956-ffa450edef68
2015-07-29 11:50:41 +00:00
Shi Jinghai 89f0ba788b OFBIZ-6552 - Error when changing language after using the product jump from the left part of the main product screen
Add a check on whether viewName is empty to view-last branch. If it's empty, try to use the value in the response config if it exists.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1693231 13f79535-47bb-0310-9956-ffa450edef68
2015-07-29 09:55:24 +00:00
Jacques Le Roux 11c4af1c2c OFBIZ-6545 - Replace webtools/control/EntitySQLProcessor FTL with widgets
Damned, forgot to save a change after undoing a try for an issue I will create soon. This was not in Gil's patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1692726 13f79535-47bb-0310-9956-ffa450edef68
2015-07-26 15:16:20 +00:00
Jacques Le Roux 7c79d1e6f3 A patch from Gil Portenseigne for OFBIZ-6545 - Replace webtools/control/EntitySQLProcessor FTL with widgets
And while at it set ofbiz.org as default selGroup when none exist. This will prevent the unobvious error message
  <<Unable to esablish a connection with the database. (Unable to acquire a new connection from the pool)>>
in most cases!

This patch replaces EntitySQLCommand ftl to widget. List screen couldn't be migrated to widget due to dynamic column rendering.
To get the default group, a little trick is used, constructing the list of map for drop-down list-option widget.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1692725 13f79535-47bb-0310-9956-ffa450edef68
2015-07-26 15:12:49 +00:00
Jacques Le Roux 6f514d81fb The description attribute of the display-entity element is now escaped to prevent the risk of an XSS attack.
[CVE-2015-3268] Stored Cross-Site Scripting Vulnerability affecting the description attribute of the display-entity element because it was not escaped.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1692357 13f79535-47bb-0310-9956-ffa450edef68
2015-07-23 08:36:36 +00:00
Shi Jinghai a575165ce4 OFBIZ-6504 - Create password protected PDF in OFBiz
1. Changed to use FOP 2.0 native encryption, jars are updated.

2. Now the Embeded options are request parameters supported in ScreenFopViewHandler.java, the options are:
http://xmlgraphics.apache.org/fop/2.0/pdfencryption.html#embedded
the default values of the options can be configured in framework/webapp/config/fop.properties.

3. The demo page is https://localhost:8443/example/control/ExampleReportPdfOptions?exampleId=EX01

4. Barcode is tested.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1691852 13f79535-47bb-0310-9956-ffa450edef68
2015-07-19 20:41:32 +00:00
Jacques Le Roux 1d9f55c71f A patch from Francis Douet for "streamContentToBrowser fails when the file name contains a comma, only with Chrome." https://issues.apache.org/jira/browse/OFBIZ-6554
streamContentToBrowser fails when the file name contains a comma, happens only with Google Chrome.
Can easily be reproduced for example by uploading the Logo Image URL of the default organization in the party manager, that includes a comma of course.
Fixed in my patch by wrapping the file name in quotes.
Error on the browser console:
GET https://localhost:8443/content/control/stream?contentId=10020 net::ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION

jleroux: at 1935.1 section of http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html I read this example << Content-Disposition: attachment; filename="fname.ext">> So Francis's solution is the right one

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1690086 13f79535-47bb-0310-9956-ffa450edef68
2015-07-09 12:30:22 +00:00
Shi Jinghai 7e30e504c8 OFBIZ-6542 as Gan Hong-Wai suggested, added EntityCondition.makeCondition("geoTypeId", "TERRITORY") in CommonWorkers.java of trunk.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1689266 13f79535-47bb-0310-9956-ffa450edef68
2015-07-05 17:20:46 +00:00
Jacques Le Roux 6ceb90c8fa Puts the focus on the 1st field of the scheduleForm in the setServiceParameterSync.ftl if it exists
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1688773 13f79535-47bb-0310-9956-ffa450edef68
2015-07-02 07:40:15 +00:00
Jacques Le Roux bc3d048a3f OFBIZ-6544 - The focus-field-name form widget feature is broken
This fixes it

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1688772 13f79535-47bb-0310-9956-ffa450edef68
2015-07-02 07:38:02 +00:00
Nicolas Malin 07fdc51217 correct compilation error, missing delegatorBaseName parameter for function GenericDelegator.getEntityNamesByGroup. Issue OFBIZ-6533, thanks Wei Zhang for this alert
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1687679 13f79535-47bb-0310-9956-ffa450edef68
2015-06-26 07:04:55 +00:00
Jacques Le Roux a41d4ac771 OFBIZ-6532 - Adding a new entity-group but no corresponding delegator/group-map is hard to debug
Adds an error message in log just before crash, so it's easy to debug

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1687589 13f79535-47bb-0310-9956-ffa450edef68
2015-06-25 17:24:55 +00:00
Deepak Dixit 43ed056525 OFBIZ-6530: Removed async=false from lookupDescriptionLoaded , getJSONuiLabels and getJSONuiLabel js method.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1687427 13f79535-47bb-0310-9956-ffa450edef68
2015-06-25 08:13:32 +00:00
Adrian Crum 4fc6618abe Removed DCL code from TreeFactory.java, small code cleanup.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1687348 13f79535-47bb-0310-9956-ffa450edef68
2015-06-24 19:18:16 +00:00
Jacques Le Roux b0ba66e6d7 Fixes a typo
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1687299 13f79535-47bb-0310-9956-ffa450edef68
2015-06-24 14:37:03 +00:00
Jacques Le Roux 4d2a942aa4 A patch from Gil Portenseigne for "Add a mean to untie geo associations" https://issues.apache.org/jira/browse/OFBIZ-6528
In the Webtools we can asociate Geos but we have yet no means to untie them

This patch adds a new grid in EditGeoScreen to see/delete GeoAssoc and CommonEntityLabels default-resource-name on GeoAssocType for translation purpose.

jleroux: On Pierre's Smits suggestion Gil also added a clickable link to open the associated Geo and a column to show the geoTypeId of the associated Geo.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1687259 13f79535-47bb-0310-9956-ffa450edef68
2015-06-24 13:10:00 +00:00
Adrian Crum 73e5b3af04 JavaDoc fixes, no functional change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1687141 13f79535-47bb-0310-9956-ffa450edef68
2015-06-23 22:02:33 +00:00
Adrian Crum 6bd65c4b2f Fixed some C&P errors in ModelFieldVisitor.java. No functional change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1687093 13f79535-47bb-0310-9956-ffa450edef68
2015-06-23 16:46:06 +00:00
Shi Jinghai 85bed69778 Refs #6518.
Translated new labels in trunk version into zh locale (Simplified Chinese).

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1686778 13f79535-47bb-0310-9956-ffa450edef68
2015-06-22 07:10:41 +00:00
Nicolas Malin 895c9856b3 Cleaning forms code is needed after setting default-value in list-options and entity-options, patch related to OFBIZ-6524 and follows the resolution of OFBIZ-6490 and OFBIZ-6489. Thanks Gil Portenseigne for this effort
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1686674 13f79535-47bb-0310-9956-ffa450edef68
2015-06-20 21:58:05 +00:00
Nicolas Malin 7382855c7b Use as default on <entity-option> and <list-option> description attribute like <display-entity> element. Related issues OFBIZ-6489 and OFBIZ-6490. Thanks to Christian Carlow for this and Gil Portenseigne for the review
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1686673 13f79535-47bb-0310-9956-ffa450edef68
2015-06-20 21:28:12 +00:00
Adrian Crum e2f875de2d Restored the 'request-confirmation' and 'confirmation-message' menu item attributes that were removed in the recent widget refactoring - https://issues.apache.org/jira/browse/OFBIZ-6334.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1686666 13f79535-47bb-0310-9956-ffa450edef68
2015-06-20 19:41:05 +00:00
Adrian Crum 220270f628 Move theme-specific js & css references from CommonDecorator(s) to themes - https://issues.apache.org/jira/browse/OFBIZ-6362.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1686655 13f79535-47bb-0310-9956-ffa450edef68
2015-06-20 17:02:22 +00:00