Roxen.git / server / modules / tags / insert_cached_href.pike

version» Context lines:

Roxen.git/server/modules/tags/insert_cached_href.pike:1:   // This is a roxen module. Copyright © 2000 - 2004, Roxen IS.   //      #include <module.h>   inherit "module";      //<locale-token project="mod_insert_cached_href">LOCALE</locale-token>   #define LOCALE(X,Y) _DEF_LOCALE("mod_insert_cached_href",X,Y)    - constant cvs_version = "$Id: insert_cached_href.pike,v 1.17 2007/03/08 09:57:44 liin Exp $"; + constant cvs_version = "$Id: insert_cached_href.pike,v 1.18 2007/03/15 11:50:56 liin Exp $";      constant thread_safe = 1;   constant module_type = MODULE_TAG;   LocaleString module_name = LOCALE(0, "Tags: Insert cached href");   LocaleString module_doc = LOCALE(0, "This module contains the RXML tag \"insert "    "cached-href\". Useful when implementing e.g."    " RSS syndication.");      #if DEBUG_INSERT_CACHED_HREF   #define DWRITE(x) report_debug("INSERT_CACHED_HREF: " + x + "\n")
Roxen.git/server/modules/tags/insert_cached_href.pike:563:    if(args->nocache)    NOCACHE();    else    CACHE(60);       string res = href_database->get_data(Attributes(args)->get_db_args(),    (["x-roxen-recursion-depth":recursion_depth]));       if(args["decode-xml"]) {    // Parse xml header and recode content to internal representation. +  mixed result = catch {    res = Parser.XML.Simple()->autoconvert(res); -  +  };    -  +  if (result) { +  werror("insert#cached-href: An error occurred trying to decode the data.\n"); +  } +     // Remove any bytes potentially still preceeding the first '<' in the xml file    return res[search(res, "<")..];    }       return res;    }   }      #ifdef THREADS