From 855b7b25aeba021400aa6a3438e2ab19c3b63907 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Wed, 4 Sep 2013 16:37:32 +0200 Subject: Replace is_cli_client() with stateful_client where applicable Stateless clients (cli client and clients using api keys) can't reclaim IDs (no cookie) so they should be required to log in asap and they will always get an error if they didn't log in. Signed-off-by: Florian Pritz --- application/controllers/file.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'application/controllers') diff --git a/application/controllers/file.php b/application/controllers/file.php index 6a97c645f..98ccae884 100644 --- a/application/controllers/file.php +++ b/application/controllers/file.php @@ -582,9 +582,9 @@ class File extends MY_Controller { // Handle pastes function do_paste() { - // desktop clients get a cookie to claim the ID later + // stateful clients get a cookie to claim the ID later // don't force them to log in just yet - if (is_cli_client()) { + if (!stateful_client()) { $this->muser->require_access(); } @@ -617,9 +617,9 @@ class File extends MY_Controller { // Handles uploaded files function do_upload() { - // desktop clients get a cookie to claim the ID later + // stateful clients get a cookie to claim the ID later // don't force them to log in just yet - if (is_cli_client()) { + if (!stateful_client()) { $this->muser->require_access("apikey"); } -- cgit v1.2.3-24-g4f1b