implements &search=key1|key2|key3 or &search=key1,key2,key3 for emulating \cite{key1,key2,key3} (feature request by Mateusz)
This commit is contained in:
+8
-5
@@ -3566,7 +3566,6 @@ class Dispatcher {
|
|||||||
|
|
||||||
//echo '<pre>';print_r($selectedEntries);echo '</pre>';
|
//echo '<pre>';print_r($selectedEntries);echo '</pre>';
|
||||||
|
|
||||||
|
|
||||||
if ($this->displayer=='') {
|
if ($this->displayer=='') {
|
||||||
$this->displayer = BIBTEXBROWSER_DEFAULT_DISPLAY;
|
$this->displayer = BIBTEXBROWSER_DEFAULT_DISPLAY;
|
||||||
}
|
}
|
||||||
@@ -3581,7 +3580,6 @@ class Dispatcher {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// required for PHP4 to have this intermediate variable
|
// required for PHP4 to have this intermediate variable
|
||||||
|
|
||||||
$x = new $this->displayer();
|
$x = new $this->displayer();
|
||||||
|
|
||||||
if (method_exists($x,'setEntries')) {
|
if (method_exists($x,'setEntries')) {
|
||||||
@@ -3697,9 +3695,10 @@ class Dispatcher {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function key() {
|
function key() {
|
||||||
|
$entries = array();
|
||||||
|
// case 1: this is a single key
|
||||||
if ($_GET[Q_DB]->contains($_GET[Q_KEY])) {
|
if ($_GET[Q_DB]->contains($_GET[Q_KEY])) {
|
||||||
$bibentry = $_GET[Q_DB]->getEntryByKey($_GET[Q_KEY]);
|
$entries[] = $_GET[Q_DB]->getEntryByKey($_GET[Q_KEY]);
|
||||||
$entries = array($bibentry);
|
|
||||||
if (isset($_GET['astext'])) {
|
if (isset($_GET['astext'])) {
|
||||||
$bibdisplay = new BibtexDisplay();
|
$bibdisplay = new BibtexDisplay();
|
||||||
$bibdisplay->setEntries($entries);
|
$bibdisplay->setEntries($entries);
|
||||||
@@ -3711,7 +3710,11 @@ class Dispatcher {
|
|||||||
}
|
}
|
||||||
return 'END_DISPATCH';
|
return 'END_DISPATCH';
|
||||||
}
|
}
|
||||||
else { nonExistentBibEntryError(); }
|
|
||||||
|
// case two: multiple keys
|
||||||
|
if (preg_match('/[|,]/',$_GET[Q_KEY])) {
|
||||||
|
$this->query[Q_SEARCH]=str_replace(',','|',$_GET[Q_KEY]);
|
||||||
|
} else { nonExistentBibEntryError(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
/** is used to remotely analyzed a situation */
|
/** is used to remotely analyzed a situation */
|
||||||
|
|||||||
Reference in New Issue
Block a user