You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2005/01/06 15:47:13 UTC
svn commit: r124383 - /lenya/trunk/src/webapp/lenya/pubs/blog/java/src/org/apache/lenya/cms/authoring/NewBlogEntryCreator.java
Author: andreas
Date: Thu Jan 6 06:47:11 2005
New Revision: 124383
URL: http://svn.apache.org/viewcvs?view=rev&rev=124383
Log:
fixed xpath to replace author
Modified:
lenya/trunk/src/webapp/lenya/pubs/blog/java/src/org/apache/lenya/cms/authoring/NewBlogEntryCreator.java
Modified: lenya/trunk/src/webapp/lenya/pubs/blog/java/src/org/apache/lenya/cms/authoring/NewBlogEntryCreator.java
Url: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/pubs/blog/java/src/org/apache/lenya/cms/authoring/NewBlogEntryCreator.java?view=diff&rev=124383&p1=lenya/trunk/src/webapp/lenya/pubs/blog/java/src/org/apache/lenya/cms/authoring/NewBlogEntryCreator.java&r1=124382&p2=lenya/trunk/src/webapp/lenya/pubs/blog/java/src/org/apache/lenya/cms/authoring/NewBlogEntryCreator.java&r2=124383
==============================================================================
--- lenya/trunk/src/webapp/lenya/pubs/blog/java/src/org/apache/lenya/cms/authoring/NewBlogEntryCreator.java (original)
+++ lenya/trunk/src/webapp/lenya/pubs/blog/java/src/org/apache/lenya/cms/authoring/NewBlogEntryCreator.java Thu Jan 6 06:47:11 2005
@@ -97,8 +97,14 @@
// Replace author
- Identity identity = (Identity)parameters.get("org.apache.lenya.ac.Identity");
- element = (Element) XPathAPI.selectSingleNode(parent, "/*[local-name() = 'entry']/*[local-name() = 'author']/*[local-name = 'name']");
+ Identity identity = (Identity) parameters.get(Identity.class.getName());
+
+ element = (Element) XPathAPI.selectSingleNode(parent, "/*[local-name() = 'entry']/*[local-name() = 'author']/*[local-name() = 'name']");
+
+ if (element == null) {
+ throw new RuntimeException("Element entry/author/name not found.");
+ }
+
element.setNodeValue(identity.getUser().getId());
// Replace date created (and issued and modified, FIXME: issued should be set during first time publishing, modified should be set during re-publishing)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org