From: Gianluca S. <gi...@gm...> - 2009-05-04 08:02:34
|
Sorry Paul, but this is really sub-optimal: ---------- Forwarded message ---------- diff --git a/core.php b/core.php index 386dbe1..f6beb47 100644 --- a/core.php +++ b/core.php @@ -83,6 +83,15 @@ function __autoload( $className ) { global $g_core_path; + switch ( $className ) { + case 'DisposableEmailChecker': + require_once( $g_core_path . 'disposable' . DIRECTORY_SEPARATOR . 'disposable.php' ); + return; + case 'PHPMailer': + require_once( PHPMAILER_PATH . 'class.phpmailer.php' ); // phpmailer_path is defined in email api + return; + } + $t_require_path = $g_core_path . 'classes' . DIRECTORY_SEPARATOR . $className . '.class.php'; if ( file_exists( $t_require_path ) ) { IMHO we need to let all our classes follow the same pattern (so one inclusion logic works for all of them) and add a sane include path for 3rd party libs (while possibly moving them in a library/ directory like it was done in the newlayout branch -- Gianluca Sforna http://morefedora.blogspot.com http://www.linkedin.com/in/gianlucasforna |