Commit Graph

95 Commits

Author SHA1 Message Date
Harald Bamberger d4494836b1 fix file permissions erroneously commited as a21a292da6 2024-10-17 15:34:00 +02:00
Harald Bamberger a8141e5dac Merge branch 'master' into feature-25999/C4 2024-09-09 11:45:10 +02:00
SimonGschnell 8e2129902c Merge branch 'feature-25999/task-39464' into feature-25999/C4_TEST 2024-05-08 11:29:39 +02:00
SimonGschnell c2a782e164 updates news fetching and DB_Model pagination methods 2024-05-08 11:28:16 +02:00
SimonGschnell c017014171 changes how the pagination is done in the DB_Model 2024-05-08 11:28:16 +02:00
cgfhtw b1c094383f Udf Component 2024-03-28 15:38:50 +01:00
SimonGschnell 04f6ee6156 Merge branch 'master' into feature-25999/C4_ma0594dev 2024-02-15 15:16:07 +01:00
SimonGschnell a21a292da6 dokument upload 2024-01-29 16:48:41 +01:00
Harald Bamberger f84a75af4e Merge branch 'feature-25563/PV21_Verschlüsselung_Gehaltsdaten' into feature-25562/PV21_Datenbankstruktur_fuer_Vertraege_und_Gehaelter 2023-05-04 15:41:44 +02:00
Paolo 1c0129466a Bugfix: added a check to DB_Model->_addEncrypt method on the parameter encryptedColumns 2023-05-04 15:23:51 +02:00
Harald Bamberger e713cdac64 Merge branch 'feature-25563/PV21_Verschlüsselung_Gehaltsdaten' into feature-25562/PV21_Datenbankstruktur_fuer_Vertraege_und_Gehaelter 2023-05-04 15:03:13 +02:00
Paolo 08de013c23 Fixes: code quality checks 2023-04-25 16:07:42 +02:00
Werner Masik c613c6dc43 small fix to prevent error when $encryptedColumns is null 2023-04-03 13:37:12 +02:00
Werner Masik c52cd05436 Merge branch 'feature-25562/PV21_Vertraege_Encryption_Merge' 2023-03-28 20:12:40 +02:00
Paolo 2b9af86955 - Added examples to application/config/db_crypt.php
- core/DB_Model->_addDecryptLoad fixed when checking the condition if the used operator is made of two characters
2023-02-21 16:11:49 +01:00
Paolo c831355012 - FilterWidget: now it is possible to provide the encryptedColumns parameter to specify which columns of a database table are encrypted, how to cast them and which password to use to decrypt them
- Added new constants PGSQL_BYTEA_TYPE, CRYPT_CONF_PASSWORDS, CRYPT_CAST, CRYPT_PASSWORD_NAME, CRYPT_SELECT_TEMPLATE, CRYPT_WHERE_TEMPLATE and CRYPT_WRITE_TEMPLATE to application/core/DB_Model.php
- Added new optional parameter encryptedColumns to application/core/DB_Model insert, update, load, loadWhere, execQuery, execReadOnlyQuery and _toPhp
- Added new private methods _addEncrypt, _addDecryptQuery and _addDecryptLoad to application/core/DB_Model.php
- core/DB_Model: now it is possible to provide the encryptedColumns parameter to specify which columns  of a database table are encrypted, how to cast them and which password to use to decrypt them
- Adapted application/models/system/PersonLog_model.php
2023-02-08 13:33:40 +01:00
Paolo 4fa1193948 - Added new CI config file application/config/db_crypt.php, it is loaded by core/DB_Model
- Added new constant ENCRYPTION_PASSWORDS to application/core/DB_Model.php
- Added new protected properties passwordName and encryptedColumns to core/DB_Model
- Added new private methods _isCryptoEnabledAndValid, _getCipher, _encrypt and _decrypt to core/DB_Model
- core/DB_Model properties insert and update now are making use of _encrypt()
- core/DB_Model properties loadWhere and loadTree now are making use of _decrypt()
2023-01-16 12:10:49 +01:00
Cris 3b1d0f3aaa Merged DB Model Int/Float conversion
+ query type cast adaptation
2022-07-18 17:33:20 +02:00
Paolo c325046e8e - Renamed public method DB_Model->hasUDF to udfsExistAndDefined
- Adapted controllers/system/FAS_UDF and models/crm/Prestudent_model
- Added new private method _getUDFsNoPerms to DB_Model
- Changed private method DB_model->_prepareUDFsWrite to use _getUDFsNoPerms
2021-10-08 17:30:28 +02:00
Paolo 45fab928ad - Renamed private method _manageUDFs to _prepareUDFsWrite in application/core/DB_Model.php
- Changed private method _toPhp in application/core/DB_Model.php to check permissions on UDFs
- Adapted code to fit the changes in application/libraries/UDFLib.php
- Renamed public method manageUDFs to prepareUDFsWrite in application/libraries/UDFLib.php
- Added new public method prepareUDFsRead to application/libraries/UDFLib.php
- Fixed bugs, comments & code style
2021-10-07 17:32:49 +02:00
Paolo e509f7acd1 Added comments and cleaned code 2019-12-17 16:57:02 +01:00
Paolo 719f2d7314 - Changed controller system/FAS_UDF, less busy now
- Method execReadOnlyQuery of DB_Model less strict check against SQL statements
- Added new public method setup to DB_Model to setup the model after initialization
- Added new constants to UDFLib
- Added new private method _printEndUDFBlock and _printEndUDFBlock to UDFLib
- Added new public methods setUDFUniqueId, getSession, getSessionElement, setSession, setSessionElement, saveUDFs and isAllowed to UDFLib
- Removed model system/FAS_UDF_model
- View views/system/fas_udf now uses the view templates/FHC-Header
- Added new parameter udfs to view templates/FHC-Header
- Added new properties to UDFWidget
- Added new private methods _initUDFWidget, _checkParameters and _startUDFWidget to UDFWidget
2019-12-17 13:35:41 +01:00
Paolo ff858a495d - Added new core controller JOB_Controller
- Added new webservicetyp_kurzbz "job" to table system.tbl_webservicetyp in system/dbupdate_3.3.php
- Added new filter "All jobs viewer"
- Added new __construct to LogLib to set properties
- Added new public methods logInfoDB, logDebugDB, logWarningDB and logErrorDB to LogLib
- Added new private method _logDB to LogLib
- Renamed LogLib private method _format to _getPrefix
- Added new private method _getDatabaseDescription to LogLib
- Changed method _getCaller to use different levels of debug_backtrace
- Added new properties and constants to LogLib to log to the database
2019-08-28 17:26:41 +02:00
Paolo d4c7f1f18d Merge branch 'master' into cleanci 2019-04-30 13:14:37 +02:00
Paolo 3b4012798f Fixed some comments typo 2019-04-30 13:13:34 +02:00
Paolo a0967588fb Better error messages in DB_Model 2019-04-25 13:38:46 +02:00
Paolo 699aca74d1 - Changed helper and language autoload
- Changed language config
- Removed never used constants
- Changed rest_language in rest config file
- Adapted models that where extending FHC_Model
- Adapted code to load hlp_return_object
- Adapted code to use exit status codes constants
2019-04-25 12:09:31 +02:00
Andreas Österreicher 0a23698b7e Fixed Loading of UDF Fields in FAS if there are only UDF Fields for
Persons
2018-12-19 07:35:16 +01:00
Paolo 08af558e8f - Better code in application/libraries/LogLib.php
- Added private property debugMode to application/core/DB_Model.php
- application/core/DB_Model.php now loads Loglib
- Added private method _logLastQuery to application/core/DB_Model.php
- Placed _logLastQuery in DB_Model methods: insert, update, delete, loadWhere, loadTree, execQuery
- DB_Model method load now calls method loadWhere
2018-11-21 14:59:31 +01:00
Paolo 46e85a2317 Merge branch 'master' into permissions 2018-06-28 14:52:09 +02:00
Paolo 25e66bf9dd - Added function isEmptyString to fhc_helper
- Added function isEmptyArray to fhc_helper
- Adapted the code in application/* to use as much as possible this two new functions
- Removed the php function empty almost everywhere
2018-06-27 15:06:04 +02:00
Paolo 9d5c9b443e Merge branch 'master' into permissions 2018-04-18 17:35:33 +02:00
Paolo 4152a67d8f - Removed permission system from DB_Model and FHC_Model
- Removed method _isEntitled from DB_Model
- Removed method isEntitled from DHC_Model
2018-03-29 12:15:12 +02:00
Andreas Österreicher 68f934a5d0 Removed Budget Tables from Core -> moved to Extension
Fixed Problem during Extension installation
2018-03-15 06:53:50 +01:00
Paolo 72bb40e786 - Added method escapeLike to DB_Model to escape strings for LIKE operator
- Added JS include jqueryui to InfoCenter
- Added left join to system.tbl_person_lock in infocenterData.php
- Added field LockDate to InfoCenter filter
- Added parameter markRow to InfoCenter filter
- Added DragNDrop to FilterWidget to sort/remove the selected filter fields
- FilterWidget now display the name of the loaded filter if available
- Added the property "name" to the jsonb of filters to display the name of the loaded filter
- Added the static method displayFilterName to the FilterWidget to display the name of the loaded filter
- The collapsible panel in FilterWidget now shows/hides the fields selection, the filter operators and the inputs to save the custom filter
- The GUI remembers if the collapsible panel should be closed or open
- Added the "Apply" button to the filter operators
- Added the markRow parameter to the FilterWidget, used to mark a row if one or more conditions are matched
- Added the alternativeMarkRowClass to use a different class to mark a row
- Added the public static function markRow to the FilterWidget
2018-02-21 17:48:03 +01:00
Paolo a7582c8868 - Method execReadOnlyQuery of DB_Model has a less strict check about the query statement
- Added a first management of the type date
2017-12-05 17:39:31 +01:00
Paolo ee3998f62e - Changed system/dbupdate_3.3.php to create table system.tbl_filters and what its needed
- Added model system/Filters_model to manage system.tbl_filters
- Removed method execQuery from model system/UDF_model
- Added property executedQueryMetaData to DB_Model
- Added property executedQueryListFields to DB_Model
- Added method getExecutedQueryListFields to DB_Model
- Added method getExecutedQueryMetaData to DB_Model
- Added method execReadOnlyQuery to DB_Model to execute read only queries from outside a model
- Changed DB_Model method _toPhp to store infos about an executed query into properties executedQueryMetaData and executedQueryListFields
- Updated library UDFLib to use execReadOnlyQuery
- Added widget FilterWidget to render and manage a filter into VileSci
- Added views widgets/filter/selectFields, widgets/filter/selectFilters and widgets/filter/tableDataset used by FilterWidget
2017-11-22 12:08:54 +01:00
Andreas Österreicher 39392d7c18 - Added Cronjob for correcting Studienplan in Status
- Modified persmission lib to not check persmissions on CLI
- Modified Cronjobs to be able to start CI Jobs
2017-10-24 11:13:59 +02:00
Paolo d1fa93a2b6 DB_model bugfix:
- update method now is using _manageUDFs instead of directly UDFLib->manageUDFs
- _manageUDFs method now accept the id as third parameter
- if the third parameter of _manageUDFs is null the getUDFs is not
called
- If id parameter of method load is null now a correct parameter is given to
get_where
2017-08-23 10:47:12 +02:00
Paolo d8cd786079 - application/core/* -> CS compliant
- application/libraries/* -> CS compliant
- FHC_Model isEntitled method now return error() or success()
- Updated all code that uses isEntitled method from FHC_Model
- Removed Squiz.PHP.DisallowSizeFunctionsInLoops from CS ruleset
- Removed depracated method replace from DB_Model
- Removed unused method pgArrayPhp from DB_Model
- Renamed method arrayMergeIndex to _arrayCombine in DB_Model and set as private
- Added method _manageUDFs to DB_Model (a wrapper for UDFLib->manageUDFs)
2017-08-22 16:24:51 +02:00
Paolo b50aab2d33 - Moved all code related to UDF from DB_Model to UDFLib
- Changed method getUDFs in DB_Model
- Removed method getUDF
- Moved method _getUDFsDefinitions to UDF_model and renamed to getUDFsDefinitions
- Updated model UDF_model
- Updated controller system/UDF
- Updated DB_Model to be more CS compliant
2017-08-18 15:50:59 +02:00
Paolo 226eda73e5 - Added comments to DB_Model
- Method _manageUDFs using a temp variable to store result from _validateUDFs
2017-08-09 16:20:10 +02:00
Paolo 973b74ce7e $validate variable reset on every loop 2017-08-09 15:55:32 +02:00
Paolo 9ee1820ac3 - Not to check the required attribute for them all together, but only if the UDF is present in the given parameters.
Update of UDF should work in the same way as the update of regular columns.
- Required rules:
    - If required === false && value to be saved == (null || false) => validation avoided
    - If required == false && value to be saved != null => validation performed
    - If required == true => validation performed && value cannot be null
    - If required == true && value to be saved == (null || false) => raise error: required field
    - If raised error required field => validation is not performed
2017-08-09 15:21:19 +02:00
Paolo 68189bb7a5 - If required == false and a null value is given for a UDF, then no
validation is performed
- No validation is performed for checkboxes
- Better workaround in UDF_Model
2017-08-02 17:02:39 +02:00
Paolo 66de1e18f8 - Removed /core from URL
- If UDf are not set in DB UDF view will not display them
- Removed placeholder from multiple dropdown widget
- Dropdown widget has null value as placeholder
- Added permission system/udf to checksystem
2017-08-01 18:25:23 +02:00
Paolo 59045e1136 Added private method _fillMissingChkboxUDF to UDF_model.
It checks if UDF checkboxes are NOT posted and sets theirs values to
false
2017-07-28 18:36:08 +02:00
Paolo 994c4e1d36 If a UDF is of type checkbox, convert the string value to a boolean 2017-07-28 17:21:01 +02:00
Paolo 28be99c952 In case a table is updated and UDF are present in that table,
the method _manageUDFs will preserve the UDF values that
are NOT given as parameters.
Updates only the wanted UDF, without overwriting the others.
2017-07-28 17:00:42 +02:00
Paolo dab6515038 - Added widgets.css
- Better widgets HTML format
- Changed required attribute to udf-required
2017-07-21 15:02:04 +02:00