From 6fedb4b10873a4f9fa4461a4f4c548afa326afae Mon Sep 17 00:00:00 2001 From: ma0068 Date: Mon, 11 May 2026 10:07:28 +0200 Subject: [PATCH] delete unused code --- application/controllers/jobs/TagJob.php | 30 ------------ application/libraries/TagLib.php | 49 +------------------ .../components/DetailHeader/DetailHeader.js | 2 +- .../Stv/Studentenverwaltung/List.js | 1 - 4 files changed, 3 insertions(+), 79 deletions(-) diff --git a/application/controllers/jobs/TagJob.php b/application/controllers/jobs/TagJob.php index c97a74bb2..5a04204d7 100644 --- a/application/controllers/jobs/TagJob.php +++ b/application/controllers/jobs/TagJob.php @@ -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); - } } diff --git a/application/libraries/TagLib.php b/application/libraries/TagLib.php index 4eb8dedef..a9322cd12 100644 --- a/application/libraries/TagLib.php +++ b/application/libraries/TagLib.php @@ -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([ diff --git a/public/js/components/DetailHeader/DetailHeader.js b/public/js/components/DetailHeader/DetailHeader.js index 486f363d9..3f81c3134 100644 --- a/public/js/components/DetailHeader/DetailHeader.js +++ b/public/js/components/DetailHeader/DetailHeader.js @@ -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); diff --git a/public/js/components/Stv/Studentenverwaltung/List.js b/public/js/components/Stv/Studentenverwaltung/List.js index ae7a577ee..19cb451ae 100644 --- a/public/js/components/Stv/Studentenverwaltung/List.js +++ b/public/js/components/Stv/Studentenverwaltung/List.js @@ -648,7 +648,6 @@ export default { // TODO(chris): filter component column chooser has no accessibilty features template: `
- test manu: currentSEM: {{semesterDates.start}} - {{semesterDates.ende}}