Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
This brings down render time of a multipaste with 180 items from ~180ms
to ~80ms.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
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>
|
|
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>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
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>
|
|
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>
|
|
mmultipaste->delete_id() also deletes multipaste tarballs which would
otherwise be left over
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Style cleanup and some regression fixes
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
|
|
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>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
|
|
|
|
|
|
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
This allows to use an api key to write a completly standalone client.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
People usually want to view them rather than read the code.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
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>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
This fixes a possible endless loop when the function is not implemented
in the driver, but the array says it is.
It also allows us to simply call it without checking if it's
implemented.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Stateless clients (cli client and clients using api keys) can't reclaim
IDs (no cookie) so they should be required to log in asap and they will
always get an error if they didn't log in.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
This reduces the amount of db queries and cookies we create since each
update triggers an db update and (which is a bug) sets a new cookie.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
This saves us 2 to 4 (useless) db queries per page.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
We expect the controller to take care of that, no need to double check.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
This supports more caching backends and doesn't force users to install
the memcache extension.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
We don't need it and getting the user name from the user drivers is way
more complicated.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
cron code already handled this correctly, valid() didn't.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Only login when necessary.
This also makes test_login() work properly (before the automatic login
would have intercepted the failure and in case of a good login
test_login() would test the credentials a second time.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|