summaryrefslogtreecommitdiffstats
path: root/application/models
AgeCommit message (Collapse)AuthorFilesLines
2013-07-15user/test_login: Allow clients to test login credentialsFlorian Pritz1-0/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-07-14get_upload_id_limits(): return proper default valuesFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-07-13Add profile page to allow changing the upload id limitsFlorian Pritz1-0/+59
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-07-13duser: add get_email()Florian Pritz1-0/+9
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-07-07Add .coffee extension mappingFlorian Pritz1-0/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-06-27mfile: Add some more ocaml extension mappingsFlorian Pritz1-0/+3
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-06-22mfile: extension -> lexer mapping; mark some functions publicFlorian Pritz1-4/+20
Also assure that autodetect_lexer always returns false if the file can't be highlit. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-06-08mfile/new_id(): rewrite as loop and make min/max parametersFlorian Pritz1-6/+12
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-05-09Change description for "text" in lexer listFlorian Pritz1-0/+1
Pygments calls it "Text only", but users are more likely to search for "plain" than "only" so won't find it in the dropdown. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-04-18new_id(): improve id blacklistFlorian Pritz1-1/+9
We shouldn't use dir or filenames from the top directory as IDs because they won't work if you use mod_rewrite. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-02-23CLI: update_file_metadata: also update mimetypesFlorian Pritz1-2/+9
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-02-14Move cli client login code to muser constructorFlorian Pritz1-0/+21
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-02-13Change license to AGPLFlorian Pritz2-2/+2
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-02-08Add some mimetypes and sort the listFlorian Pritz1-32/+41
fileinfo uses some different mimetypes than File::MimeInfo. This tries to add most of those that are currently on paste.xinu.at. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-02-04Handle text/x-diff MIME typeFlorian Pritz1-0/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-02-03Use php's fileinfo instead of perl to detect mimetypeFlorian Pritz1-1/+3
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-02-02Add tex highlightingFlorian Pritz1-0/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-01-30Remove userid from session upon logoutFlorian Pritz1-0/+1
No necessary, but better safe than sorry. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-01-30Modularize authentication systemFlorian Pritz1-37/+3
This allows to easily add LDAP and other support. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-01-25Refactor querying action tableFlorian Pritz1-0/+16
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-01-24m/user/username_exists: fix bug on empty/false argumentFlorian Pritz1-0/+4
username_exists(false) returned true because the condition matches any existing user. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-01-09Fix some indentation issuesFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-01-09Fix copyright informationFlorian Pritz2-1/+8
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-10-22switch design to bootstrap; minor fixes along the wayFlorian Pritz1-0/+21
Initial-work-by: Oliver Mader <b52@reaktor42.de> Additional-work-by: Markus Cisler <mrkscslr@gmail.com> Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-10-09Rename $mode to $lexerFlorian Pritz1-16/+16
Pygments calls it that and mode was an undescriptive name anyway. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-09-11file/cron: always remove stale filesFlorian Pritz1-0/+5
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-09-09m/file: add text/x-tcl to autodetectionFlorian Pritz1-0/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-08-28Only create new sessions when the are really neededFlorian Pritz1-3/+38
Most sessions are just people viewing a paste. Those don't need a session until they want to log in so we don't have to pollute the database and waste resources. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-08-16switch to pygmentsFlorian Pritz1-2/+2
- faster than geshi - easier to modify the css because there is only one - geshi upstream seems pretty dead Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-08-09rename file_mod to mfileFlorian Pritz1-1/+1
Muser already uses this scheme as it is easier to type. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-07-12Explicitly select fields in db queriesFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-07-12Store userid in sessionFlorian Pritz1-6/+2
We don't really have to hit the db here every time. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-07-12Display nice error message if username exists alreadyFlorian Pritz1-0/+15
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-05-17Move some functions from file_mod to file controllerFlorian Pritz1-207/+7
Models shouldn't really call views Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-05-17improve is_cli_client() and use everywhereFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-05-15Ignore etags when displaying HTML pagesFlorian Pritz1-1/+3
This allows the html page to change (user logged in/not logged in), but still keeps etag support for content that's really going to stay the same (images, plain file content, qr codes for urls) Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-05-12fix missing object initialization and properly declare class variablesFlorian Pritz1-1/+1
var is deprecated since ages and in strict mode we have to initialize $this->var as a generic object before using it. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-05-03add ID/info to display more information about a fileFlorian Pritz1-10/+37
The table is shared with the old delete_form, but it doesn't display the delete button in info mode. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-05-01move file link generation from controller to viewFlorian Pritz1-6/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-05-01move etag handling into handle_etag()Florian Pritz1-27/+23
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-14Make sure we keep the uri flashdataFlorian Pritz1-0/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-14Allow to keep and reclaim uploads without being logged inFlorian Pritz2-3/+38
If a user keeps the browser open until his session expires and then tries to upload something we now add it to the database, add the ID to the new session and when someone logs in with that session the ID is assigned. Until then even if you guess it correctly, you won't be able to download it. If the user still manages to let the 2nd session expire because he can't find his password, the upload will be lost. Shit happens. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-13Hide delete button if user doesn't own the idFlorian Pritz1-1/+1
It won't work anyway. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-12CSP: add unsafe-inline to style-srcFlorian Pritz1-1/+1
chromium rejects inline css with this. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-11Use phpass for password hashingFlorian Pritz1-2/+5
The current implementation sometimes failed to generate valid hashes (had something to do with the random salt). Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-11Fix password verificationFlorian Pritz1-1/+9
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-11Add filesize to history viewFlorian Pritz1-3/+4
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-09muser: decrease cost parameter for cryptFlorian Pritz1-1/+1
09 should take long enough and not waste too much time. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-09random_id() -> random_alphanum(); allow single argumentFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-09Move is_cli_client() and random_id() to helperFlorian Pritz2-30/+3
Signed-off-by: Florian Pritz <bluewind@xinu.at>