summaryrefslogtreecommitdiff
path: root/util
AgeCommit message (Collapse)AuthorFilesLines
2018-09-29Add default spoiler level to tags and use it in spoiler calculationYorhel3-11/+18
https://vndb.org/t11296.3 (And I forgot to add update_20180929.sql in the previous commit)
2018-09-29Add default spoiler level to traits and use it on character editYorhel1-1/+2
https://vndb.org/t11296
2018-08-12Add 1600x900 resolutionYorhel1-0/+3
https://vndb.org/t950.481 Also, the resolution should really be stored as an ENUM in the database, this integer thing is waay too fragile.
2018-06-03Add development DB dump, remove old devdb, convert README to markdownYorhel7-420/+246
2018-05-25Add uncensored flag to release entriesYorhel2-2/+9
As discussed in https://vndb.org/t10665
2018-05-25Add privacy policy page - happy GDPR dayYorhel1-0/+4
2018-05-03Docker: Update to Ubuntu Bionic + Postgres 10 !ACTION REQUIRED!Yorhel1-3/+3
If you don't really care about the data in your Docker's Postgres DB, then you can just update with: docker volume rm vndb-data docker volume create --name vndb-data docker build --pull --no-cache -t vndb . If you do want to keep your data, the process is roughly as follows: - Do a pg_dumpall from your current docker image to save the data. - Run the above commands to upgrade - Import the database in the new docker image (cherry picked from commit c278eec720b78624580f844d8289ddb575035138)
2018-03-18Fix Docker init script for Mac + add some spacing around vndb-dev-server.pl ↵Yorhel2-10/+20
output
2018-02-08Store d+ pages in the DB as versioned entries + use markdownYorhel7-6/+137
This touches a bunch of things: - Adds a new first-class database entry type - Removes the d+.+.+ BBCode link syntax, adds a new d+#+ and d+#+.+ link syntax (references have been updated where possible) - Adds a new dependency on Text::MultiMarkdown
2018-02-07Use newline separation for producer aliasesYorhel1-0/+3
For consistency with the VN & character alias fields. It's also less ambiguous, as there are a few aliases that contain commas.
2018-02-04SQL: Load permissions after creating sequencesYorhel1-4/+4
Otherwise the vndb_site/_multi users won't have usage rights on those. Fixes https://vndb.org/t10218.6
2018-02-04Add "development database" for quick setup & testing purposesYorhel3-0/+350
+ a bit of tooling to make it work. The database was contributed by tigershark, with a few minor additions by me.
2018-01-12vndb-dev-server.pl: Properly propagate connection closeYorhel1-2/+2
Should fix https://vndb.org/t9425.11
2018-01-08BBCode: Fix parsing of tags in [something[url=..]Yorhel1-4/+6
https://vndb.org/t2520.233 The old bb2html() blindly replaced [url=..] anywhere inside the matched token, and did not require that the [url=..] was itself the token. I've made the tag matching more strict to make sure that [something[url=..] is now properly tokenized. This also affects other tags, so it's likely that there's some input that the old bb2html() would still have handled differently.
2018-01-06BBCode: Fix word boundary check when dblink is the first tokenYorhel1-0/+5
2018-01-06Add bb2text() and use it for release notes & open graph tagsYorhel1-8/+39
2018-01-06Rewrite bb2html() to be more flexibleYorhel1-0/+185
This is based on the API that I described in https://vndb.org/t5564.12 It's mostly bug-compatible with the old bb2html(), main differences: - <br /> -> <br> for no reason - Doesn't sporadically add a wrong </div> - $rmwhitespace now also after [/code] Most of the test cases were contributed by flan <flan@flande.re>
2017-12-29SQL: Don't inherit trait/tag childs if parent is mentioned directlyYorhel1-2/+7
Should fix https://vndb.org/t10082
2017-12-29Experimenting with PostgreSQL 10: "UNENCRYPTED" keyword has been removedYorhel2-4/+4
2017-12-09Add vndb-dev-server.pl, an autoreloading http serverYorhel3-1/+157
2017-12-09Add Docker configYorhel1-0/+87
2017-12-06Add instructions for running VNDB as standalone web serverYorhel1-0/+8
2017-11-26Add language: Bulgarian and Platforms: Nintendo Switch & Wii UYorhel2-2/+9
2017-11-25perms.sql: Revoke all permissions before re-assigningYorhel1-0/+2
This makes perms.sql the definitive place for all permissions assigned to these roles. The DROP OWNED does require superuser privileges, but that's alright - the statement is simply skipped when run as 'vndb'.
2017-08-14Remove useless NOT NULL in schema.sqlYorhel1-1/+1
2017-06-01Add script to remove unused imagesYorhel1-0/+108
This saves about 1GiB.
2017-04-21Add 1366x768 resolutionYorhel1-0/+3
https://vndb.org/t950.317
2016-12-01SQL: Fix adding vndb_multi role and grant on rlistsYorhel2-1/+4
2016-11-27SQL: Use separate role for Multi2.26Yorhel2-2/+69
2016-11-27SQL: Use separate role for the website + disallow access to user dataYorhel5-4/+206
Previously the website was connected to the database with a "database owner" user, which has far too many permissions. Now there's a special vndb_site user with only the necessary permissions. The primary reason to do this is to decrease the impact if the site process is compromised. E.g. it's now no longer possible to delete or modify old entry revisions. An attacker can still do a lot of damage, however. Additionally (and this was the main reason to implement this change in the first place), the user sessions, passwords and email data is now not easily accessible anymore. Hopefully, the new user management abstractions will prevent email and password dumps in case of an SQL injection or RCE vulnerability in the site code. Of course, this only works if my implementation is fully correct and there's no privilige escalation vulnerability somewhere. Furthermore, changing your password now invalidates any existing sessions, and the password reset function is disabled for 'usermods' (because usermods can list email addresses from the database, and the password reset function could still allow an attacker to gain access to anyone's account). I also changed the format of the password reset tokens, as they totally don't need to be salted.
2016-08-09Add Croatian languageYorhel2-1/+5
2016-07-31SQL: Improve trait cache update from 206 to 16 secondsYorhel3-4/+12
VNDB tends to get unresponsive for a few minutes when the daily cron is run. This should help somewhat.
2016-07-31Add Thai languageYorhel2-1/+5
2016-07-03Generalize substring search relevance + apply to most dropdown searchesYorhel2-0/+26
This is a generalization of the search improvements made in 7da2edeaa0f6cf7794f4f8f68960497dc1be893c and 92235222dba4e5d0c7713d53ef12e0f10e371b83 And has been applied to the dropdown searches for producers, staff, tags and traits. For all those searches, exact matches are listed first, followed by prefix matches, and then substring matches. Relevance is currently only based on the primary name/title and ignores aliases (except for staff). This is fixable, but not trivial, and I'm not sure it's all that useful.
2016-07-02Util::ValidateTemplates: Fix forgotten import of kv_validateYorhel1-1/+1
2016-07-02Validate release dates + move validation out of vndb.plYorhel1-75/+0
2016-02-15Add Tagalog languageYorhel2-1/+5
2016-02-12JS: Fix char_roles bug + CSS: Minor tweaks to main VN info layoutYorhel1-1/+1
2016-01-23L10N: Remove all remaining traces of the interface translation featureYorhel2-220/+0
...unless I missed something.
2016-01-17L10N: Intern all Javascript strings and rename main JS fileYorhel1-100/+4
This has been mostly automated.
2016-01-17L10N: Intern blood_types/genders/(char|staff)_roles/discussion_boardsYorhel1-4/+4
I definitely needed the Tie::IxHash thing for these.
2016-01-17Use Tie::IxHash for some global.pl listsYorhel1-3/+3
This removes the reliance on sort() to provide meaningful ordering (the keys aren't always good for ordering) and removes the 'order' hack used for (vn|prod)_relations.
2016-01-17L10N: Intern tag_cats/voiced/animated/*_statusYorhel1-3/+3
2016-01-16L10N: Intern languages/platforms/resolutions/media/ptype/rtype/vnlengthYorhel1-11/+8
2016-01-16L10N: Remove all translationsYorhel1-30/+2
TODO: Intern strings again to simplify the code. The immediate effect of this commit is that starting the util/vndb.pl script and generating the JS file is much faster now and that vndb.pl uses less memory. Translations have already been disabled on the main VNDB for a week now.
2016-01-10Use atomic replace when writing .gz assetsYorhel2-2/+8
2016-01-10Support zopfli/zopflipng for all static asset generatorsYorhel3-22/+25
Compresses a little better. I reduced the number of iterations required to find the optimal image size in spritegen.pl, but generating the icons.png is *incredibly slow* when combining zopflipng with the 'slow' option. It's possible to parallelize the calculation and use multiple cores to speed it up, but that seems overkill. Some icons.png compression stats: METHOD SIZE RUNTIME default 18103 <1sec slow 17941 few secs pngcrush 15385 <1sec pngcrush+slow 15148 few mins zopflipng 14986 few secs zopflipng+slow 14898 ~1 hour
2015-11-11Misc poll improvementsYorhel3-25/+46
- Merged polls table into threads table. Not much of a storage/performance difference, and it's a bit simpler this way. - Merged DB::Polls into DB::Discussions. Mainly because of the above change in DB structure. - Add option to remove an existing poll. - Allow preview and recast to be changed without deleting the votes - Set preview option by default. Because personal preferences. :) - Minor form validation differences
2015-11-10Merge branch 'master' into pollmorkt8-817/+1096
2015-11-01Switch to HTML5 doctype + s/acronym/abbr/ + s/&nbsp;/&#xa0;/eYorhel1-0/+4
I'd have preferred to stick with XHTML 1.0, but unfortunately browsers won't allow you to use modern Javascript APIs with an older doctype. Note that most pages don't actually validate correctly as HTML5, I'm relying on browsers to be lenient. In either case, I'd like VNDB to stay valid XML (XHTML5, then), and luckily that shouldn't be a problem.