mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
add config for userAutomatedTags
This commit is contained in:
@@ -151,3 +151,5 @@ $config['stv_prestudent_tags'] = [
|
||||
'stbtr_erh_auto' => ['readonly' => true],
|
||||
'jgv_auto' => ['readonly' => true],
|
||||
];
|
||||
|
||||
$config['userAutomatedTags'] = 'sftest';
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user