From 03132b1f95dc2bc4e963a62aa2a1a3a3d85d7748 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Thu, 26 Jul 2012 21:45:15 +0200 Subject: [PATCH] - mod_yparser: add a command to create comments --- src/nhttpd/yhttpd_mods/mod_yparser.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/nhttpd/yhttpd_mods/mod_yparser.cpp b/src/nhttpd/yhttpd_mods/mod_yparser.cpp index fc8a5c48b..9ad6eb7e6 100644 --- a/src/nhttpd/yhttpd_mods/mod_yparser.cpp +++ b/src/nhttpd/yhttpd_mods/mod_yparser.cpp @@ -353,6 +353,7 @@ std::string CyParser::cgi_cmd_parsing(CyhookHandler *hh, //----------------------------------------------------------------------------- // ycgi : cmd executing +// comment:~ // script: // include: // func: (funcname to be implemented in CyParser::YWeb_cgi_func) @@ -377,7 +378,13 @@ std::string CyParser::YWeb_cgi_cmd(CyhookHandler *hh, std::string ycmd) { if (ySplitString(ycmd, ":", ycmd_type, ycmd_name)) { if (ycmd_type == "L") yresult = CLanguage::getInstance()->getTranslation(ycmd_name); - else if (ycmd_type == "script") + else if (ycmd_type == "comment") { + std::string comment_y, comment_html; + if (ySplitString(ycmd_name, "~", comment_y, comment_html)) { + if (comment_html != "") + yresult = ""; + } + } else if (ycmd_type == "script") yresult = YexecuteScript(hh, ycmd_name); else if (ycmd_type == "if-empty") { std::string if_value, if_then, if_else;