phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: calendar/inc class.uicalendar.inc.php, 1.66.2.55


From: Ralf Becker <address@hidden>
Subject: [Phpgroupware-cvs] CVS: calendar/inc class.uicalendar.inc.php, 1.66.2.55.2.18, 1.66.2.55.2.19
Date: Tue, 19 Aug 2003 06:49:48 -0400

Update of /cvsroot/phpgroupware/calendar/inc
In directory subversions:/tmp/cvs-serv26276

Modified Files:
      Tag: Version-0_9_16-branch
        class.uicalendar.inc.php 
Log Message:
fixed handling of titles shown in planner (specialy with & in it)

Index: class.uicalendar.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.uicalendar.inc.php,v
retrieving revision 1.66.2.55.2.18
retrieving revision 1.66.2.55.2.19
diff -C2 -r1.66.2.55.2.18 -r1.66.2.55.2.19
*** class.uicalendar.inc.php    17 Aug 2003 23:02:37 -0000      1.66.2.55.2.18
--- class.uicalendar.inc.php    19 Aug 2003 10:49:44 -0000      1.66.2.55.2.19
***************
*** 1664,1669 ****
                                if (!$is_private)
                                {
!                                       $max_chars = 
6*$colspan/$intervals_per_day-5;
!                                       $max_chars /= ($colspan<9 ? 2 : 1);
  
                                        $min_chars = 3; // minimum for 
max_chars to display -> this should be configurable
--- 1664,1668 ----
                                if (!$is_private)
                                {
!                                       $max_chars = 
intval(6*$colspan/$intervals_per_day-2);
  
                                        $min_chars = 3; // minimum for 
max_chars to display -> this should be configurable
***************
*** 1672,1679 ****
                                                $len_title = 
strlen($event['title']);
  
!                                               if ($len_title < $max_chars)
                                                {
                                                        $title = 
$event['title'];
!                                                       $max_chars -= 
$len_title - 3; // 3 chars for separator: " - "
                                                        $len_descr = 
strlen($event['description']);
  
--- 1671,1678 ----
                                                $len_title = 
strlen($event['title']);
  
!                                               if ($len_title <= $max_chars)
                                                {
                                                        $title = 
$event['title'];
!                                                       $max_chars -= 
$len_title + 3; // 3 chars for separator: " - "
                                                        $len_descr = 
strlen($event['description']);
  
***************
*** 1685,1689 ****
                                                else
                                                {
!                                                       $title = 
substr($event['title'], 0 , $max_chars).'...';
                                                }
                                                $event['print_title'] = 'yes';
--- 1684,1689 ----
                                                else
                                                {
!                                                       $has_amp = 
strpos($event['title'],'&amp;');
!                                                       $title = 
substr($event['title'], 0 , 
$max_chars-1+($has_amp!==False&&$has_amp<$max_chars?4:0)).'...';
                                                }
                                                $event['print_title'] = 'yes';





reply via email to

[Prev in Thread] Current Thread [Next in Thread]