From 4d2372f37e3c16a0107d3353fdb25d2db5e7dbd7 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Thu, 14 May 2015 13:32:56 +0200 Subject: [PATCH] yWeb: add define-get function to get some global defines Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/3baa51700e7b907d1b0f2ab823905ee3425abeee Author: vanhofen Date: 2015-05-14 (Thu, 14 May 2015) Origin message was: ------------------ - yWeb: add define-get function to get some global defines ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/nhttpd/yhttpd_mods/mod_yparser.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/nhttpd/yhttpd_mods/mod_yparser.cpp b/src/nhttpd/yhttpd_mods/mod_yparser.cpp index 6d3670553..fb42c643d 100644 --- a/src/nhttpd/yhttpd_mods/mod_yparser.cpp +++ b/src/nhttpd/yhttpd_mods/mod_yparser.cpp @@ -18,6 +18,7 @@ #include #include // tuxbox +#include #include #include // yhttpd @@ -448,6 +449,28 @@ std::string CyParser::YWeb_cgi_cmd(CyhookHandler *hh, std::string ycmd) { } } else if (ycmd_type == "func") yresult = this->YWeb_cgi_func(hh, ycmd_name); + else if (ycmd_type == "define-get") { + if (ycmd_name.compare("CONFIGDIR")) yresult = CONFIGDIR; + else if (ycmd_name.compare("DATADIR")) yresult = DATADIR; + else if (ycmd_name.compare("FONTDIR")) yresult = FONTDIR; + else if (ycmd_name.compare("LIBDIR")) yresult = LIBDIR; + else if (ycmd_name.compare("GAMESDIR")) yresult = GAMESDIR; + else if (ycmd_name.compare("PLUGINDIR")) yresult = PLUGINDIR; + else if (ycmd_name.compare("PLUGINDIR_VAR")) yresult = PLUGINDIR_VAR; + else if (ycmd_name.compare("LUAPLUGINDIR")) yresult = LUAPLUGINDIR; + else if (ycmd_name.compare("LOCALEDIR")) yresult = LOCALEDIR; + else if (ycmd_name.compare("LOCALEDIR_VAR")) yresult = LOCALEDIR_VAR; + else if (ycmd_name.compare("THEMESDIR")) yresult = THEMESDIR; + else if (ycmd_name.compare("THEMESDIR_VAR")) yresult = THEMESDIR_VAR; + else if (ycmd_name.compare("ICONSDIR")) yresult = ICONSDIR; + else if (ycmd_name.compare("ICONSDIR_VAR")) yresult = ICONSDIR_VAR; + else if (ycmd_name.compare("LOGODIR")) yresult = LOGODIR; + else if (ycmd_name.compare("LOGODIR_VAR")) yresult = LOGODIR_VAR; + else if (ycmd_name.compare("PRIVATE_HTTPDDIR")) yresult = PRIVATE_HTTPDDIR; + else if (ycmd_name.compare("PUBLIC_HTTPDDIR")) yresult = PUBLIC_HTTPDDIR; + else if (ycmd_name.compare("HOSTED_HTTPDDIR")) yresult = HOSTED_HTTPDDIR; + else yresult = ""; + } else if (ycmd_type == "ini-get") { std::string filename, varname, tmp, ydefault, yaccess; ySplitString(ycmd_name, "~", filename, yaccess);