Skip to content
Snippets Groups Projects
Commit 0a9cc3ae authored by Demian Katz's avatar Demian Katz
Browse files

Make use of "hasFullText" flag.

parent da406b26
No related merge requests found
...@@ -411,6 +411,7 @@ Geographic Search = "Geographic Search" ...@@ -411,6 +411,7 @@ Geographic Search = "Geographic Search"
Geographic Terms = "Geographic Terms" Geographic Terms = "Geographic Terms"
Geography = "Geography" Geography = "Geography"
Get full text = "Get full text" Get full text = "Get full text"
Get more information = "Get more information"
Get RSS Feed = "Get RSS Feed" Get RSS Feed = "Get RSS Feed"
Globe = "Globe" Globe = "Globe"
Go = "Go" Go = "Go"
......
...@@ -499,11 +499,9 @@ class Summon extends DefaultRecord ...@@ -499,11 +499,9 @@ class Summon extends DefaultRecord
public function getURLs() public function getURLs()
{ {
if (isset($this->fields['link'])) { if (isset($this->fields['link'])) {
$msg = $this->hasFullText() ? 'Get full text' : 'Get more information';
return [ return [
[ ['url' => $this->fields['link'], 'desc' => $this->translate($msg)]
'url' => $this->fields['link'],
'desc' => $this->translate('Get full text')
]
]; ];
} }
$retVal = []; $retVal = [];
...@@ -629,4 +627,14 @@ class Summon extends DefaultRecord ...@@ -629,4 +627,14 @@ class Summon extends DefaultRecord
} }
return $str; return $str;
} }
/**
* Does this record have full text access?
*
* @return bool
*/
public function hasFullText()
{
return (bool)($this->fields['hasFullText'] ?? false);
}
} }
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment