*Value = ChrPtr(Buf);
*len = StrLength(Buf);
/* we can't free it here, so we put it into the subst so its discarded later on. */
- ///SVPUTBuf(TKEY(N), Buf, 0);
+ PutRequestLocalMem(Buf, HFreeStrBuf);
break;
default:
NewTemplate->Data = NewStrBufPlain(NULL, statbuf.st_size + 1);
if (StrBufReadBLOB(NewTemplate->Data, &fd, 1, statbuf.st_size, &Err) < 0) {
close(fd);
- lprintf(1, "ERROR: reading template '%s' - %s<br />\n",
+ lprintf(1, "ERROR: reading template '%s' - %s<br>\n",
ChrPtr(NewTemplate->FileName), strerror(errno));
//FreeWCTemplate(NewTemplate);/////tODO
return NULL;
TP = &LocalTP;
}
- if (WC->is_mobile > 0) {
- Static = WirelessTemplateCache;
- StaticLocal = WirelessLocalTemplateCache;
- }
- else {
- Static = TemplateCache;
- StaticLocal = LocalTemplateCache;
- }
+ Static = TemplateCache;
+ StaticLocal = LocalTemplateCache;
if (len == 0)
{
if (GetHash(SortHash, SKEY(BSort), &vSortBy) &&
(vSortBy != NULL)) {
SortBy = (SortStruct*)vSortBy;
+ /* first check whether its intended for us... */
+ if ((SortBy->ContextType == It->ContextType)&&
/** Ok, its us, lets see in which direction we should sort... */
- if (havebstr("SortOrder")) {
+ (havebstr("SortOrder"))) {
int SortOrder;
SortOrder = LBSTR("SortOrder");
if (SortOrder != 0)