Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be more generous with URL expansion #755

Merged
merged 13 commits into from
Sep 19, 2018
5 changes: 4 additions & 1 deletion Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ public function parse_text($text) {
// Re-assemble parsed template into string
public function parsed_text() {
if ($this->has(strtolower('CITATION_BOT_PLACEHOLDER_BARE_URL'))) {
if ($this->blank('title')) {
if ($this->has('doi') && !doi_active($this->get('doi')) && $this->blank([DOI_BROKEN_ALIASES, 'title', 'chapter'])) {
$this->mark_inactive_doi(); // Check it right now-this routine is called from within TEMPLATE()
}
if ($this->blank(['title', 'chapter'])) {
return base64_decode($this->get(strtolower('CITATION_BOT_PLACEHOLDER_BARE_URL')));
} else {
$this->forget(strtolower('CITATION_BOT_PLACEHOLDER_BARE_URL'));
Expand Down