mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-02 18:31:12 +02:00
mod_yparser: add find-exec function;
return full path and filename of given executabe
Origin commit data
------------------
Branch: ni/coolstream
Commit: 68854aaed7
Author: vanhofen <vanhofen@gmx.de>
Date: 2015-03-31 (Tue, 31 Mar 2015)
Origin message was:
------------------
- mod_yparser: add find-exec function;
return full path and filename of given executabe
------------------
This commit was generated by Migit
This commit is contained in:
@@ -371,8 +371,9 @@ std::string CyParser::cgi_cmd_parsing(CyhookHandler *hh,
|
||||
// ini-set:<filename>;<varname>;<value>[~open|save|cache]
|
||||
// if-empty:<value>~<then>~<else>
|
||||
// if-equal:<left_value>~<right_value>~<then>~<else> (left_value == right_value?)
|
||||
// if-not-equal:<left_value>~<right_value>~<then>~<else> (left_val!e == right_value?)
|
||||
// if-not-equal:<left_value>~<right_value>~<then>~<else> (left_value == right_value?)
|
||||
// if-file-exists:<filename>~<then>~<else>
|
||||
// find-exec:<filename>
|
||||
// include-block:<filename>;<block-name>[;<default-text>]
|
||||
// var-get:<varname>
|
||||
// var-set:<varname>=<varvalue>
|
||||
@@ -427,6 +428,8 @@ std::string CyParser::YWeb_cgi_cmd(CyhookHandler *hh, std::string ycmd) {
|
||||
yresult = (access(if_value, R_OK) == 0) ? if_then
|
||||
: if_else;
|
||||
}
|
||||
} else if (ycmd_type == "find-exec") {
|
||||
yresult = find_executable(ycmd_name.c_str());
|
||||
} else if (ycmd_type == "include") {
|
||||
std::string ytmp;
|
||||
std::fstream fin(ycmd_name.c_str(), std::fstream::in);
|
||||
|
Reference in New Issue
Block a user