dx.doi.org and scholar url now use https (#66)
This commit is contained in:
@@ -302,7 +302,7 @@ class BTBTest extends PHPUnit_Framework_TestCase {
|
|||||||
$btb = new BibDataBase();
|
$btb = new BibDataBase();
|
||||||
$btb->update_internal("inline", $test_data);
|
$btb->update_internal("inline", $test_data);
|
||||||
$first_entry=$btb->bibdb[array_keys($btb->bibdb)[0]];
|
$first_entry=$btb->bibdb[array_keys($btb->bibdb)[0]];
|
||||||
$this->assertEquals('<pre class="purebibtex">@Article{Baldwin2014Quantum,Doi={<a href="http://dx.doi.org/10.1103/PhysRevA.90.012110">10.1103/PhysRevA.90.012110</a>},Url={<a href="http://link.aps.org/doi/10.1103/PhysRevA.90.012110">http://link.aps.org/doi/10.1103/PhysRevA.90.012110</a>}}</pre>',$first_entry->toEntryUnformatted());
|
$this->assertEquals('<pre class="purebibtex">@Article{Baldwin2014Quantum,Doi={<a href="https://dx.doi.org/10.1103/PhysRevA.90.012110">10.1103/PhysRevA.90.012110</a>},Url={<a href="http://link.aps.org/doi/10.1103/PhysRevA.90.012110">http://link.aps.org/doi/10.1103/PhysRevA.90.012110</a>}}</pre>',$first_entry->toEntryUnformatted());
|
||||||
}
|
}
|
||||||
|
|
||||||
function test_filter_view() {
|
function test_filter_view() {
|
||||||
@@ -620,7 +620,7 @@ class BTBTest extends PHPUnit_Framework_TestCase {
|
|||||||
$db = new BibDataBase();
|
$db = new BibDataBase();
|
||||||
$db->update_internal("inline", $test_data);
|
$db->update_internal("inline", $test_data);
|
||||||
$entry=$db->getEntryByKey("key");
|
$entry=$db->getEntryByKey("key");
|
||||||
$this->assertContains('<a href="http://scholar.google.com/scholar?cites=1234">[citations]</a>', $entry->toHTML());
|
$this->assertContains('<a href="https://scholar.google.com/scholar?cites=1234">[citations]</a>', $entry->toHTML());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // end class
|
} // end class
|
||||||
|
|||||||
+3
-3
@@ -1336,7 +1336,7 @@ class BibEntry {
|
|||||||
function getDoiLink($iconurl=NULL) {
|
function getDoiLink($iconurl=NULL) {
|
||||||
$str = $this->getIconOrTxt('doi',$iconurl);
|
$str = $this->getIconOrTxt('doi',$iconurl);
|
||||||
if ($this->hasField('doi')) {
|
if ($this->hasField('doi')) {
|
||||||
return '<a'.get_target().' href="http://dx.doi.org/'.$this->getField('doi').'">'.$str.'</a>';
|
return '<a'.get_target().' href="https://dx.doi.org/'.$this->getField('doi').'">'.$str.'</a>';
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
@@ -1345,7 +1345,7 @@ class BibEntry {
|
|||||||
function getGSLink($iconurl=NULL) {
|
function getGSLink($iconurl=NULL) {
|
||||||
$str = $this->getIconOrTxt('citations',$iconurl);
|
$str = $this->getIconOrTxt('citations',$iconurl);
|
||||||
if ($this->hasField('gsid')) {
|
if ($this->hasField('gsid')) {
|
||||||
return ' <a'.get_target().' href="http://scholar.google.com/scholar?cites='.$this->getField("gsid").'">'.$str.'</a>';
|
return ' <a'.get_target().' href="https://scholar.google.com/scholar?cites='.$this->getField("gsid").'">'.$str.'</a>';
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
@@ -1901,7 +1901,7 @@ class BibEntry {
|
|||||||
|
|
||||||
// Fields that should be hyperlinks
|
// Fields that should be hyperlinks
|
||||||
// the order matters
|
// the order matters
|
||||||
$hyperlinks = array('url' => '%O', 'file' => '%O', 'pdf' => '%O', 'doi' => 'http://dx.doi.org/%O', 'gsid' => 'http://scholar.google.com/scholar?cites=%O');
|
$hyperlinks = array('url' => '%O', 'file' => '%O', 'pdf' => '%O', 'doi' => 'https://dx.doi.org/%O', 'gsid' => 'https://scholar.google.com/scholar?cites=%O');
|
||||||
|
|
||||||
$vals = array();
|
$vals = array();
|
||||||
foreach ($hyperlinks as $field => $url) {
|
foreach ($hyperlinks as $field => $url) {
|
||||||
|
|||||||
Reference in New Issue
Block a user