| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: I95f1aa6f0ed2cc3306aa6e588a11f359854315c1
|
|
|
|
|
|
|
| |
The referenced hooks simply call the corresponding hooks in WikiPage.php,
so it would be better to call them from WikiPage.php directly.
Change-Id: Ia0cf526c625d38cd941a1166876c13697be87a86
|
|
|
|
| |
Change-Id: I7f8dee09ac734cbc369441431841f2d4aa5d7f51
|
|
|
|
| |
Change-Id: Id28acdd8fe0028bf1e46344cfed131076c8f4c95
|
|
|
|
| |
Change-Id: I3ce92463d485a0fb23e464e9a8059330f32d79af
|
|
|
|
|
|
| |
1 of n.
Change-Id: I852729f08bbb0c5e39c2db44362ccdc7f59dcc08
|
|
|
|
|
|
|
|
| |
check-vars correctly detects the call to CategoryPage::getAutosummary as
deprecated by coming from Article::getAutosummary but needs an explicit
hideDeprecated() to not complain about it.
Change-Id: I8a51a3041cc4cab592c5e37862efb69b538821a0
|
|
|
|
|
|
|
|
| |
Some class extending MediaWikiTestCase did not call its setUp method. We
most probably always want to do it since MediaWikiTestCase::setUp() does
garbage collection and might do more in the future.
Change-Id: I68dde370a62c8f4a779836ca0c4ad06844fdc916
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This introduces the ContentHandler facility into MediaWiki,
see docs/contenthandler.txt.
For convenient review, a squashed version is available at
https://gerrit.wikimedia.org/r/27191
The ContentHandler facility is a major building block of the Wikidata project.
It has been discussed repeatedly on wikitech-l.
Change-Id: I3804e2d5f6f59e6a39db80744bdf61bfe8c14f98
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
a) when testing deprecated functions, use $this->hideDeprecated() to
suppress warnings.
b) use doEditContent() instead of doEdit()
Change-Id: Ifa9e0ef373ed72ef7d4a3c2dd558483af4a3fd55
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit depends on the introduction of
MediaWikiTestCase::setMwGlobals in change Iccf6ea81f4.
Various tests already set their globals, but forgot to restore
them afterwards, or forgot to call the parent setUp, tearDown...
Either way they won't have to anymore with setMwGlobals.
Consistent use of function characteristics:
* protected function setUp
* protected function tearDown
* public static function (provide..)
(Matching the function signature with PHPUnit/Framework/TestCase.php)
Replaces:
* public function (setUp|tearDown)\(
* protected function $1(
* \tfunction (setUp|tearDown)\(
* \tprotected function $1(
* \tfunction (data|provide)\(
* \tpublic static function $1\(
Also renamed a few "data#", "provider#" and "provides#" functions
to "provide#" for consistency. This also removes confusion where
the /media tests had a few private methods called dataFile(),
which were sometimes expected to be data providers.
Fixes:
TimestampTest often failed due to a previous test setting a
different language (it tests "1 hour ago" so need to make sure
it is set to English).
MWNamespaceTest became a lot cleaner now that it executes with
a known context. Though the now-redundant code that was removed
didn't work anyway because wgContentNamespaces isn't keyed by
namespace id, it had them was values...
FileBackendTest:
* Fixed: "PHP Fatal: Using $this when not in object context"
HttpTest
* Added comment about:
"PHP Fatal: Call to protected MWHttpRequest::__construct()"
(too much unrelated code to fix in this commit)
ExternalStoreTest
* Add an assertTrue as well, without it the test is useless
because regardless of whether wgExternalStores is true or false
it only uses it if it is an array.
Change-Id: I9d2b148e57bada64afeb7d5a99bec0e58f8e1561
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/107419
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/105795
|
|
|
|
|
|
|
|
|
|
|
| |
* Moved generateReason() to WikiPage. This fixes the PureWikiDeletion ext too.
* Make Checkpoint ext call getRawText() as doEdit() does. Aalso, WikiPage doesn't have fetchContent().
* Call getAutosummary() statically in doEdit().
* Fixed outdated code comment.
* Fixed title used in unit test.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/96460
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/96428
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/96424
|
|
|
|
|
|
|
|
|
|
| |
explaining that
what we are testing is actually the function existence (see r91123 summary)
Change the onArticle* to is_callable()s, so that a db is not needed.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/92962
|
|
|
|
|
|
|
| |
to factory(). This avoids an extra class.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/92002
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/91980
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/91376
|
|
and WikiCategoryPage from CategoryPage.
* WikiPage functions/fields are "magically" part of Article when accessed for b/c. Magic is kind of ugly but there are too many callers to make breaking changes atm. Some functions are just wrappers for WikiPage ones (were magic won't work).
* Added newFromID() to each WikiPage subclass (works around pre-existing inheritance problem).
* Added Page class for convenient type hinting and changed hints from Article -> Page. This lets things use WikiPage objects without getting type errors.
* Updated FlaggedPage to extend WikiPage. Worked around getOldIdFromRequest().
* Added setTimestamp() to WikiPage and moved some timestamp setting code from ParserCache to Article.
* Removed ampersands from $dbw arguments.
* @TODO: dependency inject user objects for WikiPage
The idea is to migrate things to use WikiPage, as the run-of-the-mill "new Article()" call doesn't care about $oldid and $wgRequest. After that, Article, ImagePage, and CategoryPage can be rewritten as an Action class or something sane (a Viewer class of sorts).
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/91123
|