summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
Diffstat (limited to 'application')
-rw-r--r--application/config/mimes.php3
-rw-r--r--application/controllers/migrate.php40
-rw-r--r--application/controllers/welcome.php22
-rw-r--r--application/migrations/001_Create_accounts.php32
4 files changed, 18 insertions, 79 deletions
diff --git a/application/config/mimes.php b/application/config/mimes.php
index 58eea5f83..8065794ff 100644
--- a/application/config/mimes.php
+++ b/application/config/mimes.php
@@ -97,7 +97,8 @@ $mimes = array( 'hqx' => 'application/mac-binhex40',
'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
'word' => array('application/msword', 'application/octet-stream'),
'xl' => 'application/excel',
- 'eml' => 'message/rfc822'
+ 'eml' => 'message/rfc822',
+ 'json' => array('application/json', 'text/json')
);
diff --git a/application/controllers/migrate.php b/application/controllers/migrate.php
deleted file mode 100644
index e5442e79c..000000000
--- a/application/controllers/migrate.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-class Migrate extends CI_Controller
-{
- function __construct()
- {
- parent::__construct();
-
- $this->load->library('migration');
-
- /** VERY IMPORTANT - only turn this on when you need it. */
-// show_error('Access to this controller is blocked, turn me on when you need me.');
- }
-
- // Install up to the most up-to-date version.
- function install()
- {
- if ( ! $this->migration->current())
- {
- show_error($this->migration->error);
- exit;
- }
-
- echo "<br />Migration Successful<br />";
- }
-
- // This will migrate up to the configed migration version
- function version($id = NULL)
- {
- // No $id supplied? Use the config version
- $id OR $id = $this->config->item('migration_version');
-
- if ( ! $this->migration->version($id))
- {
- show_error($this->migration->error);
- exit;
- }
-
- echo "<br />Migration Successful<br />";
- }
-}
diff --git a/application/controllers/welcome.php b/application/controllers/welcome.php
index 79689f012..21bef43d9 100644
--- a/application/controllers/welcome.php
+++ b/application/controllers/welcome.php
@@ -2,12 +2,22 @@
class Welcome extends CI_Controller {
- function __construct()
- {
- parent::__construct();
- }
-
- function index()
+ /**
+ * Index Page for this controller.
+ *
+ * Maps to the following URL
+ * http://example.com/index.php/welcome
+ * - or -
+ * http://example.com/index.php/welcome/index
+ * - or -
+ * Since this controller is set as the default controller in
+ * config/routes.php, it's displayed at http://example.com/
+ *
+ * So any other public methods not prefixed with an underscore will
+ * map to /index.php/welcome/<method_name>
+ * @see http://codeigniter.com/user_guide/general/urls.html
+ */
+ public function index()
{
$this->load->view('welcome_message');
}
diff --git a/application/migrations/001_Create_accounts.php b/application/migrations/001_Create_accounts.php
deleted file mode 100644
index 4b2fc936f..000000000
--- a/application/migrations/001_Create_accounts.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php defined('BASEPATH') OR exit('No direct script access allowed');
-
-class Migration_Create_accounts extends CI_Migration {
-
- function up()
- {
- if ( ! $this->db->table_exists('accounts'))
- {
- // Setup Keys
- $this->dbforge->add_key('id', TRUE);
-
- $this->dbforge->add_field(array(
- 'id' => array('type' => 'INT', 'constraint' => 5, 'unsigned' => TRUE, 'auto_increment' => TRUE),
- 'company_name' => array('type' => 'VARCHAR', 'constraint' => '200', 'null' => FALSE),
- 'first_name' => array('type' => 'VARCHAR', 'constraint' => '200', 'null' => FALSE),
- 'last_name' => array('type' => 'VARCHAR', 'constraint' => '200', 'null' => FALSE),
- 'phone' => array('type' => 'TEXT', 'null' => FALSE),
- 'email' => array('type' => 'TEXT', 'null' => FALSE),
- 'address' => array('type' => 'TEXT', 'null' => FALSE),
- 'Last_Update' => array('type' => 'DATETIME', 'null' => FALSE)
- ));
-
- $this->dbforge->add_field("Created_At TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP");
- $this->dbforge->create_table('accounts', TRUE);
- }
- }
-
- function down()
- {
- $this->dbforge->drop_table('accounts');
- }
-}