Added default data sql file.
This commit is contained in:
parent
adbd329f0c
commit
2f2e1c5adc
2 changed files with 9 additions and 0 deletions
|
@ -73,6 +73,14 @@ class Installation extends CI_Controller {
|
|||
$this->db->query($query);
|
||||
}
|
||||
|
||||
// Insert default E!A entries into the database.
|
||||
$file_contents = file_get_contents(dirname(BASEPATH) . '/assets/sql/data.sql');
|
||||
$sql_queries = explode(';', $file_contents);
|
||||
array_pop($sql_queries);
|
||||
foreach($sql_queries as $query) {
|
||||
$this->db->query($query);
|
||||
}
|
||||
|
||||
// Insert admin
|
||||
$this->load->model('admins_model');
|
||||
$admin = json_decode($_POST['admin'], true);
|
||||
|
|
1
src/assets/sql/data.sql
Normal file
1
src/assets/sql/data.sql
Normal file
|
@ -0,0 +1 @@
|
|||
INSERT INTO ea_settings (name, value) VALUES ('google_analytics_code', '');
|
Loading…
Reference in a new issue