summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
Diffstat (limited to 'application')
-rw-r--r--application/core/MY_Output.php16
-rw-r--r--application/test/tests/test_api_v2.php13
2 files changed, 29 insertions, 0 deletions
diff --git a/application/core/MY_Output.php b/application/core/MY_Output.php
new file mode 100644
index 000000000..402e46c80
--- /dev/null
+++ b/application/core/MY_Output.php
@@ -0,0 +1,16 @@
+<?php
+/*
+ * Copyright 2016 Florian "Bluewind" Pritz <bluewind@server-speed.net>
+ *
+ * Licensed under AGPLv3
+ * (see COPYING for full license text)
+ *
+ */
+
+class MY_Output extends CI_Output {
+ public function __construct()
+ {
+ parent::__construct();
+ $this->parse_exec_vars = false;
+ }
+}
diff --git a/application/test/tests/test_api_v2.php b/application/test/tests/test_api_v2.php
index b50af4bcf..7335c3bdd 100644
--- a/application/test/tests/test_api_v2.php
+++ b/application/test/tests/test_api_v2.php
@@ -359,6 +359,19 @@ class test_api_v2 extends \test\Test {
$this->t->is($ret["data"]["total_size"], 0, "total_size = 0 since no uploads");
}
+ public function test_history_specialVarsNotExpanded()
+ {
+ $apikey = $this->createUserAndApikey();
+ $uploadid = $this->uploadFile($apikey, "data/tests/{elapsed_time}.txt")['data']['ids'][0];
+
+ $ret = $this->CallEndpoint("POST", "file/history", array(
+ "apikey" => $apikey,
+ ));
+ $this->expectSuccess("get history", $ret);
+
+ $this->t->is($ret["data"]["items"][$uploadid]['filename'], '{elapsed_time}.txt', "{elapsed_time} is not expanded in history reply");
+ }
+
public function test_delete_canDeleteUploaded()
{
$apikey = $this->createUserAndApikey();