diff options
Diffstat (limited to 'application')
-rw-r--r-- | application/config/config.php | 10 | ||||
-rw-r--r-- | application/config/migration.php | 38 | ||||
-rw-r--r-- | application/config/mimes.php | 3 | ||||
-rw-r--r-- | application/controllers/migrate.php | 40 | ||||
-rw-r--r-- | application/controllers/welcome.php | 22 | ||||
-rw-r--r-- | application/migrations/001_Create_accounts.php | 32 |
6 files changed, 24 insertions, 121 deletions
diff --git a/application/config/config.php b/application/config/config.php index dc029a94b..1ec65435e 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -262,11 +262,13 @@ $config['sess_time_to_update'] = 300; | 'cookie_prefix' = Set a prefix if you need to avoid collisions | 'cookie_domain' = Set to .your-domain.com for site-wide cookies | 'cookie_path' = Typically will be a forward slash +| 'cookie_secure' = Cookies will only be set if a secure HTTPS connection exists. | */ -$config['cookie_prefix'] = ''; -$config['cookie_domain'] = ''; -$config['cookie_path'] = '/'; +$config['cookie_prefix'] = ""; +$config['cookie_domain'] = ""; +$config['cookie_path'] = "/"; +$config['cookie_secure'] = FALSE; /* |-------------------------------------------------------------------------- @@ -357,4 +359,4 @@ $config['proxy_ips'] = ''; /* End of file config.php */ -/* Location: ./application/config/config.php */
\ No newline at end of file +/* Location: ./application/config/config.php */ diff --git a/application/config/migration.php b/application/config/migration.php deleted file mode 100644 index 37b1b8534..000000000 --- a/application/config/migration.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php defined('BASEPATH') OR exit('No direct script access allowed');
-/*
-|--------------------------------------------------------------------------
-| Enable/Disable Migrations
-|--------------------------------------------------------------------------
-|
-| Migrations are disabled by default for security reasons.
-| You should enable migrations whenever you intend to do a schema migration
-| and disable it back when you're done.
-|
-*/
-$config['migration_enabled'] = TRUE;
-
-
-/*
-|--------------------------------------------------------------------------
-| Migrations version
-|--------------------------------------------------------------------------
-|
-| This is used to set migration version that the file system should be on.
-| If you run $this->migration->latest() this is the version that schema will
-| be upgraded / downgraded to.
-|
-*/
-$config['migration_version'] = 1;
-
-
-/*
-|--------------------------------------------------------------------------
-| Migrations Path
-|--------------------------------------------------------------------------
-|
-| Path to your migrations folder.
-| Typically, it will be within your application path.
-| Also, writing permission is required within the migrations path.
-|
-*/
-$config['migration_path'] = APPPATH . 'migrations/';
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');
- }
-}
|