roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agillil...@apache.org
Subject svn commit: r549614 - in /roller/trunk/apps/weblogger/src: java/org/apache/roller/weblogger/ui/struts2/editor/WeblogConfig.java sql/320-to-400-migration.vm
Date Thu, 21 Jun 2007 21:12:37 GMT
Author: agilliland
Date: Thu Jun 21 14:12:36 2007
New Revision: 549614

URL: http://svn.apache.org/viewvc?view=rev&rev=549614
Log:
fixing functional issue with multi-language blog support.  we haven't been properly enforcing
the fact that the 'show all langs' option is tied to value of the 'enable multi-lang blogging'
option.  i.e. that it only makes sense to disable 'show all langs' and force a blog view to
1 language at a time if 'enable multi-lang blogging' is enabled.

this commit includes a fix in the weblogConfig action to enforce this rule moving forward
and it also includes a sql command for upgrading users to make sure that existing blogs are
properly updated to enforce this.


Modified:
    roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/editor/WeblogConfig.java
    roller/trunk/apps/weblogger/src/sql/320-to-400-migration.vm

Modified: roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/editor/WeblogConfig.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/editor/WeblogConfig.java?view=diff&rev=549614&r1=549613&r2=549614
==============================================================================
--- roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/editor/WeblogConfig.java
(original)
+++ roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/editor/WeblogConfig.java
Thu Jun 21 14:12:36 2007
@@ -144,6 +144,13 @@
                 addMessage("websiteSettings.commentsOffForInactiveWeblog");
             }
             
+            // if blog has unchecked 'show all langs' then we must make sure
+            // the multi-language blogging option is enabled.
+            // TODO: this should be properly reflected via the UI
+            if(!weblog.isShowAllLangs() && !weblog.isEnableMultiLang()) {
+                weblog.setEnableMultiLang(true);
+            }
+            
             // save config
             umgr.saveWebsite(weblog);
             

Modified: roller/trunk/apps/weblogger/src/sql/320-to-400-migration.vm
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/sql/320-to-400-migration.vm?view=diff&rev=549614&r1=549613&r2=549614
==============================================================================
--- roller/trunk/apps/weblogger/src/sql/320-to-400-migration.vm (original)
+++ roller/trunk/apps/weblogger/src/sql/320-to-400-migration.vm Thu Jun 21 14:12:36 2007
@@ -53,6 +53,11 @@
 -- add new custom stylesheet column to website table
 #addColumnNull("website" "customstylesheet" "varchar(128)")
 
+-- fix blogs which have unchecked showalllangs but did not check enablemultilang
+update website set enablemultilang = 1 where showalllangs = 0;
+
+
+
 -- remove old id column of group subscription table
 alter table rag_group_subscription drop column id;
 



Mime
View raw message