Sergey Shepelevich pushed to branch master at cms-community / hippo-repository


Commits:
91cfe25e by Sergey Shepelevich at 2017-08-07T12:53:24+02:00
REPO-1752 Migrate the URL rewriter configuration in repository

Fix for creating destination urlrewriter node

- - - - -


1 changed file:

- engine/src/main/java/org/hippoecm/repository/MigrateNodeTypesToV12.java


Changes:

=====================================
engine/src/main/java/org/hippoecm/repository/MigrateNodeTypesToV12.java
=====================================
--- a/engine/src/main/java/org/hippoecm/repository/MigrateNodeTypesToV12.java
+++ b/engine/src/main/java/org/hippoecm/repository/MigrateNodeTypesToV12.java
@@ -117,12 +117,12 @@ class MigrateNodeTypesToV12 {
     private Node createUrlRewriterDestinationNode() throws RepositoryException 
{
         final Node modulesNode = 
session.getNode("/hippo:configuration/hippo:modules");
         String urlrewriter = "urlrewriter";
-        final Node urlrewriterNode = !modulesNode.hasNode(urlrewriter) ?
-                modulesNode.addNode(urlrewriter, NT_MODULE) :
-                modulesNode.getNode(urlrewriter);
+        final Node urlrewriterNode = modulesNode.hasNode(urlrewriter) ?
+                modulesNode.getNode(urlrewriter) :
+                modulesNode.addNode(urlrewriter, NT_MODULE);
 
         return urlrewriterNode.hasNode(HIPPO_MODULECONFIG) ?
-                modulesNode.getNode(HIPPO_MODULECONFIG) : 
modulesNode.addNode(HIPPO_MODULECONFIG, HIPPOSYS_MODULE_CONFIG);
+                urlrewriterNode.getNode(HIPPO_MODULECONFIG) : 
urlrewriterNode.addNode(HIPPO_MODULECONFIG, HIPPOSYS_MODULE_CONFIG);
     }
 
     private void movePropertyToNode(final Property sourceProperty, final Node 
destinationNode) throws RepositoryException {



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-repository/commit/91cfe25e0482ae64bad208c9f8e25e8ccb54261c

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-repository/commit/91cfe25e0482ae64bad208c9f8e25e8ccb54261c
You're receiving this email because of your account on code.onehippo.org.
_______________________________________________
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn

Reply via email to