diff options
Diffstat (limited to 'libtemplate/templatefunction.c')
-rw-r--r-- | libtemplate/templatefunction.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libtemplate/templatefunction.c b/libtemplate/templatefunction.c index 8465961..80cf762 100644 --- a/libtemplate/templatefunction.c +++ b/libtemplate/templatefunction.c @@ -1186,6 +1186,19 @@ void cTemplateFunction::ParseStringParameters(void) { break;
}
}
+ for (map < string, int >::iterator it = intTokens->begin(); it != intTokens->end(); it++) {
+ size_t found = path.find(it->first);
+ if (found != string::npos) {
+ updated = true;
+ imgPath = path;
+ if (found > 0 && ((it->first).size() + 2 <= imgPath.size())) {
+ stringstream intVal;
+ intVal << it->second;
+ imgPath.replace(found-1, (it->first).size() + 2, intVal.str());
+ }
+ break;
+ }
+ }
}
}
|