Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 694 of 806  Not logged in ELOG logo
ID Date Icon Author Author Email Category OSdown ELOG Version Subject
  66355   Thu May 7 13:35:32 2009 Reply Rich Sterlingrbsterli@juno.comQuestionAll2.7.6Re: Office 2007 file attachments download as zip due to mime config

Stefan Ritt wrote:
Rich Sterling wrote:

Are there any plans to add the new mime extensions to the elogd.c source? (Instead of forcing users to use FireFox or Right click, save-as and rename?

 

 Ok, I added the MIME extensions in ELOG Rev. 2196. The forum runs already the updated version, so can you try with the demo attachments from your entry?

 It looks good from here!  Thanks!!

Best Regards,

Rich

  66411   Wed Jun 24 15:02:49 2009 Warning Richard Stamperr.stamper@rl.ac.ukBug fixAll2.7.6-2191Auto-increment substitutions broken with records for multiple days
With a logbook defined by 

 [test]
 Theme = default
 Comment = Test of auto-increment
 Attributes = Batch
 Subst Batch = %Y%m%d-##

the auto-incrementing of the Batch attribute within dates works when the logbook contains only entries for
today's date but otherwise will give a batch number of "01" for each entry.  

Changing line 8714 of elogd.c as follows, from:

      /* if date part changed, start over with index */
      if (strlen(attrib[index]) > 0 && strncmp(attrib[index], retstr, loc) != 0)
         old_index = 0;   
      else
         /* retrieve old index */
      if (atoi(attrib[index] + loc) > old_index)
         old_index = atoi(attrib[index] + loc);
to
      /* if date part changed, start over with index */
      if (strlen(attrib[index]) > 0 && strncmp(attrib[index], retstr, loc) != 0)
         break;            /* <------------- */
      else
         /* retrieve old index */
      if (atoi(attrib[index] + loc) > old_index)
         old_index = atoi(attrib[index] + loc);

appears to fix this bug when I test it.  This code is inside a loop stepping back through all log entries, and
the variable old_index is already set to zero before the loop. The existing code resets old_index whenever the
prefix of the attribute string (containing a date) does not match the "current" value of that prefix as found in
retstr (set using strftime).  So, if there are any records for dates other than today then old_index is reset
and attribute values will be set with the counter = (old_index+1) = 1.  The modified version stops comparisons
once a different date is seen, but assumes that records are date ordered.  An alternative patch:

      /* if date part matches */
      if (strlen(attrib[index]) > 0 && strncmp(attrib[index], retstr, loc) == 0)
          /* retrieve old index */
         if (atoi(attrib[index] + loc) > old_index)
            old_index = atoi(attrib[index] + loc);
  
does not make this assumption and also appears to work OK when I test it.
  66414   Thu Jun 25 10:09:18 2009 Reply Stefan Rittstefan.ritt@psi.chBug fixAll2.7.6-2191Re: Auto-increment substitutions broken with records for multiple days
> An alternative patch:
> 
>       /* if date part matches */
>       if (strlen(attrib[index]) > 0 && strncmp(attrib[index], retstr, loc) == 0)
>           /* retrieve old index */
>          if (atoi(attrib[index] + loc) > old_index)
>             old_index = atoi(attrib[index] + loc);
>   
> does not make this assumption and also appears to work OK when I test it.

Yes, this is the right one, it searches all entries to have the same date than the current one, and then looks for the 
largest index which will be stored in old_index and later incremented by one. I committed your patch to the 
repository. Thanks a lot.
  66492   Wed Aug 5 01:07:04 2009 Warning Richard Stamperr.stamper@rl.ac.ukBug reportAll2.7.7-2246init_resize sometimes not defined

Under some circumstances the New/Edit entry screen can invoke the init_resize() function in the onload handler for the <body> tag, but the init_resize() function is not defined.  In my case there is a log where the encoding is plain text (Default encoding = 1) and the message height is restricted (Message height = 4).  Creating or editing entries in this log generates warnings in the Firefox error console and alert boxes in IE about init_resize being undefined.

I think there is some missing logic.  In revision 2246 of elogd.c

  • at line 9924, if enc_selected = 1 then init_resize() is included in the onload handler, but
  • at line 9801, if enc_selected = 1 but at least one of the  "Message height" or "Message width" attributes is set then the code defining init_resize() is not include

I think you need to duplicate the checks on the Message height and Message width attributes at lines 9924, so that the init_resize() function is only included when defined.

Richard S

  66493   Wed Aug 5 13:36:44 2009 Reply Stefan Rittstefan.ritt@psi.chBug reportAll2.7.7-2246Re: init_resize sometimes not defined

Richard Stamper wrote:

Under some circumstances the New/Edit entry screen can invoke the init_resize() function in the onload handler for the <body> tag, but the init_resize() function is not defined.  In my case there is a log where the encoding is plain text (Default encoding = 1) and the message height is restricted (Message height = 4).  Creating or editing entries in this log generates warnings in the Firefox error console and alert boxes in IE about init_resize being undefined.

I think there is some missing logic.  In revision 2246 of elogd.c

  • at line 9924, if enc_selected = 1 then init_resize() is included in the onload handler, but
  • at line 9801, if enc_selected = 1 but at least one of the  "Message height" or "Message width" attributes is set then the code defining init_resize() is not include

I think you need to duplicate the checks on the Message height and Message width attributes at lines 9924, so that the init_resize() function is only included when defined.

Richard S

Perfect! Not only your analysis but also your suggested solution. I implemented that in revision 2249.

Stefan 

  66494   Wed Aug 5 19:05:01 2009 Question Dennis Seitzdseitz@berkeley.eduRequestAll2.7.6alphabetize Quick Filter items?

 Hi Stefan,

I'd like to request a feature: automatic alphabetization of the items in the Quick Filter menus.

We track quite a few detector assemblies, which are produced with non-sequential designations. It would be useful if the Quick Filter list was automatically sorted alphabetically to make it more convenient for folks to find a particular item.

I know people can always search by designation but it would be handy to have this alpha sorting feature. Would it be possible to include that in a future release?

Thanks again for a *very* useful logging system!

Dennis

  66495   Thu Aug 6 08:00:22 2009 Reply Stefan Rittstefan.ritt@psi.chRequestAll2.7.6Re: alphabetize Quick Filter items?

Dennis Seitz wrote:

 Hi Stefan,

I'd like to request a feature: automatic alphabetization of the items in the Quick Filter menus.

We track quite a few detector assemblies, which are produced with non-sequential designations. It would be useful if the Quick Filter list was automatically sorted alphabetically to make it more convenient for folks to find a particular item.

I know people can always search by designation but it would be handy to have this alpha sorting feature. Would it be possible to include that in a future release?

Thanks again for a *very* useful logging system!

Dennis

The order of items in a Quick Filter menu is exactly as in the configuration file. Like if you have items

Options Type = C, D, A, B

they are shown like that in the quick filter menu. If you want to sort them, just do the sorting yourself in the configuration file like

Options Type = A, B, C, D

I have not implemented automatic sorting since some people want a different order, like some main topics at top. So by following the order from the configuration file, everybody can be satisfied just by chaning the order in the config file.

- Stefan 

  66500   Thu Aug 6 22:29:12 2009 Entry Erik Iversoneiverson@ornl.govQuestionAll2.7.3Pre-populate Attachments in URL
Is there a way to pre-populate the new entry window with one or more attachments? Per the documentation, this is easy to do with attributes, i.e., http://localhost:8070/demo/?cmd=New&pauthor=joe&ptype=Info as a URL or bookmark will do it. I'd like to do the same thing with attachments, for example http://localhost:8070/demo/?cmd=New&pauthor=joe&ptype=Photograph&attfile1=picture1.jpg&attfile2=picture2.jpg might prepopulate two attachments, giving me an edit window all ready to enter the brief description represented by the two pictures.
ELOG V3.1.5-3fb85fa6