Commit graph

100 commits

Author SHA1 Message Date
MatmaRex
5ce5e78a93 Remove Wikimedia-specific hack in ParserOutput
Cleanup after I6a6c12a9. To be merged after appropriate caches are purged.

Change-Id: I849c4bd1fe59e582f9f16789e8b511719e2a5d06
2013-06-07 09:51:11 +00:00
MatmaRex
7833589c5d (bug 41729) Move section edit links to after the headings
This requires minor changes in various parts of MediaWiki, and
being extra careful about cached rendered pages' HTML.

Fun fact: editsection links are not made in Parser. They're made in
Linker, in Skin *and* in ParserOutput.

Client-side code and screen-scrapers will have to be adjusted to
handle both cases (old HTML will still be visible on cached page
renders until they are purged); extensions using the DoEditSectionLink
or EditSectionLink hooks might need adjustments as well.

* Linker: Change the HTML of pages to move the link itself from the
  beginning of the heading (before <span class="mw-headline">) to the end
  of the  heading (after the span).
* Skin: Change the class from .editsection to .mw-editsection; we use this
  opportunity to clean up old cruft, and this makes it much easier to
  handle cached renders (by just detecting the old class).
* ParserOutput: Implement a horrible hack to support cached parser
  outputs with the old order of items.
* Ensure everything that should support both classes supports both
  classes (this includes print stylesheets and some scripts).
* Implement styles for the new look for all the skins (did this in
  shared.css; the styles are non-intrusive and can be overridden
  easily, and all of the skins were using the same look before).

Change-Id: I6a6c12a90de3604012420b20c1f520e0ece170ab
2013-04-29 00:00:09 +00:00
umherirrender
6c38a5eb72 Fixed spacing in logging/parser/profiler/rl/revdel/search folder
Added spaces before if, foreach
Added some braces for one line statements

Change-Id: I11bbcfa351e945b7bde10c2105d61a3cf5622205
2013-04-20 17:38:24 +02:00
umherirrender
8764b3aa7c Remove spaces in function signature
Change-Id: I45aea7a7af88cd913b2f485913620a8af0ab2fed
2013-03-18 20:44:43 +01:00
Tyler Anthony Romeo
4dcc7961df Fixed @param tags to conform with Doxygen format.
Doxygen expects parameter types to come before the
parameter name in @param tags. Used a quick regex
to switch everything around where possible. This
only fixes cases where a primitve variable (or a
primitive followed by other types) is the variable
type. Other cases will need to be fixed manually.

Change-Id: Ic59fd20856eb0489d70f3469a56ebce0efb3db13
2013-03-11 13:15:01 -04:00
umherirrender
d63121016d fix some spacing
Added/removed spaces around logical/arithmetic operator
Reduced multiple empty lines to one empty line
Removed wrong tabs before comments at end of line
Removed too many spaces in assigments

Change-Id: I2bba4e72f9b5f88c53324d7b70e6042f1aad8f6b
2013-03-07 17:53:21 +01:00
umherirrender
570dda0455 fix some spacing
Change-Id: I88e73d47a552918880514d88a876296a6cb80d88
2013-02-04 20:09:18 +00:00
daniel
40cb62d558 Better way for extensions to add to ParserOutput.
Extensions sometimes need to stash information in the ParserOutput
for later use. This change provides a clean way to do that.

Change-Id: I8bc571d13c9a70bb71430862c2ab679ff1947126
2013-01-30 12:45:47 +01:00
umherirrender
2e8da558ba fix some spacing
Change-Id: Id7eda67a43f9040117edd79fdbeb678f1c3a6da2
2013-01-26 22:11:09 +01:00
jeroendedauw
5157242009 Added typehint
Change-Id: Ic71419e72f8cf0a12d9ea1be84fd0fcd838337d9
2013-01-25 20:29:10 +00:00
jeroendedauw
c19ec2d8f9 Simplified code. Removed not needed if-else
Change-Id: I9660f543deefb5154a03535b668ee68eb3394e75
2013-01-25 20:07:27 +00:00
Tim Starling
7474d1388a Document what ParserOutput::setProperty() is for
Change-Id: I88735b1ebc9b8423b4fbe7b196dfc914f95818fd
2012-11-02 15:39:53 +01:00
Siebrand Mazeland
d4b046a893 Update docs for return and exception info
* Removed some inline tabs in the process.
* IDE fixed some incorrect leading spaces, too.

