Thursday, Jul 1, 3:45PM
Jul. 1st, 2010 03:44 pmBug counts: resolved 199, assigned 11, needs-review 6
I hadn't been planning on doing any dev work today, but I saw bug 2749 come in and I couldn't resist. I had committed the patch that added AO3 to the list, and I had just been working on bug 733 which touched the same code in DW::External::Site, so I pounced on it.
My first thought was to explicitly disallow any site that didn't have a servicetype of "lj" since I knew we only crossposted to LJ-based sites. That's the same approach I used when dealing with detecting journaltype in 733. I knew I was making an assumption about protocols, and it nagged at me, but it produced the desired result.
However,
So now in addition to the get_sites method that lists all the defined sites, we also have get_xpost_sites that only lists the sites that can crosspost. Yay!
As a bonus, I saw another optimization that could be made from XPostProtocol and copied it to Site - using LJ::ModuleLoader->autouse_subclasses instead of copying out the list of external site subclasses in the file. Again, one less thing to maintain manually.
Since this is a pretty big change to the header of the same code file I edited in 733, the patches aren't compatible. I pulled my 733 patch from the queue and will regenerate it once my new code from 2749 is approved.
no subject
Date: 2010-07-01 11:55 pm (UTC)(no subject)
From:(no subject)
From:(no subject)
From:(no subject)
From: