Improved PhrasesLib and Phrase_model

. optimized code in PhrasesLib.php
. secured method in Phrase_model with bindings
This commit is contained in:
Cris
2018-06-06 15:12:42 +02:00
parent 894dc51e13
commit 7facb7ab78
2 changed files with 7 additions and 3 deletions
+7 -2
View File
@@ -263,8 +263,13 @@ class PhrasesLib
}
/**
*
* stores phrases-array in property $_phrases
* Retrieves phrases in the users language.
* If a phrase is not set in the users language it will be retrieved in the default language.
* Stores phrases-array in property $_phrases.
* @param array $categories Could be an:
* - indexed array: string or an array of strings. These are the categories used to load phrases.
* - associative array: of categories, and for each category there is an array of phrases.
* @param string User's language or default language.
*/
private function _setPhrases($categories, $language)
{
@@ -81,7 +81,6 @@ class Phrase_model extends DB_Model
/**
* Loads phrases using category(s) and language as keys using associative category array
* that contains also phrases for each category
* They are ordered by p.category, p.phrase, pt.orgeinheit_kurzbz DESC and pt.orgform_kurzbz DESC'
*/
public function getPhrasesByCategoryAndPhrasesAndLanguage($phrasesParams, $language)
{