23 Commits

Author SHA1 Message Date
Paolo 3b4012798f Fixed some comments typo 2019-04-30 13:13:34 +02:00
Paolo c04126d4d5 Merge branch 'master' into permissions 2018-06-11 14:08:20 +02:00
Paolo db7d508d12 Cleaned code in getPhrasesByCategoryAndPhrasesAndLanguage 2018-06-11 13:47:03 +02:00
Paolo 3bc9062515 Fixed query in method getPhrasesByCategoryAndPhrasesAndLanguage of model Phrase_model 2018-06-11 13:44:18 +02:00
Paolo 81e4f2968e Merge branch 'master' into permissions
- Added new core controller called Auth_Controller that extends FHC_Controller and manage the authentication
- All the controllers that were extending the CI_Controller now they extend the FHC_Controller
- All the controllers that were extending the FHC_Controller now they extend the Auth_Controller
- Added the method isAllowed to the FiltersLib to check if the authenticated user has the required permissions
- FilterWidget and controller Filters are using the method isAllowed from the FiltersLib
2018-06-08 17:53:12 +02:00
Cris 7facb7ab78 Improved PhrasesLib and Phrase_model
. optimized code in PhrasesLib.php
. secured method in Phrase_model with bindings
2018-06-06 15:12:42 +02:00
Paolo 894dc51e13 Enhancements 2018-06-06 14:53:24 +02:00
Paolo 7c5995c318 Code and comments improved 2018-05-29 15:57:10 +02:00
Cris 865eea2245 Added PHRASES translation for javascript
added:
. PhrasesLib.js: translate method for retreiving phrasentexte in users language with JS
. PhrasesLib.php: methods to retrieve data from Phrase_model and return as JSON
. Phrase_model: method to perform query for categories AND phrases-array AND language
. FHC-Header.php:
 -- included js lib
 -- generate global FHC_JS_PHRASES_STORAGE_OBJECT

Changes of other files: loading libs, inits,...
2018-05-29 14:13:00 +02:00
Cris 03b298f1f5 Added translation fallback
. fallback 1: 
  if no entry or empty entry in user's language --> fallback to default language
. fallback 2:
  if empty entry at all (even in default langage) --> fallback to phrasename
2018-05-09 12:39:19 +02:00
Paolo 9d5c9b443e Merge branch 'master' into permissions 2018-04-18 17:35:33 +02:00
Paolo 08c5733298 - Added method loadPhrases to FHC_Conroller as a wrapper to load phrases
- Added method getLanguage to Person_model to load the language for a user by the given UID
- Added comments to method getPhrasesByCategoryAndLanguage of system/Phrase_model, ORDER BY and more fields to SQL statement
2018-04-17 16:00:19 +02:00
Paolo 874cbc9b92 Added method getPhrasesByCategoryAndLanguage to system/Phrase_model
It's used to retrived Phrases from DB using category and sprache as keys
2018-04-17 13:12:15 +02:00
Paolo d9b80b790d Removed permission system from models 2018-03-29 12:13:08 +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
bison-paolo 5087826891 - phpC(d)I
- Renamed method chkRights to _isEntitled in model DB_Model
- Updated models where it was needed
2016-10-20 16:37:52 +02:00
bison-paolo f3b79cd731 - Added method chkRights to DB_Model
- Added method toPhp to DB_Model to convert array and boolean types from PostgresSQL to php
- Added method execQuery to DB_Model to execute a query (it calls toPhp)
- Added method pgsqlArrayToPhpArray to convert a pgsql array to php
- Updated DB_Model methods to using chkRights (and toPhp where it is needed)
- Removed methods escapeArray and _pgsqlArrayToPhpArray from controller APIv1_Controller
- Removed escapeArray from controllers Dokumentstudiengang and Dokument
- Updated models to use execQuery (and chkRights where it is needed)
2016-10-17 17:07:51 +02:00
bison-paolo 8e0ca12deb - All permission functionalities now are in the library PermissionLib
- All return messages functions are in the message helper and it is loaded by the core classes
- Added the missing constant FHC_NOPK
- Updated all the interested classes with the new permission method
- Updated all the interested classes with the new return message functions
2016-10-13 17:53:12 +02:00
paolo 79230cd85d Added function getBerechtigungKurzbz to model FHC_Model.
Using this function will be avoided the notice "Undefined index".
All models have been adapted.
2016-07-07 16:42:04 +02:00
Paminger 73c36d8520 BugFix 2016-06-29 09:34:51 +02:00
Paminger 9a44c818ea FHC Helper 2016-06-29 08:41:02 +02:00
paolo f35ede3974 - Added Phrase controller
- Phrase controller has the method getPhrases() to get sentences translated into several languages
- Added method getPhrases to PhrasesLib
- Modified the PhrasesLib constructor to pass the uid to the models
- Added method getPhrases to Phrase_model
2016-06-22 14:59:49 +02:00
root ca83b2f59d phrases system 2016-06-21 16:25:55 +02:00