Commit graph

44090 commits

Author SHA1 Message Date
daniel
2c488a0eba Replace usage of doEdit() with doEditContent()
Change-Id: I2c423744bd91044c37bbec53b35729bd1c09901b
2012-08-28 16:53:19 +02:00
daniel
a275d1d93f Merge "EditPage cleanup - parser errors, etc" into Wikidata 2012-08-28 14:42:04 +00:00
daniel
9fb7a73356 Merge "Updating of redirect target in Content objects" into Wikidata 2012-08-28 14:41:14 +00:00
daniel
a1f145591b EditPage cleanup - parser errors, etc
Cleaned up EditPage, removing and fixing comments etc.

The most prominent changes are:
* improved handing for parse errors
* improved handling for image redirects
* better readability because one huge try/catch block was removed

Change-Id: Ie33720922eb05dda89a22ca1f5f0cba4b1d31129
2012-08-28 16:38:02 +02:00
daniel
96f7db3f7b Avoid deprecation warnings in test cases.
a) when testing deprecated functions, use $this->hideDeprecated() to
suppress warnings.

b) use doEditContent() instead of doEdit()

Change-Id: Ifa9e0ef373ed72ef7d4a3c2dd558483af4a3fd55
2012-08-28 16:00:39 +02:00
daniel
faac3746a2 Updating of redirect target in Content objects
Content::updateRedirect may be used to change the redirect target
without knowing anything about the content's format.

Change-Id: Ifaf8f2bdd9d1cbf984e2ef3c60d0282c984c18c1
2012-08-28 13:50:05 +02:00
daniel
53ffc46221 Merge "Fixing creation of DifferenceEninge" into Wikidata 2012-08-28 11:44:44 +00:00
daniel
07d71ed658 Merge "Revert all changes to DairikiDiff." into Wikidata 2012-08-28 11:44:22 +00:00
daniel
aeba1add50 Merge "Make LinkFilter handle Content objects" into Wikidata 2012-08-28 11:44:09 +00:00
daniel
da1f395cfb Merge "Add Content::matchMagicWord" into Wikidata 2012-08-28 11:42:46 +00:00
daniel
ee007485b8 Merge "cleaned up comments in DifferenceEngine" into Wikidata 2012-08-28 11:42:18 +00:00
daniel
c2d111973c Merge "Made ApiParse aware of ContentHandler" into Wikidata 2012-08-28 11:42:04 +00:00
daniel
a246b4902f Merge "Improved content model handling in ApiEditPage" into Wikidata 2012-08-28 11:41:52 +00:00
daniel
4339e201be Merge "Revision::getContent must return clone if mutable" into Wikidata 2012-08-28 11:40:32 +00:00
daniel
e96675a43c Merge "Bug 39509: Function for running legacy hooks." into Wikidata 2012-08-28 11:40:11 +00:00
daniel
2bc191889a Fixing creation of DifferenceEninge
Creation of DifferenceEninge insteances was based on invalid assumptions
in several places.

Change-Id: Ib67ca893ea53a27d4ac7efd8a9ca0d3b2d93949f
2012-08-24 20:49:19 +02:00
daniel
489234a248 Revert all changes to DairikiDiff.
Reverting unrelated changes to DairikiDiff. Slight refactoring would
make the diff classes much more reusable and flexible, but that needs
some more thought, and is unrelated to the task at hand.

