delete unused code

This commit is contained in:
ma0068
2026-05-11 10:07:28 +02:00
parent 905c69c384
commit 6fedb4b108
4 changed files with 3 additions and 79 deletions
-30
View File
@@ -112,34 +112,4 @@ class TagJob extends JOB_Controller
$this->logInfo( PHP_EOL . "End Job rebuild Automated Tags");
}
public function deleteAllAutomatedTags()
{
print_r( PHP_EOL . "Start Job delete ALL Automated Tags" . PHP_EOL);
$resultToDelete = $this->NotizModel->loadWhere(array('insertvon' => 'BatchJobTagAdd'));
$data = $resultToDelete->retval;
$notiz_ids = array_map(function($item) {
return $item->notiz_id;
}, $data);
print_r($notiz_ids);
foreach ($notiz_ids as $notiz_id)
{
$result = $this->NotizzuordnungModel->delete([
'notiz_id' => $notiz_id
]);
if (isError($result))
$this->logError ('Error occurred delete Notizzuordnung' . $notiz_id);
$result = $this->NotizModel->delete([
'notiz_id' => $notiz_id
]);
if (isError($result))
return error ('Error occurred delete Notiz' . $notiz_id);
}
print_r( PHP_EOL . "End Job delete Automated Tags" . PHP_EOL);
}
}
+2 -47
View File
@@ -134,7 +134,6 @@ class TagLib
$countRecycled++;
$retagged[] = $id;
//$retagged[] = $notizId; //notiz_id
}
// ---------------------------------
@@ -145,12 +144,9 @@ class TagLib
foreach ($toAdd as $id)
{
$result = $this->_insertTag($typeId, $id, $tag, $zeitraum[$id]['von'], $zeitraum[$id]['bis']);
if (isError($result)) {
return $result;
}
$this->_insertTag($typeId, $id, $tag, $zeitraum[$id]['von'], $zeitraum[$id]['bis']);
$countAdded++;
//$tagged[] = $result->retval[0]->notiz_id; //notiz_id
$tagged[] = $id;
}
@@ -169,7 +165,6 @@ class TagLib
}
$countDeleted++;
//$deleted[] = $result->retval['deleted']; //notizId
$deleted[] = $id;
}
@@ -321,46 +316,6 @@ class TagLib
return success($return);
}
public function checkForDeleteDEPR($tag, $typeId, $id, $start, $ende)
{
//TODO Zeitbezug
$return = null;
$notiz_id = null;
$_ci = get_instance();
$_ci->addMeta(
'in checkForDelete', $tag
);
if (!is_numeric($id))
return error ("id " . $id . "not numeric");
$result = $this->_ci->NotizModel->checkIfValidTag($tag, $typeId, $id, $start, $ende);
if (isError($result)) {
return error('Error checking valid tag for ' . $typeId . ': ' . $id);
}
if(hasData($result))
{
$notiz_id = $result->retval[0]->notiz_id;
$_ci = get_instance();
$_ci->addMeta(
'checkDeleteHas DAta', $notiz_id
);
}
else
return null;
if($notiz_id)
{
$_ci->addMeta(
'TO DELETE', $notiz_id
);
$result = $this->_deleteTag($notiz_id);
}
return ['deleted' => $result];
}
private function _insertTag($typeId, $id, $tag, $von, $bis)
{
$resultInsert = $this->_ci->NotizModel->insert([
@@ -102,7 +102,7 @@ export default {
} else if (this.typeHeader === 'mitarbeiter') {
if (!this.person_id || !this.mitarbeiter_uid || !this.domain) {
throw new Error(
'[DetailHeader] "person_id", "mitarbeiter_uid", and "domain" are requried.'
'[DetailHeader] "person_id", "mitarbeiter_uid", and "domain" are required.'
)
}
this.loadHeaderData(this.person_id, this.mitarbeiter_uid);
@@ -648,7 +648,6 @@ export default {
// TODO(chris): filter component column chooser has no accessibilty features
template: `
<div class="stv-list h-100 pt-3">
test manu: currentSEM: {{semesterDates.start}} - {{semesterDates.ende}}<hr>
<div
class="tabulator-container d-flex flex-column h-100"
:class="{'has-filter': filter.length}"