Show
Ignore:
Timestamp:
05/11/07 11:23:20 (1 year ago)
Author:
argh
Message:

Fixed a bug when using an autoload() function in combination with external modules.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/patForms.php

    r378 r392  
    599599        return true; 
    600600    } 
    601      
     601 
    602602   /** 
    603603    * add a base directory where patForms should search for 
     
    607607    * 
    608608    * patForms will be searching for a module in the same 
    609     * order you added them. It will first look in module specific  
    610     * directory (added with addModuleDir()), afterwards in module  
    611     * base dirs. If the module cannot be found in the custom  
     609    * order you added them. It will first look in module specific 
     610    * directory (added with addModuleDir()), afterwards in module 
     611    * base dirs. If the module cannot be found in the custom 
    612612    * folders, it will look in patForms/$moduleType. 
    613613    * 
     
    615615    * @access   public 
    616616    * @param    string|array    directory or directories to search. 
    617     * @see addModuleDir()  
     617    * @see addModuleDir() 
    618618    */ 
    619619    function addModuleBaseDir($dir) 
     
    15341534 
    15351535   /** 
    1536     * load module class  
     1536    * load module class 
    15371537    * 
    15381538    * @access   private 
     
    15441544    { 
    15451545        $moduleClass = 'patForms_'.$type.'_'.$name; 
    1546         if (class_exists($moduleClass)) { 
     1546        if (class_exists($moduleClass,false)) { 
    15471547            return $moduleClass; 
    15481548        } 
     
    15501550        if ($hasBaseClass) { 
    15511551            $baseClass = 'patForms_'.$type; 
    1552             if (!class_exists( $baseClass)) { 
     1552            if (!class_exists( $baseClass,false)) { 
    15531553                $baseFile  = PATFORMS_INCLUDE_PATH . '/'.$type.'.php'; 
    15541554                if (!file_exists($baseFile)) { 
     
    15631563        } 
    15641564 
    1565         /*  
     1565        /* 
    15661566         * if there is an underscore in the module name, we want 
    15671567         * to load the module from a subfolder, so we transform 
    15681568         * all underscores to slashes. 
    1569          */  
     1569         */ 
    15701570        $pathName = $name; 
    15711571        if (strstr($pathName, '_' )) { 
     
    15881588        // patForms standard folder 
    15891589        $moduleDirs[$type][]    =   PATFORMS_INCLUDE_PATH . '/' . $type; 
    1590          
     1590 
    15911591        $found  =   false; 
    15921592        foreach ($moduleDirs[$type] as $dir) {