Skip to content
Snippets Groups Projects
Commit 4f67a2de authored by Florian Azizian's avatar Florian Azizian
Browse files

FEAT #12332 TIME 0:10 remove chr_by_folder

parent cf892d29
No related branches found
No related tags found
No related merge requests found
......@@ -70,8 +70,6 @@ class ChronoModel
$value['value'] = ChronoModel::getChronoCategory($aArgs['id']);
} elseif ($value['value'] == 'category_char') {
$value['value'] = ChronoModel::getChronoCategoryChar($aArgs['id']);
} elseif ($value['value'] == 'chr_by_folder') {
$value['value'] = ChronoModel::getChronoFolder($aArgs['folderId']);
} elseif ($value['value'] == 'chr_by_res_id') {
$value['value'] = $aArgs['resId'];
}
......@@ -119,24 +117,6 @@ class ChronoModel
return $entityId . "/" . $chrono;
}
public static function getChronoFolder($folderId)
{
$chronoId = "chrono_folder_{$folderId}";
$parameter = ParameterModel::getById(['id' => $chronoId, 'select' => ['param_value_int']]);
if (empty($parameter)) {
ParameterModel::create(['id' => $chronoId, 'param_value_int' => 1]);
$chrono = 1;
} else {
$chrono = $parameter['param_value_int'];
}
ParameterModel::update(['id' => $chronoId, 'param_value_int' => $chrono + 1]);
return $chrono;
}
public static function getChronoCategory($categoryId)
{
$chronoId = "chrono_{$categoryId}_" . date('Y');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment