kopia lustrzana https://github.com/magicbug/Cloudlog
[Dashboard] Removed extra login session check and migration check as its called by auto load
Removed extra login session check and migration check as its called by auto load this speeds up page load time and reduces SQL queries down to 44 for the page which is still too manypull/1407/head
rodzic
88e90d7e50
commit
91548afea7
|
@ -8,11 +8,7 @@ class Dashboard extends CI_Controller {
|
|||
if(ENVIRONMENT == 'development') {
|
||||
$this->output->enable_profiler(TRUE);
|
||||
}
|
||||
|
||||
// Check our version and run any migrations
|
||||
$this->load->library('Migration');
|
||||
$this->migration->current();
|
||||
|
||||
|
||||
// Database connections
|
||||
$this->load->model('logbook_model');
|
||||
$this->load->model('user_model');
|
||||
|
@ -23,16 +19,6 @@ class Dashboard extends CI_Controller {
|
|||
// user is not logged in
|
||||
redirect('user/login');
|
||||
}
|
||||
|
||||
|
||||
if(!$this->user_model->authorize($this->config->item('auth_mode'))) {
|
||||
if($this->user_model->validate_session()) {
|
||||
$this->user_model->clear_session();
|
||||
show_error('Access denied<p>Click <a href="'.site_url('user/login').'">here</a> to log in as another user', 403);
|
||||
} else {
|
||||
redirect('user/login');
|
||||
}
|
||||
}
|
||||
|
||||
// Calculate Lat/Lng from Locator to use on Maps
|
||||
if($this->session->userdata('user_locator')) {
|
||||
|
|
Ładowanie…
Reference in New Issue