Changeset 27095

Show
Ignore:
Timestamp:
19.03.2013 12:58:28 (7 years ago)
Author:
ak19
Message:

Tidied up previous commit

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/runtime-src/src/recpt/rssaction.cpp

    r27093 r27095  
    112112  text_t &arg_c = args["c"]; 
    113113 
    114   // For some reason, setting the _httpdomain_ macro only works when its package name is specified as Global 
    115   // Doesn't work if package name is set as rssfeed, even though etc/main.cfg refers to new rss.dm containing a package by that name 
    116114   
    117115  // Before resolving the _httpdomain_ macro 
     
    119117  // E.g. user could have defined it in package Global of zextra.dm 
    120118  // If none found, try to get it from the cgiargs hostname= (set using javascript),  
    121   // and set as macro for package Rss. 
    122    
    123   if(disp.havemacro("Global", "httpdomain") == 0) { // checks rss(feed) and Global packages and if not found 
     119  // and set as macro for the desired package (e.g. package rss). Setting httpdomain in package Global. 
     120  // If the httpdomain macro needs to be in package rss, then need to mention this macro as  
     121  // "_rss:httpdomain_" not "_httpdomain_" throughout rss-items. 
     122  // If ever adding a custom macro file like rss.dm that mentions the package, need to list rss.dm in etc/main.cfg 
     123 
     124  if(disp.havemacro("Global", "httpdomain") == 0) { // if using rss package, willcheck rss and Global packages in order. And if not found: 
    124125     
    125126    if(!args["hostname"].empty()) { 
    126       disp.setmacro("httpdomain", "Global", "http://" + args["hostname"]); //disp.setmacro("httpdomain", "Global", args["hostname"]); 
     127      disp.setmacro("httpdomain", "Global", "http://" + args["hostname"]); 
    127128    }  
    128129    else { // we shouldn't have to get here