diff options
author | Florian Pritz <bluewind@xinu.at> | 2016-07-13 21:47:56 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2016-07-13 21:47:56 +0200 |
commit | 3bd289a3c14f377c3c689f97cf20366571f6add9 (patch) | |
tree | 9b523be2327def5e18c6a22e6084bbae570f5277 /application/controllers/tools.php | |
parent | f67a3cf212a774945a0d10143e93071e19dc40f4 (diff) |
Throw public exception when accessing CLI only functions
We actually don't need to hide this from the user. The error should be
shown rather than a blank page being returned.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/controllers/tools.php')
-rw-r--r-- | application/controllers/tools.php | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/application/controllers/tools.php b/application/controllers/tools.php index 664a9e324..845597b08 100644 --- a/application/controllers/tools.php +++ b/application/controllers/tools.php @@ -14,9 +14,7 @@ class Tools extends MY_Controller { parent::__construct(); $this->load->model('mfile'); - if (!$this->input->is_cli_request()) { - throw new \exceptions\PublicApiException("api/cli-only", "This can only be called via CLI"); - } + $this->_require_cli_request(); } function index() |