Browse Source

Merge remote-tracking branch 'remotes/origin/dev'

tags/v1.8.2.5
ZiebaM 3 years ago
parent
commit
51c05cc503
3 changed files with 29 additions and 11 deletions
  1. +7
    -1
      modules/CRM/Calendar/Calendar_0.php
  2. +16
    -9
      modules/CRM/PhoneCall/PhoneCallCommon_0.php
  3. +6
    -1
      modules/Utils/Tooltip/TooltipCommon_0.php

+ 7
- 1
modules/CRM/Calendar/Calendar_0.php View File

@@ -209,8 +209,14 @@ class CRM_Calendar extends Module {
///////////////////
// right column

$config = HTMLPurifier_Config::createDefault();
$config->set('HTML.AllowedElements','span');// $config->set('HTML.AllowedElements','span');
$purifier = new HTMLPurifier($config);
$row['title'] = $purifier->purify($row['title']);

$title = Utils_TooltipCommon::create($row['title'],$row['custom_tooltip']);
$day = (isset($row['timeless']) && $row['timeless'])?$row['timeless']:Base_RegionalSettingsCommon::time2reg($row['start'], false, true, true, false);
if ($day<date('Y-m-d')) $class = 'past';
elseif ($day==date('Y-m-d')) $class = 'today';


+ 16
- 9
modules/CRM/PhoneCall/PhoneCallCommon_0.php View File

@@ -131,6 +131,13 @@ class CRM_PhoneCallCommon extends ModuleCommon {
}
}
public static function display_subject($record, $nolink = false) {
$config = HTMLPurifier_Config::createDefault();
$purifier = new HTMLPurifier($config);
$config->set('HTML.ForbiddenElements','a, i, script');
$record['subject'] = $purifier->purify($record['subject']);
$record['description'] = $purifier->purify($record['description']);
$ret = Utils_RecordBrowserCommon::create_linked_label_r('phonecall', 'Subject', $record, $nolink);
if (!$nolink && isset($record['description']) && $record['description']!='') $ret = '<span '.Utils_TooltipCommon::open_tag_attrs(Utils_RecordBrowserCommon::format_long_text($record['description']), false).'>'.$ret.'</span>';
return $ret;
@@ -235,14 +242,14 @@ class CRM_PhoneCallCommon extends ModuleCommon {
return Utils_RecordBrowserCommon::record_bbcode('phonecall', array('subject'), $text, $param, $opt);
}
public static function subscribed_employees($v) {
if (!is_array($v)) return;
foreach ($v['employees'] as $k) {
$user = Utils_RecordBrowserCommon::get_value('contact',$k,'Login');
if ($user!==false && $user!==null && is_numeric($user) && $user>0) Utils_WatchdogCommon::user_subscribe($user, 'crm_meeting', $v['id']);
}
}
public static function subscribed_employees($v) {
if (!is_array($v)) return;
foreach ($v['employees'] as $k) {
$user = Utils_RecordBrowserCommon::get_value('contact',$k,'Login');
if ($user!==false && $user!==null && is_numeric($user) && $user>0) Utils_WatchdogCommon::user_subscribe($user, 'crm_meeting', $v['id']);
}
}
public static function submit_phonecall($values, $mode) {
switch ($mode) {
case 'display':
@@ -300,7 +307,7 @@ class CRM_PhoneCallCommon extends ModuleCommon {
case 'added':
if (isset($values['follow_up']))
CRM_FollowupCommon::add_tracing_notes($values['follow_up'][0], $values['follow_up'][1], $values['follow_up'][2], 'phonecall', $values['id'], $values['subject']);
self::subscribed_employees($values);
self::subscribed_employees($values);
$related = $values['employees'];
if (!isset($values['other_customer'])) $related[] = $values['customer'];
foreach ($related as $v) {


+ 6
- 1
modules/Utils/Tooltip/TooltipCommon_0.php View File

@@ -122,7 +122,12 @@ class Utils_TooltipCommon extends ModuleCommon {
$table.='</td></tr>';
}
$table.='</table>';
return $table;

$config = HTMLPurifier_Config::createDefault();
$purifier = new HTMLPurifier($config);
$return = $purifier->purify($table);

return $return;
}

public static function tooltip_leightbox_mode() {


Loading…
Cancel
Save