From abb846aa04807a2eba22785f089115fe33860ca7 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 26 Sep 2016 11:36:06 +0200 Subject: Remove special handling of cli clients Signed-off-by: Florian Pritz --- application/controllers/file/file_default.php | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'application/controllers/file/file_default.php') diff --git a/application/controllers/file/file_default.php b/application/controllers/file/file_default.php index 82e933021..563102026 100644 --- a/application/controllers/file/file_default.php +++ b/application/controllers/file/file_default.php @@ -553,10 +553,6 @@ class File_default extends MY_Controller { } } - if (is_cli_client()) { - $redirect = false; - } - if ($redirect && count($ids) == 1) { redirect($this->data['urls'][0], "location", 303); } else { @@ -770,14 +766,8 @@ class File_default extends MY_Controller { ); } - $order = is_cli_client() ? "ASC" : "DESC"; - - uasort($history["items"], function($a, $b) use ($order) { - if ($order == "ASC") { - return $a["date"] - $b["date"]; - } else { + uasort($history["items"], function($a, $b) { return $b["date"] - $a["date"]; - } }); foreach($history["items"] as $key => $item) { @@ -786,16 +776,6 @@ class File_default extends MY_Controller { if (isset($item['preview_text'])) { $history["items"][$key]["preview_text"] = htmlentities($item['preview_text']); } - - if (is_cli_client()) { - // Keep track of longest string to pad plaintext output correctly - foreach($fields as $length_key => $value) { - $len = mb_strlen($history["items"][$key][$length_key]); - if ($len > $lengths[$length_key]) { - $lengths[$length_key] = $len; - } - } - } } $this->data["items"] = $history["items"]; -- cgit v1.2.3-24-g4f1b