fixed a bug that occurred in postgresql 7.4.x when an article's parent is deselected
authorzapata <zapata>
Mon, 5 Sep 2005 19:11:01 +0000 (19:11 +0000)
committerzapata <zapata>
Mon, 5 Sep 2005 19:11:01 +0000 (19:11 +0000)
source/mircoders/servlet/ServletModuleContent.java

index 1369888..7bd4dba 100755 (executable)
@@ -62,6 +62,7 @@ public class ServletModuleContent extends ServletModule {
 
   private ServletModuleContent() {
     super();
+
     propagatedParameters.add("selectarticleurl");
 
     logger = new LoggerWrapper("ServletModule.Content");
@@ -208,8 +209,7 @@ public class ServletModuleContent extends ServletModule {
   /**
    * Deattaches media from an article
    */
-  public void dettach(HttpServletRequest aRequest, HttpServletResponse aResponse) throws ServletModuleExc
-  {
+  public void dettach(HttpServletRequest aRequest, HttpServletResponse aResponse) throws ServletModuleExc {
     String  articleId = aRequest.getParameter("articleid");
     String  midParam = aRequest.getParameter("mid");
     if (articleId == null)
@@ -278,8 +278,7 @@ public class ServletModuleContent extends ServletModule {
   /**
    * Forcelocks an article
    */
-  public void forcelock(HttpServletRequest aRequest, HttpServletResponse aResponse) throws ServletModuleExc
-  {
+  public void forcelock(HttpServletRequest aRequest, HttpServletResponse aResponse) throws ServletModuleExc {
     HTTPRequestParser requestParser = new HTTPRequestParser(aRequest);
 
     String idParam = requestParser.getParameter("id");
@@ -299,8 +298,7 @@ public class ServletModuleContent extends ServletModule {
   /**
    * Stores an article
    */
-  public void update(HttpServletRequest aRequest, HttpServletResponse aResponse) throws ServletModuleExc
-  {
+  public void update(HttpServletRequest aRequest, HttpServletResponse aResponse) throws ServletModuleExc {
     try {
       HTTPRequestParser requestParser = new HTTPRequestParser(aRequest);
 
@@ -489,8 +487,7 @@ public class ServletModuleContent extends ServletModule {
     }
   }
 
-  public void setparent(HttpServletRequest aRequest, HttpServletResponse aResponse) throws ServletModuleExc
-  {
+  public void setparent(HttpServletRequest aRequest, HttpServletResponse aResponse) throws ServletModuleExc {
     HTTPRequestParser requestParser = new HTTPRequestParser(aRequest);
     String articleId = requestParser.getParameter("childid");
     String parentId  = requestParser.getParameter("id");
@@ -514,15 +511,14 @@ public class ServletModuleContent extends ServletModule {
     ServletHelper.redirect(aResponse, returnUrl);
   }
 
-  public void clearparent(HttpServletRequest aRequest, HttpServletResponse aResponse) throws ServletModuleExc
-  {
+  public void clearparent(HttpServletRequest aRequest, HttpServletResponse aResponse) throws ServletModuleExc {
     HTTPRequestParser requestParser = new HTTPRequestParser(aRequest);
     String articleId = requestParser.getParameter("id");
     String returnUrl = requestParser.getParameter("returnurl");
 
     try {
       EntityContent article = (EntityContent) mainModule.getById(articleId);
-      article.setFieldValue("to_content", "");
+      article.setFieldValue("to_content", null);
       article.setProduced(false);
       article.update();
       logAdminUsage(aRequest, articleId, "parent cleared");