summaryrefslogtreecommitdiffstats
path: root/application/service
AgeCommit message (Collapse)AuthorFilesLines
2018-01-01Ensure file does not exist when new one is added to DBFlorian Pritz1-0/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-01-01Only update mtime when uploaded files already existFlorian Pritz1-6/+17
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-09-16Update negativ return check of session userdata for CI3Florian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-06-17Fix broken lineendings when rendering ascii colorsFlorian Pritz1-1/+1
Without -m ansi2html may not close the span tags at the end of the line. Since we wrap the output lines in our own tags those left-open tags break the rendering. Fix it by letting ansi2html wrap lines into tags on it's own. This adds superflous tags in the HTML, but it works nicely. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-05-22Fix markdown rendering not finding ParsedownFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-03-26s/renderer: Extract json reformater methodFlorian Pritz1-16/+28
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-03-26s/renderer: Pass output_cache in constructorFlorian Pritz1-11/+14
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-03-26Extract render code into dedicated classFlorian Pritz1-0/+166
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-11-05Remove API v1 compatability codeFlorian Pritz1-2/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-11-01s/multipaste_queue: Refactor constructor to support dependency injectionFlorian Pritz1-6/+19
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-11-01s/multipaste_queue: Remove duplicate assignmentFlorian Pritz1-2/+0
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-11-01Add multipaste queueFlorian Pritz1-0/+85
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-09-19Extract tooltip function into \service\filesFlorian Pritz1-0/+28
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-08-21mfile->add_file: Take userid via argumentFlorian Pritz1-6/+6
This allows for easier testing. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-08-20service\storage->gzip_compress: Remove incorrectly documented parameterFlorian Pritz1-1/+0
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-13Fix missing phpdoc for \service\userFlorian Pritz1-4/+6
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-13Remove incorrect TODO about $new_file being unsetFlorian Pritz1-1/+0
I think this is left over from developing the feature. This seems to have been incorrect in the inital commit of the code. Just drop it. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-04service\files->get_multipaste_history: Add sort order from DBFlorian Pritz1-1/+8
Keep this field private for now. I may be exposed at a later time. The returned values are already normalized so they can be safely exposed. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-04Add function to ellipsize textFlorian Pritz1-0/+38
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-06-16Remove old TODOFlorian Pritz1-1/+0
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-09-20postgres: Fix multiple queries using MySQL syntaxFlorian Pritz1-5/+5
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-09-20API 2.1: Add thumbnail link to historyFlorian Pritz1-0/+3
Also adjust test cases to check for the new value. API v1 does not change. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-09-14API 2.0: Remove private fields from file/historyFlorian Pritz1-1/+6
Since this is a breaking change bump the api version to 2. The private fields are user_id and multipaste_id which where leaked via the multipaste_items field. This commit also adds a test case to both api versions that checks the returned fields. NOTE: Most of this commit is copied from the files of api v1 so when viewing the diff use --find-copies-harder for an easy to read diff. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-05-21Calc correct total size for history with duplicate hashesFlorian Pritz1-1/+2
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-05-21Support multiple files with the same hashFlorian Pritz1-33/+52
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-04-18s/files:get_multipaste_history: Remove multipastes without itemsFlorian Pritz1-0/+8
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-03-08api/file/create_multipase: return URLFlorian Pritz1-0/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-03-08Unify file/cron and mfile->valid_idFlorian Pritz1-0/+50
Create a testable function doing all the verification/removal, add tests and use it for both cases. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-22s\files: rename add_file to add_uploaded_fileFlorian Pritz1-1/+1
It doesn't add any file so it should have that name. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-21s/files: add add_file_data for future code deduplicationFlorian Pritz1-2/+31
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-15s/file/add_file: make file move atomicFlorian Pritz1-3/+5
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-14Fix consistency of error_idsFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-14Use assoc array for service/files/verify_uploaded_filesFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-14Use assoc array for service/user/apikeysFlorian Pritz1-1/+5
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-06service/files::delete: Fix incorrect error when wrong ownerFlorian Pritz1-3/+4
Also improve the variable name for easier understanding. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-05service/files::history: Fix total_size if no resultsFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-05fixup! Support database table prefixesFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-03api: implement file/create_multipasteFlorian Pritz1-0/+53
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-03api: implement file/deleteFlorian Pritz1-0/+62
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-03Rework error handling in upload validatorFlorian Pritz2-4/+5
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-02Rework api error handlingFlorian Pritz1-2/+2
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-01-16add some TODOsFlorian Pritz1-0/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-01-16fix multipaste in service/historyFlorian Pritz1-1/+5
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-01-16refactor service/file/historyFlorian Pritz1-24/+28
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-01-16add initial user apiFlorian Pritz1-0/+75
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-01-16Improve history api for multipastesFlorian Pritz1-11/+21
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-01-16first go at reworking; needs to be redesignedFlorian Pritz1-0/+116
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-11-02Add tarball support to multipastesFlorian Pritz1-0/+161
Signed-off-by: Florian Pritz <bluewind@xinu.at>