Patch to always edit the current actions file.
authorjongfoster <jongfoster@users.sourceforge.net>
Tue, 5 Mar 2002 00:24:51 +0000 (00:24 +0000)
committerjongfoster <jongfoster@users.sourceforge.net>
Tue, 5 Mar 2002 00:24:51 +0000 (00:24 +0000)
cgiedit.c
templates/edit-actions-list

index ec7b5d2..db16c51 100644 (file)
--- a/cgiedit.c
+++ b/cgiedit.c
@@ -1,4 +1,4 @@
-const char cgiedit_rcs[] = "$Id: cgiedit.c,v 1.12 2002/03/03 09:18:03 joergs Exp $";
+const char cgiedit_rcs[] = "$Id: cgiedit.c,v 1.13 2002/03/04 02:07:59 david__schmidt Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/cgiedit.c,v $
@@ -42,6 +42,9 @@ const char cgiedit_rcs[] = "$Id: cgiedit.c,v 1.12 2002/03/03 09:18:03 joergs Exp
  *
  * Revisions   :
  *    $Log: cgiedit.c,v $
+ *    Revision 1.13  2002/03/04 02:07:59  david__schmidt
+ *    Enable web editing of actions file on OS/2 (it had been broken all this time!)
+ *
  *    Revision 1.12  2002/03/03 09:18:03  joergs
  *    Made jumbjuster work on AmigaOS again.
  *
@@ -1740,7 +1743,9 @@ static jb_err get_file_name_param(struct client_state *csp,
 {
    const char *param;
    const char *s;
+#if 0 /* Patch to make 3.0.0 work properly. */
    char *name;
+#endif /* 0 - Patch to make 3.0.0 work properly. */
    char *fullpath;
    char ch;
    int len;
@@ -1784,6 +1789,13 @@ static jb_err get_file_name_param(struct client_state *csp,
       }
    }
 
+   /*
+    * FIXME Following is a hack to make 3.0.0 work properly.
+    * Change "#if 0" --> "#if 1" below when we have modular action
+    * files.
+    *    -- Jon
+    */
+#if 0 /* Patch to make 3.0.0 work properly. */
    /* Append extension */
    name = malloc(len + strlen(suffix) + 1);
    if (name == NULL)
@@ -1796,6 +1808,16 @@ static jb_err get_file_name_param(struct client_state *csp,
    /* Prepend path */
    fullpath = make_path(csp->config->confdir, name);
    free(name);
+#else /* 1 - Patch to make 3.0.0 work properly. */
+   if ((csp->actions_list == NULL)
+    || (csp->actions_list->filename == NULL))
+   {
+      return JB_ERR_CGI_PARAMS;
+   }
+
+   fullpath = ( (csp->actions_list && csp->actions_list->filename)
+             ? strdup(csp->actions_list->filename) : NULL);
+#endif /* 1 - Patch to make 3.0.0 work properly. */
    if (fullpath == NULL)
    {
       return JB_ERR_MEMORY;
index 44e55e4..bfdc3a4 100644 (file)
 #
 # Revisions   :
 #    $Log: edit-actions-list,v $
+#    Revision 1.8  2002/03/03 10:29:12  swa
+#    point users to the right feedback forms,
+#    not necessarily the developer list.
+#
 #    Revision 1.7  2002/01/23 00:26:45  jongfoster
 #    Reducing length of URLs
 #    Where encoded and unencoded versions of a string existed, removing
@@ -92,7 +96,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <meta name="robots" content="noindex,nofollow">
 
-<title>JunkBuster: Edit actions file - @f@.action</title>
+<title>JunkBuster: Edit actions file</title>
 
 <style type="text/css">
 body {
@@ -241,7 +245,7 @@ href="http://sourceforge.net/mail/?group_id=11118">mailing lists</a>.
 <table cellpadding="20" cellspacing="10" border="0" width="100%">
   <tr>
     <td class="light">
-      <h2>Editing Actions File - @f@.action</h2>
+      <h2>Editing Actions File</h2>
       <p><a class="cmd" href="edit-actions-section-add?f=@f@&amp;v=@v@&amp;s=0">Insert new section at top</a></p>
     </td>
   </tr>