Author: dpillot
Date: Fri Jun  8 11:22:52 2007
New Revision: 17515

URL: https://svndev.jahia.net/websvn/listing.php?sc=3D1&rev=3D17515&repname=
=3Djahia
Log:
JAHIA-2022

Modified:
    branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/engines/importex=
port/contentpick.jsp

Modified: branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/engines/im=
portexport/contentpick.jsp
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-SP=
-BRANCH/core/src/webapp/jsp/jahia/engines/importexport/contentpick.jsp&rev=
=3D17515&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/engines/importex=
port/contentpick.jsp (original)
+++ branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/engines/importex=
port/contentpick.jsp Fri Jun  8 11:22:52 2007
@@ -64,6 +64,7 @@
      * @return a description string (cleaned or not) or a mini description=
. an empty result means use initial description unchanged
      */
     private String extractDescriptionTeaser(String description, int max, b=
oolean cleantag) {
+        if(description=3D=3Dnull || description.equals("")) return "";
         String pattern =3D "<.*?>";
         String result =3D description.replaceAll(pattern, " ");//removing =
tags
         pattern =3D "\\s+";
@@ -195,9 +196,11 @@
             while (pages.hasMoreElements()) {
                 ContentPage thePage =3D (ContentPage) pages.nextElement();
                 String _label =3D thePage.getTitle(elr);
+                               if(_label=3D=3Dnull) _label=3D"nd";
+
                 cpath +=3D_label.length();
                 if(cpath<pathsize-3){
-                bf.append("<a href=3D\"").append(thePage.getUrl(jParams)).=
append("\" target=3D\"_new\">").append(thePage.getTitle(elr)).append("</a>"=
);
+                bf.append("<a href=3D\"").append(thePage.getUrl(jParams)).=
append("\" target=3D\"_new\">").append(_label).append("</a>");
                 bf.append(" / ");
                 cpath ++;
                 } else {
@@ -1204,6 +1207,10 @@
             //got metadata description and keywords
             if (thiscontainer !=3D null && thiscontainer.getMetadata("desc=
ription", true) !=3D null) {
                 description =3D thiscontainer.getMetadata("description", t=
rue).getValue(jParams, elh.getPreviousEntryLoadRequest());
+                               if(description=3D=3Dnull){
+                                       description=3D"";
+                                       logger.debug("description is null!");
+                                       }
             }
             keywords =3D thiscontainer.getMetadataValue("keywords", jParam=
s, "").trim();
 =


_______________________________________________
cvs_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/cvs_list

Reply via email to