Change-Id: I9f132985207096676cbb6139c7d37572a10b8806
2012-08-24 20:47:23 +02:00
jeroendedauw
2fb3ee45b5 Merge "cherry-pick bdaee6f6594532409ce55e9cde0f942f96ec4181" into Wikidata 2012-08-24 14:54:45 +00:00
jeroendedauw
8882bb82b4 cherry-pick bdaee6f659
Change-Id: I5251c8f83f401731c3027718656cb65d8d910f22
2012-08-24 16:54:06 +02:00
aude
5f7b761fa4 add docs for getContentInternal()
Change-Id: I87a0c9908975c236794bad39209ad8bdef4699c3
2012-08-22 19:57:53 +00:00
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
daniel
14ce85f58c Make LinkFilter handle Content objects
Change-Id: Iced1c83642143faa79a5461ae6278267e0595aa9
2012-08-21 17:54:52 +02:00
daniel
a66eb27653 cleaned up comments in DifferenceEngine
Change-Id: I939fa563a66357efb8eae8d8f60bf0ba08cd05eb
2012-08-21 16:26:14 +02:00
daniel
e8ded47603 Made ApiParse aware of ContentHandler
Change-Id: I656e4cab6641eaae98b40700c7b3a7cb0eeed54f
2012-08-21 16:15:12 +02:00
daniel
daf415aa88 Improved content model handling in ApiEditPage
Change-Id: Ifd9e344864f7663de7263cb536e83dbdc03cf2ed
2012-08-21 16:14:18 +02:00
daniel
266b66c899 Revision::getContent must return clone if mutable
Revision::getContent must return a cloned instance of the Content object
if the Content object is mutable to avoid confusion.

Content::copy is used to achieve this, which is specified to return $this
for immutable Content.

Change-Id: Iace17b6ae8aa85a3500624441b69bc067c1ade00
2012-08-21 12:48:29 +02:00
daniel
74fe09ed4d Bug 39509: Function for running legacy hooks.
ContentHandler::runLegacyHooks can be used to run hooks that don't
supprot Content objects yet. runLegacyHooks will issue a warning and take
case of serialization/unserialization of the content as appropriate.

Changeset 2: rebased.

Change-Id: I31109061110f87c38bdeebf30d520c8e1241bb29
2012-08-20 22:00:52 +02:00
daniel
0139923580 fixing long lines
Change-Id: Iebcd40a1a37a3a93cc571fa2c2b0a87f53dc97a4
2012-08-20 21:33:07 +02:00
daniel
b642ae2b87 Merge "merging latest master" into Wikidata 2012-08-20 14:57:55 +00:00
daniel
29719f846b merging latest master
Change-Id: I36b7f2f63ab8c08f8412d521dc68ea45c8b67711
2012-08-20 16:55:28 +02:00
jeroendedauw
6dbb91c13f Added utility method taking an array of elements and wrapping each element in it's own array.
Useful for data providers that only return a single argument.

Change-Id: I220948865e3de395363bf8858098e61de3c8d35b
2012-08-20 12:21:33 +02:00
Daniel Werner
1761192376 Merge "add Article::setParserOptions" into Wikidata 2012-08-07 17:08:05 +00:00
daniel
30d416f1c4 add Article::setParserOptions
Change-Id: Ica1c0a3c4b5b569c4911d4c1fb0167812f932c20
2012-08-07 19:02:24 +02:00
jeroendedauw
859db6a6df Added fixme for incorrect assumption being made
Change-Id: I40b83428019b32c39c529577bf3f55677a407693
2012-08-06 19:28:57 +02:00
daniel
c0b50eb47d merged master
Change-Id: I6afafe971afb3f38fc8f1e66ba409283b8a698f8
2012-08-02 11:01:22 +02:00
Tim Starling
69e1d12fe7 Revert "(bug 260) Wrap <pre> overflow properly."
Due to bug 38800. Just reverting to prevent accidental deployment in
1.20wmf9. I would set a fixme status instead if there was such a thing.

The problem with this is that it breaks formatting of thousands of
Wikipedia articles due to interaction with SyntaxHighlight_GeSHi. I'm
sure some satisfactory solution can be found which fixes both bugs, but
leaving this commit deployed is not a good interim solution.

This reverts commit 782b9f1774.

