From 27781ed8058ca82675819b65d24d65f9458c2b6b Mon Sep 17 00:00:00 2001 From: Martin Monperrus Date: Wed, 1 Sep 2010 00:11:17 +0200 Subject: [PATCH] added support for bib files that are not in the current directory, thanks to urlencoded slashes --- bibtexbrowser.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bibtexbrowser.php b/bibtexbrowser.php index 3b8621a..89f3005 100755 --- a/bibtexbrowser.php +++ b/bibtexbrowser.php @@ -137,7 +137,7 @@ define('BIBLIOGRAPHYSTYLE','MyFancyBibliographyStyle'); ?> -[[http://www.monperrus.net/martin/bibtexbrowser-style-janos.php.txt|János Tapolcai contributed with this style, which looks like IEEE references]]. +[[http://www.monperrus.net/martin/bibtexbrowser-style-janos.php.txt|J�nos Tapolcai contributed with this style, which looks like IEEE references]]. For contributing with a new style, [[http://www.monperrus.net/martin/|please drop me an email ]] =====How to add links to the slides of a conference/workshop paper?===== @@ -200,7 +200,7 @@ License, or (at your option) any later version. /** Release 2009-01-05 * Added support for new bibliographic styles (users just have to create a function and change a configuration parameter, see documentation) -* Packaged the IEEE-like bibliographic style of János Tapolcai (many thanks János), see http://www.monperrus.net/martin/bibtexbrowser-style-janos.php.txt +* Packaged the IEEE-like bibliographic style of J�nos Tapolcai (many thanks J�nos), see http://www.monperrus.net/martin/bibtexbrowser-style-janos.php.txt * Added support for external CSS (if bibtexbrowser.css exists, it is used instead of the embedded one) * Added support for local configuration parameters in bibtexbrowser.local.php * Bug in RSS fixed (handling of &) @@ -282,6 +282,10 @@ function setDB() { } + // $_GET[Q_FILE] can be urlencoded + // so we decode it + $_GET[Q_FILE] = urldecode($_GET[Q_FILE]); + if (!file_exists($_GET[Q_FILE])) { // to automate dectection of faulty links with tools such as webcheck header('HTTP/1.1 404 Not found'); @@ -907,7 +911,7 @@ class BibEntry { function addHomepageLink($author) { // hp as home page // accents are handled normally - // e.g. @STRING{hp_Jean-MarcJézéquel="http://www.irisa.fr/prive/jezequel/"} + // e.g. @STRING{hp_Jean-MarcJ�z�quel="http://www.irisa.fr/prive/jezequel/"} $homepage = strtolower('hp_'.preg_replace('/ /', '', $author)); //echo $homepage; if (isset($_GET[Q_DB]->stringdb[$homepage]))