Code Duplication    Length = 15-19 lines in 2 locations

web_interface/astpp/system/core/Loader.php 2 locations

@@ 358-376 (lines=19) @@
355
	 *
356
	 * @return	string
357
	 */
358
	public function dbutil()
359
	{
360
		if ( ! class_exists('CI_DB'))
361
		{
362
			$this->database();
363
		}
364
365
		$CI = & get_instance();
366
367
		// for backwards compatibility, load dbforge so we can extend dbutils off it
368
		// this use is deprecated and strongly discouraged
369
		$CI->load->dbforge();
370
371
		require_once(BASEPATH.'database/DB_utility.php');
372
		require_once(BASEPATH.'database/drivers/'.$CI->db->dbdriver.'/'.$CI->db->dbdriver.'_utility.php');
373
		$class = 'CI_DB_'.$CI->db->dbdriver.'_utility';
374
375
		$CI->dbutil = new $class();
376
	}
377
378
	// --------------------------------------------------------------------
379
@@ 385-399 (lines=15) @@
382
	 *
383
	 * @return	string
384
	 */
385
	public function dbforge()
386
	{
387
		if ( ! class_exists('CI_DB'))
388
		{
389
			$this->database();
390
		}
391
392
		$CI = & get_instance();
393
394
		require_once(BASEPATH.'database/DB_forge.php');
395
		require_once(BASEPATH.'database/drivers/'.$CI->db->dbdriver.'/'.$CI->db->dbdriver.'_forge.php');
396
		$class = 'CI_DB_'.$CI->db->dbdriver.'_forge';
397
398
		$CI->dbforge = new $class();
399
	}
400
401
	// --------------------------------------------------------------------
402