Change-Id: Ic9303eff6db4424ac3f1fa2816839692b43e6190
2012-10-09 09:41:58 +00:00
daniel
c546fae8ed merge latest master into Wikidata branch
Change-Id: Id4e0f40c03679c13d8934a6add99b5cd86d0437d
2012-10-08 13:58:54 +02:00
umherirrender
a2e470ee68 (bug 32951) Do not register absolute internal externals
Setting $wgRegisterInternalExternals = false for proto server should not
store the http/https links in externallinks table

Also fix detection of own links for links with query or anchor or
nothing

new also detected:
//localhost
//localhost?query
//localhost#anchor

already detected:
//localhost/path

Change-Id: Idd03d309cc3b71728a8cbea460efa12b10348d64
2012-10-03 23:15:38 +00:00
daniel
0139923580 fixing long lines
Change-Id: Iebcd40a1a37a3a93cc571fa2c2b0a87f53dc97a4
2012-08-20 21:33:07 +02:00
daniel
29719f846b merging latest master
Change-Id: I36b7f2f63ab8c08f8412d521dc68ea45c8b67711
2012-08-20 16:55:28 +02:00
Aaron Schulz
bfe2fde968 Merge "Added some docs, fixed some docs and made implicit checks explicit" 2012-08-07 19:45:40 +00:00
jeroendedauw
df8245ba25 Split CacheTime into its own file
Change-Id: Iaa546fc5a30dad4bc0a0dbd0dc18dd2e05bf9d7f
2012-08-06 16:18:02 +02:00
jeroendedauw
8f940b57ff Added some docs, fixed some docs and made implicit checks explicit
Change-Id: Ib8ed516bc1114c58bec6e6213b52658fb34f5c98
2012-08-06 15:56:23 +02:00
daniel
d87135d706 merged master
Change-Id: Iad12ee382d6aeb1fab6fefb611d290b74865ea4b
2012-07-23 22:07:18 +02:00
Antoine Musso
aab43dd495 escape tags and entity in doxygen comments
When inserting XML elements inline <such as this one>, doxygen chokes
about it not being known. Simply enclosing the tag in double quotes
prevents doxygen from emitting a warning.

Also enclosed a few invalid functions calls such as \. and double quoted
the HTML entities such as &foobar;

Change-Id: I4019637145e683c2bec3d17b2fd98b0c50a932f1
2012-07-10 17:08:32 +02:00
daniel
48d0bedd78 cleanup and fixes for secondary data updates 2012-06-07 14:57:43 +02:00
daniel
d6d9d901fd sync comments to master 2012-05-15 14:47:15 +02:00
daniel
181641792a merged master after 1.20wmf3 2012-05-15 08:46:34 +02:00
daniel
01f36b721f merged latest master 2012-05-14 23:24:18 +02:00
daniel
a12ce17c6e Generalizing LinksUpdate to allow extensions to add arbitrary update handlers.
This supercedes I6d03bf2a, using better names for the new classes and
incorporating the changes requested by Aaron.

This change introduces the base class SecondaryDataUpdate to be used for any
updates that need to be applied when a page is changed or deleted. Until now,
this was done by the LinksUpdate class for updates and WikiPage::doDeletionUpdates
upon deletion. This patch uses a list of SecondaryDataUpdates in both cases.

This allows extensions (e.g. via the ContentHandler facility, once that is in) to
easily specify what needs to be done when a page is updated or deleted in order to
keep any secondary data stores (such as link tables) in sync.

Note that limited transactional logic is also introduced, so SecondaryDataUpdate
can be implemented to only commit their changes if all updates were performed
sucessfully.

Patch Set 2: fixing some coding style issues mentioned by Nikerabbit.

Patch Set 4: some stuff I kept from the old LinksUpdate class needs cleanup,
             but might break extensions when changed. Marking as todo for now.

Patch Set 5: fixed misnamed member in LinksDeletionUpdate (thanks Aaron).

Change-Id: Ibe3e88fadd8c1d4063cf13bb6972f2a23569a73f
2012-05-13 20:53:37 +02:00
jeroendedauw
6948cfe072 nicify field declerations
Change-Id: I0f683d421080788ba731c9b52413f532cd9d9e7c
2012-05-10 21:25:40 +02:00
jeroendedauw
98fab462b6 add since tags
Change-Id: I613fe006351c885420ff03a93cf2a239ca88831d
2012-05-10 21:22:11 +02:00
jeroendedauw
b0065ef84e fix null check and compacted/calrified code
Change-Id: I38c7075016f5be0192d85e2a0db273fb100de64b
2012-05-10 21:06:45 +02:00
Alexandre Emsenhuber
0fc8c8e14e Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: I10c077f27a2077a266a64048fa137f7b1f8e226c
2012-05-01 09:05:48 +02:00
daniel
c536e3db65 use ParserOutput::getSecondaryDataUpdates() as the primary method of getting pending updates 2012-04-17 17:54:00 +02:00
Jens Ohlig
10e91851b2 Merge branch 'master' into Wikidata
Conflicts:
	.gitreview
	includes/Article.php
	includes/AutoLoader.php
	includes/EditPage.php
	includes/LinksUpdate.php
	includes/WikiPage.php
	includes/installer/Ibm_db2Updater.php
	includes/installer/MysqlUpdater.php
	includes/installer/OracleUpdater.php
	includes/installer/SqliteUpdater.php
	maintenance/refreshLinks.php
