From 30ede51997ff3f2de453ae3b48dedaa87d70d7d2 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 21 Mar 2008 20:30:19 +0000 Subject: [PATCH] using static html methods and autoloaded $egw->objects --- calendar/inc/class.bocal.inc.php | 24 +++------ calendar/inc/class.socal.inc.php | 14 +---- calendar/inc/class.uical.inc.php | 67 +++++++++++------------ calendar/inc/class.uiviews.inc.php | 85 +++++++++++++++--------------- 4 files changed, 81 insertions(+), 109 deletions(-) diff --git a/calendar/inc/class.bocal.inc.php b/calendar/inc/class.bocal.inc.php index aa1a2f11f5..852bf14cc8 100644 --- a/calendar/inc/class.bocal.inc.php +++ b/calendar/inc/class.bocal.inc.php @@ -27,6 +27,8 @@ define('WEEK_s',7*DAY_s); */ define('EGW_ACL_READ_FOR_PARTICIPANTS',EGW_ACL_CUSTOM_1); +require_once(EGW_INCLUDE_ROOT.'/calendar/inc/class.socal.inc.php'); + /** * Class to access all calendar data * @@ -45,7 +47,6 @@ define('EGW_ACL_READ_FOR_PARTICIPANTS',EGW_ACL_CUSTOM_1); * * All permanent debug messages of the calendar-code should done via the debug-message method of this class !!! */ - class bocal { /** @@ -155,21 +156,10 @@ class bocal function bocal() { if ($this->debug > 0) $this->debug_message('bocal::bocal() started',True,$param); + + $this->so = new socal(); + $this->datetime = $GLOBALS['egw']->datatime; - foreach(array( - 'so' => 'calendar.socal', - 'datetime' => 'phpgwapi.datetime', - ) as $my => $app_class) - { - list(,$class) = explode('.',$app_class); - - if (!is_object($GLOBALS['egw']->$class)) - { - //echo "

calling CreateObject($app_class)

\n".str_repeat(' ',4096); - $GLOBALS['egw']->$class = CreateObject($app_class); - } - $this->$my = &$GLOBALS['egw']->$class; - } $this->common_prefs =& $GLOBALS['egw_info']['user']['preferences']['common']; $this->cal_prefs =& $GLOBALS['egw_info']['user']['preferences']['calendar']; @@ -199,9 +189,7 @@ class bocal } //echo "registered resources="; _debug_array($this->resources); - $config =& CreateObject('phpgwapi.config','calendar'); - $this->config =& $config->read_repository(); - unset($config); + $this->config = config::read('calendar'); } /** diff --git a/calendar/inc/class.socal.inc.php b/calendar/inc/class.socal.inc.php index 8b0be5cc6f..6cf9a54e18 100644 --- a/calendar/inc/class.socal.inc.php +++ b/calendar/inc/class.socal.inc.php @@ -84,19 +84,7 @@ class socal */ function socal() { - foreach(array( - 'async' => 'phpgwapi.asyncservice', - ) as $my => $app_class) - { - list(,$class) = explode('.',$app_class); - - if (!is_object($GLOBALS['egw']->$class)) - { - //echo "

calling CreateObject($app_class)

\n".str_repeat(' ',4096); - $GLOBALS['egw']->$class =& CreateObject($app_class); - } - $this->$my =& $GLOBALS['egw']->$class; - } + $this->async = $GLOBALS['egw']->asyncservice; $this->db = $GLOBALS['egw']->db; $this->all_tables = array($this->cal_table); diff --git a/calendar/inc/class.uical.inc.php b/calendar/inc/class.uical.inc.php index 9f334f889a..a0409da058 100644 --- a/calendar/inc/class.uical.inc.php +++ b/calendar/inc/class.uical.inc.php @@ -134,25 +134,20 @@ class uical */ function uical($use_bocalupdate=false,$set_states=NULL) { - foreach(array( - 'bo' => $use_bocalupdate ? 'calendar.bocalupdate' : 'calendar.bocal', - 'jscal' => 'phpgwapi.jscalendar', // for the sidebox-menu - 'html' => 'phpgwapi.html', - 'datetime' => 'phpgwapi.datetime', - 'accountsel' => 'phpgwapi.uiaccountsel', - ) as $my => $app_class) - { - list(,$class) = explode('.',$app_class); + $bo_class = $use_bocalupdate ? 'bocalupdate' : 'bocal'; + require_once(EGW_INCLUDE_ROOT.'/calendar/inc/class.'.$bo_class.'.inc.php'); + $this->bo = new $bo_class(); + $this->jscal = $GLOBALS['egw']->jscalendar; + $this->datetime = $GLOBALS['egw']->datetime; + $this->accountsel = $GLOBALS['egw']->uiaccountsel; - if (!is_object($GLOBALS['egw']->$class)) - { - $GLOBALS['egw']->$class =& CreateObject($app_class); - } - $this->$my = &$GLOBALS['egw']->$class; - } - if (!is_object($this->cats)) + if ($GLOBALS['egw']->categories->app_name != 'calendar') { - $this->cats =& CreateObject('phpgwapi.categories','','calendar'); // we need an own instance to get the calendar cats + $this->cats = new categories('','calendar'); // we need an own instance to get the calendar cats + } + else + { + $this->cats = $GLOBALS['egw']->categories; } $this->common_prefs = &$GLOBALS['egw_info']['user']['preferences']['common']; $this->cal_prefs = &$GLOBALS['egw_info']['user']['preferences']['calendar']; @@ -231,7 +226,7 @@ class uical $GLOBALS['egw_info']['flags']['include_xajax'] = true; $GLOBALS['egw']->common->egw_header(); - if ($_GET['msg']) echo '

'.$this->html->htmlspecialchars($_GET['msg'])."

\n"; + if ($_GET['msg']) echo '

'.html::htmlspecialchars($_GET['msg'])."

\n"; if ($this->group_warning) echo '

'.$this->group_warning."

\n"; } @@ -386,11 +381,11 @@ class uical { if($event['priority'] == 3) { - $icons[] = $this->html->image('calendar','high',lang('high priority')); + $icons[] = html::image('calendar','high',lang('high priority')); } if($event['recur_type'] != MCAL_RECUR_NONE) { - $icons[] = $this->html->image('calendar','recur',lang('recurring event')); + $icons[] = html::image('calendar','recur',lang('recurring event')); } // icons for single user, multiple users or group(s) and resources foreach($event['participants'] as $uid => $status) @@ -400,16 +395,16 @@ class uical if (isset($icons['single']) || $GLOBALS['egw']->accounts->get_type($uid) == 'g') { unset($icons['single']); - $icons['multiple'] = $this->html->image('calendar','users'); + $icons['multiple'] = html::image('calendar','users'); } elseif (!isset($icons['multiple'])) { - $icons['single'] = $this->html->image('calendar','single'); + $icons['single'] = html::image('calendar','single'); } } elseif(!isset($icons[$uid{0}]) && isset($this->bo->resources[$uid{0}]) && isset($this->bo->resources[$uid{0}]['icon'])) { - $icons[$uid{0}] = $this->html->image($this->bo->resources[$uid{0}]['app'], + $icons[$uid{0}] = html::image($this->bo->resources[$uid{0}]['app'], ($this->bo->resources[$uid{0}]['icon'] ? $this->bo->resources[$uid{0}]['icon'] : 'navbar'), lang($this->bo->resources[$uid{0}]['app']), 'width="16px" height="16px"'); @@ -418,15 +413,15 @@ class uical } if($event['non_blocking']) { - $icons[] = $this->html->image('calendar','nonblocking',lang('non blocking')); + $icons[] = html::image('calendar','nonblocking',lang('non blocking')); } if($event['public'] == 0) { - $icons[] = $this->html->image('calendar','private',lang('private')); + $icons[] = html::image('calendar','private',lang('private')); } if(isset($event['alarm']) && count($event['alarm']) >= 1 && !$is_private) { - $icons[] = $this->html->image('calendar','alarm',lang('alarm')); + $icons[] = html::image('calendar','alarm',lang('alarm')); } return $icons; } @@ -477,7 +472,7 @@ class uical $vars['hour'] = $hour; $vars['minute'] = $minute; } - return $this->html->a_href($content,'/index.php',$vars,' target="_blank" title="'.$this->html->htmlspecialchars(lang('Add')). + return html::a_href($content,'/index.php',$vars,' target="_blank" title="'.html::htmlspecialchars(lang('Add')). '" onclick="'.$this->popup('this.href','this.target').'; return false;"'); } @@ -553,8 +548,8 @@ class uical $title = array_shift($data); $vars = array_merge($link_vars,$data); - $icon = $this->html->image('calendar',$icon,lang($title)); - $link = $view == 'add' ? $this->add_link($icon) : $this->html->a_href($icon,'/index.php',$vars); + $icon = html::image('calendar',$icon,lang($title)); + $link = $view == 'add' ? $this->add_link($icon) : html::a_href($icon,'/index.php',$vars); $views .= ''.$link."\n"; } @@ -614,15 +609,15 @@ class uical ), ) as $data) { - $options .= '\n"; + $options .= '\n"; } $file[++$n] = $this->_select_box('displayed view','view',$options,$GLOBALS['egw']->link('/index.php')); // Search - $blur = addslashes($this->html->htmlspecialchars(lang('Search').'...')); - $value = @$_POST['keywords'] ? $this->html->htmlspecialchars($_POST['keywords']) : $blur; + $blur = addslashes(html::htmlspecialchars(lang('Search').'...')); + $value = @$_POST['keywords'] ? html::htmlspecialchars($_POST['keywords']) : $blur; $file[++$n] = array( - 'text' => $this->html->form(' html::form('', '','/index.php',array('menuaction'=>'calendar.uilist.listview')), @@ -720,7 +715,7 @@ function load_cal(url,id) { } // Import & Export $file[] = array( - 'text' => lang('Export').': '.$this->html->a_href(lang('iCal'),'calendar.uiforms.export',$this->first ? array( + 'text' => lang('Export').': '.html::a_href(lang('iCal'),'calendar.uiforms.export',$this->first ? array( 'start' => $this->bo->date2string($this->first), 'end' => $this->bo->date2string($this->last), ) : false), @@ -728,8 +723,8 @@ function load_cal(url,id) { 'link' => False, ); $file[] = array( - 'text' => lang('Import').': '.$this->html->a_href(lang('iCal'),'calendar.uiforms.import'). - ' & '.$this->html->a_href(lang('CSV'),'/calendar/csv_import.php'), + 'text' => lang('Import').': '.html::a_href(lang('iCal'),'calendar.uiforms.import'). + ' & '.html::a_href(lang('CSV'),'/calendar/csv_import.php'), 'no_lang' => True, 'link' => False, ); diff --git a/calendar/inc/class.uiviews.inc.php b/calendar/inc/class.uiviews.inc.php index c613b3fbe3..44386630dd 100644 --- a/calendar/inc/class.uiviews.inc.php +++ b/calendar/inc/class.uiviews.inc.php @@ -343,7 +343,7 @@ class uiviews extends uical 'date' => $this->bo->date2string($week_start), ); $title = lang('Wk').' '.adodb_date('W',$week_start); - $title = $this->html->a_href($title,$week_view,'',' title="'.lang('Weekview').'"'); + $title = html::a_href($title,$week_view,'',' title="'.lang('Weekview').'"'); $content .= $this->timeGridWidget($this->tagWholeDayOnTop($week),$weeks == 2 ? 30 : 60,200,'',$title,0,$week_start+WEEK_s >= $this->last); } @@ -453,12 +453,12 @@ class uiviews extends uical # # // add navigation for previous and next # // prev. week - # $GLOBALS['egw_info']['flags']['app_header'] = $this->html->a_href($this->html->image('phpgwpai','first',lang('previous'),$options=' alt="<<"'),array( + # $GLOBALS['egw_info']['flags']['app_header'] = html::a_href(html::image('phpgwpai','first',lang('previous'),$options=' alt="<<"'),array( # 'menuaction' => $this->view_menuaction, # 'date' => date('Ymd',$this->first-$days*DAY_s), # )) . '   '.$GLOBALS['egw_info']['flags']['app_header']; # // next week - # $GLOBALS['egw_info']['flags']['app_header'] .= '   '.$this->html->a_href($this->html->image('phpgwpai','last',lang('next'),$options=' alt=">>"'),array( + # $GLOBALS['egw_info']['flags']['app_header'] .= '   '.html::a_href(html::image('phpgwpai','last',lang('next'),$options=' alt=">>"'),array( # 'menuaction' => $this->view_menuaction, # 'date' => date('Ymd',$this->last+$days*DAY_s), # )); @@ -552,17 +552,17 @@ class uiviews extends uical { foreach(array('task','phone','note') as $type) { - $todo_label .= ' '.$this->html->a_href( $this->html->image('infolog',$type,lang('Add')),'infolog.uiinfolog.edit',array( + $todo_label .= ' '.html::a_href( html::image('infolog',$type,lang('Add')),'infolog.uiinfolog.edit',array( 'type' => $type, 'start_time' => $ts, ),' target="_blank" onclick="window.open(this.href,this.target,\'dependent=yes,width=750,height=590,scrollbars=yes,status=yes\'); return false;"'); } } - $cols[1] = $this->html->div( - $this->html->div($todo_label,'','calDayTodosHeader th')."\n". - $this->html->div($todos,'','calDayTodosTable'),'','calDayTodos'); + $cols[1] = html::div( + html::div($todo_label,'','calDayTodosHeader th')."\n". + html::div($todos,'','calDayTodosTable'),'','calDayTodos'); $cols['.1'] = 'width=30%'; - echo $this->html->table(array( + echo html::table(array( 0 => $cols, '.0' => 'valign="top"' ),'class="calDayView"'); @@ -735,9 +735,9 @@ class uiviews extends uical // determine if the browser supports scrollIntoView: IE4+, firefox1.0+ and safari2.0+ does // then show all hours in a div of the size of the workday and scroll to the workday start // still disabled, as things need to be re-aranged first, to that the column headers are not scrolled - $this->scroll_to_wdstart = false;/*$this->use_time_grid && ($this->html->user_agent == 'msie' || - $this->html->user_agent == 'mozilla' && $this->html->ua_version >= 5.0 || - $this->html->user_agent == 'safari' && $this->html->ua_version >= 2.0);*/ + $this->scroll_to_wdstart = false;/*$this->use_time_grid && (html::$user_agent == 'msie' || + html::$user_agent == 'mozilla' && html::ua_version >= 5.0 || + html::$user_agent == 'safari' && html::ua_version >= 2.0);*/ if ($this->scroll_to_wdstart) { @@ -810,7 +810,7 @@ class uiviews extends uical $html .= $indent."\t".'
'."\n"; - if ($this->html->user_agent == 'msie') // necessary IE hack - stupid thing ... + if (html::$user_agent == 'msie') // necessary IE hack - stupid thing ... { // Lars Kneschke 2005-08-28 // why do we use a div in a div which has the same height and width??? @@ -840,7 +840,7 @@ class uiviews extends uical $dayColWidth,$indent."\t\t",$short_title,++$on_off & 1,$col_owner); ++$n; } - if ($this->html->user_agent == 'msie') $html .= "
\n"; + if (html::$user_agent == 'msie') $html .= "\n"; $html .= $indent."\t\n"; // calDayCols } @@ -932,16 +932,16 @@ class uiviews extends uical if ($short_title === true) { - $title = $this->html->a_href($title,$day_view,'', + $title = html::a_href($title,$day_view,'', !isset($this->holidays[$day_ymd])?' title="'.lang('Dayview').'"':''); } elseif ($short_title === false) { // add arrows to go to the previous and next day (dayview only) $day_view['date'] = $this->bo->date2string($ts -= 12*HOUR_s); - $title = $this->html->a_href($this->html->image('phpgwapi','left',$this->bo->long_date($ts)),$day_view).'   '.$title; + $title = html::a_href(html::image('phpgwapi','left',$this->bo->long_date($ts)),$day_view).'   '.$title; $day_view['date'] = $this->bo->date2string($ts += 48*HOUR_s); - $title .= '   '.$this->html->a_href($this->html->image('phpgwapi','right',$this->bo->long_date($ts)),$day_view); + $title .= '   '.html::a_href(html::image('phpgwapi','right',$this->bo->long_date($ts)),$day_view); } $html .= $indent."\t".'
'. $title."
\n"; @@ -1103,6 +1103,7 @@ class uiviews extends uical if (!$tpl) { $tpl = $GLOBALS['egw']->template; + $tpl->set_root($GLOBALS['egw']->common->get_tpl_dir('calendar')); $tpl->set_file('event_widget_t','event_widget.tpl'); $tpl->set_block('event_widget_t','event_widget'); @@ -1127,7 +1128,7 @@ class uiviews extends uical } $is_private = !$this->bo->check_perms(EGW_ACL_READ,$event); - $icons = !$is_private ? $this->event_icons($event) : array($this->html->image('calendar','private',lang('private'))); + $icons = !$is_private ? $this->event_icons($event) : array(html::image('calendar','private',lang('private'))); $cats = $this->bo->categories($event['category'],$color); // these values control varius aspects of the geometry of the eventWidget @@ -1173,9 +1174,9 @@ class uiviews extends uical 'body_icons' => $small ? implode("\n",$icons) : '', 'icons' => implode('',$icons), 'timespan' => $timespan, - 'title' => ($title = !$is_private ? $this->html->htmlspecialchars($event['title']) : lang('private')), + 'title' => ($title = !$is_private ? html::htmlspecialchars($event['title']) : lang('private')), 'header' => $small_height ? $title : $timespan, - 'description' => !$is_private ? nl2br($this->html->htmlspecialchars($event['description'])) : '', + 'description' => !$is_private ? nl2br(html::htmlspecialchars($event['description'])) : '', 'location' => !$is_private ? $this->add_nonempty($event['location'],lang('Location')) : '', 'participants' => $participants, 'times' => !$event['multiday'] ? $this->add_nonempty($this->bo->timespan($event['start_m'],$event['end_m'],true),lang('Time')) : @@ -1186,7 +1187,7 @@ class uiviews extends uical $this->add_nonempty($this->bo->format_date($event['end']),lang('End')), 'category' => !$is_private ? $this->add_nonempty($cats,lang('Category')) : '', // the tooltip is based on the content of the actual widget, this way it takes no extra bandwidth/volum -// 'tooltip' => $this->html->tooltip(False,False,array('BorderWidth'=>0,'Padding'=>0)), +// 'tooltip' => html::tooltip(False,False,array('BorderWidth'=>0,'Padding'=>0)), // various aspects of the geometry or style 'corner_radius' => $corner_radius.'px', 'header_height' => $header_height.'px', @@ -1218,7 +1219,7 @@ class uiviews extends uical } */ $tooltip = $tpl->fp('tooltip','event_tooltip'); - $tpl->set_var('tooltip',$this->html->tooltip($tooltip,False,array('BorderWidth'=>0,'Padding'=>0))); + $tpl->set_var('tooltip',html::tooltip($tooltip,False,array('BorderWidth'=>0,'Padding'=>0))); $html = $tpl->fp('out',$block); $view_link = $GLOBALS['egw']->link('/index.php',array('menuaction'=>'calendar.uiforms.edit','cal_id'=>$event['id'],'date'=>$this->bo->date2string($event['start']))); @@ -1249,10 +1250,10 @@ class uiviews extends uical ); } $ie_fix = ''; - if ($this->html->user_agent == 'msie') // add a transparent image to make the event "opaque" to mouse events + if (html::$user_agent == 'msie') // add a transparent image to make the event "opaque" to mouse events { - $ie_fix = $indent."\t".$this->html->image('calendar','transparent.gif','', - $this->html->tooltip($tooltip,False,array('BorderWidth'=>0,'Padding'=>0)). + $ie_fix = $indent."\t".html::image('calendar','transparent.gif','', + html::tooltip($tooltip,False,array('BorderWidth'=>0,'Padding'=>0)). ' style="top:0px; left:0px; position:absolute; height:100%; width:100%; z-index:1"') . "\n"; } if ($this->use_time_grid) @@ -1276,7 +1277,7 @@ class uiviews extends uical $html = $indent.'
html->tooltip($tooltip,False,array('BorderWidth'=>0,'Padding'=>0)). + $popup.' '.html::tooltip($tooltip,False,array('BorderWidth'=>0,'Padding'=>0)). '>'."\n".$ie_fix.$html."\n". $indent."
"."\n"; @@ -1296,8 +1297,8 @@ class uiviews extends uical 'eventId'=>$event['id'], 'eventOwner'=>$event['owner'], 'calendarOwner'=>$owner, - 'errorImage'=>addslashes($this->html->image('phpgwapi','dialog_error',false,'style="width: 16px;"')), - 'loaderImage'=>addslashes($this->html->image('phpgwapi','ajax-loader')), + 'errorImage'=>addslashes(html::image('phpgwapi','dialog_error',false,'style="width: 16px;"')), + 'loaderImage'=>addslashes(html::image('phpgwapi','ajax-loader')), ), 'calendar.dragDropFunctions.dragEvent', 'calendar.dragDropFunctions.dropEvent', @@ -1325,7 +1326,7 @@ class uiviews extends uical { return ''.$label.':'. ($one_per_line ? '
' : ' '). - nl2br($this->html->htmlspecialchars($content)).'
'; + nl2br(html::htmlspecialchars($content)).'
'; } return ''; } @@ -1578,11 +1579,11 @@ class uiviews extends uical if ($this->day >= 15) $prev = $t_arr; // we stay in the same month $prev['day'] = $this->day < 15 ? 15 : 1; $half = $this->bo->date2string($prev); - $title = $this->html->a_href($this->html->image('phpgwpai','first',lang('back one month'),$options=' alt="<<"'),array( + $title = html::a_href(html::image('phpgwpai','first',lang('back one month'),$options=' alt="<<"'),array( 'menuaction' => $this->view_menuaction, 'date' => $full, )) . '   '. - $this->html->a_href($this->html->image('phpgwpai','left',lang('back half a month'),$options=' alt="<"'),array( + html::a_href(html::image('phpgwpai','left',lang('back half a month'),$options=' alt="<"'),array( 'menuaction' => $this->view_menuaction, 'date' => $half, )) . '   '.$title; @@ -1604,11 +1605,11 @@ class uiviews extends uical if ($this->day < 15) $next = $t_arr; // we stay in the same month $next['day'] = $this->day < 15 ? 15 : 1; $half = $this->bo->date2string($next); - $title .= '   '.$this->html->a_href($this->html->image('phpgwpai','right',lang('forward half a month'),$options=' alt=">>"'),array( + $title .= '   '.html::a_href(html::image('phpgwpai','right',lang('forward half a month'),$options=' alt=">>"'),array( 'menuaction' => $this->view_menuaction, 'date' => $half, )). '   '. - $this->html->a_href($this->html->image('phpgwpai','last',lang('forward one month'),$options=' alt=">>"'),array( + html::a_href(html::image('phpgwpai','last',lang('forward one month'),$options=' alt=">>"'),array( 'menuaction' => $this->view_menuaction, 'date' => $full, )); @@ -1645,21 +1646,21 @@ class uiviews extends uical $title = lang('Week').' '.date('W',$t); if ($days > 7) { - $title = $this->html->a_href($title,array( + $title = html::a_href($title,array( 'menuaction' => 'calendar.uiviews.planner', 'planner_days' => 7, 'date' => date('Ymd',$t), - ),false,' title="'.$this->html->htmlspecialchars(lang('Weekview')).'"'); + ),false,' title="'.html::htmlspecialchars(lang('Weekview')).'"'); } else { // prev. week - $title = $this->html->a_href($this->html->image('phpgwpai','first',lang('previous'),$options=' alt="<<"'),array( + $title = html::a_href(html::image('phpgwpai','first',lang('previous'),$options=' alt="<<"'),array( 'menuaction' => $this->view_menuaction, 'date' => date('Ymd',$t-7*DAY_s), )) . '   '.$title; // next week - $title .= '   '.$this->html->a_href($this->html->image('phpgwpai','last',lang('next'),$options=' alt=">>"'),array( + $title .= '   '.html::a_href(html::image('phpgwpai','last',lang('next'),$options=' alt=">>"'),array( 'menuaction' => $this->view_menuaction, 'date' => date('Ymd',$t+7*DAY_s), )); @@ -1703,31 +1704,31 @@ class uiviews extends uical } if ($days > 1) { - $title = $this->html->a_href($title,array( + $title = html::a_href($title,array( 'menuaction' => 'calendar.uiviews.planner', 'planner_days' => 1, 'date' => date('Ymd',$t), - ),false,strpos($class,'calHoliday') !== false || strpos($class,'calBirthday') !== false ? '' : ' title="'.$this->html->htmlspecialchars(lang('Dayview')).'"'); + ),false,strpos($class,'calHoliday') !== false || strpos($class,'calBirthday') !== false ? '' : ' title="'.html::htmlspecialchars(lang('Dayview')).'"'); } if ($days < 5) { if (!$i) // prev. day only for the first day { - $title = $this->html->a_href($this->html->image('phpgwpai','first',lang('previous'),$options=' alt="<<"'),array( + $title = html::a_href(html::image('phpgwpai','first',lang('previous'),$options=' alt="<<"'),array( 'menuaction' => $this->view_menuaction, 'date' => date('Ymd',$start-DAY_s), )) . '   '.$title; } if ($i == $days-1) // next day only for the last day { - $title .= '   '.$this->html->a_href($this->html->image('phpgwpai','last',lang('next'),$options=' alt=">>"'),array( + $title .= '   '.html::a_href(html::image('phpgwpai','last',lang('next'),$options=' alt=">>"'),array( 'menuaction' => $this->view_menuaction, 'date' => date('Ymd',$start+DAY_s), )); } } $content .= $indent."\t".'
'.$title."
\n"; + ($holidays ? ' title="'.html::htmlspecialchars($holidays).'"' : '').'>'.$title."\n"; } $content .= $indent."\n"; // end of plannerScale @@ -1915,7 +1916,7 @@ class uiviews extends uical return $indent.'
html->tooltip($data['tooltip'],False,array('BorderWidth'=>0,'Padding'=>0)).'>'."\n".$data['html'].$indent."
\n"; + html::tooltip($data['tooltip'],False,array('BorderWidth'=>0,'Padding'=>0)).'>'."\n".$data['html'].$indent."\n"; } /**