You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by ag...@apache.org on 2005/07/14 23:22:45 UTC

svn commit: r219102 - /incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/readmore/ReadMorePlugin.java

Author: agilliland
Date: Thu Jul 14 14:22:43 2005
New Revision: 219102

URL: http://svn.apache.org/viewcvs?rev=219102&view=rev
Log:
making sure that it uses context sensite website.getPageByXXX() method instead of old userMgr.getPageByXXX() method.

Modified:
    incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/readmore/ReadMorePlugin.java

Modified: incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/readmore/ReadMorePlugin.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/readmore/ReadMorePlugin.java?rev=219102&r1=219101&r2=219102&view=diff
==============================================================================
--- incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/readmore/ReadMorePlugin.java (original)
+++ incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/readmore/ReadMorePlugin.java Thu Jul 14 14:22:43 2005
@@ -55,7 +55,7 @@
      */
     private String getPageLink(UserManager mgr, WebsiteData website) throws RollerException
     {
-        return mgr.retrievePage(website.getDefaultPageId()).getLink();
+        return website.getDefaultPage().getLink();
     }
 
     /* 
@@ -82,11 +82,15 @@
             pageLink = getPageLink(
                 RollerFactory.getRoller().getUserManager(), entry.getWebsite());
         }
-        catch (RollerException e) 
        {
+        catch (RollerException e) 
+        {
             mLogger.warn("Unable to get pageLink", e);
         }
         
-        String result = Utilities.removeHTML(entry.getText(), true);
        result = Utilities.truncateText(result, 240, 260, "...");
        //String result = Utilities.truncateNicely(entry.getText(), 240, 260, "... ");
        
+        String result = Utilities.removeHTML(entry.getText(), true);
+        result = Utilities.truncateText(result, 240, 260, "...");
+        //String result = Utilities.truncateNicely(entry.getText(), 240, 260, "... ");
+        
         // if the result is shorter, we need to add "Read More" link
         if (result.length() < entry.getText().length())
         {