On Tue, Jul 12, 2016 at 11:47 AM, Daniel Kinzler <
[email protected]> wrote:

> Am 12.07.2016 um 17:02 schrieb Brad Jorsch (Anomie):
> > On Tue, Jul 12, 2016 at 4:40 AM, Daniel Kinzler <
> [email protected]
> >
> > One simple method: assign the numeric IDs by making the numeric ID column
> > auto-increment, and insert the model strings into the table as needed.
>
> When exactly? When update.php runs? Should work fine, but I'd like a nice
> interface that extensions can use for this. Or should we check and
> auto-insert
> on every page edit?
>

The linked example is inserting (if necessary) on every page edit. The
check part needs to happen on every edit anyway because it needs to fetch
the ID for the name.

update.php would work too as long as things blow up clearly when someone
didn't run update.php recently enough. That could also allow us to let the
extension suggest an ID, so the registrar would only have to assign a
"random" ID in case of a conflict.


> > Does the registry idea work all that smoothly for namespaces, though?
>
> I don't think it was ever really tried for namespace. But it's not a
> perfect
> solution. Just a possibility.
>

https://www.mediawiki.org/wiki/Extension_default_namespaces?


-- 
Brad Jorsch (Anomie)
Senior Software Engineer
Wikimedia Foundation
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to