diff options
author | Georg Ehrke <developer@georgehrke.com> | 2014-12-20 22:44:41 +0100 |
---|---|---|
committer | Georg Ehrke <developer@georgehrke.com> | 2015-01-07 14:55:53 +0100 |
commit | f579f2bd948ca73a1af720e19517af9bdde11748 (patch) | |
tree | 08c7259d72d8db413895e215b774df83539a938c /lib/public | |
parent | 510488ad3e24110c435423860e9afbc58020ed66 (diff) | |
download | nextcloud-server-f579f2bd948ca73a1af720e19517af9bdde11748.tar.gz nextcloud-server-f579f2bd948ca73a1af720e19517af9bdde11748.zip |
add Download logfile button to admin settings
add logSettingsController
add download logfile button
move getEntries to LogSettingsController
move set log level to logsettingscontroller.php
add warning if logfile is bigger than 100MB
add unit test for set log level
fix typecasting, add new line at EoF
show log and logfile download only if log_type is set to owncloud
add unit test for getFilenameForDownload
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/appframework/http/datadownloadresponse.php | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/lib/public/appframework/http/datadownloadresponse.php b/lib/public/appframework/http/datadownloadresponse.php new file mode 100644 index 00000000000..326be927b2e --- /dev/null +++ b/lib/public/appframework/http/datadownloadresponse.php @@ -0,0 +1,42 @@ +<?php +/** + * @author Georg Ehrke + * @copyright 2014 Georg Ehrke <georg@ownCloud.com> + * + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ +namespace OCP\AppFramework\Http; + +class DataDownloadResponse extends DownloadResponse { + /** + * @var string + */ + private $data; + + /** + * Creates a response that prompts the user to download the text + * @param string $data text to be downloaded + * @param string $filename the name that the downloaded file should have + * @param string $contentType the mimetype that the downloaded file should have + */ + public function __construct($data, $filename, $contentType) { + $this->data = $data; + parent::__construct($filename, $contentType); + } + + /** + * @param string $data + */ + public function setData($data) { + $this->data = $data; + } + + /** + * @return string + */ + public function render() { + return $this->data; + } +} |