Changeset 2331


Ignore:
Timestamp:
03/24/10 09:31:16 (14 years ago)
Author:
rodsouza
Message:

Ticket #911 - Removendo o uso de na inclusão de arquivos, devido a inconsistência.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/controller.php

    r2032 r2331  
    3232         
    3333        // Load dinamically class file. 
    34         if($app == '$this') 
    35                 $app = $_SESSION['phpgw_info']['expresso']['currentapp']; 
     34        if ( $app == '$this' ) 
     35        { 
     36                $app = dirname( $_SERVER[ 'PHP_SELF' ] ) . '/'; 
     37                $app = dirname( substr( $_SERVER[ 'HTTP_REFERER' ], strpos( $_SERVER[ 'HTTP_REFERER' ], $app ) + strlen( $app ) ) ); 
     38        } 
    3639        else 
    37         if( strpos($app, '$this/') == 0 ) 
    38         { 
    39                 $filename = str_replace('$this/','',$app) . '.php'; 
    40                 include_once($filename); 
    41                 exit; 
    42         } 
     40                if( strpos($app, '$this/') == 0 ) 
     41                { 
     42                        $filename = str_replace('$this/','',$app) . '.php'; 
     43                        include_once($filename); 
     44                        exit; 
     45                } 
    4346        $filename = $app.'/inc/class.'.$class.'.inc.php'; 
    4447 
Note: See TracChangeset for help on using the changeset viewer.