summaryrefslogtreecommitdiff
path: root/lib/VNDB/Handler/VNEdit.pm
AgeCommit message (Collapse)AuthorFilesLines
2020-07-19Delete old VN edit form + some other unreferenced codeYorhel1-541/+0
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.
2020-06-29VN::Edit: Start rewrite of the VN edit formYorhel1-4/+4
This is mostly a copy-paste of the Char::Edit form.
2020-03-12SQL: Keep track of dimensions for all images in the DBYorhel1-2/+2
Ought to simplify the image flagging UI.
2019-09-13Remove the VN length examples (+ some cruft I forgot earlier)Yorhel1-2/+2
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.
2019-09-11VNDB::Types: Convert vn_lengths, anime_types and tag_categoriesYorhel1-2/+2
2019-09-11VNDB::Types: Convert vn_relations and prod_relationsYorhel1-3/+3
2019-09-11VNDB::Types: Convert staff_roles into %CREDIT_TYPEYorhel1-1/+2
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.
2019-09-02Minor cleanup of l_wp/l_encubed link codeYorhel1-5/+2
The fields are still there in order to keep the edit history somewhat sensible, but we don't need this additional code.
2019-08-22Reset "original" field if it is the same as "title" or "name"Yorhel1-0/+2
A rather common mistake made by people who don't read.
2019-08-09Replace Wikipedia links with Wikidata IDsYorhel1-6/+11
+ Automatically fetch other links from Wikidata
2018-10-31VNEdit: Remove "import cast" functionalityYorhel1-9/+0
https://vndb.org/t950.521
2018-02-08Store d+ pages in the DB as versioned entries + use markdownYorhel1-1/+1
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
2016-10-16Support more than 100 characters per VNYorhel1-1/+1
2016-07-31Handler::VNEdit: Fix bug with new staff/cast being removed on form errorYorhel1-6/+5
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.
2016-07-03Various staff search improvementsYorhel1-2/+2
- 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
2016-01-23L10N: Intern all VNDB::Handler::* stuffYorhel1-51/+74
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.
2016-01-20L10N: Intern all VNDB::Util::* stuffYorhel1-4/+4
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.
2016-01-17L10N: Intern blood_types/genders/(char|staff)_roles/discussion_boardsYorhel1-1/+1
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 VN/producer relations + update relation graphsYorhel1-1/+1
Now that graphviz knows the actual strings, it has a better opportunity to create better graphs. (Most of them still look messy tho)
2016-01-16L10N: Intern languages/platforms/resolutions/media/ptype/rtype/vnlengthYorhel1-2/+2
2015-11-28VNPage: Generalize seiyuu listing to character summary listingYorhel1-1/+1
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.
2015-11-01Handler::VNEdit: Also increase size of title fields in VN add formYorhel1-2/+2
2015-10-28Handler::(Releases|VNEdit): Increase width of title/orig input fieldsYorhel1-2/+2
2015-10-21SQL: Fix editing + func.sql + triggers.sql + autocreate editing funcsYorhel1-7/+7
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.
2015-10-17SQL: Fix all browsing queries to use the new schemaYorhel1-1/+1
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.
2015-10-03formValidate: Add json_(maxitems|unique|sort) options to json templateYorhel1-33/+10
Adds slightly more strict validation and simplifies further processing.
2015-10-03js: Minor fixesYorhel1-1/+1
2015-10-03Handle JSON data natively when processing form dataYorhel1-23/+16
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
2015-10-03Rewrote screenshot uploader to support multiple files + use jsonYorhel1-27/+23
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-10-01VNEdit: Give error on duplicate alias + improved msg on id/page errorYorhel1-8/+8
2015-09-20Fix handling of empty seiyuu/credits fieldsYorhel1-2/+2
2015-09-20formValidate: Add json template and remove json_validate() functionYorhel1-16/+15
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...
2015-09-20formValidate: Created templates for gtin and editsum fieldsYorhel1-2/+1
2015-09-20Update usage kv_validate() to upcoming TUWF 1.0Yorhel1-8/+5
And added new 'page' and 'id' templates for more strict validation.
2015-09-17Handler::VNEdit: Use json_validate() for the VN staff/cast dataYorhel1-36/+38
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.
2015-09-17Rename jsonEncode/Decode to C-style namingYorhel1-6/+6
CamelCase is used for methods, C-style names for functions. I'm just nitpicking now.
2015-08-10Split script.js into multiple smaller filesYorhel1-0/+2
First part of a Javascript cleanup.
2015-07-18Handler::(VNEdit|Chars): Fix removal of alpha layer in imagesYorhel1-1/+2
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
2015-07-12Handler::VNEdit: Use better resizing algorithmYorhel1-1/+6
Same as 2f61c4f6772f852f9e0b9ede6228de4e4dbf71a0
2015-02-03Conditionally append char IDs in seiyuu editor + minor fixesmorkt1-1/+8
2015-01-28Apply bbSubstLinks to database description fieldsYorhel1-0/+1
2015-01-25staff: Fix adding/editing staff with >10 aliassesYorhel1-1/+1
Another bug related to query limits. It's become a common theme now.
2015-01-16staff: More form verification + support more chars for VN seiyuu linkingmorkt1-4/+12
2015-01-12staff: Stronger verification of form datamorkt1-8/+14
2015-01-02staff: Fix deleting of staff + use JSON to pass data + minor fixesmorkt1-27/+46
2014-12-29staff: Don't use inline script to pass seiyuu import datamorkt1-14/+8
Same reasoning as 0d191b5cd8c79eef3cef63c40ded96506a40382a
2014-12-28staff: Import cast from other VN + some styling + more improvementsmorkt1-0/+15
2014-12-28More progress on the staff + cast DBmorkt1-1/+43
2014-12-24Further progress on the staff databasemorkt1-1/+29
- 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