diff --git a/bibtexbrowser.php b/bibtexbrowser.php
index 71412af..ce1de4a 100755
--- a/bibtexbrowser.php
+++ b/bibtexbrowser.php
@@ -61,6 +61,8 @@ define('BIBTEXBROWSER','v__MTIME__');
// only displaying the n newest entries
@define('BIBTEXBROWSER_NEWEST',5);
+@define('BIBTEXBROWSER_NO_DEFAULT', false);
+
// do we add [bibtex] links ?
// suggested by Sascha Schnepp
@define('BIBTEXBROWSER_BIBTEX_LINKS',true);
@@ -141,6 +143,23 @@ function zetDB($bibtex_filenames) {
return $db;
}
+/** @nodoc */
+function default_message() {
+
+ if (BIBTEXBROWSER_NO_DEFAULT) { return; }
+
+ ?>
+
+ Congratulations! bibtexbrowser is correctly installed!
+ Now you have to pass the name of the bibtex file as parameter (e.g. bibtexbrowser.php?bib=mybib.php)
+ You may browse:
+ '.$bibfile.'
';
+ }
+ echo "
";
+}
+
/** @nodoc */
function _zetDB($bibtex_filenames) {
@@ -155,17 +174,8 @@ function _zetDB($bibtex_filenames) {
// default bib file, if no file is specified in the query string.
if (!isset($bibtex_filenames) || $bibtex_filenames == "") {
- ?>
-
- Congratulations! bibtexbrowser is correctly installed!
- Now you have to pass the name of the bibtex file as parameter (e.g. bibtexbrowser.php?bib=mybib.php)
- You may browse:
- '.$bibfile.'
';
- }
- echo "
";
- return; // we cannot set the db wtihout a bibfile
+ default_message();
+ exit;
}
// first does the bibfiles exist: