';
+ echo '
'; // pre is nice when it is embedded with no CSS available
echo $this->getConstants();
if ($this->hasField('url')) {
$url=$this->getField('url');
// this is not a parsing but a simple replacement
echo str_replace($url,''.$url.'',$this->getText());
} else echo $this->getText();
- echo '
';
+ echo '';
}
}
@@ -1279,7 +1316,6 @@ class MenuManager extends BibtexBrowserDisplay {
/** Creates a new display manager that uses the given bib database. */
function MenuManager(&$db) {
$this->db =$db;
- new HTMLWrapper($this,array(array('robots','noindex')));
}
/** function called back by HTMLWrapper */
@@ -2429,7 +2465,7 @@ class Dispatcher {
// we send a redirection for having the frameset
// if some contents have already been sent, for instance if we are included
// this means doing nothing
- if ( ! /* not */ headers_sent() ) {
+ if ( headers_sent() == false ) { /* to avoid sending an unnecessary frameset */
header("Location: ".$_SERVER['SCRIPT_NAME']."?frameset&bib=".$_GET[Q_FILE]);
}
}
@@ -2449,7 +2485,12 @@ class Dispatcher {
$this->wrapper='NoWrapper';
}
- function search() { $this->query[Q_SEARCH]=$_GET[Q_SEARCH]; }
+ function search() {
+ if (preg_match('/utf-?8/i',ENCODING)) {
+ $_GET[Q_SEARCH] = urldecode($_GET[Q_SEARCH]);
+ }
+ $this->query[Q_SEARCH]=$_GET[Q_SEARCH];
+ }
function exclude() { $this->query[Q_EXCLUDE]=$_GET[Q_EXCLUDE]; }
@@ -2464,7 +2505,9 @@ class Dispatcher {
function type() { $this->query[Q_TYPE]=$_GET[Q_TYPE]; }
function menu() {
- new MenuManager($_GET[Q_DB]);
+ $menu = new MenuManager($_GET[Q_DB]);
+ new $this->wrapper($menu,array(array('robots','noindex')));
+ return 'END_DISPATCH';
}
/** the academic keyword in URLs switch from a year based viey to a publication type based view */
@@ -2513,7 +2556,7 @@ class Dispatcher {