Added the ability to auto-load Models
diff --git a/system/application/config/autoload.php b/system/application/config/autoload.php
index 8bb4181..2dfbe42 100644
--- a/system/application/config/autoload.php
+++ b/system/application/config/autoload.php
@@ -23,6 +23,7 @@
 | 3. Plugins

 | 4. Custom config files

 | 5. Language files

+| 6. Models

 |

 */

 

@@ -96,6 +97,20 @@
 

 $autoload['language'] = array();

 

+

+/*

+| -------------------------------------------------------------------

+|  Auto-load Models

+| -------------------------------------------------------------------

+| Prototype:

+|

+|	$autoload['model'] = array('model1', 'model2');

+|

+*/

+

+$autoload['model'] = array();

+

+

 /*

 | -------------------------------------------------------------------

 |  Auto-load Core Libraries

diff --git a/system/libraries/Loader.php b/system/libraries/Loader.php
index 051d3d8..dd63979 100644
--- a/system/libraries/Loader.php
+++ b/system/libraries/Loader.php
@@ -107,8 +107,19 @@
 	 */	

 	function model($model, $name = '', $db_conn = FALSE)

 	{		

-		if ($model == '')

+		if (is_array($model))

+		{

+			foreach($model as $babe)

+			{

+				$this->model($babe);	

+			}

 			return;

+		}

+

+		if ($model == '')

+		{

+			return;

+		}

 	

 		// Is the model in a sub-folder? If so, parse out the filename and path.

 		if (strpos($model, '/') === FALSE)

@@ -855,6 +866,12 @@
 			}		

 		}

 

+		// Autoload models

+		if (isset($autoload['model']))

+		{

+			$this->model($autoload['model']);

+		}

+

 		// A little tweak to remain backward compatible

 		// The $autoload['core'] item was deprecated

 		if ( ! isset($autoload['libraries']))

@@ -875,6 +892,7 @@
 			// Load the model class.

 			if (in_array('model', $autoload['libraries']))

 			{

+				die('made it in!');

 				$this->model();

 				$autoload['libraries'] = array_diff($autoload['libraries'], array('model'));

 			}