Change-Id: I1977f093563b5658def9ba57a6ea6cfa9796f795
2012-08-02 14:51:42 +10:00
Catrope
002225e645 Merge "[FileBackend] Skip over some illegal paths and output the error." 2012-08-01 23:52:14 +00:00
Aaron Schulz
a649bfb419 [FileBackend] Skip over some illegal paths and output the error.
Change-Id: Ib32aadc6398168e4a63279d7da61a0dd1e1a6483
2012-08-01 16:48:33 -07:00
Catrope
7bc74c92f3 Merge "Add localonly= to prop duplicatefiles and imageinfo" 2012-08-01 23:47:35 +00:00
Kaldari
6d6d788bab Better inline styling for badge.
Change-Id: Ie92a18478c0f9b62fceff39f54a9524432eec921
2012-08-01 16:03:35 -07:00
Catrope
c7579fdfaa Merge "bug 36073 Use mw-imagepage-linkstoimage-ns as a class instead of an ID" 2012-08-01 21:54:27 +00:00
Aaron Schulz
f2379f38bd Merge "Change File::compare to use getName, not getTitle" 2012-08-01 19:39:10 +00:00
Derk-Jan Hartman
8fa160aadb bug 36073 Use mw-imagepage-linkstoimage-ns as a class instead of an ID
This avoids multiple defines of the same ID on a File page.

Change-Id: I0f8ae37d74f2ec519361b2af164e115f6efa4ac6
2012-08-01 21:34:34 +02:00
Aaron Schulz
cc03405e5c Merge "memcached: better error messaging" 2012-08-01 19:06:53 +00:00
Antoine Musso
ab59fadb39 (bug 38492) let doxygen document variables
We are using '@var' to document our variables and class properties,
which is unfortunately not working since '@var' is really meant to
document a function or method.

The way to fix it is to use an input filter that will rewrite our PHP
source code to pretends variables are typed. Aka something like:

 /**
  * A title object
  * @var Title
  */
 var $title;

Will be made:

 /**
  * A title object
  * @var Title
  */
 Title $title;

That is incorrect PHP code but it is properly recognized by Doxygen.

This patch as a side effect, all variables and properties will end up
being documented in addition of type hinting.

Use a hack authored by Goran Rakic at:
	http://stackoverflow.com/a/8472180/276152

Change-Id: I4ead1bd1feace44496b45ed8c55f5e52c59e7694
2012-08-01 20:44:40 +02:00
umherirrender
a57ea5c3ad Add localonly= to prop duplicatefiles and imageinfo
When looking only for local files, the localonly param skipped the
mabye expensive look up inside the file repos.

Change-Id: Ib8f38d6abf9238a349bbfd617a36933bdfe74b5c
2012-08-01 19:51:23 +02:00
umherirrender
7b2a62b74a Change File::compare to use getName, not getTitle
For files the file name with underscores is often used,
than the compare method should do that also.
This matches than the ORDER BY img_name done by some query.

Change-Id: Ia1b89577538bdfdf751c7b9584e7c008a8c2bb1e
2012-08-01 19:40:10 +02:00
Antoine Musso
bbf703c4fa memcached: better error messaging
MemcachedClient output a generic error message: "Error parsing memcached
response\n" whenever it is not able to read from the socket. It is also
lacking the remote peer it is reading from.

This patch add a new message when fgets( <socket> ) return false, which
means we could not read from the file pointer. It also get the stream
remote name for debugging purposes.

Change-Id: I9b8a25a03af0d730aa3b4830a44b1ea739343274
2012-08-01 16:33:26 +02:00
Nikerabbit
e41e273bd2 Merge "autoloader entry for UserNotLoggedIn class" 2012-08-01 11:15:08 +00:00
Reedy
f7d8c9e383 (bug 37830) new $wgRequirePasswordforEmailChange
$wgRequirePasswordforEmailChange to control whether password
confirmation is required for changing an email address or not.

Change-Id: Iaef440ef56d391bf9e68d15899fc81c6050722fb
2012-08-01 12:55:13 +02:00