Notiz Anhang Preview & CodeQuality

This commit is contained in:
cgfhtw
2024-05-28 14:38:37 +02:00
parent fb4997b1ac
commit dccf845e3b
2 changed files with 12 additions and 4 deletions
@@ -17,17 +17,26 @@ class NotizPerson extends Notiz_Controller
{
if($typeId != "person_id")
{
return $this->terminateWithError($this->p->t('ui','error_typeNotizIdIncorrect'), self::ERROR_TYPE_GENERAL);
return $this->terminateWithError($this->p->t('ui', 'error_typeNotizIdIncorrect'), self::ERROR_TYPE_GENERAL);
}
//TODO define permission
if(!$this->permissionlib->isBerechtigt('admin', 'suid') && !$this->permissionlib->isBerechtigt('assistenz', 'suid'))
if (!$this->permissionlib->isBerechtigt('admin', 'suid') && !$this->permissionlib->isBerechtigt('assistenz', 'suid'))
{
$result = $this->p->t('lehre','error_keineSchreibrechte');
$result = $this->p->t('lehre', 'error_keineSchreibrechte');
return $this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
}
return $this->outputJsonSuccess(true);
}
public function loadDokumente()
{
$notiz_id = $this->input->post('notiz_id');
$this->NotizModel->addSelect($this->NotizModel->escape(base_url('content/notizdokdownload.php?id=' . $notiz_id)) . ' AS preview');
return parent::loadDokumente();
}
}
-1
View File
@@ -475,7 +475,6 @@ abstract class Notiz_Controller extends FHCAPI_Controller
public function loadDokumente()
{
$_POST = json_decode(utf8_encode($this->input->raw_input_stream), true);
$notiz_id = $this->input->post('notiz_id');
$this->NotizModel->addSelect('campus.tbl_dms_version.*');