From 6bbecd4c07bbc67a02f6996415e12e1fafdeb7a7 Mon Sep 17 00:00:00 2001 From: Chuck Hagenbuch Date: Thu, 22 Feb 2001 16:01:14 +0000 Subject: [PATCH] factory-generated classes have lowercase subclass names by our (newly revised) standards. --- pear/Mail.php | 8 +------- pear/Makefile.in | 4 ++-- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/pear/Mail.php b/pear/Mail.php index 83622c71d2..807568edf7 100644 --- a/pear/Mail.php +++ b/pear/Mail.php @@ -35,15 +35,9 @@ class Mail extends PEAR { */ function factory($driver, $params = array()) { + $driver = strtolower($driver); if (@include_once 'Mail/' . $driver . '.php') { $class = 'Mail_' . $driver; - } elseif (@include_once 'Mail/' . strtoupper($driver) . '.php') { - $class = 'Mail_' . strtoupper($driver); - } elseif (@include_once 'Mail/' . ucfirst($driver) . '.php') { - $class = 'Mail_' . ucfirst($driver); - } - - if (isset($class)) { return new $class($params); } else { return new PEAR_Error('Unable to find class for driver ' . $driver); diff --git a/pear/Makefile.in b/pear/Makefile.in index 89faa3fe10..f2c9464061 100644 --- a/pear/Makefile.in +++ b/pear/Makefile.in @@ -69,8 +69,8 @@ PEAR_FILES = \ Log/syslog.php \ Mail.php \ Mail/RFC822.php \ - Mail/Sendmail.php \ - Mail/SMTP.php \ + Mail/sendmail.php \ + Mail/smtp.php \ Math/Fraction.php \ Math/Util.php \ Net/Curl.php \ -- 2.50.1