Show
Ignore:
Timestamp:
09/15/11 20:05:23 (8 months ago)
Author:
p_lindheimer
Message:

fixes failed autoload scenarios when Zend obfuscated modules are sometimes present

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/trunk/amp_conf/htdocs/admin/functions.inc.php

    r12446 r12522  
    9595    $class = 'component'; 
    9696  } 
    97   switch($class){ 
     97 
     98  /* Special case of TRUE forces all classes to be loaded. Make sure to add new classes to this array 
     99   * as they are added to the autoloader. This was added because the presence of Zend enabled modules 
     100   * can result in the autoloader function failing. 
     101   * 
     102   * Basically, every 'case' below should have a corresponding entry in the $class array below. 
     103   */ 
     104  if ($class === true) { 
     105    $class = array('ampuser','CI_Email','CI_Table','CssMin','component','featurecode','cronmanager','moduleHook','modulelist','notifications','xml2Array'); 
     106  } else { 
     107    $class = array($class); 
     108  } 
     109 
     110  foreach ($class as $this_class) switch($this_class){ 
    98111    case 'ampuser': 
    99112      require_once($dirname . '/libraries/ampuser.class.php'); 
     
    130143      break; 
    131144    case 'CssMin': 
    132       require_once('libraries/cssmin.class.php'); 
     145      require_once($dirname . '/libraries/cssmin.class.php'); 
    133146      break; 
    134147    case 'component':