add config for userAutomatedTags

This commit is contained in:
ma0068
2026-05-22 14:04:32 +02:00
parent 9fb00f6cbd
commit 0ed56ca067
3 changed files with 5 additions and 10 deletions
+2
View File
@@ -151,3 +151,5 @@ $config['stv_prestudent_tags'] = [
'stbtr_erh_auto' => ['readonly' => true],
'jgv_auto' => ['readonly' => true],
];
$config['userAutomatedTags'] = 'sftest';
-7
View File
@@ -6,9 +6,6 @@ use \DateTime as DateTime;
class TagJob extends JOB_Controller
{
const BATCHUSER = 'sftest';
/**
* API constructor
*/
@@ -34,8 +31,6 @@ class TagJob extends JOB_Controller
public function rebuildAutomatedTags()
{
$automatedTagsRes = $this->NotiztypModel->loadWhere(array('automatisiert' => true, 'taglib IS NOT NULL' => null));
$automatedTags = hasData($automatedTagsRes) ? getData($automatedTagsRes) : [];
@@ -109,9 +104,7 @@ class TagJob extends JOB_Controller
$this->logInfo("Tag " . $result->retval['input']['tag'] . "Deleted tags(s: " . implode(', ', $result->retval['results']['deletedTagsIds']));
if ($result->retval['results']['retaggedIds'])
$this->logInfo("Tag " . $result->retval['input']['tag'] . "Recycled tag(s): " . implode(', ', $result->retval['results']['retaggedIds']));
}
$this->logInfo( "End Job rebuild Automated Tags");
}
}
+3 -3
View File
@@ -16,8 +16,6 @@ use \stdClass as stdClass;
class TagLib
{
const BATCHUSER = 'sftest';
/**
* Object initialization
*/
@@ -38,6 +36,8 @@ class TagLib
// Libraries
$this->_ci->load->library('PermissionLib');
$this->_ci->load->library('PrestudentLib');
$batchUser = $this->_ci->config->item('userAutomatedTags');
}
public function updateAutomatedTags($paramsTag)
@@ -321,7 +321,7 @@ class TagLib
$resultInsert = $this->_ci->NotizModel->insert([
'titel' => 'TAG',
'text' => 'AUTOMATED TAG',
'verfasser_uid' => self::BATCHUSER,
'verfasser_uid' => $this->batchUser,
'erledigt' => false,
'insertamum' => date('Y-m-d H:i:s'),
'insertvon' => 'BatchJobTagAdd',