From 4465c0278911106aed47e9e9e7a40ea68d9dc7de Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 8 Aug 2011 14:29:19 -0500 Subject: [PATCH] Refactor loader for performance. --- system/package.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/package.php b/system/package.php index e9586f2c..7719cec1 100644 --- a/system/package.php +++ b/system/package.php @@ -19,9 +19,9 @@ public static function load($packages) { foreach ((array) $packages as $package) { - if (file_exists($bootstrap = PACKAGE_PATH.$package.'/bootstrap'.EXT)) + if ( ! static::loaded($package) and file_exists($bootstrap = PACKAGE_PATH.$package.'/bootstrap'.EXT)) { - require_once $bootstrap; + require $bootstrap; } static::$loaded[] = $package;