summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Cochrane <mikec@mikenz.geek.nz>2008-07-24 19:47:01 -0400
committerMike Cochrane <mikec@mikenz.geek.nz>2008-07-24 19:47:01 -0400
commit341563d6cdd5e0541a375cbf2b9ce89711c9530d (patch)
tree7c3a7b17b970c69abef98056b8ab153d149c60e8
parentdd3ae36084fe33dd169103429bc1a417ccfb1829 (diff)
Auto/Lazy load the class files
darcs-hash:20080724234701-533db-ceab005e4c418a62d49af04e7835e963b67b03e0.gz
-rw-r--r--lib/common.php17
1 files changed, 5 insertions, 12 deletions
diff --git a/lib/common.php b/lib/common.php
index dadf64ae3..5e8eae6e7 100644
--- a/lib/common.php
+++ b/lib/common.php
@@ -111,17 +111,10 @@ require_once(INSTALLDIR.'/lib/action.php');
require_once(INSTALLDIR.'/lib/theme.php');
require_once(INSTALLDIR.'/lib/mail.php');
-require_once(INSTALLDIR.'/classes/Avatar.php');
-require_once(INSTALLDIR.'/classes/Notice.php');
-require_once(INSTALLDIR.'/classes/Profile.php');
-require_once(INSTALLDIR.'/classes/Remote_profile.php');
-require_once(INSTALLDIR.'/classes/Subscription.php');
-require_once(INSTALLDIR.'/classes/User.php');
-require_once(INSTALLDIR.'/classes/Confirm_address.php');
-require_once(INSTALLDIR.'/classes/Remember_me.php');
-require_once(INSTALLDIR.'/classes/Queue_item.php');
-require_once(INSTALLDIR.'/classes/Reply.php');
-require_once(INSTALLDIR.'/classes/Notice_tag.php');
-require_once(INSTALLDIR.'/classes/Sms_carrier.php');
+function __autoload($class) {
+ if (file_exists(INSTALLDIR.'/classes/' . $class . '.php')) {
+ require_once(INSTALLDIR.'/classes/' . $class . '.php');
+ }
+}
require_once('markdown.php');