Added default data sql file.

This commit is contained in:
Alex Tselegidis 2015-11-05 21:19:52 +01:00
parent adbd329f0c
commit 2f2e1c5adc
2 changed files with 9 additions and 0 deletions

View file

@ -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
View file

@ -0,0 +1 @@
INSERT INTO ea_settings (name, value) VALUES ('google_analytics_code', '');