<?php

//CakePHP is pretty awful. I was so foolish.

$host = $_SERVER['HTTP_HOST'];

if($host == 'cmc.lan' || $host == '192.168.0.7') {
  class DATABASE_CONFIG {

    var $default = array(
      'driver' => 'mysql',
      'persistent' => false,
      'host' => 'localhost',
      'login' => 'quotenik',
      'password' => 'quotenik', 
      'database' => 'quotenik',
      'prefix' => '',
    );

    var $test = array(
      'driver' => 'mysql',
      'persistent' => false,
      'host' => 'localhost',
      'login' => 'user',
      'password' => 'password',
      'database' => 'test_database_name',
      'prefix' => '',
    );
  }
}

else {
   class DATABASE_CONFIG {

      var $default = array(
        'driver' => 'mysql',
        'persistent' => false,
        'host' => 'localhost',
        'login' => 'root',
        'password' => '', 
        'database' => 'cmc',
        'prefix' => '',
      );

      var $test = array(
        'driver' => 'mysql',
        'persistent' => false,
        'host' => 'localhost',
        'login' => 'user',
        'password' => 'password',
        'database' => 'test_database_name',
        'prefix' => '',
      );
   }
}

