Commit Graph

49 Commits

Author SHA1 Message Date
Paolo bc2fb32e3e Fixed phrases import from old system to the new one 2025-11-03 16:32:37 +01:00
Paolo 0f82e73935 Fixed application/libraries/PhrasesLib.php->_appendPhraseToCategoryFile 2025-09-22 10:54:57 +02:00
Paolo 0c83bdfc68 Merge branch 'master' into feature-6237/Phrases_system_MkIII 2025-09-22 10:31:11 +02:00
ma0048 7df383f45e hinzugefuegte spann class caps durch den parser entfernt 2025-08-28 08:36:20 +02:00
Johann Hoffmann e387671e09 added set language feature; phrasen plugin with optional reload if non responsive phrasen are used; stundenplan header mode & buttons reworked 2024-10-24 17:46:42 +02:00
Harald Bamberger d4494836b1 fix file permissions erroneously commited as a21a292da6 2024-10-17 15:34:00 +02:00
Paolo e5f65ff442 - Added new public method syncFiles to application/controllers/system/phrases/CLI_Manager.php
- Added new constant CORE_PHRASES_LEGACY_CFG_FILE to application/libraries/PhrasesLib.php
- Added new public method syncFiles to application/libraries/PhrasesLib.php
- Added new private methods _appendPhraseToCategoryFile and _createPhraseToCategoryFile to application/libraries/PhrasesLib.php
2024-07-31 14:56:59 +02:00
SimonGschnell a21a292da6 dokument upload 2024-01-29 16:48:41 +01:00
Paolo 4ea2772a8d Fixes to be compliant with PHPMD & PHPCS 2022-03-07 12:16:56 +01:00
Paolo d7b700f781 - Added new FilterWidget in the Administration menu for the phrases
- Extension installer is visible only for system/extensions
- Removed the old phrases editor from Vilesci
- system/checksystem.php does not call anymore system/phrasesupdate.php
- system/phrasesupdate.php has been removed
- Added new directory application/phrases
- application/phrases contains one file for each phrases category, and one file contains all the phrases for that category
- Added new controller system/phrases/Manager to install phrases in the core
- Added new constants CORE_PHRASES_DIRECTORY, INSERT_BY, APP, CATEGORY, PHRASE, SPRACHE, TEXT and DESCRIPTION to libraries/PhrasesLib
- libraries/PhrasesLib now loads EPrintfLib
- Removed public methods getPhraseByApp, getPhraseInhalt, delPhrasentext, savePhrase, getPhrasentextById, insertPhraseinhalt, getVorlagetextById and updatePhraseInhalt from libraries/PhrasesLib
- Renamed public method getJSON to toJSON in libraries/PhrasesLib
- Added new public methods installFromCore and installFrom to libraries/PhrasesLib
- Added new private methods _installPhrases and _addPhrases to libraries/PhrasesLib
2021-11-16 17:22:24 +01:00
Paolo 15fa4a6c90 Merge branch 'master' into feature-3716/Messaging_inbox_outbox_user 2020-01-23 09:55:00 +01:00
Paolo 4e43d37780 - Droped not used packages from composer.json
- Fixed packages version in composer.json
- Renewed file composer.lock
- Checked & Fixed imports paths
- Moved /vendor/FHC-Vendor to /FHC-Vendor
2020-01-15 18:08:29 +01:00
Paolo 2ef386c34e - Changed system/dbupdate_3.3.php to add oe_kurzbz to table public.tbl_msg_recipient and foreign key fk_tbl_msg_recipient_oe_kurzbz
- Removed not used constants for messaging from config/constants.php
- Renamed config entry assistent_function to ou_receivers and converted from string to array
- Moved controllers/MailJob.php to controllers/jobs/MailJob.php
- Controller MailJob now extends CLI_Controller
- Added new function parseText to helpers/hlp_common_helper.php
- Improved code function generateToken in helpers/hlp_common_helper.php
- helpers/hlp_sancho_helper.php now uses parseText function from hlp_common_helper
- Removed method parseVorlagetext from PhrasesLib.php
- PhrasesLib.php now uses parseText function from hlp_common_helper
- Removed method parseVorlagetext from VorlageLib
- Improved code of controller controllers/system/Messages.php (uses parseText too)
- Controller controllers/system/Vorlage.php now uses parseText
2019-06-12 17:27:35 +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 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
Paolo 0509a26b1e Removed not useful code 2018-11-23 11:36:22 +01:00
Paolo d08eb75b5a Adapted MessageLib, PhrasesLib and UDFLib to use the function getUserLanguage from language_helper 2018-07-05 12:13:02 +02:00
Paolo 2b15c88410 - Moved the loading of the fhcauth from Filters controller to the library FiltersLib
- Added comments
2018-06-29 11:24:50 +02: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 d4e6027c7c Removed load->helper->('message') from libs 2018-06-27 11:26:42 +02:00
Andreas Österreicher 2fed75f175 Fixed PHP compatibility issues 2018-06-26 18:10:21 +02:00
Andreas Österreicher 84a0db4483 Fixed PHP Version compatibility 2018-06-18 11:27:10 +02:00
Paolo 7d836a0147 - Added FiltersLib to contain all the shared logic of a FilterWidget
- Adapted Filters controller and FilterWidget to use this new lib
- Better memory usage in FilterWidget
- PhrasesLib now checks if categories is an empty array, it it is then avoid to call the method to load phrases (avoids an ugly error)
- Renamed the class FHC_PhraseLib to FHC_PhrasesLib (like the filename)
2018-06-08 15:17:38 +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
Cris efebfddd58 Added fallback to default language for phrases
. added fallback to default language in PhrasesLib.php
. fixed small issues concerning right translation in PhrasesLib.php
. all other files: adding translation for Infocenter overview + details page (client- and serverside)
2018-06-06 10:00:17 +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 db759fc72e PhrasesLib:
- Better code
- Added private method _extend_construct to extend the constructor
- Now is possible to instantiate the object PhrasesLib giving other parameters (like a second constructor)
- The new parameters are categories and language, used to retrive phrases from the DB
- Added new method 't' used to print out a phrase using the following parameters: category, phrase, replacement parameters, orgeinheit_kurzbz, orgform_kurzbz
- This method uses the CodeIgniter parser to replace parameters inside the phrase
2018-04-17 16:06:18 +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 be4cab8230 PhrasesLib bugfix: getPhrases method now checks if the textile parser
has added the 'p' tags to the phrase before removing them
2017-03-28 11:18:40 +02:00
bison-paolo a20bf91193 - Added functions isSuccess, isError and hasData in message helper
- Updated the code using these new functions
2016-10-14 15:04:15 +02:00
bison-paolo 3588047989 All the libraries, when it is required, now are using the message helper 2016-10-07 14:13:58 +02:00
paolo 4b82843c76 - Added parameter blockTags to controller Phrase
If this parameter is set to "no", it will be removed the tags <p> and </p>
from the beginning and from the end of the returned phrases
2016-07-29 15:36:32 +02:00
paolo 88a395b31e Bug fixes 2016-07-25 19:27:04 +02:00
paolo 2568d8f912 - Removed the parameter "sprache" from controller Message
- Added method escape to class DB_Model
- Changed method sendMessageVorlage of MessageLib to send messages trying
to use the same language of the receiver, and improved message errors
- Added OrganisationseinheitLib to handle a recursive search using in the
organisation tree
- Removed from PhrasesLib the method loadVorlagetext because is already
present in VorlageLib
- Changed method loadVorlagetext of VorlageLib, now it searches the template
using the organisation tree
- Added method getOneLevel to model Organisationseinheit_model to get one
level of the organisation tree
2016-07-15 13:38:09 +02:00
paolo ba1c637ca4 Method getPhrases of library PhrasesLib now returns the text of a phrase
converted from textile to html
2016-07-06 16:07:17 +02:00
Gerry Raab 23201670b1 Phrasentext delete 2016-07-04 18:25:35 +02:00
Paminger 09787cca65 BugFix PhraseLib 2016-06-30 07:22:18 +02:00
Paminger 48655039ba Move public.phrase to system.phrase and change phrase_inhalt to phrasentext 2016-06-29 09:32:51 +02:00
paolo 9a4f5480c4 - Added permission basis/phrase to dump.sql
- The function getAuthUID() present in the helper fhcauth_helper.php
now tries to work always with CI session to get the uid
- REST_controller doesn't need anymore to handle the uid
- FHC_Controller and FHC_Model load fhcauth_helper in their constructor,
so any class that extends them now could call the function getAuthUID()
anywhere in the code
- The controllers don't need anymore to pass the uid to the models or to the
libraries
- Library FHC_DB_ACL load fhcauth_helper in its constructor and uses getAuthID()
2016-06-24 13:22:27 +02:00
Gerry Raab ab4c8ac373 Merge branch 'ci' of https://github.com/FH-Complete/FHC-Core into ci 2016-06-22 17:20:18 +02:00
Gerry Raab c8e4b463b5 new phrase inhalt 2016-06-22 17:19:43 +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 25e0ba9407 basic phrases editing 2016-06-22 01:24:59 +02:00
root ca83b2f59d phrases system 2016-06-21 16:25:55 +02:00