Changeset 4432 for branches


Ignore:
Timestamp:
05/17/11 15:49:51 (13 years ago)
Author:
rafaelraymundo
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.0.1/calendar/inc/class.uicalendar.inc.php

    r4426 r4432  
    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 
    479486                                $new_body = '<html>'."\n" 
    480487                                        .'<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" 
     488                                        .'<LINK href="'.$GLOBALS['phpgw_info']['server']['webserver_url'].'/calendar/templates/'.$app_css_path.'/app.css" type=text/css rel=StyleSheet>'."\n" 
     489                                        .'<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" 
    483490                                        .'</head> 
    484491                                        <table id="calendar_print_main" class="calendar_print_main">                                             
Note: See TracChangeset for help on using the changeset viewer.