diff --git a/bibtexbrowser-test.php b/bibtexbrowser-test.php index a364083..19242f0 100755 --- a/bibtexbrowser-test.php +++ b/bibtexbrowser-test.php @@ -339,7 +339,7 @@ class BTBTest extends PHPUnit_Framework_TestCase { function test_link_configuration() { bibtexbrowser_configure('BIBTEXBROWSER_LINKS_TARGET','_self'); $test_data = fopen('php://memory','x+'); - fwrite($test_data, "@book{aKey,pdf={myarticle.pdf}}\n@book{bKey,url={myarticle.pdf}}\n@book{cKey,url={myarticle.htm}}\n" + fwrite($test_data, "@book{aKey,pdf={myarticle.pdf}}\n@book{bKey,url={myarticle.pdf}}\n@book{cKey,url={myarticle.xyz}}\n" ); fseek($test_data,0); $btb = new BibDataBase(); @@ -352,7 +352,7 @@ class BTBTest extends PHPUnit_Framework_TestCase { $second_entry=$btb->bibdb[array_keys($btb->bibdb)[1]]; $this->assertEquals('[pdf]',$second_entry->getPdfLink()); $third_entry=$btb->bibdb[array_keys($btb->bibdb)[2]]; - $this->assertEquals('[url]',$third_entry->getPdfLink()); + $this->assertEquals('[url]',$third_entry->getPdfLink()); } // see https://github.com/monperrus/bibtexbrowser/pull/14 diff --git a/bibtexbrowser.php b/bibtexbrowser.php index 36f8147..37c8157 100755 --- a/bibtexbrowser.php +++ b/bibtexbrowser.php @@ -1340,7 +1340,7 @@ class BibEntry { return ""; } - /** See description of 'getPdfLink' + /** See description of 'getUrlLink' */ function getAndRenameLink($bibfield, $iconurl=NULL) { $extension = strtolower(pathinfo(parse_url($this->getField($bibfield),PHP_URL_PATH),PATHINFO_EXTENSION));