|
|
Choosing A Webhost: |
svn commit: r371896 - /lenya/trunk/src/java/org/apache/lenya/cms/site/useca: msg#00131cms.lenya.cvs
Author: josias Date: Tue Jan 24 03:27:06 2006 New Revision: 371896 URL: http://svn.apache.org/viewcvs?rev=371896&view=rev Log: use the correct document id in the existance-check in the case of a sibling-after relation: use the method getNewDocumentId() because it takes the relation (child, sibling-after) into account. Modified: lenya/trunk/src/java/org/apache/lenya/cms/site/usecases/CreateDocument.java Modified: lenya/trunk/src/java/org/apache/lenya/cms/site/usecases/CreateDocument.java URL: http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/cms/site/usecases/CreateDocument.java?rev=371896&r1=371895&r2=371896&view=diff ============================================================================== --- lenya/trunk/src/java/org/apache/lenya/cms/site/usecases/CreateDocument.java (original) +++ lenya/trunk/src/java/org/apache/lenya/cms/site/usecases/CreateDocument.java Tue Jan 24 03:27:06 2006 @@ -94,14 +94,14 @@ if (!provided && !documentManager.isValidDocumentName(documentName)) { addErrorMessage("The document ID may not contain any special characters."); } else { - Document parent = getSourceDocument(); Publication publication = getSourceDocument().getPublication(); + String newDocumentId = getNewDocumentId(); Document document = getSourceDocument().getIdentityMap().get(publication, getSourceDocument().getArea(), - parent.getId() + "/" + documentName, + newDocumentId, language); if (document.exists()) { - addErrorMessage("The document does already exist."); + addErrorMessage("The document with ID " + newDocumentId + " already exists."); } } } finally {
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
Free MagazinesCisco NewsReceive 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 |