diff options
Diffstat (limited to 'application')
-rw-r--r-- | application/config/config.php | 10 | ||||
-rw-r--r-- | application/config/mimes.php | 5 | ||||
-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 |
5 files changed, 25 insertions, 84 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/mimes.php b/application/config/mimes.php index de923c45a..8065794ff 100644 --- a/application/config/mimes.php +++ b/application/config/mimes.php @@ -56,7 +56,7 @@ $mimes = array( 'hqx' => 'application/mac-binhex40', 'midi' => 'audio/midi', 'mpga' => 'audio/mpeg', 'mp2' => 'audio/mpeg', - 'mp3' => array('audio/mpeg', 'audio/mpg', 'audio/mpeg3'), + 'mp3' => array('audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'), 'aif' => 'audio/x-aiff', 'aiff' => 'audio/x-aiff', 'aifc' => 'audio/x-aiff', @@ -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');
- }
-}
|