Restore PublicDictionary's details_only option
This commit is contained in:
parent
ed7f06d061
commit
be67f965eb
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue