Return-Path: Delivered-To: apmail-incubator-roller-commits-archive@www.apache.org Received: (qmail 41609 invoked from network); 19 Apr 2006 22:09:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 Apr 2006 22:09:04 -0000 Received: (qmail 73257 invoked by uid 500); 19 Apr 2006 22:09:03 -0000 Delivered-To: apmail-incubator-roller-commits-archive@incubator.apache.org Received: (qmail 73230 invoked by uid 500); 19 Apr 2006 22:09:03 -0000 Mailing-List: contact roller-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: roller-dev@incubator.apache.org Delivered-To: mailing list roller-commits@incubator.apache.org Received: (qmail 73219 invoked by uid 99); 19 Apr 2006 22:09:03 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Apr 2006 15:09:03 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 19 Apr 2006 15:09:02 -0700 Received: (qmail 41360 invoked by uid 65534); 19 Apr 2006 22:08:42 -0000 Message-ID: <20060419220842.41357.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r395408 - in /incubator/roller/trunk: src/org/roller/util/Utilities.java web/WEB-INF/classes/flavors/atom.vm web/WEB-INF/classes/flavors/rss.vm Date: Wed, 19 Apr 2006 22:08:41 -0000 To: roller-commits@incubator.apache.org From: snoopdave@apache.org X-Mailer: svnmailer-1.0.8 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: snoopdave Date: Wed Apr 19 15:08:40 2006 New Revision: 395408 URL: http://svn.apache.org/viewcvs?rev=395408&view=rev Log: Show entry.summary as RSS or Atom if there is no entry.text Modified: incubator/roller/trunk/src/org/roller/util/Utilities.java incubator/roller/trunk/web/WEB-INF/classes/flavors/atom.vm incubator/roller/trunk/web/WEB-INF/classes/flavors/rss.vm Modified: incubator/roller/trunk/src/org/roller/util/Utilities.java URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/src/org/roller/util/Utilities.java?rev=395408&r1=395407&r2=395408&view=diff ============================================================================== --- incubator/roller/trunk/src/org/roller/util/Utilities.java (original) +++ incubator/roller/trunk/src/org/roller/util/Utilities.java Wed Apr 19 15:08:40 2006 @@ -73,11 +73,17 @@ private static final Pattern QUOTE_PATTERN = Pattern.compile(""", Pattern.CASE_INSENSITIVE); /** - * Utility methods for calling StringUtils since it cannot be - * instantiated and Utilties can. + * Test if string is not null and and not empty. */ public static boolean isNotEmpty(String str) { return StringUtils.isNotEmpty(str); + } + + /** + * Test if string is null or empty. + */ + public static boolean isEmpty(String str) { + return StringUtils.isEmpty(str); } //------------------------------------------------------------------------ Modified: incubator/roller/trunk/web/WEB-INF/classes/flavors/atom.vm URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/web/WEB-INF/classes/flavors/atom.vm?rev=395408&r1=395407&r2=395408&view=diff ============================================================================== --- incubator/roller/trunk/web/WEB-INF/classes/flavors/atom.vm (original) +++ incubator/roller/trunk/web/WEB-INF/classes/flavors/atom.vm Wed Apr 19 15:08:40 2006 @@ -30,7 +30,8 @@ $utilities.formatIso8601Date($entry.pubTime) $utilities.formatIso8601Date($entry.updateTime) - #if( $utilities.isNotEmpty($entry.summary) )#showEntrySummary($entry)#end + #if( $utilities.isNotEmpty($entry.summary) && $utilities.isNotEmpty($entry.text))#showEntrySummary($entry)#end + #if( $utilities.isNotEmpty($entry.summary) && $utilities.isEmpty($entry.text))#showEntrySummary($entry)#end #if( $utilities.isNotEmpty($entry.text) )#showEntryContent($entry)#end #set( $mc_url = $entry.findEntryAttribute("att_mediacast_url") ) #set( $mc_type = $entry.findEntryAttribute("att_mediacast_type") ) Modified: incubator/roller/trunk/web/WEB-INF/classes/flavors/rss.vm URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/web/WEB-INF/classes/flavors/rss.vm?rev=395408&r1=395407&r2=395408&view=diff ============================================================================== --- incubator/roller/trunk/web/WEB-INF/classes/flavors/rss.vm (original) +++ incubator/roller/trunk/web/WEB-INF/classes/flavors/rss.vm Wed Apr 19 15:08:40 2006 @@ -22,7 +22,8 @@ #end $utilities.formatRfc822Date($entry.pubTime) $utilities.textToHTML($entry.category.name,true) - #if( $utilities.isNotEmpty($entry.summary) )#showEntrySummary($entry)#end + #if( $utilities.isNotEmpty($entry.summary) && $utilities.isNotEmpty($entry.text))#showEntrySummary($entry)#end + #if( $utilities.isNotEmpty($entry.summary) && $utilities.isEmpty($entry.text))#showEntrySummary($entry)#end #if( $utilities.isNotEmpty($entry.text) )#showEntryContent($entry)#end #set( $mc_url = $entry.findEntryAttribute("att_mediacast_url") ) #set( $mc_type = $entry.findEntryAttribute("att_mediacast_type") )