this update is necessary to prevent a bug with getpage()
inside the section [special:begin] it is possible to add some text which is include to the web page
[special:begin]
this line will be displayed on the browser
....
*****************************************************************************
procedure Tmainfrm.getPage(sectionName:string; data:TconnData; f:Tfile=NIL; tpl2use:Ttpl=NIL);
....
data.conn.reply.mode:=HRM_REPLY;
if sectionName = 'ban' then data.conn.reply.mode:=HRM_DENY;
if sectionName = 'deny' then data.conn.reply.mode:=HRM_DENY;
if sectionName = 'not found' then data.conn.reply.mode:=HRM_NOT_FOUND;
if sectionName = 'unauthorized' then data.conn.reply.mode:=HRM_UNAUTHORIZED;
if sectionName = 'overload' then data.conn.reply.mode:=HRM_OVERLOAD;
if sectionName = 'max contemp downloads' then data.conn.reply.mode:=HRM_OVERLOAD;
md.cd:=data;
md.tpl:=tpl2use;
md.folder:=f;
md.f:=NIL;
md.archiveAvailable:=FALSE;
section:=tpl2use.getSection(sectionName);
if section = NIL then exit;
s:=tpl2use['special:begin'];
tryApplyMacrosAndSymbols(s, md, FALSE);
s:=trim(s)+section.txt;
if data.conn.reply.mode <> HRM_REPLY then
s:=xtpl(tpl2use['error-page'], ['%content%', section.txt]); // in error page do not include the special:begin text
tryApplyMacrosAndSymbols(s, md);
data.conn.reply.body:=xtpl(s, [
'\n', CRLF,
'%build-time%', floatToStrF((now()-buildTime)*SECONDS, ffFixed, 7,3)
]);
if section.nolog then data.dontLog:=TRUE;
compressReply(data);
finally
if not externalTpl then
tpl2use.free
end
end; // getPage