kopia lustrzana https://github.com/nextcloud/social
avoid duplicate
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>pull/625/head
rodzic
0d42d2d0c6
commit
fff61b27f5
|
|
@ -122,6 +122,8 @@ trait TDetails {
|
||||||
public function addDetail(string $detail, string $value) {
|
public function addDetail(string $detail, string $value) {
|
||||||
if (!array_key_exists($detail, $this->details) || !is_array($this->details[$detail])) {
|
if (!array_key_exists($detail, $this->details) || !is_array($this->details[$detail])) {
|
||||||
$this->details[$detail] = [];
|
$this->details[$detail] = [];
|
||||||
|
} else if (in_array($value, $this->details[$detail])) {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->details[$detail][] = $value;
|
$this->details[$detail][] = $value;
|
||||||
|
|
|
||||||
Ładowanie…
Reference in New Issue