summaryrefslogtreecommitdiffstats
path: root/application
AgeCommit message (Collapse)AuthorFilesLines
2015-04-02Pygments::get_pygments_info: cache in memoryFlorian Pritz1-1/+1
It's used multiple times if we are rendering a multipaste so it makes sense not to run to the backend cache each time (if there even is one). This reduced the render time for a multipaste with 180 items from >500ms to ~225ms when using the file cache backend. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-04-02Fix automatic highlight of svg filesFlorian Pritz1-7/+7
They should not be highlit.. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-04-02helper: Add cache_function_fullFlorian Pritz1-1/+18
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-04-01file/do_websubmit: throw exception rather than assertFlorian Pritz1-2/+3
An assert is actually wrong for user input. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-04-01Get supported mimetypes from pygments itselfFlorian Pritz1-0/+9
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-04-01Refactor \libraries\Pygments::get_lexersFlorian Pritz1-4/+13
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-04-01Refactor lexer code into dedicated classFlorian Pritz3-190/+215
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-03-25API 1.2.0: Add user/delete_apikeys endpointFlorian Pritz3-5/+61
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-03-21Highlight application/postscriptFlorian Pritz1-0/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-03-21Change gentoo overlay link to httpsFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-03-19Make user/get_action/invalid-action exception publicFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-03-16Map .pp files to puppet lexerFlorian Pritz1-0/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-03-11Move upload button for small displaysFlorian Pritz1-1/+1
The uUpload button was not visible when using firefox in gnome on a laptop with 1366x768. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-03-09Update gentoo overlay URLFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-03-09Test: Prefix output with testcase nameFlorian Pritz2-2/+20
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-03-08Test: Improve exception handlingFlorian Pritz2-6/+21
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-03-08api/file/create_multipase: return URLFlorian Pritz3-2/+4
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-03-08Unify file/cron and mfile->valid_idFlorian Pritz4-49/+201
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-03-08Add mockeryFlorian Pritz2-0/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-03-08test: Fail on exceptionsFlorian Pritz2-1/+2
If we don't output a test plan prove will consider the test failed. The destructor would run when an uncaught exception is thrown so don't use a destructor to output the testplan. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-03-08autoloader: support multiple search pathsFlorian Pritz1-5/+10
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-03-02Add imagemagick supportFlorian Pritz9-197/+533
Adds additional support for imagemagick if GD doesn't support a file type and extends the files displayed as thumbnails to all images and pdf files. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-23upload_form: Support multiple textareas/files at the same timeFlorian Pritz2-75/+141
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-22Add comment for actions_max_age in configFlorian Pritz1-0/+3
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-22Fix upload_max_age commentFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-22s\files: rename add_file to add_uploaded_fileFlorian Pritz3-3/+3
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-19Add claiming of multipastesFlorian Pritz3-5/+19
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-15c/f/do_upload: simpilfy multipaste creationFlorian Pritz1-12/+1
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 Pritz2-2/+2
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-14Use assoc array for service/user/apikeysFlorian Pritz3-6/+10
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-14Fix typo in error messageFlorian Pritz2-2/+2
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-14Unify exceptions for unknown/invalid endpointsFlorian Pritz1-4/+4
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-10api: Require the version to start with vFlorian Pritz2-2/+9
Makes the URL easier to understand (especially the v1 case). Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-08Add tests for \s\f::verify_uploaded_filesFlorian Pritz1-0/+85
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-08Add tests for invalid loginFlorian Pritz1-0/+32
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-08tests: Fix php dev server being slowFlorian Pritz1-0/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-08Add more testsFlorian Pritz1-0/+36
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-08Improve testcasesFlorian Pritz1-48/+189
- create apikeys/users on demand (no magic numbers) - add some more testcases - extract api version into function - readability cleanup Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-08run-tests.sh: Clean up old database before running testsFlorian Pritz1-0/+4
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-06Add more testsFlorian Pritz2-2/+56
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-06fixup! Support database table prefixesFlorian Pritz1-8/+8
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-05Add simple testsuiteFlorian Pritz4-1/+258
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-05fixup! Support database table prefixesFlorian Pritz2-7/+7
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-05Improve error line information in Test-MoreFlorian Pritz1-4/+8
This finds the last frame before Test-More instead of using the topmost frame. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-05Make Test-More useable for our usecaseFlorian Pritz2-5/+6
Signed-off-by: Florian Pritz <bluewind@xinu.at>