Changeset 2748 for trunk/phpgwapi


Ignore:
Timestamp:
05/10/10 11:47:10 (14 years ago)
Author:
rodsouza
Message:

Ticket #1058 - Corrigindo problema no calendario para adicionar evento e na visao diaria.

Location:
trunk/phpgwapi/inc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/phpgwapi/inc/class.javascript.inc.php

    r2628 r2748  
    267267                function get_source( $param ) 
    268268                { 
     269                        ob_start( ); 
    269270                        $source = ''; 
    270271                        foreach( explode( ';', $param[ 'source' ] ) as $script ) 
    271                                 $source .= file_get_contents( realpath( dirname( __FILE__ ) . '/../..' ) . $script ); 
     272                                if ( strrpos( $script, '.php' ) != strlen( $script ) - 4 ) 
     273                                        $source .= file_get_contents( realpath( dirname( __FILE__ ) . '/../..' ) . $script ); 
     274                                else 
     275                                { 
     276                                        include_once realpath( dirname( __FILE__ ) . '/../..' ) . $script; 
     277                                        $source .= ob_get_contents( ); 
     278                                        ob_clean( ); 
     279                                } 
    272280 
    273281                        echo $source; 
  • trunk/phpgwapi/inc/jscalendar-setup.php

    r2 r2748  
    2424); 
    2525 
    26 include('../../header.inc.php'); 
     26include_once dirname( __FILE__ ) . '/../../header.inc.php'; 
    2727header('Content-type: text/javascript; charset='.$GLOBALS['phpgw']->translation->charset()); 
    2828$GLOBALS['phpgw']->translation->add_app('jscalendar'); 
Note: See TracChangeset for help on using the changeset viewer.