Changeset 4469 for sandbox


Ignore:
Timestamp:
05/20/11 11:06:46 (13 years ago)
Author:
airton
Message:

Ticket #1820 - utilizar default/app.css e default/app_print.css caso nao existam no template

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/2.2.0.2/calendar/inc/class.uicalendar.inc.php

    r4467 r4469  
    477477                        if($this->bo->printer_friendly || $_GET['plain'] == 'True') 
    478478                        {        
     479                                $app_css_path = $_SESSION['phpgw_info']['calendar']['user']['preferences']['common']['template_set'];  
     480                    $app_print_css_path = $app_css_path;  
     481                    if (!file_exists($GLOBALS['phpgw_info']['server']['webserver_url'].'/calendar/templates/'.$app_css_path.'/app.css'))  
     482                                        $app_css_path = 'default';  
     483                    if (!file_exists($GLOBALS['phpgw_info']['server']['webserver_url'].'/calendar/templates/'.$app_print_css_path.'/app_print.css'))  
     484                                        $app_print_css_path = 'default'; 
     485                         
     486                         
    479487                                $new_body = '<html>'."\n" 
    480488                                        .'<head>'."\n" 
    481                                         .'<LINK href="'.$GLOBALS['phpgw_info']['server']['webserver_url'].'/calendar/templates/'.$_SESSION['phpgw_info']['calendar']['user']['preferences']['common']['template_set'].'/app.css" type=text/css rel=StyleSheet>'."\n" 
    482                                         .'<LINK href="'.$GLOBALS['phpgw_info']['server']['webserver_url'].'/calendar/templates/'.$_SESSION['phpgw_info']['calendar']['user']['preferences']['common']['template_set'].'/app_print.css" type=text/css rel=StyleSheet media="print">'."\n" 
     489                                        .'<LINK href="'.$GLOBALS['phpgw_info']['server']['webserver_url'].'/calendar/templates/'.$app_css_path.'/app.css" type=text/css rel=StyleSheet>'."\n" 
     490                                        .'<LINK href="'.$GLOBALS['phpgw_info']['server']['webserver_url'].'/calendar/templates/'.$app_print_css_path.'/app_print.css" type=text/css rel=StyleSheet media="print">'."\n" 
    483491                                        .'</head> 
    484492                                        <table id="calendar_print_main" class="calendar_print_main">                                             
Note: See TracChangeset for help on using the changeset viewer.