summaryrefslogtreecommitdiffstats
path: root/application/controllers
AgeCommit message (Collapse)AuthorFilesLines
2016-07-14muser: Add add_user functionFlorian Pritz1-14/+2
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-14controller/user: Use our function for email verifcationFlorian Pritz1-2/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-14Move username/email validation functions to muserFlorian Pritz1-29/+4
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-14Fix incorrect username validation0.9.17Florian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-13Fix missing empty lines in chromium when copying codeFlorian Pritz1-2/+6
Chromium apparently requires a <br> or some text to be present for a line to be copied to the clipboard. Firefox interprets the \n at the end as line break and copies that if there is no content. Adding an explicit <br> makes chromium work correctly, but firefox still converts the \n. Fix this by putting the \n in an HTML comment. That way the output is still somewhat readable, but both browsers do the correct thing. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-13Fix double linebreaks when copying code in firefoxFlorian Pritz1-3/+3
Apparently firefox doesn't like html code in <pre> and adds incorrect linebreaks when copying the code. This does not happen with chromium. Fix it by switching to <code> instead of <pre>. Also change the CSS to refer to the element by class instead of by type so future changes are simpler. Not sure why, but in chroium changing the container element type breaks the ordering of the lines. Adding display: table to the .code-container fixes this. References: http://stackoverflow.com/questions/24851173/why-does-text-copied-from-a-set-of-pre-tags-have-double-line-breaks#comment41552816_26408656 Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-13Throw public exception when accessing CLI only functionsFlorian Pritz3-9/+7
We actually don't need to hide this from the user. The error should be shown rather than a blank page being returned. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-13controllers/user: Deduplicate email verificationFlorian Pritz1-5/+14
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-13controllers/user: Deduplicate username verificationFlorian Pritz1-2/+15
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-13Remove duplicate TODO for supporting multiple type for thumbnailsFlorian Pritz1-1/+0
Already in \libraries\Exif Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-12Add asciinema supportFlorian Pritz1-3/+7
This bypasses require.js for asciinema because apparently require.js can't deal with the embedded React library. The result is that React is not loaded properly and the asciinema player is unable to find it. Just load it like upstream tells you to. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-04Add popover with filenames of multipaste to historyFlorian Pritz1-0/+20
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-04service\files->get_multipaste_history: Add sort order from DBFlorian Pritz2-1/+10
Keep this field private for now. I may be exposed at a later time. The returned values are already normalized so they can be safely exposed. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-04file/history: Add support to display preview of entries on hoverFlorian Pritz1-0/+5
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-04Update API v2 version info to 2.1.0Florian Pritz1-1/+1
The documentation already refers to 2.1.0 and lists a new feature of the file/history endpoint, but requests for 2.1.0 are not yet accepted because the server doesn't know that it actually supports this version. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-06-12Switch to PHP based markdown renderer (parsedown)Florian Pritz1-4/+6
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-06-09Use PHP library for QR codesFlorian Pritz1-1/+5
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-06-07file/download: Delete invalid multipastesFlorian Pritz1-0/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-06-05Fix redirect on login after registering new accountFlorian Pritz1-0/+2
Previously the login box in the navigation would redirect to the current page, but this page will throw an error in the case of the registration page since that's the page with the invition key and that key is no longer valid. Fix this by redirecting to the $redirect_uri and ensure that this value is set for all requests. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-04-01muser: Add set_passwordFlorian Pritz1-4/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-11-02view/client: Hardcode URLsFlorian Pritz1-3/+0
Clients are only hosted on paste.xinu.at and everywhere else the links will point to missing files so they become useless. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-09-28Fix login redirect with multipate URLFlorian Pritz1-1/+1
The - from m-ID was missing in the regex. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-09-26f/cron: Fix missing field when deleting unowned uploadsFlorian Pritz1-2/+3
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-09-20postgres: Adapt MySQL query for thumbnail historyFlorian Pritz1-3/+3
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-09-20Implement migration 14 for postgresFlorian Pritz1-2/+7
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-09-20API 2.1: Add thumbnail link to historyFlorian Pritz1-0/+3
Also adjust test cases to check for the new value. API v1 does not change. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-09-14API 2.0: Remove private fields from file/historyFlorian Pritz3-0/+116
Since this is a breaking change bump the api version to 2. The private fields are user_id and multipaste_id which where leaked via the multipaste_items field. This commit also adds a test case to both api versions that checks the returned fields. NOTE: Most of this commit is copied from the files of api v1 so when viewing the diff use --find-copies-harder for an easy to read diff. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-09-14API 1.4: Add more values to file/get_configFlorian Pritz2-2/+3
These are necessary for clients that want to send lots of fields e.g. in a delete request or upload multiple files in one upload request. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-08-18claim_id: Support multiple upload batchesFlorian Pritz1-5/+13
If the user has multiple tabs open, but is not logged in this will be called multiple times (unless he logs in after the first upload batch) and earlier uploads would be lost. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-08-18Fix redirect URI when using multiple tabsFlorian Pritz1-7/+12
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-1/+2
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-1/+1
- 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-08-04Add audio and video players to multipastesFlorian Pritz1-1/+4
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-08-02Add PLS playlist support for multipastesFlorian Pritz1-0/+31
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-06-05Keep email reset keys after useFlorian Pritz1-2/+0
The user might click the wrong link or might change their mind and it is really not necessary to clean them up early. Let the cron job take care of that. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-06-05Allow users to change their emailFlorian Pritz1-2/+132
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-06-04Refactor exception handling into dedicated classFlorian Pritz2-2/+2
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-06-01Allow stderr for pygmentsFlorian Pritz1-1/+0
This happens when an invalid lexer is used so until we use the exceptions this should not be forbidden since we won't fall back to plain text then. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-05-28Improve running of external commandsFlorian Pritz1-11/+16
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-05-28Execute scripts directlyFlorian Pritz1-1/+1
No need to specify the interpreter twice. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-05-22Fix incorrect EXIF orientation on thumbnail history0.9.1Florian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-05-21\c\file::clean_stale_files: Increase robustnessFlorian Pritz1-3/+7
Delete files not matching our pattern and be forgiving if directories are cleaned up by mfile->delete_data_id. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-05-21Clarify variable usage in \c\tools->testFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-05-21tests: Rework database handlingFlorian Pritz1-2/+2
We no longer interfere with the normal installation's database settings. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-05-21tests: Make prove --state work; Restructure testsFlorian Pritz1-2/+5
This moves all tests into a subdirectory and lets prove itself figure out which tests exist. It seems if you supply the testlist via arguments or stdin --state won't affect the order. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-05-21Support multiple files with the same hashFlorian Pritz1-34/+42
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-05-03c/tools: Make non-cli request error publicFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-05-02Get supported image types from driversFlorian Pritz1-2/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-04-25API 1.3.0: Allow multipaste creation for basic accessFlorian Pritz3-3/+3
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-04-18Added config option max_invitation_keysAlexander Finkhäuser1-1/+1