summaryrefslogtreecommitdiffstats
path: root/application/models
AgeCommit message (Collapse)AuthorFilesLines
2016-07-13muser: Improve invalid action key error messageFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-13Fix typoFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-06-07mmultipaste->valid_id: Detect empty multipastes as invalidFlorian Pritz1-0/+4
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-05-24mfile/valid_id: Remove duplicate codeFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-05-24Fix TypeError when getting thumbnail for invalid IDFlorian Pritz1-0/+5
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-04-01Support rehashing of passwords not conforming to configFlorian Pritz1-0/+6
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-04-01muser: Add set_passwordFlorian Pritz1-0/+7
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-04-01Support changing password hashing settingsFlorian Pritz1-1/+6
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-03-29Catch potential password hashing errorsFlorian Pritz1-1/+5
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-03-29Use PHP's password_hash functionFlorian Pritz1-5/+1
This drops a third party library, but bumps our required php version to 5.5 which is currently old stable. Earlier versions are no longer supported by php upstream nor by us. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-09-20postgres: Fix multiple queries using MySQL syntaxFlorian Pritz1-6/+6
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-08-18Fix redirect URI when using multiple tabsFlorian Pritz1-12/+0
If we store only the last called URI in the session we can't support multiple browser tabs that all need to log in again. Fix this by storing the URI in the URL. Also change a trim() to ltrim() so that the URI string we store keeps it's trailing slash. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-08-10Increase thumbnail cache ttlFlorian Pritz1-0/+1
Also try to clean up when files are deleted since 1 month is a rather long time. Granted, thumbnails are small, but whatever Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-08-09Improve performance of thumbnail historyFlorian Pritz1-12/+16
- Use the filedata we already have in c/file->upload_history_thumbnails() rather than fetching it per id in m/mfile->valid_id - Construct the config array for s/f::valid_id only once and not for every validation. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-05-21Support multiple files with the same hashFlorian Pritz1-45/+38
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-04-08Cache filedataFlorian Pritz1-12/+15
This brings down render time of a multipaste with 180 items from ~180ms to ~80ms. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-04-01Refactor lexer code into dedicated classFlorian Pritz1-183/+0
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-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-08Unify file/cron and mfile->valid_idFlorian Pritz1-25/+18
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-02Add imagemagick supportFlorian Pritz1-9/+1
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-19Add claiming of multipastesFlorian Pritz2-0/+13
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-05fixup! Support database table prefixesFlorian Pritz1-6/+6
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-03Use exceptions instead of show_errorFlorian Pritz3-5/+5
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-03use function instead of variableFlorian Pritz1-2/+2
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-02-03generalize authentication handlingFlorian Pritz1-12/+10
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-11-08mfile->delete_id: Forgive if a dir doesn't existFlorian Pritz1-2/+4
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-11-03mfile->delete_id: Check for file before trying to unlinkFlorian Pritz1-1/+3
file->cron unlinks the file and then deletes the hash which causes an error in mfile->delete_id because the file no longer exists. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-11-03Simplify mfile->delete_hashFlorian Pritz1-31/+3
This probably increases the database queries a bit, but greatly simplifies the code and fixes the missing deletion of multipaste tarballs (delete_id handles that). Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-11-03Properly delete multipastes when deleting a single pasteFlorian Pritz1-4/+4
mmultipaste->delete_id() also deletes multipaste tarballs which would otherwise be left over Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-11-03Fix deletion of multipaste tarball when deleting a multipasteFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-11-02Add tarball support to multipastesFlorian Pritz1-0/+9
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-10-19Clean up the postgres changesFlorian Pritz1-6/+10
Style cleanup and some regression fixes Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-10-10Merge remote-tracking branch 'rafi/master' into rafiFlorian Pritz3-71/+77
2014-10-03Move thumbnail code to dedicated classFlorian Pritz1-172/+0
This also moves the code from mfile->image_dimension() to the only place where it was called. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-09-20thumbnails: Handle EXIF orientationFlorian Pritz1-0/+63
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-09-19Fixing multipaste delete queriesRafael Bodill2-38/+33
2014-09-19Fix user/register mistaken query handlingRafael Bodill1-1/+1
2014-09-19WIP: Cascading deleteRafael Bodill2-20/+40
2014-09-18Integrating query builder in modelsRafael Bodill2-51/+42
2014-09-11Fix black background in thumbnails with transparencyFlorian Pritz1-0/+6
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-08-29add multipaste supportFlorian Pritz2-32/+246
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-02-21Implement multiple access levels for api keysFlorian Pritz1-7/+12
This allows to use an api key to write a completly standalone client. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-01-21Disable automatic code display for SVG filesFlorian Pritz1-1/+0
People usually want to view them rather than read the code. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-01-10let GD itself determine what it can readFlorian Pritz1-14/+5
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-11-09use cache_function() everywhereFlorian Pritz1-6/+3
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-09-22Add some more file extension -> lexer mappingsFlorian Pritz1-0/+18
Mimetype detection doesn't always properly detect code (I saw javascript as plain text, c as asm) and if there is an extension we can likely get better result by using that. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-09-16Remove executable bitsFlorian Pritz1-0/+0
Signed-off-by: Florian Pritz <bluewind@xinu.at>