From c96109899dec7a8c4217c76869dce6e7f355a0bc Mon Sep 17 00:00:00 2001 From: Florian Date: Fri, 25 Nov 2016 22:48:47 +0100 Subject: [PATCH] Update wildcardHandler.py Fixing problem that replacement has been tried whether POC was alarmed or ZVEI; works fine for both POC and ZVEI. Original author might verify, works fine for me --- includes/helper/wildcardHandler.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/includes/helper/wildcardHandler.py b/includes/helper/wildcardHandler.py index 3f89f27..358f4b6 100644 --- a/includes/helper/wildcardHandler.py +++ b/includes/helper/wildcardHandler.py @@ -53,12 +53,13 @@ def replaceWildcards(text, data, lineBrakeAllowed=False): # replace POC data if "ric" in data: text = text.replace("%RIC%", data["ric"]) - if "function" in data: text = text.replace("%FUNC%", data["function"]) + if "function" in data: + text = text.replace("%FUNC%", data["function"]) + if data["function"] == "1": text = text.replace("%FUNCTEXT%", globalVars.config.get("POC","rica")) + if data["function"] == "2": text = text.replace("%FUNCTEXT%", globalVars.config.get("POC","ricb")) + if data["function"] == "3": text = text.replace("%FUNCTEXT%", globalVars.config.get("POC","ricc")) + if data["function"] == "4": text = text.replace("%FUNCTEXT%", globalVars.config.get("POC","ricd")) if "functionChar" in data: text = text.replace("%FUNCCHAR%", data["functionChar"]) - if data["function"] == "1": text = text.replace("%FUNCTEXT%", globalVars.config.get("POC","rica")) - if data["function"] == "2": text = text.replace("%FUNCTEXT%", globalVars.config.get("POC","ricb")) - if data["function"] == "3": text = text.replace("%FUNCTEXT%", globalVars.config.get("POC","ricc")) - if data["function"] == "4": text = text.replace("%FUNCTEXT%", globalVars.config.get("POC","ricd")) if "msg" in data: text = text.replace("%MSG%", data["msg"]) if "bitrate" in data: text = text.replace("%BITRATE%", str(data["bitrate"]))