summaryrefslogtreecommitdiffstats
path: root/application/controllers
AgeCommit message (Collapse)AuthorFilesLines
2012-04-21Disable cache for upload_history for now.Florian Pritz1-1/+3
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-15upload_hstory: Initialize $lengths correctlyFlorian Pritz1-5/+16
If you only uploaded short filenames "Filename" could e longer than any filename, resulting in a broken table. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-14claim_id: Fix wrong variable nameFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-14cron: Remove expired, unowned filesFlorian Pritz1-4/+10
Unowned files expire whenever a session expires because the user won't be able to reclaim them anymore. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-14Allow to keep and reclaim uploads without being logged inFlorian Pritz1-5/+21
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-0/+2
It won't work anyway. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-13Add nuke_id() commandFlorian Pritz1-0/+26
This can be used to remove an ID and all other IDs referencing the same hash. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-13Add do_paste() and remove ajax from upload_formFlorian Pritz1-5/+39
If the session has timed out, javascript will get the login page and try to redirect to "base_url/$htmlcode" which will obviously fail. Instead of fixing the js code, reintroduce do_paste and use it. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-11Add filesize to history viewFlorian Pritz1-1/+32
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-11Show confirmation after loginFlorian Pritz1-0/+4
Some users might expect confirmation emails, but we don't send those (yet?). Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-09user/register: restrict username to max 32 charsFlorian Pritz1-1/+1
The db field is 32 chars long. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-09user/register: restrict username to a-z0-9Florian Pritz1-2/+2
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-09add register functionFlorian Pritz1-0/+73
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-09Implement simple referral systemFlorian Pritz1-0/+49
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-09Move is_cli_client() and random_id() to helperFlorian Pritz2-2/+2
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-09c/file: Style changesFlorian Pritz1-1/+3
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-09c/file: remove old commentFlorian Pritz1-2/+0
It doesn't really apply anymore. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-09Redirect to / if log in successfulFlorian Pritz1-4/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-09upload_form(): don't require a userFlorian Pritz1-2/+0
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-09muser: fix handling of cli clients without accountFlorian Pritz1-9/+2
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-09declare used class variablesFlorian Pritz1-0/+3
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-09do_upload(): fix errors if no file was uploadedFlorian Pritz1-1/+6
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-09Revert "Disable paste box"Florian Pritz1-1/+2
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-09improve page titlesFlorian Pritz1-4/+5
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-09more user changesFlorian Pritz2-47/+43
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-09start working on usersFlorian Pritz2-18/+113
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-09Set 404 if a paste doesn't existFlorian Pritz1-0/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-09Disable paste boxFlorian Pritz1-2/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-02Fix "Unknown ID" typoFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-02-19move stale file removal to it's own functionFlorian Pritz1-5/+9
This shouldn't be needed and it's also pretty slow. No need to run it with ever cronjob. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-02-19file/cron: make accessible via CLI onlyFlorian Pritz1-1/+6
In production environments the cronjob might run quite some time and could be used to overload the server. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-02-19file/cron: close dir handles after useFlorian Pritz1-0/+3
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-02-19file/cron: clean up stale filesFlorian Pritz1-0/+33
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-01-25strip base64 decoded file of special charsFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-01-25allow client to overwrite filenameFlorian Pritz1-1/+12
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-12-18only calculate field lengths for cli clientsFlorian Pritz1-5/+7
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-12-18remove parameter of client()Florian Pritz1-4/+4
Parameters of controller functions are treated as url parameter so file/client/0 would also disable the headers. The cli client has empty headers anyway so just check that. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-12-18display more information on delete_formFlorian Pritz1-0/+6
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-12-17use perl from PATH and copy markdown.pl to scripts/Florian Pritz1-0/+3
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-12-17use migrations; automatically set up the databaseFlorian Pritz1-0/+6
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-11-18don't display "latest client" link if there is no clientFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-09-15remove leftover codeFlorian Pritz1-2/+0
do_paste has been remove in b8fb38927fd2cc25f6748cff51b7de94e3082701 Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-09-13fix undefined variables in upload_form when using a cli clientFlorian Pritz1-4/+11
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-09-11properly initialize $lengths arrayFlorian Pritz1-5/+6
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-09-11add upload_history pageFlorian Pritz1-0/+48
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-08-19hide "Latest release" on client page if there is noneFlorian Pritz1-1/+3
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-08-19move inclusion of file_plaintext/client view to controllerFlorian Pritz1-2/+3
This allows me to remove redundant variable definition from upload_form() since the same code is in client(). Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-08-19make "contact me" on the main page optionalFlorian Pritz1-0/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-08-19fix warning if data/client/latest doen't existFlorian Pritz1-1/+3
Signed-off-by: Florian Pritz <bluewind@xinu.at>