diff options
Diffstat (limited to 'server/src/widgetgenerator.cc')
-rw-r--r-- | server/src/widgetgenerator.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/server/src/widgetgenerator.cc b/server/src/widgetgenerator.cc index 2e51b32..90d2b9e 100644 --- a/server/src/widgetgenerator.cc +++ b/server/src/widgetgenerator.cc @@ -40,20 +40,22 @@ static std::string automap(std::string name) if(name[i] == '.') groupcheck += " and " + group; else groupcheck += name[i]; } - groupcheck += " and " + name + ".value and " + name + ".timestamp"; + groupcheck += " and " + name + ".value and " + name + ".timestamp and " + name + ".source"; groupcheck += ")\n"; std::string automapstring = "-- Returning 0, 0 invalidates the result\n" "value = 0\n" "timestamp = 0\n" + "source = 0\n" "\n" + groupcheck + "then\n" " value = " + name + ".value\n" " timestamp = " + name + ".timestamp\n" + " source = " + name + ".source\n" "end\n" - "return value, timestamp\n"; + "return value, timestamp, source\n"; PRACRO_DEBUG(widget, "Automap:\n%s\n", automapstring.c_str()); @@ -99,7 +101,7 @@ static std::string send_macro_widget(Macro ¯o, if(value.timestamp > time(NULL) - Conf::pentominos_max_ttl) { widget.attributes["value"] = xml_encode(value.value); timestamp = value.timestamp; - prefilled = "pentominos"; + prefilled = xml_encode(value.source); } } // widget.attributes.erase(widget.attributes.find("map")); |