summaryrefslogtreecommitdiff
path: root/util
AgeCommit message (Collapse)AuthorFilesLines
2010-02-17CSS: Refer to all external files with the version as query stringYorhel1-5/+12
This makes sure that these also get forced reloaded on a version change.
2010-02-05Merge branch 'master' into betaYorhel1-2/+2
Conflicts: data/lang.txt
2010-02-05Notifications: Added 'announce' notificationYorhel4-3/+27
This one is also configurable, but mainly because I want to avoid generating several thousands of notifications for a single action...
2010-02-05Notifications: Added 'dbedit' notificationYorhel4-5/+50
And added a settings window where you can disable this notification, which is something you really want to do if you're an active contributor...
2010-02-04SQL: Alter the default of sessions.added in the update scriptYorhel1-0/+1
Forgot to do this in the earlier commit.
2010-02-04Notifications: Added notify for deletion of entries in (wish)listYorhel3-4/+41
2010-02-02Differentiate between pt-PT and pt-BR in the languagesYorhel1-5/+6
As requested, http://vndb.org/t423
2010-02-02SQL: Converted language columns to an ENUM typeYorhel4-5/+19
And changed vn.c_languages to an array type while I was at it. This required some changes in the Perl code, and I found a bug in DBD::Pg while I was at it: https://rt.cpan.org/Ticket/Display.html?id=54224 Luckily, there's an easy workaround for that.
2010-02-02SQL: Improved query in edit_commit()Yorhel1-6/+4
This one's a lot faster.
2010-02-01Added notification for database deletions to users who contributedYorhel3-4/+44
Complex queries...
2010-02-01SQL: Renamed the hidlock_update trigger namesYorhel2-6/+6
Nothing wrong with using the same name...
2010-02-01Cache the title and userid of the notificationsYorhel3-6/+11
These aren't likely to change anyway, and things will become less easy to display when other types of notifications are added.
2010-01-29SQL: Another try at fixing the tag spoiler calculationYorhel1-2/+2
62cb41c3b8780bffe5a8ea58a6a7b5053d9e1059 and 4895ea63323b94f0b128d6874be997a24d3a3b0d were bad jokes, really... let's hope this permanently fixes the problem.
2010-01-26SQL: Replaced sessions.expiration with sessions.addedYorhel2-1/+4
An expiration date doesn't make much sense if it's both not used and if it can't be configured by the user, so just make this a timestamp to indicate when the session has been added, which, while still not really used, is more valuable.
2010-01-26Keep track of when a session has last been usedYorhel2-0/+5
If we're going to automatically remove older sessions, it would make more sense to remove unused sessions, rather than old sessions that are still in use. But we first need to keep track of when a session has last been used to do so...
2010-01-26Removed the ?l10n= parameterYorhel1-8/+4
Setting the l10n cookie is now done from a separate url: /setlang This makes the language determination code less complex, and makes sure nobody links to pages that change the UI language without intending to. (I've seen some links floating around with the l10n parameter included, which is... bad)
2010-01-26Made a start on the notification systemYorhel5-8/+96
The current setup should be able to handle all kinds of notifications, though only PMs are implemented at this point. More to come.
2010-01-24Automatically generate the skin credits on d7Yorhel1-2/+2
Added a userid field in the skin config files, from which the credits are loaded. Now I don't have to constantly update d7 for every language when something changes in the skin files.
2010-01-24SkinFile: Abstracted access to the skin configuration filesYorhel2-59/+35
And updated skingen.pl and vndb.pl to make use of this abstraction.
2010-01-24Versioned the deleting and locking of database entriesYorhel4-11/+93
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.
2010-01-23SQL: Don't DROP the temporary edit_* tablesYorhel1-39/+52
Simply re-using them by truncating the tables first is faster, and requires less locking when performing batch edits in one transaction.
2010-01-10L10N: Determine language from Accept-Language headerYorhel1-4/+16
So that people with correctly configured browsers don't have to manually choose their language of choice with the language switcher, and so that most people will have one cookie less. (The 'l10n' cookie is removed if it matches the Accept-Header language -- or the fallback) More info @ http://www.w3.org/International/questions/qa-lang-priorities
2010-01-09SQL: Split dump.sql into several files and merged update_2.10.sqlYorhel6-1148/+1028
The functions can now be edited without having to repeat them in the update scripts. Just importing the func.sql file with \i will do the trick.
2010-01-01SQL: Revision insertion abstraction for producer entriesYorhel1-0/+39
2010-01-01SQL: Revision insertion abstraction for release entriesYorhel2-2/+64
Also added a little sanity checking on the edit_(vn|release) table, and added a default value for releases_rev.released.
2010-01-01SQL: Made a start on revision insertion abstractionYorhel1-0/+110
This will make it easier to do automated edits, either from cron jobs, Multi, update scripts, or from within SQL triggers. So far only the VN related functions have been defined/updated, trying to edit/add releases or producers will not work at the moment. The functions for editing or adding a new database entry have been merged, as the procedure is rather similar. util/dump.sql will be updated later on.
2009-12-28SQL: Fixed bug in producer_relgraph_notify()Yorhel2-10/+4
2009-12-05SQL: Removed changes.causedbyYorhel2-3/+12
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...
2009-12-05SQL: Call update_vncache() in a triggerYorhel2-2/+32
This removes the need for the dbVNCache() function in perl.
2009-12-05SQL: Don't allow argument of update_vncache() to be 0Yorhel2-18/+54
To batch update, simply do a SELECT update_vncache(id) FROM vn; The function is now more readable as well.
2009-12-05SQL: Removed the use of CONSTRAINT TRIGGERsYorhel2-30/+101
This makes use of the change that the [vn|producers].latest columns are now only updated after the entire revision has been inserted.
2009-11-29SQL: Replace index on tags_vn_inherit (tag) with an index on (tag,vid)Yorhel2-4/+4
This drastically improves the performance of the search-VN-tag-filter feature, and it seems PostgreSQL can use the index even when only filtering results by the tag column.
2009-11-29Tags: Replaced tag_tree() with WITH .. SELECT queries, and removed /g/debugYorhel2-61/+3
The return value of dbTagTree() is also somewhat easier to work with.
2009-11-29SQL: Rewrote tag_vn_calc() to use a WITH RECURSIVE .. SELECT queryYorhel2-45/+59
This is more efficient, and doesn't require the tag_tree() or tag_vn_childs() stored procedures. Does require PostgreSQL 8.4+
2009-11-27Changed VN score on tags pages to display plain averagesYorhel2-12/+46
For three reasons: - Speed tag_vn_calc() is now more than 10 times faster (granted, it could have been a lot faster even with the bayesian rating, but whatever) - Consistency with the tag scores displayed on the VN pages (which are raw averages as well) - It didn't always make sense
2009-11-15SQL: Improved performance of update_vnpopularity()Yorhel2-2/+2
The previous statement was optimized for PostgreSQL 8.3 and took only about a second, but after the update to 8.4 it took about 10 times longer due to a different execution plan being generated. This slightly reworded statement generates a more efficient plan on 8.4.
2009-11-15SQL: Fixed bug in bayesian rating calculationYorhel1-1/+1
avg_rating should be the average rating of all VNs, not the global average vote.
2009-11-14SQL: Allow NULL for vn.c_popularityYorhel2-2/+22
Sorting from least to most popular VN make sense now, you won't have to wade through those entries without any vote at all.
2009-11-14SQL: Don't count users with ign_votes in bayesian ratingYorhel1-2/+2
They still have influence on the average number of votes per VN and the overall average vote, but this isn't significant. (at least, not at the moment)
2009-11-14SQL: Cached bayesian VN rating and vote countsYorhel2-16/+10
Was a good idea after all...
2009-11-14Added bayesian rating and vote count to the VN listYorhel2-0/+20
It's even realtime! To my surprise this calculation isn't very heavy, or PostgreSQL is just extremely fast. The GetVN query on /v/all takes 100ms in the worst case (instead of the usual 30-60ms). Can always cache this later on.
2009-11-14Added wikipedia links for producersYorhel2-1/+6
2009-11-14SQL/L10N: Allow NULL for releases_rev.minage and make the values translatableYorhel2-1/+9
2009-11-02SQL: Fixed another bug with the tags_vn_bayesian.spoiler calculationYorhel2-1/+33
2009-11-02Replaced util/init.pl with a MakefileYorhel1-70/+0
I'm planning to add some more stuff to this makefile later, like starting/stopping Multi and performing updates.
2009-10-24Removed update_rev() function and monthly revcache cronYorhel2-25/+4
The changes.rev column should be correct in the first place, and in the (most likely) impossible condition that it isn't, the update_rev() function is more likely to make things worse.
2009-10-24Added Spawned <> Originated from producer relationYorhel2-2/+2
2009-10-24lang.pl: Added 'stage' functionalityYorhel1-0/+15
2009-10-21SQL: Send relgraph notify when needed for producer entriesYorhel2-0/+55
2009-10-21Added relation graphs for producersYorhel2-1/+4
TODO: - document the relations - emit a relgraph notify when needed