Fix incorrect variable name; Correctly display public dict
This commit is contained in:
parent
3dd370a375
commit
e1222a43f6
|
@ -20,8 +20,10 @@ class PublicDictionary {
|
||||||
|
|
||||||
$this->details = $this->getPublicDictionaryDetails($dictionary_id);
|
$this->details = $this->getPublicDictionaryDetails($dictionary_id);
|
||||||
$this->words = $this->getPublicDictionaryWords($dictionary_id);
|
$this->words = $this->getPublicDictionaryWords($dictionary_id);
|
||||||
|
if ($this->details !== false) {
|
||||||
$this->details['wordStats'] = $this->getWordStats();
|
$this->details['wordStats'] = $this->getWordStats();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function getPublicDictionaryDetails ($dictionary) {
|
public function getPublicDictionaryDetails ($dictionary) {
|
||||||
if (is_numeric($dictionary)) {
|
if (is_numeric($dictionary)) {
|
||||||
|
@ -239,7 +241,7 @@ WHERE words.dictionary=? AND is_public=1";
|
||||||
foreach($references as $reference) {
|
foreach($references as $reference) {
|
||||||
$reference_link = $this->getWordReferenceHTML($reference, $dictionary_id);
|
$reference_link = $this->getWordReferenceHTML($reference, $dictionary_id);
|
||||||
if ($reference_link !== $reference) {
|
if ($reference_link !== $reference) {
|
||||||
$details = str_replace($reference, $markdown_link, $details);
|
$details = str_replace($reference, $reference_link, $details);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue