Skip to content

Commit

Permalink
Fix methods for user storage
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Kharanenka committed Mar 14, 2018
1 parent 2d63ac1 commit afa0f38
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion classes/storage/AbstractUserStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function addToList($sKey, $sValue)
//Get value from storage
$arValueList = $this->getList($sKey);

$arValueList[] = $sValue;
array_unshift($arValueList, $sValue);
$arValueList = array_unique($arValueList);

$this->put($sKey, $arValueList);
Expand Down
2 changes: 1 addition & 1 deletion classes/storage/UserStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public function getList($sKey)
}

if (!empty($arDefaultStorageValue)) {
$arValueList = array_merge($arValueList, $arDefaultStorageValue);
$arValueList = array_merge($arDefaultStorageValue, $arValueList);
$arValueList = array_unique($arValueList);

$this->put($sKey, $arValueList);
Expand Down

0 comments on commit afa0f38

Please sign in to comment.