Commiting integration of Site Wide Categories into Weblogger. While implementing this I've also fixed numerous random bugs.
Some comments off the top of my head regarding this implementation:
* Weblogger currently doesn't take advantage of nested categories. You can use trees that are nested but categories in those trees are treated as if they were all flat.
* I've provided a migration script from old to new categories. The script just copies data and doesn't delete anything. It is written in Tcl so that it can take advantage of the APIs.
* I left the legacy categories in system. There are several reasons for that:
- Site-Wide categories don't have short names and thus speaking URLs are not implemented. Some people might prefer to keep speaking URLs, especially if they don't want to break them after migration
- Blogger-specific categories are simpler and thus easier to use.
- Having both solutions available for a while makes transition less painful.
* I had lots of problems with Oracle port. At first I thought just that it is slightly instable because we are working on HEAD and categories are in flux... Only after having fixed a lot of bugs I realized that LEGACY CATEGOIRIES NEVER WORKED IN ORACLE. At that point it was easier to make them actually work in oracle :-)
* Actually it seems that the whole Weblogger never worked in Oracle, I was fixing bugs such as broken filtering by date (because Oracle's trunc() uses different format strings from PostgreSQL's date_trunc() etc. etc.
* Juggling pieces of Tcl from .tcl to .xql (via variable and command substitution) and pieces of SQL from .xql to .tcl (via db_map) was fun :-)
* Implementing nested multirows (to show all categories one object is in), in combination with included templates thought me a lot about the templating system. One of the lessons: <multirow name="@foo@"> with variable could actually work if a bunch of bugs with variable substitution were fixed in templating system. Until then using: template::multirow -local -ulevel 1 upvar $foo myfoo will be necessary.
* Some extensions for db_multirow, <multiple> and friends to support grouping and tables-within-tables would be really useful. I didn't dare do such large-scale hacks on db_multirow
* one-entry{tcl,adp} should be replaced with blog{tcl,adp} - after all getting one entry is just a special case of getting many entries.