N°2875 - Update branch to current develop branch state

This commit is contained in:
Molkobain
2020-12-09 20:06:40 +01:00
parent 68332896ad
commit a8431c5810
2 changed files with 13 additions and 2 deletions

View File

@@ -2015,6 +2015,7 @@ EOF
$aConfig = utils::GetCkeditorPref();
$aConfig['placeholder'] = Dict::S('UI:CaseLogTypeYourTextHere');
// - Mentions
// TODO 3.0.0: Should this be in the utils::GetCkeditorPref() as well? (Note that if we do so, we should warn that the endpoints are defaults only and should be overloaded by other GUIs such as the end-users portal)
$sMentionsEndpoint = utils::GetAbsoluteUrlAppRoot().'pages/ajax.render.php?operation=cke_mentions&target_class=Person&needle={encodedQuery}';
$sMentionItemUrl = utils::GetAbsoluteUrlAppRoot().'pages/UI.php?operation=details&class=Person&id={id}';
$sMentionItemTemplate = <<<HTML

View File

@@ -2482,13 +2482,23 @@ class utils
return static::$iNextId++;
}
/**
* Return the CKEditor config as an array
*
* @return array
* @throws \CoreException
* @throws \CoreUnexpectedValue
* @throws \MySQLException
* @since 3.0.0
*/
public static function GetCkeditorPref()
{
$sLanguage = strtolower(trim(UserRights::GetUserLanguage()));
$aDefaultConf = array('language'=> $sLanguage,
$aDefaultConf = array(
'language'=> $sLanguage,
'contentsLanguage' => $sLanguage,
'extraPlugins' => 'disabler,codesnippet',
'extraPlugins' => 'disabler,codesnippet,mentions',
);
$aRichTextConfig = json_decode(appUserPreferences::GetPref('richtext_config', '{}'), true);