summaryrefslogtreecommitdiffstats
path: root/application/controllers/api/v2/file.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2016-07-04 07:51:19 +0200
committerFlorian Pritz <bluewind@xinu.at>2019-01-28 18:02:51 +0100
commite01630006051bd91641d11f132846f7e0d845da1 (patch)
tree59354b266ca090010ca01ad4702bc4b20b8bc648 /application/controllers/api/v2/file.php
parentf707604ddadf27482ea7700932065cba6c828427 (diff)
WIP: Add preview of text pastes to historydev-text-paste-preview
- Performance needs to be improved by putting the preview text into the database instead of fetching it on each call. Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/controllers/api/v2/file.php')
-rw-r--r--application/controllers/api/v2/file.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/application/controllers/api/v2/file.php b/application/controllers/api/v2/file.php
index 3d4103f1c..34e472d74 100644
--- a/application/controllers/api/v2/file.php
+++ b/application/controllers/api/v2/file.php
@@ -60,6 +60,9 @@ class file extends \controllers\api\api_controller {
{
$this->CI->muser->require_access("apikey");
$history = \service\files::history($this->CI->muser->get_userid());
+ foreach ($history['items'] as $key => $item) {
+ unset($history['items'][$key]['preview_text']);
+ }
foreach ($history['multipaste_items'] as $key => $item) {
foreach ($item['items'] as $inner_key => $item) {
unset($history['multipaste_items'][$key]['items'][$inner_key]['sort_order']);