Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
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.
|
|
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.
|
|
|
|
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)
|
|
|
|
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.
|
|
|
|
And added new 'page' and 'id' templates for more strict validation.
|
|
Broken in commit 887607bb3744c727ec617508c17b2b7df46c2287
|
|
|
|
|
|
- Removed 'hist' and 'mod', weren't used at all
- Merged 'del' and 'lock' into a single 'dbmod'
|
|
Haven't found any bugs this way, yet. I doubt there'll be any problems,
but it's a nice new feature that could help quite a bit. :-D
|
|
There may still be some bugs present and I've only converted the points
where TUWF is incompatible with YAWF. The new TUWF features are not in
use yet, I'll do that later on.
Note that, in order to run the new code, TUWF must be installed on your
system. The configuration for the TransAdmin plugin has also changed.
Other than that there shouldn't be any issues.
|
|
The check is quite basic and you can easily get around it. It's just
intended to warn about common mistakes.
|
|
This can be seen as a partial revert of
0a4f97f0186d6941a4cab2e3bd05201f1fed1441.
I used to think using NULL for special values is more "correct" in
database terms. But in the end I guess I should be aiming for whatever
solution is easier. Both are "correct" in a sense anyway.
|
|
And rewrote the expand/collapse JS/CSS code so that the difference
between expanded and collapsed view is merely the class of the
containing table. This way the JS code doesn't have to pass through the
table rows and is thus noticeably faster for larger tables (i.e. /p65).
|
|
Primary reason for this change is because Algorithm::Diff::Fast isn't
all that fast for character-level diffs. :-/
|
|
It's an awesome feature now. :-)
|
|
A nice expanded view. It also happens to be faster than the old view in
terms of SQL queries. (In most cases at least)
Can be improved a little more by:
- Adding an 'expand/collapse' feature to list only the VNs
- Adding a column indicating the role of the producer (dev/pub)
|
|
|
|
And changed the order a bit, as suggested by ImmLff.
|
|
This is implemented by adding ihid (item hidden) and ilock (item
locked) columns to the changes table,
The (vn|release|producer).(hidden|locked) columns now work as a
cache, refering to the changes.(ihid|ilock) columns with
changes.id = (vn|release|producer).latest.
The cached columns are updated automatically each time a new revision is
inserted.
This is a pretty large change, bugs are quite likely.
|
|
|
|
|
|
The warnbg and warnborder colors from the skins are used for
highlighting.
|
|
This column was used to differentiate between automated edits and user
edits, but that later changed to checking for changes.requester = 1.
The column has since never really been used, and due to a bug introduced
in VNDB 2.0, it has never been updated, either. Meaning it's not even
accurate for any database changes made after december 2008...
|
|
A form validation error is somewhat more user friendly than a 500.
|
|
And also changed the way the item_table.latest column was updated: it is
now only updated after the revision insert has completed, making it
easier to write trigger functions in SQL.
|
|
|
|
|
|
TODO:
- document the relations
- emit a relgraph notify when needed
|
|
Again, mostly copied from the VN relation editor...
|
|
|
|
And again copied something from the VN relation code... meh.
|
|
The current list of relations isn't final yet, may be changed later on.
Quite a bit of this code has been copied from the VN relations... need
to find a way to use prober code reuse here.
TODO:
- Nice relation editor interface
- Display relations in revision browser
- Display relations on producer pages
- Generate relation graphs
- Sync update_2.8.sql into dump.sql
|
|
|
|
|
|
|
|
|
|
|
|
The subform id is now passed to htmlForm() as first formpart item. This
way the id won't change even if the title does, which will be the case
with the interface translation.
|
|
Hmmm, I think I'll need to update some of the utility functions to take
more functionality from the Handler pages in regard to getting text
strings. Using mt() on everything that is essentially already passed to
other functions with a unique string for identification is a bit double.
So far I've updated htmlRevision to do this. (The name argument is
still present but currently ignored, to preserve backwards compatility,
the rest of the code will be updated soon.) Other utility functions like
htmlForm should probably do something like that as well.
|
|
This finishes Util::CommonHTML, with the exception of htmlVoteStats
|
|
and age()
|