From d8978f969093cc1d244a4a293d8135f0a4029109 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Thu, 21 Sep 2017 18:03:09 +0200 Subject: Remove usage of deprecated is_cli_request() Signed-off-by: Florian Pritz --- application/core/MY_Controller.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'application/core/MY_Controller.php') diff --git a/application/core/MY_Controller.php b/application/core/MY_Controller.php index 63db6c8a5..463a4df64 100644 --- a/application/core/MY_Controller.php +++ b/application/core/MY_Controller.php @@ -20,7 +20,7 @@ class MY_Controller extends CI_Controller { $this->load->library('customautoloader'); // check if DB is up to date - if (!($this->input->is_cli_request() && $this->uri->segment(1) === "tools")) { + if (!(is_cli() && $this->uri->segment(1) === "tools")) { $this->_ensure_database_schema_up_to_date(); } @@ -54,7 +54,7 @@ class MY_Controller extends CI_Controller { protected function _require_cli_request() { - if (!$this->input->is_cli_request()) { + if (!is_cli()) { throw new \exceptions\PublicApiException("api/cli-only", "This function can only be accessed via the CLI interface"); } } @@ -106,7 +106,7 @@ class MY_Controller extends CI_Controller { return false; } - if ($this->input->is_cli_request()) { + if (is_cli()) { return false; } -- cgit v1.2.3-24-g4f1b