Skip to content

Commit

Permalink
Don't count hits on article if we are within the admincp.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lonnie authored and Lonnie committed Nov 2, 2012
1 parent 005becb commit 38ff241
Show file tree
Hide file tree
Showing 2 changed files with 138 additions and 127 deletions.
16 changes: 13 additions & 3 deletions app/core/MY_Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,25 @@
class MY_Controller extends CI_Controller {
public function __construct() {
parent::__construct();

// we don't want to do anything if we're not installed
$this->load->helper('install_redirect_helper');
install_redirect();

// this is a config.php setting. if TRUE, it shows an awesome
// profiler at the bottom of each page.
if ($this->config->item('debug_profiler') === TRUE) {
$this->output->enable_profiler(TRUE);
}
}

// If we're in the admincp, define a var so we can check later.
if ($this->router->fetch_class() == 'admincp')
{
define('IN_ADMIN', true);
}
else
{
define('IN_ADMIN', false);
}
}
}
Loading

0 comments on commit 38ff241

Please sign in to comment.