From 1c7391c3b8aed9205279aad47ce90350898c8b49 Mon Sep 17 00:00:00 2001 From: Martin Monperrus Date: Fri, 29 Oct 2010 12:04:24 +0200 Subject: [PATCH] solved bug found by Ken ("book" selects inbook, book, bookchapter) --- bibtexbrowser.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bibtexbrowser.php b/bibtexbrowser.php index 572a22c..09ab0ef 100755 --- a/bibtexbrowser.php +++ b/bibtexbrowser.php @@ -1608,6 +1608,7 @@ function query2title(&$query) { $headers = array(); foreach($query as $k=>$v) { if($k == '_author') { $k = 'author'; } + if($k == 'type') { $v = substr($v,1,strlen($v)-2); } $headers[$k] = ucwords($k).': '.ucwords($v); } // special cases @@ -2561,7 +2562,13 @@ class Dispatcher { $this->query['_author']=$_GET[Q_AUTHOR]; } - function type() { $this->query[Q_TYPE]=$_GET[Q_TYPE]; } + function type() { + // remarks KEN + // "book" selects inbook, book, bookchapter + // so we add the regexp modifiers + if (strlen($_GET[Q_TYPE])>0) { $_GET[Q_TYPE] = '^'.$_GET[Q_TYPE].'$'; } + $this->query[Q_TYPE]= $_GET[Q_TYPE]; + } function menu() { $menu = new MenuManager($_GET[Q_DB]);