Age | Commit message (Collapse) | Author | Files | Lines |
|
There's a lot more unreferenced code in VNDB::DB::*, but I'll not spend
too much effort cleaning that up right now. All of it can be deleted
in bulk at some point.
|
|
This is mostly a copy-paste of the Char::Edit form.
|
|
Ought to simplify the image flagging UI.
|
|
The original intention was that this list of common VNs most people have
played would be used for comparison to determine the length. But
nowadays there barely any such "well-read" VNs and even then it hasn't
been a very reliable approach anyway. Let's just stick with the time
indication.
|
|
|
|
|
|
Part one in converting data/global.pl lists into a separate VNDB::Types
module. This is basically what I had started with VN3::Types, but it
looks like a gradual rewrite/cleanup may be more successful. At least
it'll be more useful on the short term.
|
|
The fields are still there in order to keep the edit history somewhat
sensible, but we don't need this additional code.
|
|
A rather common mistake made by people who don't read.
|
|
+ Automatically fetch other links from Wikidata
|
|
https://vndb.org/t950.521
|
|
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
|
|
|
|
The names of the staff were fetched from the existing VN entry, so any
newly added staff were not present in that list, and would thus not
show up when the form validation failed.
This fix makes sure to always fetch the required data from the database.
|
|
- Exact match is now case-insensitive
- Main staff search supports exact match with =-prefix
- On VN edit dropdown: exact matches are sorted before other matches
- VN edit dropdown now also displays original name
|
|
Most of these replacements were automated. This ended up being less
work than I had anticipated.
I also fixed a few minor bugs along the way, but probably introduced
more than I fixed.
|
|
With some related edits in other parts of the code, mostly due to
interface changes to htmlRevision() and htmlFormError().
Trivial replacements were automated by a super awesome script.
|
|
I definitely needed the Tie::IxHash thing for these.
|
|
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.
|
|
Now that graphviz knows the actual strings, it has a better opportunity
to create better graphs.
(Most of them still look messy tho)
|
|
|
|
The comment already suggested this:
I wonder whether it's better to just ask database for character list
instead of doing this manual group/sort
So yeah, let's just do that.
|
|
|
|
|
|
This changes quite a bit to the way the editing functions work. Because
these functions are very repetitive and it's easy to keep things out of
sync, I created a script to generate them automatically. I had to rename
a few function and table names for consistency to make this work.
Since database entries don't have a 'latest' column anymore, and since
the order in which tables are updated doesn't have to be fixed, I
dropped many of the SQL triggers and replaced them with a
edit_committed() function which is called from edit_*_commit() and
checks for stuff to be done.
Don't forget to run 'make' before importing the update script.
|
|
This basically makes VNDB browsable again, but editing entries is still
broken.
I split off the get-old-revision functionality from the db*Get() methods
into db*GetRev(). This split makes sense even with the old SQL schema:
db*Get() had to special-case some joins/filters when fetching an older
revision, and none of the other filters would work in that case. This
split does cause some code duplication in that all db*GetRev() methods
look very much alike, and that the columns they fetch is almost
identical to the db*Get() methods. Not sure yet how to avoid the
duplication elegantly.
I didn't do a whole lot of query optimization yet (most issues require
extra indices, I'll investigate later which indices will make a big
difference), but I did fix some low hanging fruit whenever I encountered
something.
I don't think I've worsened anything, performance-wise.
|
|
Adds slightly more strict validation and simplifies further processing.
|
|
|
|
No more need for extra json_encode/json_decode calls, and the
form_compare() function is more lenient w.r.t. integer/string
comparison.
This is the improvement I described in commit
ed86cfd12b0bed7352e2be525b8e63cb4d6d5448
|
|
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.
|
|
|
|
|
|
This is less convenient than I had expected, because all the form
handling code is designed to work with plain strings rather than any
scalar. This means the json data has to be encoded again to get into
$frm (not doing this means that, if the form didn't validate, the field
won't be filled out correctly). And then decoded for validation, and
then encoded again for comparison.
I suspect the better solution is to fix the form handling code to handle
arbitrary data structures: comparison can be done by deep comparison
rather than a simple string compare, and the form generator can
auto-encode-to-json if it sees a complex object.
Another advantage of this solution is that the comparison function can
be less strict with respect to number formatting. In the current scheme
you have to be very careful that numbers are not automatically coerced
into string format, otherwise the comparison will fail.
Either way, that's an idea for the future...
|
|
|
|
And added new 'page' and 'id' templates for more strict validation.
|
|
This (only very slightly) simplified further processing of the data. It
does add more validation than was present: Previously it was possible to
send invalid roles (would give a 500) or invalid numeric IDs (would
throw some perl warnings). These issues are now handled earlier on. This
change also puts a maximum length on the notes field, but nobody has
passed the 300 characters so far.
|
|
CamelCase is used for methods, C-style names for functions. I'm just
nitpicking now.
|
|
First part of a Javascript cleanup.
|
|
Apparently, imagemagick's Flatten() has some odd corner cases where it
seems to do more than just remove the alpha layer. The current approach
is the one recommended by the official docs:
http://www.imagemagick.org/Usage/masking/#remove
|
|
Same as 2f61c4f6772f852f9e0b9ede6228de4e4dbf71a0
|
|
|
|
|
|
Another bug related to query limits. It's become a common theme now.
|
|
|
|
|
|
|
|
Same reasoning as 0d191b5cd8c79eef3cef63c40ded96506a40382a
|
|
|
|
|
|
- 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
|