1
0
Fork 0
mirror of https://github.com/Alamantus/Lexiconga.git synced 2025-06-05 16:56:36 +02:00

Restore PublicDictionary's details_only option

This commit is contained in:
Robbie Antenesse 2023-10-31 16:25:42 -06:00
parent ed7f06d061
commit be67f965eb

View file

@ -10,7 +10,7 @@ class PublicDictionary {
public $details; public $details;
public $words; public $words;
function __construct ($dictionary_id) { function __construct ($dictionary_id, $details_only = false) {
$this->db = new Db(); $this->db = new Db();
$this->token = new Token(); $this->token = new Token();
@ -19,7 +19,7 @@ class PublicDictionary {
); );
$this->details = $this->getPublicDictionaryDetails($dictionary_id); $this->details = $this->getPublicDictionaryDetails($dictionary_id);
$this->words = $this->getPublicDictionaryWords($dictionary_id); $this->words = $details_only ? [] : $this->getPublicDictionaryWords($dictionary_id);
if ($this->details !== false) { if ($this->details !== false) {
$this->details['wordStats'] = $this->getWordStats(); $this->details['wordStats'] = $this->getWordStats();
} }