Commit Graph
420 Commits
Author SHA1 Message Date
Jacopo Cappellato 400d48ab4c OFBIZ-5167 Applied patch from Leon to fix a wrong array index that was causing the proliferation of subfolders in the runtime/uploads directory.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1463989 13f79535-47bb-0310-9956-ffa450edef68
2013-04-03 12:59:10 +00:00
Scott Gray 04df9cb162 Add a bunch of missing Override annotations
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1418651 13f79535-47bb-0310-9956-ffa450edef68
2012-12-08 12:06:40 +00:00
Scott Gray 5df3e3f70b Remove a bunch of unused imports, no functional changes
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1418646 13f79535-47bb-0310-9956-ffa450edef68
2012-12-08 12:03:52 +00:00
Erwan de Ferrieres 97d5a93b23 Upgrading to latest stable Apache lucene version
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1405428 13f79535-47bb-0310-9956-ffa450edef68
2012-11-03 21:50:23 +00:00
Scott Gray a2a2857bef Replace more misc. webSiteId retrievals with calls to WebSiteWorker.getWebSiteId(request). Deprecated CatalogWorker.getWebSiteId(request) and CatalogWorker.getWebSite(request).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1400626 13f79535-47bb-0310-9956-ffa450edef68
2012-10-21 11:27:10 +00:00
Scott Gray 47abb49013 Replaced direct access to webSiteId from the servlet context attributes with calls to WebSiteWorker.getWebSiteId(request)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1400601 13f79535-47bb-0310-9956-ffa450edef68
2012-10-21 08:53:04 +00:00
Adrian Crum 8f23ccfa30 Fixed NPE in Content component.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1400421 13f79535-47bb-0310-9956-ffa450edef68
2012-10-20 11:34:26 +00:00
Erwan de Ferrieres 0e1d563143 Upgrading to lucene 3.6.1
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1380896 13f79535-47bb-0310-9956-ffa450edef68
2012-09-04 21:26:41 +00:00
Jacques Le Roux 1e64fe94c7 A slightly modified patch from Nicolas Malin "change serviceName by customMethod on Content " https://issues.apache.org/jira/browse/OFBIZ-5020
When you used a content as template, the content.serviceName value used to call the context populate service before rendering.
I propose to replace serviceName field by customMethodId and use customMethod pattern for more flexibility.
serviceName field is kept for backward compatibility

Thanks to Scott and Adrian for support


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1379937 13f79535-47bb-0310-9956-ffa450edef68
2012-09-02 09:46:20 +00:00
Jacques Le Roux 7738f5a45c Revert r1379389 it was incomplete and need more work, see https://issues.apache.org/jira/browse/OFBIZ-5020#comment-13446639
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1379740 13f79535-47bb-0310-9956-ffa450edef68
2012-09-01 10:44:14 +00:00
Jacques Le Roux fa5824d1af A patch from Nicolas Malin "change serviceName by customMethod on Content " https://issues.apache.org/jira/browse/OFBIZ-5020
When you used a content as template, the content.serviceName value used to call the context populate service before rendering.
I propose to replace serviceName field by customMethodId and use customMethod pattern for more flexibility.
serviceName field is renamed to oldServiceName field for backward compatibility



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1379389 13f79535-47bb-0310-9956-ffa450edef68
2012-08-31 09:55:34 +00:00
Jacopo Cappellato b3c51dfa0f Misc cleanups (no functional changes) to the Lucene integration:
* removed unused imports
* removed unused old methods with duplicated logic
* made some methods private
* improved some debug statements
* formatting adjustments

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1375970 13f79535-47bb-0310-9956-ffa450edef68
2012-08-22 10:16:52 +00:00
Jacopo Cappellato dfd54dd328 Fixed some inconsistent use of Lucene Version (now the current Version is set as a static final field of SearchWorker); misc minor code cleanups.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1374328 13f79535-47bb-0310-9956-ffa450edef68
2012-08-17 15:43:30 +00:00
Jacopo Cappellato dc97189688 Minor code cleanup: removed unnecessary variable declaration.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1374283 13f79535-47bb-0310-9956-ffa450edef68
2012-08-17 14:24:47 +00:00
Jacopo Cappellato 739defff37 Minor code cleanup: removed empty lines and reused a variable rather than getting it from a GenericValue.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1374273 13f79535-47bb-0310-9956-ffa450edef68
2012-08-17 14:08:23 +00:00
Jacopo Cappellato e283d923ab Added a new special error string returned by the serveObjectData event when the output stream has been already used; this is associated to a no-response because we will not be able to return the error page; this used to cause an error in the logs.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1363786 13f79535-47bb-0310-9956-ffa450edef68
2012-07-20 14:03:34 +00:00
Jacques Le Roux c78b9f662c Moves addMostRecent services to Attic
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1348546 13f79535-47bb-0310-9956-ffa450edef68
2012-06-10 08:04:39 +00:00
Adam Heath 00047e7e37 DEPRECATION: applications: GenericValue.getRelated(ByAnd|OrderBy)(|Cache)
replaced by the single getRelated variant.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343528 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:20:58 +00:00
Adam Heath 43efe66c75 DEPRECATION: applications/content: GenericValue.getRelated/getRelatedCache variants replaced with a single getRelated variant that takes a boolean useCache parameter.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343511 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:17:44 +00:00
Adam Heath a92d79d341 DEPRECATION: applications/content: getRelatedOne variants replaced with a getRelatedOne variant that takes a boolean useCache parameter.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343481 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:12:04 +00:00
Adam Heath b0a3703c6b DEPRECATION: applications/content: findByAnd variants replaced with findByAnd that takes a boolean useCache parameter.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338406 13f79535-47bb-0310-9956-ffa450edef68
2012-05-14 21:00:34 +00:00
Adam Heath d40ce532e1 DEPRECATION: applications/content: findByPrimaryKey variants replaced
with findOne

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1337665 13f79535-47bb-0310-9956-ffa450edef68
2012-05-12 21:18:36 +00:00
Adam Heath a6a2498e51 FORMATTING: Combined split lines, removed a few blank lines, added {}
around single-stmt if, reindented a few things, added spaces after
casts.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1337319 13f79535-47bb-0310-9956-ffa450edef68
2012-05-11 18:02:50 +00:00
Hans Bakker 3416f110b9 improve error messages by replacing null pointer exception with meaningfull message
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1326268 13f79535-47bb-0310-9956-ffa450edef68
2012-04-15 07:58:09 +00:00
Scott Gray 05616620b7 CVE-2012-1621: Prevent user submitted data from being streamed directly back to the browser when the content map-key is not found. Log a warning instead.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1309993 13f79535-47bb-0310-9956-ffa450edef68
2012-04-05 18:24:54 +00:00
Jacques Le Roux 8cfaf4aaf6 A patch from Sebastian Leitner "ContentManagementServices throws NullPointerException" https://issues.apache.org/jira/browse/OFBIZ-4751
Fixes a NPE

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1303764 13f79535-47bb-0310-9956-ffa450edef68
2012-03-22 12:59:00 +00:00
Erwan de Ferrieres ceb6b06df1 Changes from while to for each loops in content component
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1301931 13f79535-47bb-0310-9956-ffa450edef68
2012-03-17 13:03:31 +00:00
Ashish Vijaywargiya eb372bb2ba On production systems you can't suppress Debug.log( message by the use of debug.properties file. It is always good to use Debug.* statements that are having log level setup in debug.properties file. The real problem comes with Debug.log( statement when you are printing any list or map object that contains so many records(or data) in it. Here I am changing all the occurrence of Debug.log( with Debug.logInfo(, Debug.logError( or Debug.logWarning( so that we can have better control of Debug.* statements on production system. :-)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1300463 13f79535-47bb-0310-9956-ffa450edef68
2012-03-14 06:07:52 +00:00
Hans Bakker 9de0762a42 make it possible that the applicable system settings in general properties can be overridded by settings in the database.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1240016 13f79535-47bb-0310-9956-ffa450edef68
2012-02-03 07:17:00 +00:00
Erwan de Ferrieres 05c9bae6e5 tabs to spaces, no functional changes - java files
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1230478 13f79535-47bb-0310-9956-ffa450edef68
2012-01-12 10:37:35 +00:00
Erwan de Ferrieres 1901c4b266 optimize is deprecated with Lucene 3.5.0, we should now use forceMerge, I forgot this one at rev 1226952
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1227339 13f79535-47bb-0310-9956-ffa450edef68
2012-01-04 21:45:26 +00:00
Erwan de Ferrieres a54992b9ed upgrade Lucene Core to 3.5.0 -- see changelog at http://lucene.apache.org/java/docs/index.html#27+November+2011+-+Lucene+Core+3.5.0
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1226952 13f79535-47bb-0310-9956-ffa450edef68
2012-01-03 21:22:59 +00:00
Hans Bakker c31c42d742 implement 404 page tracking in google analytics also for the pages coming from the content component. more info at: http://support.google.com/googleanalytics/bin/answer.py?hl=en&answer=86927
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1221128 13f79535-47bb-0310-9956-ffa450edef68
2011-12-20 07:36:45 +00:00
Jacques Le Roux 75532a3358 A patch from Martin Kreidenweis https://issues.apache.org/jira/browse/OFBIZ-4451
Warning in log when using @renderSubContentCache freemarker macro

When using the @renderSubContentCache freemarker macro, warnings like this appear in the log:

[      GenericEntity.java:314:WARN ] The field name (or key) [caContentAssocTypeId] is not valid for entity [ContentDataResourceView], printing IllegalArgumentException instead of throwing it because Map interface specification does not allow throwing that exception.

Patch: GenericValue.get() will actually not throw an exception but instead log a warning if the field doesn't exist, so now we first check if the field we are trying to access exists.
Checking one of the fields through the ModelEntity should be enough, as all three of them come from the same entity.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1212147 13f79535-47bb-0310-9956-ffa450edef68
2011-12-08 21:56:02 +00:00
Erwan de Ferrieres 097e8f990d Forgot to remove an unused import at rev 1202437
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1202445 13f79535-47bb-0310-9956-ffa450edef68
2011-11-15 22:19:53 +00:00
Erwan de Ferrieres 81d65d7ced reorganizing commments so that there are no more one-word lines
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1202440 13f79535-47bb-0310-9956-ffa450edef68
2011-11-15 22:02:06 +00:00
Erwan de Ferrieres 38c04736d1 refactoring in Lucene search, using for each instead of while, no functional changes
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1202437 13f79535-47bb-0310-9956-ffa450edef68
2011-11-15 21:54:01 +00:00
Hans Bakker aa3d73675b also introduce keyword size limit(configurable) in product and move property setting to content component
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1199130 13f79535-47bb-0310-9956-ffa450edef68
2011-11-08 07:02:16 +00:00
Hans Bakker f644018217 create a configurable maxlength keyword for content search keywords
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1198709 13f79535-47bb-0310-9956-ffa450edef68
2011-11-07 12:04:16 +00:00
Hans Bakker d7990380d1 another impovement to the content filter when a url has the '/control/main' shopped of
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1179100 13f79535-47bb-0310-9956-ffa450edef68
2011-10-05 08:32:44 +00:00
Hans Bakker 9dfef06c9e seo friendly url did not work on blog entries: reported by Ruth on the ofbiz mailing list
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1178317 13f79535-47bb-0310-9956-ffa450edef68
2011-10-03 07:37:01 +00:00
Jacques Le Roux c2f4aa2851 A patch from Martin Kreidenweis "updateContentAndUploadedFile service broken" https://issues.apache.org/jira/browse/OFBIZ-4452
The updateContentAndUploadedFile service doesn't work correctly: When the new file is shorter (smaller) than the old file, only part of the file is replaced; it keeps its original size. 



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1177128 13f79535-47bb-0310-9956-ffa450edef68
2011-09-29 00:34:43 +00:00
Sascha Rodekamp 082526b9de FIX: Wrong use of toArray() method (https://issues.apache.org/jira/browse/OFBIZ-4425). A patch from Dimitri Unruh which replaces Array Casts with a propper call of the toArray method.
String[] temp = (String[]) foo.toArray(); <-- may cause class cast exception it is better to use: String[] temp = foo.toArray(new String[foo.size()]) 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1173607 13f79535-47bb-0310-9956-ffa450edef68
2011-09-21 12:53:35 +00:00
Sascha Rodekamp 46b29a9911 IMPROVEMENT: Replace String concatenation in a loop (https://issues.apache.org/jira/browse/OFBIZ-4418) A patch from Dimitri Unruh.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1170961 13f79535-47bb-0310-9956-ffa450edef68
2011-09-15 06:04:29 +00:00
Jacques Le Roux 2b712efb98 No functional changes, simple code refactoring around UtilValidate.is(Not)Empty()
Changes implementation of UtilValidate.isEmpty() for Collection and Map by using isEmpty() instead of c.size() == 0). It's more clear and as efficient. Removes also useless parentheses there.

Makes use of UtilValidate.is(Not)Empty() everywhere it makes senses. This for 2 reasons:
* Make the code more readable by replacing the (!)null/isEmpty pattern.
* Avoid possible NPEs when only isEmpty() was used (after Entity.find... for instance). I found a lot of cases (242 today) where isEmpty() could perhaps be replaced in Framework. But I guess no NPE checks were missing there and anyway it was too much for me to check them all... So I only did the relevant changes in Applications...



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1169478 13f79535-47bb-0310-9956-ffa450edef68
2011-09-11 17:06:11 +00:00
Hans Bakker 53de1508c4 improve the alternative seo friendly content url: some url's where not recognized
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1153366 13f79535-47bb-0310-9956-ffa450edef68
2011-08-03 07:12:29 +00:00
Hans Bakker e2531c1cfc improved content friendly urls, fix some errors
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1148144 13f79535-47bb-0310-9956-ffa450edef68
2011-07-19 04:04:32 +00:00
Hans Bakker 1749a6989f Add seo friendly url's for showing content. reorganize the same program snippets with seo friendly url for products. These content url's are demonstrated at the ecommerce frontend in the left bottom corner: Content Information
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1141878 13f79535-47bb-0310-9956-ffa450edef68
2011-07-01 09:03:32 +00:00
Scott Gray 89f4d19219 OFBIZ-4323 fix NPE bug reported by Javier Orrantia, screen xml documents rendered retrieved via the DataResourceWorker weren't using the correct UtilXml method that populates the xml documents userData.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139504 13f79535-47bb-0310-9956-ffa450edef68
2011-06-25 08:45:22 +00:00
Hans Bakker 37fac38c97 add a button to content to (re) generate the keywords for all content. The whole keyword implementation was done by Antwebsystems employee Tom
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1130890 13f79535-47bb-0310-9956-ffa450edef68
2011-06-03 03:05:23 +00:00