summaryrefslogtreecommitdiff
path: root/libtemplate/templatefunction.c
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2014-10-26 11:09:09 +0100
committerlouis <louis.braun@gmx.de>2014-10-26 11:09:09 +0100
commit5dee1fced4d51d545d85d0f18db99849ac328b98 (patch)
tree53b7b21538d497a540796f2fd82cd476013d8c75 /libtemplate/templatefunction.c
parente84c60f48aecc60d7289882d53b687920d223ef8 (diff)
downloadvdr-plugin-skindesigner-5dee1fced4d51d545d85d0f18db99849ac328b98.tar.gz
vdr-plugin-skindesigner-5dee1fced4d51d545d85d0f18db99849ac328b98.tar.bz2
no absolute pathes allowed for image type 'image', path has to start with {ressourcedir}
Diffstat (limited to 'libtemplate/templatefunction.c')
-rw-r--r--libtemplate/templatefunction.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/libtemplate/templatefunction.c b/libtemplate/templatefunction.c
index b96f0be..4b0c66f 100644
--- a/libtemplate/templatefunction.c
+++ b/libtemplate/templatefunction.c
@@ -1067,8 +1067,17 @@ void cTemplateFunction::ParseStringParameters(void) {
}
parsedText = text.str();
- //now check further possible string variables
string path = GetParameter(ptPath);
+ if (GetNumericParameter(ptImageType) == itImage && path.size() > 0) {
+ //no absolute pathes allowed
+ if (!startswith(path.c_str(), "{")) {
+ esyslog("skindesigner: no absolute pathes allowed for images - %s", path.c_str());
+ }
+ if (startswith(path.c_str(), "{ressourcedir}")) {
+ imgPath = path.replace(0, 14, *config.GetSkinRessourcePath());
+ }
+ }
+ //now check further possible string variables
if (stringTokens && path.size() > 0 && path.find("{") != string::npos) {
for (map < string, string >::iterator it = stringTokens->begin(); it != stringTokens->end(); it++) {
size_t found = path.find(it->first);