(bug 47070) check content model namespace on import.
authordaniel <daniel.kinzler@wikimedia.de>
Tue, 10 Dec 2013 13:36:52 +0000 (14:36 +0100)
committerDaniel Kinzler <daniel.kinzler@wikimedia.de>
Tue, 17 Dec 2013 16:58:57 +0000 (16:58 +0000)
commit4cc9407fe943dd9ca754f38aeabe049a8a79f6cc
tree2e3f215ebc8532b94c8427879dab14a2e8a9f43c
parentcbc4e5c6b25153e61250bc77f8147584c0167bd3
(bug 47070) check content model namespace on import.

When importing, we need to check that the kind of content we are about to
import is actually allowed in the specified location on the local wiki.

This change does two things:

* Introduce the ContentModelCanBeUsedOn hook which provides control over
which kind of content can be used where.

* Introduce a check against ContentHandler::canBeUsedOn in the importer,
along with an appropriate error message.

Change-Id: Ia2ff0b0474f4727c9ebbba3c0a2a111495055f61
docs/hooks.txt
includes/Import.php
includes/content/ContentHandler.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php
maintenance/language/messages.inc