summaryrefslogtreecommitdiff
path: root/lib/VNDB/DB
AgeCommit message (Collapse)AuthorFilesLines
2015-10-03Rewrote screenshot uploader to support multiple files + use jsonYorhel1-1/+1
This might have broken the screenshot uploader on some crappy browsers, but it's much cleaner than the old iframe hack. The ability to upload multiple files in one go is also very convenient.
2015-09-17Created json_validate() for JSON form data, used for Staff alias editorYorhel1-6/+5
The intention is to move more JS editing forms to use JSON, but manually verifying JSON objects is both painful and likely to introduce errors or vulnerabilities. json_validate() is a bit of a hack, but has the advantage that its validation syntax is the same as for normal forms, and it automatically strips whitespace. I intent to give kv_validate() an upgrade to be more flexible/modular so it can do more custom normalization. But that's for later. I've been meaning to rewrite the JS forms anyway together with the large JS rewrite, but I'm rather lazy. This is one small step in the right direction anyway. Note that json_validate() assumes that the JS code will provide user-friendly messages on bad input, but the staff alias editor doesn't quite do this yet.
2015-09-07Handler::Discussions: Fix two bugs introduced in last commitYorhel1-1/+1
2015-09-07Handler::Discussions: Use ts_headline() to format search resultsYorhel1-2/+20
And also fix strip_bb_tags() to be case-insensitive and fix a bug in converting the query into a tsquery.
2015-09-07Implement discussion board search functionYorhel1-5/+16
Inspired by wakaranai's implementation at https://github.com/morkt/vndb/commit/b852c87ad145fdaaa09c79b6378dd819b46f7e87 This version is different in a number of aspects: - Separate search functions for title search and fulltext post search. Perhaps not the most convenient option, but the downside of a combined search is that if the query matches the threads' title, then all of the posts in that thread will show up in the results. This didn't seem very useful. - Sorting is based purely on post date. Rank-based sort is slow without a separate caching column, and in my opinion not all that useful. Implementation differences: - Integrated in the existing DB::Discussions functions, so less code to maintain and more code reuse. - No separate caching column for the tsvector, a functional index is used instead. This is a bit slower (index results need to be re-checked against the actual messages, hence the slowdown), but has the advantage of smaller database dumps and less complexity in updating the cache. Things to fix or look at: - Highlighting of the search query in message contents. - Allow or-style query matching
2015-09-06SQL: Convert threads_board.type to ENUMYorhel1-2/+2
The char(2) solution is both inefficient and ugly. Also needed to be careful with handling the extra space that Postgres would automatically add to single-character types.
2015-08-08Add sexual trait toggle to character informationYorhel1-1/+1
It's not a preference yet and the sexual traits are still visible by default. I'll fix that later.
2015-06-15d7: Replace "top 5 contributors" with "special users" listingYorhel1-1/+4
Having a proper and up-to-date list of moderators is an often requested feature.
2015-02-16Various staff improvementsmorkt1-1/+2
(Quoting mail:) - character list is sorted by name in cast edit form (managing of the huge lists like v6458 becomes slightly easier); - display number of characters voiced on seiyuu page; - display a notice in staff edit form when primary name could be changed.
2015-02-14DB::Staff: Filter out hidden VNsmorkt1-4/+4
2015-02-14Revamp staff alias editing interface + fix reverting removed aliassesmorkt1-1/+12
The new alias editing interface makes it a lot easier to change the primary name.
2015-02-04Add spoiler settings to /v+/staffmorkt1-1/+1
2015-02-04DB::Staff: Fix role filter bugmorkt1-2/+2
2015-02-02dbVNHasChar(): Fix bug with hidden/deleted charactersYorhel1-1/+1
2015-02-02Add filters to staff browsers + minor layout fix on staff pagesmorkt1-1/+19
2015-01-28Hide spoilerous characters from the VN staff pages by defaultYorhel1-1/+2
To fix an issue mentioned in <https://vndb.org/t6138.15>. Yay for writing patches on the live site.
2015-01-28Merge branch 'staff' into masterYorhel4-10/+9
Conflicts: lib/VNDB/DB/VN.pm lib/VNDB/Handler/VNPage.pm
2015-01-17DB: No need to use double-%% in like queriesYorhel3-3/+3
2015-01-17staff: Fix search to ignore spaces in Japanese namesmorkt1-1/+6
2015-01-17Fix bug with language icon not being displayed for release in user listmorkt1-6/+5
This happened when a release was linked to multiple visual novel entries, the language icon would show on one VN but not on the other.
2015-01-12staff: Remove some remnants of the staff imagesYorhel1-1/+1
2015-01-04staff: Add some link fields and guidelinesmorkt1-2/+2
2015-01-02staff: Fix duplicate listing of seiyuu for chars with multiple releasesYorhel1-3/+3
This unfortunately means I had to remove the order-by-character-role feature. It's possible to get that back, but it's not quite as trivial.
2015-01-02staff: Fix deleting of staff + use JSON to pass data + minor fixesmorkt2-4/+7
2014-12-28staff: Import cast from other VN + some styling + more improvementsmorkt3-4/+19
2014-12-28More progress on the staff + cast DBmorkt3-30/+41
2014-12-24Further progress on the staff databasemorkt2-3/+17
- Moves staff<->vn linking form to the main VN edit form - Fixes a bug with linking staff aliases to VNs - Adds staff changes to the VN revisions - And some misc. improvements
2014-12-22DB: Merge name/title fetching in main fetching functionsYorhel4-41/+8
And call bbSubstLinks() from Handler::Discussions rather than DB::Discussions - it's not a transformation that the DB layer should do, IMO.
2014-12-22bbcode: Replace [vcpgi][0-9]+ links with a [url] tagmorkt4-4/+38
Patch from https://vndb.org/t5564.13
2014-12-22Initial implementation of a staff/seiyuu databasemorkt4-7/+181
2014-12-02Completely drop l_vnn column from VN infoYorhel1-2/+2
Used to link to a visual-novels.net review or something. Links have been hidden and dead since ages. No need to keep the column around.
2014-10-16Hash session tokens with SHA-1 when storing in DBYorhel1-4/+4
This ensures that, if an attacker evers gets read access to the database, he will not be able to compromise any accounts. SHA-1 suffices here, because the data being hashed is a random 20 byte string. The search space is so damn large that you can't sanely brute force it, nor are rainbow tables any use at that scale. They're not salted. The password reset tokens are also hashed in the database and do include salt, but I've no idea why we did that.
2014-10-15SQL: Merge users.(passwd|salt) in one column + document valuesYorhel1-9/+7
It doesn't make a whole lot to separate the hashed password and the salt from each other, you need both to do anything with them, and from the database perspective they're both completely opaque strings only usable for direct comparison with other hashed strings. This change is mostly as preparation for switching to a proper key derivation function (sha256 isn't...) and to add support for longer and/or binary salt. Because the passwd field now needs to be interpreted in Perl, it's being passed around as a binary string rather than a hex-encoded value. API login is broken in this commit. I'll get to that.
2014-10-13SQL: Use enum to represent platformsYorhel1-3/+3
I believe I didn't do this conversion earlier (back when I converted the language types) because PostgreSQL didn't support dynamically adding new values to an existing enum back then, and modifying an enum was a huge pain. Recent versions do support this, so there's no reason to keep it as a string. ...I just felt like adding some churn to the code base.
2014-10-11SQL: Convert login_throttle.timeout to a timestamptzYorhel1-3/+3
Easier to work with in custom queries.
2014-08-29Throttle failed login attempts (10/day)Yorhel1-0/+16
2014-03-14DB::Releases: Fix mixing AND/OR expressions in platform/media filtersYorhel1-4/+4
Fixes http://vndb.org/t5136
2013-03-09Allow only one account registration per /48 IPv6 block per dayYorhel1-1/+1
I think this is the only thing necessary to add full IPv6 support to VNDB. It's not actually necessary, but without this modification it will become way too easy to flood the site with new accounts.
2013-01-21Added "unknown medium" release filterYorhel1-2/+5
2013-01-21Added "unknown platform" release filterYorhel1-2/+5
2013-01-05Screenshot uploader: Load stuff synchronously + removed processing flagYorhel1-1/+1
All the async stuff isn't necessary now that images are processed synchronously.
2013-01-05Don't use Multi for processing screenshotsYorhel1-2/+2
TODO: Get rid of the 'processing' flag and all the async loading of screenshot data in the screenshot uploader.
2012-07-28DB::Releases: Use id as secondary order when sorting on dateYorhel1-1/+1
This is under the assumption that earlier releases are added earlier, even when they're released on the same date. (E.g. in the case of v9678)
2012-07-24DB::VN: Use subquery join for obtaining rlist status infoYorhel1-18/+11
I rather dislike GROUP BY on a large query and scary combinations of LEFT JOINs and regular JOINs. As expected from Postgres, subquery joins are quite fast. :D
2012-07-24Add wishlist / VN list status options to VN list browserSpaceRanger1-2/+23
2012-07-13Various improvements with the releases tableSpaceRanger1-4/+10
2012-01-10Allow one fractional digit for VN votesYorhel1-5/+6
The interface to set a non-integer vote isn't very nice, but at least it works. Or so I hope.
2011-12-29Added duplicate check when adding VNsYorhel1-2/+2
2011-12-29DB::VN: Add secondary order on title when sorting by release dateYorhel1-1/+1
2011-10-24Added 'role' filter to character browserYorhel1-1/+4