summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2015-04-02Improve performance of pygments->mime2lexerFlorian Pritz2-8/+9
Normal arrays are rather slow when accessed sequentially. Use associative arrays and key lookups to reduce the render time of a multipaste with 180 items from 225ms to ~190ms. Signed-off-by: Florian Pritz <bluewind@xinu.at>
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-01Display authentication errors to cli clientsFlorian Pritz1-1/+5
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 Pritz2-7/+24
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 Pritz4-5/+62
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-08Update NEWSFlorian Pritz1-0/+3
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-08Fix background of lightbox for transparent imagesFlorian Pritz1-1/+1
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 Pritz3-0/+4
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-02Update NEWSFlorian Pritz1-0/+3
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-03-02Improve assertion handlingFlorian Pritz1-0/+8
Enable it explicitly and make sure a failed assertion will always terminate execution. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-03-02Add imagemagick supportFlorian Pritz10-197/+541
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 Pritz3-76/+179
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-22INSTALL: Mention upload_max_age explicitlyFlorian Pritz1-1/+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-15update NEWSFlorian Pritz1-0/+1
Maybe I remember to do it when merging next time... Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-15Merge branch 'api-rework' into workingFlorian Pritz88-461/+2987
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-08run-tests.sh: drop database in cleanupFlorian Pritz1-1/+1
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-08run-tests.sh: use trap to clean upFlorian Pritz1-5/+8
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-08tests: Remember previous state; print elapsed timeFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>