mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-15 14:02:17 +00:00
Merge branch 'feature-63394/StV_Favoriten_64_Zeichen_Variablenbeschraenkung' into demo-cis40
This commit is contained in:
@@ -60,17 +60,6 @@ class Favorites extends FHCAPI_Controller
|
||||
|
||||
$favorites = $this->input->post('favorites');
|
||||
|
||||
$removed = [];
|
||||
while (strlen($favorites) > 64) {
|
||||
$favObj = json_decode($favorites);
|
||||
if (!$favObj->list)
|
||||
break;
|
||||
$removed[] = array_shift($favObj->list);
|
||||
$favorites = json_encode($favObj);
|
||||
}
|
||||
if ($removed)
|
||||
$this->addMeta('removed', $removed);
|
||||
|
||||
$result = $this->VariableModel->setVariable(getAuthUID(), 'stv_favorites', $favorites);
|
||||
|
||||
$this->getDataOrTerminateWithError($result);
|
||||
|
||||
Reference in New Issue
Block a user