Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0
Graphe des révisions

117 commits

Auteur SHA1 Message Date
Ramon Dantas
1968d2ae54 Move translation func to template variables (#652)
* Add T field to template variables

* Remove languages.SetTranslationFromRequest

* Add Tfunc on handlers

* Remove T and Ts from template_functions

* Update templates

Change the templates to use the local Tfunc, instead of the global one.
Also changed the signature of the fields on template_variables.go, so that
they return a template.HTML to avoid escaping problems.

* Remove unnecessary variable
2017-05-21 08:38:28 +10:00
akuma06
cf478a4235 Add Torrent WebLink + fixes
Simplifying messages util (no need to add everytime r)
2017-05-20 17:01:13 +02:00
akuma06
369c9151f1 Merge remote-tracking branch 'refs/remotes/origin/dev' into multi-action-torrents-mod
# Conflicts:
#	router/modpanel.go
#	router/router.go
#	service/torrent/torrent.go
2017-05-20 13:58:37 +02:00
akuma06
0d5e2abf7f Added multi action on torrents 2017-05-20 13:45:15 +02:00
tomleb
babf0a37f0 Cleanups and fixes (#623)
* Keep naming consistent

* Remove execute bit from files

* Default to DefaultLanguage (without passing it to the func)

* Remove commented code

* Use Content-Type to get language json

* Lines of 400 characters is dumb

* Update new repo in README

* Remove useless script since we fallback to a defaultlang

* Fix fallback language panic

* Fix uninitialized MaxPerPage when not in querystr

The issue was that the req.MaxPerPage was not set (default to 0) when
the query string didn't include "max". This makes the server query the
whole db since the resulting limit is 0.

* Fix creating empty torrents (only worked once)

* Lines of 400 characters is still dumb
2017-05-19 12:55:59 +10:00
akuma06
88bf3c0573 Fix #570 2 2017-05-17 23:41:18 +02:00
PantsuDev
70f87e7aac finish repo transfer 2017-05-17 15:58:40 +10:00
Atvaark
cd844aec45 Replace 'en-us' literals with the default language
This consolidates the places where a default language has to be set.

- Removed import of the 'userService' package into the 'languages' util
  package
  This was required to prevent a cyclic import between the two packages.
- Added a 'UserRetriever' interface to read the language setting of users
  inside the 'languages' package
2017-05-14 22:10:07 +02:00
sfan5
b930997c68 Make sorting by date date work nicely 2017-05-14 17:35:10 +02:00
Mokhtar
a9019bb490 Fix search category filter when subcategory's length exceeds 1 character (#457)
* Fixed search category filter when subcategory's length exceeds 1 character

* Changed the subcategory's length check to not let the possibility to overflow
2017-05-14 14:03:04 +10:00
Atvaark
6e546facc0 Fix i18n file errors
- Fixed an error in the spanish and chinese translation file
- Refactored reading the translation files
  Instead of ignoring errors in the non-default language files
  the error will now be returned and the remaining files will
  not be loaded.
- Added a unit test to check if all translation files are valid
- Added an i18n config to specify the translations dir and the
  default language
2017-05-13 22:52:17 +02:00
PantsuDev
0ae488e7eb Merge branch 'dev' into dev 2017-05-13 12:24:55 +10:00
ElegantMonkey
dfd9caeb31 Add language selector without login 2017-05-12 19:17:34 -03:00
sfan5
c5fe70800d Disable CTEs and TSQuery for now 2017-05-12 19:38:08 +02:00
sfan5
38f23a3d7f Use ts_query on Postgres for performance reasons
Untested.
2017-05-12 17:41:26 +02:00
wranai
4b810494f3 Now really fixing the status filter (#354)
I managed to screw up in the last update. Normal is 0 and remake is 1, so that makes the "goodness" order of statuses non-monotonic, so I can't use the greater sign for filtering out remakes...
2017-05-11 14:46:23 -05:00
PantsuDev
1f383b06f5 Merge pull request #360 from majestrate/cache-interface
ReAdd cache
2017-05-11 23:42:34 +10:00
Jeff Becker
0e8a3cde3b Merge branch 'cache-interface' into merge-cache-interface 2017-05-11 09:24:20 -04:00
Eliot Whalan
521064b946 Add vary accept-language header 2017-05-11 23:12:19 +10:00
Jeff Becker
059ea7d2a8 abstract out cache 2017-05-11 09:01:53 -04:00
Eliot Whalan
c1cafb9d9a Remove broken caching stuff 2017-05-11 22:22:49 +10:00
akuma06
a17004360f Merge pull request #357 from majestrate/scraper
fixes
2017-05-11 13:50:46 +02:00
Jeff Becker
57895251a3 fix torrent swarm ordering and add timeouts for udp scrape 2017-05-11 07:40:50 -04:00
akuma06
9f2d0f1962 New translation function and time depends on translation 2017-05-11 13:15:52 +02:00
akuma06
e8774abf21 Updated search
When in a user page and clicked on more torrents, show a list navigable
of the user torrent
On that list, we can make advance search (categories, order, ...)

Moderation search reimplemented
Clicking on user (id) in the torrent list redirect to the list of the
user torrents
Ability to search within the user torrents
2017-05-11 03:52:42 +02:00
Eliot Whalan
65ee41a10b Add orderby seeders/leechers/completed 2017-05-11 10:26:58 +10:00
wranai
12bb79b4f5 Fixing the status filter for good (#326)
"Trusted" should include A+ (a.k.a "Trusted A+") torrents as well.
2017-05-10 18:13:54 -05:00
TUSF
cce29b5797 This is why I should test before committing.
Probably missed more...
2017-05-10 16:48:33 -05:00
TUSF
8677871e94 Made a typo with this extra close-parenthesis... 2017-05-10 16:45:47 -05:00
TUSF
d79ae33e0e Woops
Greater-than symbols were being filtered out by the sanitizer as they were saved to the database. Hopefully this will fix 'em. I considered using regexp, but thought that would be complete overkill.
2017-05-10 16:30:46 -05:00
Sirakain
6c479f33be Filter remakes excludes from SQL query, not A+ (#309)
Fixes #286
2017-05-10 16:09:38 -05:00
Ramon Dantas
c84140964b Add language selector (#298) 2017-05-10 14:45:39 -05:00
ayame-git
1bf4012eb2 yea.. 2017-05-10 21:42:20 +03:00
akuma06
45e6fc109f Edit profile unborked, please don't bork it anymore :'( 2017-05-10 20:24:37 +02:00
Jeff Becker
73f77f1624 properly handle os.Interrupt Signal
This makes systemd not put unit into fail mode when stopping

INFO:

* make sure to use signals.RegisterCloser for everything that should be closed on interrupt

* for any net.Listeners created make sure to wrap them with network.WrapListener and register with signals.RegisterCloser
2017-05-10 08:23:29 -04:00
bakape
58ca34132c cache: Add total torrent count and fixes 2017-05-10 12:32:49 +03:00
bakape
6bf7ee3438 Search query caching 2017-05-10 12:03:49 +03:00
Chris MacLeod
c9b72206a5 Consistency, formatting, error checking, cleanup, and a couple bug fixes (#245)
* Checkpoint: it builds

The config, db, model, network, os, and public packages have had some
fixes to glaringly obvious flaws, dead code removed, and stylistic
changes.

* Style changes and old code removal in router

Router needs a lot of work done to its (lack of) error handling.

* Dead code removal and style changes

Now up to util/email/email.go. After I'm finished with the initial sweep
I'll go back and fix error handling and security issues. Then I'll fix
the broken API. Then I'll go through to add documentation and fix code
visibility.

* Finish dead code removal and style changes

Vendored libraries not touched. Everything still needs security fixes
and documentation. There's also one case of broken functionality.

* Fix accidental find-and-replace

* Style, error checking, saftey, bug fix changes

* Redo error checking erased during merge

* Re-add merge-erased fix. Make Safe safe.
2017-05-09 21:34:40 -05:00
PantsuDev
9e09dff4d4 Merge pull request #223 from ElegantMonkey/load-translations
Load translations from folder
2017-05-10 06:45:33 +10:00
PantsuDev
d02672add8 Merge pull request #217 from sfan5/installgentoo
Various changes
2017-05-10 06:44:10 +10:00
ElegantMonkey
f1f86e8d6d Fallback to default language when a translation is missing 2017-05-09 15:25:56 -03:00
akuma06
bbffb24ae8 Merge pull request #214 from majestrate/make-rss-fast-again
make rss fast again
2017-05-09 18:53:57 +02:00
akuma06
8aa8a0593c Added delete account and edit profile 2017-05-09 17:47:12 +02:00
Jeff
18d6ad3992 make rss fast again :^) 2017-05-09 11:07:42 -04:00
sfan5
fb07da18ec Display uploader name with link to profile page 2017-05-09 16:21:56 +02:00
bakape
839bc46163 Workaround for SQLite search
At least we can test it in development now.
2017-05-09 15:31:47 +03:00
bakape
ec8bd90c4e Merge branch 'master' of https://github.com/ewhal/nyaa into refactor-search 2017-05-09 14:32:10 +03:00
bakape
a0ae1f7e6a Refactor search
Optimise, error handling and avoid some exploits
2017-05-09 14:31:58 +03:00
Eliot Whalan
3c018c4988 Move markdown stuff to it's own function 2017-05-09 17:28:29 +10:00
Eliot Whalan
66a2adecfc Merge branch 'less-realloc' of git://github.com/bakape/nyaa into bakape-less-realloc 2017-05-09 13:16:42 +10:00