summaryrefslogtreecommitdiffstats
path: root/application/models
AgeCommit message (Collapse)AuthorFilesLines
2017-09-21Fix return checks for CI3Florian Pritz1-0/+4
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-09-18Migrate return code checks for CI3Florian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-09-09WIP: CI3 migrationFlorian Pritz3-0/+0
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-09-09Merge tag '3.1.5' into dev-ci3Florian Pritz1-1/+2
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-04-18Use === for some equality checksFlorian Pritz1-2/+2
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-11-05muser: Rename login_cli_client to login_api_clientFlorian Pritz1-10/+10
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-11-05Disable cli client login functionFlorian Pritz1-3/+4
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-11-01mmultipaste->delete_id: Fix inverted return valueFlorian Pritz1-1/+1
Broken in d2fdfc77f7a9485548869414d4377cd6848fe339 Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-08-21Remove unecessary whitespaceFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-08-21Improve coding style for return statements that only check one conditionFlorian Pritz2-20/+4
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-08-21muser: Add delete_user()Florian Pritz3-0/+78
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-08-21mfile->add_file: Take userid via argumentFlorian Pritz1-3/+1
This allows for easier testing. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-14muser: Add add_user functionFlorian Pritz1-0/+23
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-14Move username/email validation functions to muserFlorian Pritz1-0/+25
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-13Improve insufficient permisions error messageFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-13Add site URL to authentication errorFlorian Pritz1-1/+1
This might help users if they run their own installation, but forget to set the URL in the client config and then run into this error. Signed-off-by: Florian Pritz <bluewind@xinu.at>
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-15add <!DOCTYPE html>Tjoosten1-1/+2
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>