solved bug found by Carlos related to 'type=' queries

This commit is contained in:
Martin Monperrus
2011-08-23 22:22:04 +02:00
parent b3697437e0
commit 1645a87653
+1 -1
View File
@@ -2846,7 +2846,7 @@ class Dispatcher {
// remarks KEN // remarks KEN
// "book" selects inbook, book, bookchapter // "book" selects inbook, book, bookchapter
// so we add the regexp modifiers // so we add the regexp modifiers
if (strlen($_GET[Q_TYPE])>0) { $_GET[Q_TYPE] = '^'.$_GET[Q_TYPE].'$'; } if (strlen($_GET[Q_TYPE])>0 && !preg_match('/^\^.*\$$/',$_GET[Q_TYPE])) { $_GET[Q_TYPE] = '^'.$_GET[Q_TYPE].'$'; }
$this->query[Q_TYPE]= $_GET[Q_TYPE]; $this->query[Q_TYPE]= $_GET[Q_TYPE];
} }