mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-18 04:29:28 +00:00
Adaptions for Apacheconfirmity
This commit is contained in:
@@ -27,7 +27,11 @@ class Favorites extends FHC_Controller
|
||||
return $this->outputJson(getError($result));
|
||||
}
|
||||
|
||||
$this->outputJson(getData($result)['stv_favorites']);
|
||||
$result = getData($result);
|
||||
if (!$result)
|
||||
$this->outputJson(null);
|
||||
else
|
||||
$this->outputJson($result['stv_favorites']);
|
||||
}
|
||||
|
||||
public function set()
|
||||
|
||||
@@ -159,7 +159,7 @@ class UDFLib
|
||||
$found = false; // used to check if the field is found or not in the json schema
|
||||
|
||||
$this->_sortJsonSchemas($jsonSchemasArray); // Sort the list of UDF by sort property
|
||||
|
||||
|
||||
// Loops through json schemas
|
||||
foreach ($jsonSchemasArray as $jsonSchema)
|
||||
{
|
||||
@@ -294,7 +294,7 @@ class UDFLib
|
||||
// Checks if the requiredPermissions is available and it is a valid array or a valid string
|
||||
if (isset($decodedUDFDefinition->{self::REQUIRED_PERMISSIONS_PARAMETER})
|
||||
&& (!isEmptyArray($decodedUDFDefinition->{self::REQUIRED_PERMISSIONS_PARAMETER})
|
||||
|| !isEmptyString($decodedUDFDefinition->{self::REQUIRED_PERMISSIONS_PARAMETER})))
|
||||
|| !isEmptyString($decodedUDFDefinition->{self::REQUIRED_PERMISSIONS_PARAMETER})))
|
||||
{
|
||||
// Then check if the user has the permissions to read such UDF
|
||||
if (!$this->_readAllowed($decodedUDFDefinition->{self::REQUIRED_PERMISSIONS_PARAMETER}))
|
||||
@@ -355,7 +355,7 @@ class UDFLib
|
||||
// Checks if the requiredPermissions is available and it is a valid array or a valid string
|
||||
if (isset($decodedUDFDefinition->{self::REQUIRED_PERMISSIONS_PARAMETER})
|
||||
&& (!isEmptyArray($decodedUDFDefinition->{self::REQUIRED_PERMISSIONS_PARAMETER})
|
||||
|| !isEmptyString($decodedUDFDefinition->{self::REQUIRED_PERMISSIONS_PARAMETER})))
|
||||
|| !isEmptyString($decodedUDFDefinition->{self::REQUIRED_PERMISSIONS_PARAMETER})))
|
||||
{
|
||||
// Then check if the user has the permissions to write such UDF
|
||||
if (!$this->_writeAllowed($decodedUDFDefinition->{self::REQUIRED_PERMISSIONS_PARAMETER}))
|
||||
@@ -634,8 +634,10 @@ class UDFLib
|
||||
]);
|
||||
if (isError($result))
|
||||
return $result;
|
||||
|
||||
$this->_definition_cache[$dbTable] = json_decode(current($result->retval)->jsons, true);
|
||||
if (!hasData($result))
|
||||
$this->_definition_cache[$dbTable] = [];
|
||||
else
|
||||
$this->_definition_cache[$dbTable] = json_decode(current($result->retval)->jsons, true);
|
||||
}
|
||||
return success($this->_definition_cache[$dbTable]);
|
||||
}
|
||||
@@ -657,8 +659,8 @@ class UDFLib
|
||||
$result = $this->getDefinitionForModel($targetModel);
|
||||
if (isError($result))
|
||||
return $result;
|
||||
$definitions = getData($result);
|
||||
|
||||
$definitions = $result->retval;
|
||||
|
||||
usort($definitions, function ($a, $b) {
|
||||
return $a[self::SORT] - $b[self::SORT];
|
||||
});
|
||||
@@ -701,7 +703,7 @@ class UDFLib
|
||||
self::PERMISSION_TABLE_METHOD,
|
||||
self::PERMISSION_TYPE_WRITE
|
||||
);
|
||||
|
||||
|
||||
// set listValues for dropdowns
|
||||
if (isset($field[self::LIST_VALUES])) {
|
||||
if (isset($field[self::LIST_VALUES]['enum'])) {
|
||||
@@ -997,7 +999,7 @@ class UDFLib
|
||||
$htmlParameters[HTMLWidget::HTML_ID] = $jsonSchema->{self::NAME};
|
||||
$htmlParameters[HTMLWidget::HTML_NAME] = $jsonSchema->{self::NAME};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sort the list of UDF by sort property
|
||||
*/
|
||||
@@ -1020,7 +1022,7 @@ class UDFLib
|
||||
return ($a->{self::SORT} < $b->{self::SORT}) ? -1 : 1;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Loads the UDF description by the given schema and table
|
||||
*/
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
//TODO(Manu) refactor with require or async
|
||||
//TODO(Manu) refactor with require or async!
|
||||
//sonst Error wenn extension file nicht vorhanden
|
||||
|
||||
import person from "./notiz/person.js";
|
||||
import softwarenotiz from "../../extensions/FHC-Core-Softwarebereitstellung/js/api/softwarenotiz.js";
|
||||
//import softwarenotiz from "../../extensions/FHC-Core-Softwarebereitstellung/js/api/softwarenotiz.js";
|
||||
//import pppnotiz from "../../extensions/FHC-Core-PEP/js/api/pppnotiz.js";
|
||||
|
||||
|
||||
export default {
|
||||
person,
|
||||
softwarenotiz,
|
||||
// softwarenotiz,
|
||||
// pppnotiz
|
||||
}
|
||||
@@ -2,7 +2,7 @@ import VueDatePicker from '../vueDatepicker.js.php';
|
||||
import {CoreFilterCmpt} from "../filter/Filter.js";
|
||||
import PvAutoComplete from "../../../../index.ci.php/public/js/components/primevue/autocomplete/autocomplete.esm.min.js";
|
||||
|
||||
import BsModal from "../Bootstrap/Modal";
|
||||
import BsModal from "../Bootstrap/Modal.js";
|
||||
import FormForm from '../Form/Form.js';
|
||||
import FormInput from '../Form/Input.js';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import BsAlert from './Alert';
|
||||
import BsAlert from './Alert.js';
|
||||
|
||||
export default {
|
||||
mixins: [
|
||||
|
||||
@@ -2,7 +2,7 @@ import VueDatePicker from '../vueDatepicker.js.php';
|
||||
import PvAutoComplete from "../../../../index.ci.php/public/js/components/primevue/autocomplete/autocomplete.esm.min.js";
|
||||
import FormUploadDms from '../Form/Upload/Dms.js';
|
||||
import {CoreFilterCmpt} from "../filter/Filter.js";
|
||||
import BsModal from "../Bootstrap/Modal";
|
||||
import BsModal from "../Bootstrap/Modal.js";
|
||||
import FormForm from '../Form/Form.js';
|
||||
import FormInput from '../Form/Input.js';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {CoreFilterCmpt} from "../../../../filter/Filter.js";
|
||||
import {CoreRESTClient} from "../../../../../RESTClient";
|
||||
/*import {CoreRESTClient} from "../../../../../RESTClient.js";*/
|
||||
import BsModal from "../../../../Bootstrap/Modal.js";
|
||||
/*import PvToast from "../../../../../../../index.ci.php/public/js/components/primevue/toast/toast.esm.min.js";*/
|
||||
import PvAutoComplete from "../../../../../../../index.ci.php/public/js/components/primevue/autocomplete/autocomplete.esm.min.js";
|
||||
|
||||
@@ -2,7 +2,7 @@ import {CoreFilterCmpt} from "../../../../filter/Filter.js";
|
||||
import BsModal from "../../../../Bootstrap/Modal.js";
|
||||
import FormForm from '../../../../Form/Form.js';
|
||||
import FormInput from '../../../../Form/Input.js';
|
||||
import {CoreRESTClient} from "../../../../../RESTClient";
|
||||
import {CoreRESTClient} from "../../../../../RESTClient.js";
|
||||
|
||||
export default{
|
||||
components: {
|
||||
|
||||
Reference in New Issue
Block a user