summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
Diffstat (limited to 'application')
-rw-r--r--application/controllers/Main.php2
-rw-r--r--application/controllers/User.php2
-rw-r--r--application/core/MY_Controller.php6
-rw-r--r--application/views/errors/html/error_general.php2
4 files changed, 6 insertions, 6 deletions
diff --git a/application/controllers/Main.php b/application/controllers/Main.php
index 31100f3d7..2e8ab3851 100644
--- a/application/controllers/Main.php
+++ b/application/controllers/Main.php
@@ -19,7 +19,7 @@ class Main extends MY_Controller {
function index()
{
- if ($this->input->is_cli_request()) {
+ if (is_cli()) {
output_cli_usage();
exit;
}
diff --git a/application/controllers/User.php b/application/controllers/User.php
index 01e310a8f..892bbe1b6 100644
--- a/application/controllers/User.php
+++ b/application/controllers/User.php
@@ -16,7 +16,7 @@ class User extends MY_Controller {
function index()
{
- if ($this->input->is_cli_request()) {
+ if (is_cli()) {
$this->load->library("../controllers/tools");
return $this->tools->index();
}
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;
}
diff --git a/application/views/errors/html/error_general.php b/application/views/errors/html/error_general.php
index 274322cbe..0f809dccd 100644
--- a/application/views/errors/html/error_general.php
+++ b/application/views/errors/html/error_general.php
@@ -12,7 +12,7 @@ if (class_exists("CI_Controller") && !isset($GLOBALS["is_error_page"]) && isset(
$CI->load->helper("filebin");
$CI->load->helper("url");
- if ($CI->input->is_cli_request()) {
+ if (is_cli()) {
$message = str_replace("</p>", "</p>\n", $message);
$message = strip_tags($message);
echo "$heading: $message\n";