projects
/
metaproxy-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e58902
)
zoom: warn if %query is not defined and Explain is used
author
Adam Dickmeiss
<adam@indexdata.dk>
Fri, 10 Feb 2012 14:35:03 +0000
(15:35 +0100)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Fri, 10 Feb 2012 14:35:03 +0000
(15:35 +0100)
src/torus.cpp
patch
|
blob
|
history
diff --git
a/src/torus.cpp
b/src/torus.cpp
index
bd0a63b
..
e286adf
100644
(file)
--- 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 <torus url=\"..\"");
+ return 0;
+ }
+ }
found = url_template.find("%db");
if (found != std::string::npos)