2012-04-11 14:24:29 +02:00
daniel
cc365c3552 Added an array of SecondaryDataUpdate objects to ParserOutput
Change-Id: I329be83a0899b3f16c99119f2f802233a157ee42
2012-04-05 17:21:07 +02:00
Daniel Kinzler
8ede0ad20e integration with Title and Revision (work in progress) 2012-04-04 19:41:52 +02:00
Sam Reed
2ec09c5165 More return documentation 2012-02-09 21:35:05 +00:00
Antoine Musso
fc6bc233be Fix doxygen docs before REL1_19 branching 2012-02-01 20:53:38 +00:00
Aaron Schulz
5a6559d8b1 Reverted r108743 per CR comment. This should at least be discussed first. 2012-01-12 19:41:18 +00:00
Sam Reed
a5c200a25b Kill "* @return void" 2012-01-12 19:12:24 +00:00
Alexandre Emsenhuber
2629c3649f * Added revision's timestamp to OutputPage along with revision ID; avoid a DB hit in Skin::lastModified() when showing parser cache's content. This changed with the removal of $wgArticle in Skin since now it's a different WikiPage object and thus WikiPage::setTimetstamp() call is useless (but still kept).
* Added ParserOutput::(get|set)Timestamp() and the $mTimestamp member; avoid messing with isset()
2011-12-10 16:30:40 +00:00
Sam Reed
9d41b95053 Kill various unused variables
Comment some out also

Add some bits of documentation
2011-10-29 01:17:26 +00:00
Platonides
924d12407e We don't need anything from the marker. The title is outside. 2011-10-07 21:05:22 +00:00
Platonides
570b984533 Forgot to commit this file in r99250. 2011-10-07 21:00:06 +00:00
Sam Reed
937fc3bcfd Back out r95396 and friends 2011-09-29 22:08:00 +00:00
Aaron Schulz
b741bcd227 FU r84610: Renamed getImageTimeKeys() to getFileSearchOptions() 2011-09-14 19:05:43 +00:00
Sam Reed
44020e254c Merge the iwtransclusion branch back into trunk
Hexmode fixed broken unit tests in revisions after last time
2011-08-24 13:03:03 +00:00
Alexandre Emsenhuber
93075f0af3 Per Platonides, follow-up r93758: rename ParserOutput::addOutputPage() to ParserOutput::addOutputPageMetadata() to match its behaviour 2011-08-02 16:31:22 +00:00
Alexandre Emsenhuber
700aec3775 * (bug 15558) Allow includable special pages to be parameterized using wiki syntax
* Changed SpecialPageFactory::capturePath() to take the same parameters as SpecialPageFactory::executePath() (except the last one) and made it always return a bool instead of bool-or-string. The result HTML can be fetched from the OutputPage object of the context.
* Added module styles, scritps and messages members to ParserOutput in addition to modules. The first one is needed to display Special:RecentChanges correctly when transcluded since EnhancedChangesList::beginRecentChangesList() calls addModuleStyles( 'mediawiki.special.changeslist' )

Yes, this means that you can use {{Special:Recentchanges|enhanced=0}} to use the old changes list. For the ones that wonder, {{Special:Recentchanges|uselang=something}} will not work since the Language object is forced to the one used by the parser.
2011-08-02 15:40:03 +00:00
Mark A. Hershberger
cb2105b6a1 fixes Bug #27543 - “Warning: in_array() [function.in-array]: Wrong datatype for second argument in ParserOptions.php”
AFAICT, result of ParserOutput::getUsedOptions() is only used by ParserOptions::optionsHash() but that method doesn't account for a non-array value.

Patch supplied on bug.
2011-08-01 15:50:49 +00:00
Mark A. Hershberger
e201e2307d w/s changes: “svn diff -x-w” is clean 2011-08-01 15:40:02 +00:00