Changeset 27095 for main/trunk/greenstone2/runtime-src/src
- Timestamp:
- 2013-03-19T12:58:28+13:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/runtime-src/src/recpt/rssaction.cpp
r27093 r27095 112 112 text_t &arg_c = args["c"]; 113 113 114 // For some reason, setting the _httpdomain_ macro only works when its package name is specified as Global115 // 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 name116 114 117 115 // Before resolving the _httpdomain_ macro … … 119 117 // E.g. user could have defined it in package Global of zextra.dm 120 118 // 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: 124 125 125 126 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"]); 127 128 } 128 129 else { // we shouldn't have to get here
Note:
See TracChangeset
for help on using the changeset viewer.