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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.