gregh3269 commented on code in PR #247:
URL: https://github.com/apache/roller/pull/247#discussion_r4561897020


##########
app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogManagerImpl.java:
##########
@@ -110,6 +114,18 @@ public void removeWeblog(Weblog weblog) throws 
WebloggerException {
         
         // remove contents first, then remove weblog
         this.removeWeblogContents(weblog);
+        
+        // Clear frontpage weblog if set
+        if (WebloggerRuntimeConfig.isFrontPageWeblog(weblog.getHandle())) {
+
+            PropertiesManager mgr = 
WebloggerFactory.getWeblogger().getPropertiesManager();
+
+            RuntimeConfigProperty handleProp = 
mgr.getProperty(FrontpageSettings.HANDLE_PROPERTY);
+
+            mgr.compareAndSetProperty(FrontpageSettings.HANDLE_PROPERTY, 
handleProp.getValue(), "");

Review Comment:
   Good point on the handleProp.getValue().  Will fix that.
   I did consider setting site.frontpage.weblog.aggregated to false, but roller 
wants a front weblog, so by not changing it will save having to going back and 
think why site.frontpage.weblog.aggregated is no longer working.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to