logo       

roller/src/org/roller/presentation/weblog/rss RssServlet.java,1.18,1.19: msg#00299

Subject: roller/src/org/roller/presentation/weblog/rss RssServlet.java,1.18,1.19
Update of /cvsroot/roller/roller/src/org/roller/presentation/weblog/rss
In directory 
sc8-pr-cvs1:/tmp/cvs-serv14121/src/org/roller/presentation/weblog/rss

Modified Files:
        RssServlet.java 
Log Message:
small optimization

Index: RssServlet.java
===================================================================
RCS file: 
/cvsroot/roller/roller/src/org/roller/presentation/weblog/rss/RssServlet.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** RssServlet.java     9 Jan 2003 15:48:11 -0000       1.18
--- RssServlet.java     31 Jan 2003 04:45:18 -0000      1.19
***************
*** 9,12 ****
--- 9,14 ----
  import java.util.ArrayList;
  import java.util.Date;
+ 
+ import org.apache.commons.lang.NumberUtils;
  import org.apache.commons.logging.Log;
  import org.apache.commons.logging.LogFactory;
***************
*** 93,97 ****
              Macros macros = new Macros( pageContext );
                        String catname = request.getParameter("catname");
!             ArrayList entries = macros.getRecentWeblogEntries(15, catname);
              Date updateTime = macros.getUpdateTime(entries);
              
--- 95,110 ----
              Macros macros = new Macros( pageContext );
                        String catname = request.getParameter("catname");
!             
!             int count = 20;
!             if ( request.getParameter("count") != null )
!             {
!                 count= NumberUtils.stringToInt(request.getParameter("count"));
!                 if ( count==0 || count>50 )
!                 {
!                     count = 20;
!                 } 
!             }           
!             
!             ArrayList entries = macros.getRecentWeblogEntries(count, catname);
              Date updateTime = macros.getUpdateTime(entries);
              
***************
*** 123,126 ****
--- 136,140 ----
              }
              
+             ctx.put( "entries", entries );
              ctx.put( "entryLength", new Integer(entryLength));
              ctx.put( "catname", catname);




-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
web.pylons.gene...    hurd.l4/2002-10...    kernel.commits....    user-groups.lin...    yellowdog.gener...    java.drools.use...    security.openva...    package-managem...    linux.debian.us...    qnx.openqnx.dev...    genealogy.gramp...    file-systems.if...    voip.wengophone...    tex.context/200...    ietf.smime/2003...    audio.csound.de...    culture.region....    xfree86.devel/2...    mobile.kannel.u...    distributed.con...    education.engli...    org.user-groups...    bug-tracking.gn...    recreation.bicy...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe