From: Adam Dickmeiss Date: Fri, 10 Feb 2012 14:35:03 +0000 (+0100) Subject: zoom: warn if %query is not defined and Explain is used X-Git-Tag: v1.3.23~3 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=55248f83c4d706bc529873d01d3696388e816d32;p=metaproxy-moved-to-github.git zoom: warn if %query is not defined and Explain is used --- diff --git a/src/torus.cpp b/src/torus.cpp index bd0a63b..e286adf 100644 --- a/src/torus.cpp +++ b/src/torus.cpp @@ -42,6 +42,15 @@ xmlDoc *mp::get_searchable(mp::Package &package, found = url_template.find("%query"); if (found != std::string::npos) url_template.replace(found, 6, mp::util::uri_encode(query)); + else + { + if (db.length() == 0) + { + package.log("zoom", YLOG_WARN, + "%query not defined in