Changeset 2370


Ignore:
Timestamp:
2001-05-07T15:27:02+12:00 (23 years ago)
Author:
sjboddie
Message:

The collector will now add a "This collection contains n documents"
sentence to the about text of each collection it builds.

Location:
trunk/gsdl
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/macros/english.dm

    r2322 r2370  
    5757_collectionextra_ {This collection contains _about:numdocs_ documents.
    5858It was last built _about:builddate_ days ago.}
     59
     60# this is only used by the collector (where the above _collectionextra_
     61# macro will always be set to another value)
     62_collectorextra_ {
     63<p>This collection contains _numdocs_ _If_("_numdocs_" eq "1",document,documents), a total of _numbytes_.
     64}
    5965
    6066_textimagecollection_ {}
  • trunk/gsdl/src/recpt/collectoraction.cpp

    r2368 r2370  
    14041404  text_t options = "-creator \"" + args["bc1contactemail"] + "\"";
    14051405  options += " -title \"" + args["bc1fullname"] + "\"";
    1406   options += " -about \"" + carriage_replace (args["bc1aboutdesc"], 0) + "\"";
     1406  options += " -about \"" + carriage_replace (args["bc1aboutdesc"] + "_collectorextra_", 0) + "\"";
    14071407  options += " -collectdir \"" + tmpdir + "\" ";
    14081408  text_t optionfile = filename_cat (tmpdir, "mkcol.opt");
  • trunk/gsdl/src/recpt/pageaction.cpp

    r2329 r2370  
    337337  if (collectproto != NULL) {
    338338    cinfo = recpt->get_collectinfo_ptr (collectproto, arg_c, logout);
    339 
     339   
    340340    disp.setmacro ("numdocs", "Global", cinfo->numDocs);
    341341    unsigned long current_time = time(NULL);
    342342    unsigned long builddate = (current_time - cinfo->buildDate) / 86400;
    343343    disp.setmacro ("builddate", "Global", builddate);
    344 
     344   
     345    text_t numbytes;
     346    if ((cinfo->numBytes/(1024*1024)) > 1) {
     347      numbytes = (text_t)(cinfo->numBytes/(1024*1024)) + " Mb";
     348    } else if ((cinfo->numBytes/1024) > 1) {
     349      numbytes = (text_t)(cinfo->numBytes/1024) + " kb";
     350    } else {
     351      numbytes = (text_t)cinfo->numBytes + " bytes";
     352    }
     353    disp.setmacro("numbytes", "Global", numbytes);
    345354  }
    346355
Note: See TracChangeset for help on using the changeset viewer.