Commit graph

10 commits

Author SHA1 Message Date
daniel
ac8150cd6f Add Content::matchMagicWord
Allows Content objects to control how magic worlds are applied to it.
Useful mainly when magic words are used outside the parser.

Change-Id: I9711f580f8beadfb9f93a706f87c97c7cf667f6c
2012-08-21 18:10:29 +02:00
Antoine Musso
79773839a1 mark WikitextContent tests as requiring database
Some of the WikitextContent tests require a database connection which
breaks the databaseless PHPUnit test job.

Change-Id: Ia78d22763bffc11a7f66a50ae67bc340939366b9
2012-07-27 22:49:58 +02:00
daniel
8d280dde9b Moved getParserOutput to Content interface.
On Tim's request, this change moved getParserOutput() and getSecondaryDataUpdates()
from the ContentHandler to the Content interface.

Change-Id: Ia654aa8710a242ba5fe7a4eb528e6a6449035f59
2012-07-23 23:52:34 +02:00
daniel
c8e633f1e3 moved getDeletionUpdates to Content interface
Change-Id: I1b46b1d663f8efd609aeb1b63cb07ee1a0a00c33
2012-07-23 22:54:25 +02:00
daniel
684178dfb6 Use Title, not IContextSource; remove createArticle, etc.
This merges the latest core patch into the Wikidata branch,
implementing suggestions collected on gerrit. Most importantly:

* Methods in the Content class no longer rely on a IContextSource
* createArticle and createEditPage were removed from Contenthandler
2012-05-23 08:53:01 +02:00
daniel
cbc2014b2d Use integers for content_model and content_format.
Representing content_model and content_format as integers in the
database was suggested by Asher mainly to save space.

This change entails some refactoring and renaming, but no big
change in logic.
2012-05-14 10:22:52 +02:00
daniel
fc91010111 backporting changes made during review of core patch 2012-04-30 12:50:31 +02:00
daniel
168ba919ac replaceSection() should replace entire content if the section id is the empty string. 2012-04-24 16:23:55 +02:00
daniel
3606cfa7f1 phpunit tests for JavascriptContent and CssContent 2012-04-23 21:21:22 +02:00
daniel
bc71cac6e2 added unit tests for WikitextContent 2012-04-23 18:16:36 +02:00