Commit graph

187 commits

Author SHA1 Message Date
Sam Reed
b6e0df246f Attempt at normalistion of comparison styles - empty string on left and right hand side normalised to it being on the rhs
Before this change, there were (? being regex 0 or 1)

"" ===? 1
'' ===? 24
"" !==? 8
'' !==? 32

== "" 14
== '' 344
!= "" 9
!== "" 4
!= '' 151
!== '' 85


Rhs was the much more common, and the preferred style by many developers.. (Was a similar discussion in #mediawiki recently.. After that lolbugreport i think)

Where there is a string (non empty) on the lhs, and variable/method call on the rhs still need normalising
2010-01-06 19:59:42 +00:00
Roan Kattouw
ab121e365f Readd case statement for {{STYLEPATH}} that was accidentally removed in r57283 2009-12-16 12:02:41 +00:00
Alexandre Emsenhuber
c3ec19debc Replaced all @fixme with "@todo Fixme" since doxygen doesn't have a @fixme command 2009-12-15 21:26:58 +00:00
Chad Horohoe
a4e5e935b6 Mass convert NULL -> null. Left strings and comments alone, obviously. 2009-12-11 21:07:27 +00:00
OverlordQ
8c0dbeb928 Followup to r59818, change transcache timestamp field to be consistent with other timestamp fields, requires schema change 2009-12-09 02:26:50 +00:00
OverlordQ
2ba3527d10 Fix Parser transcache to correctly format timestamps 2009-12-08 02:01:26 +00:00
Daniel Kinzler
52f05fd8fa adding support for <a> tags as a parser tag hook, in order to support rdfa output 2009-11-07 16:46:34 +00:00
Chad Horohoe
25a68735f7 Add bunch of missing classes to the Autoloader 2009-10-25 13:37:15 +00:00
Chad Horohoe
395eb8c5c6 Fix r57997 and r58039 for realz this time 2009-10-22 22:07:05 +00:00
Chad Horohoe
ffe23ad69f Fix retarded mistake in 57997, move break to within the if block or it defeats the entire purpose 2009-10-22 22:01:14 +00:00
Chad Horohoe
bfaf6cc2b4 (bug 21222) Free <math> tag if not using it. Patch by Platonides. 2009-10-22 11:40:38 +00:00
Happy-melon
69810149c2 (bug 21095) allow tracking categories added to the parser to be disabled by setting the system message to "-". 2009-10-11 12:52:08 +00:00
Daniel Kinzler
9d00a90a21 follow-up to r57278: cache all variables untill the next clearState() 2009-10-02 09:46:17 +00:00
Daniel Kinzler
f0b39b40d2 clear variable cache in clearState() as suggested by tim. fix odd values for long running imports; more vars could be cached now. 2009-10-02 09:09:18 +00:00
Andrew Garrett
1a42431b0f Add signature prefetching logic to Parser, supports r56706. 2009-09-30 10:35:34 +00:00
Happy-melon
96e20213d4 Recommit r56688 (tracking categories for __INDEX__ and __NOINDEX__). 2009-09-28 17:55:00 +00:00
Roan Kattouw
62de3d1478 Add a {{STYLEPATH}} magic word; necessary for upcoming EditToolbar fix 2009-09-26 11:51:37 +00:00
Brion Vibber
0d1d984313 Revert broken rewrite of login system; totally broken.
* Login doesn't attach to session properly, so can't stay logged in!
* Password field shown in plaintext!

If it just DOESN'T WORK please keep it on a work branch, don't put it in trunk!

Reverted:
r56682
r56683
r56684
r56686
r56688
r56696
r56699
r56702
r56703
r56704
r56782
r56896
2009-09-26 00:49:32 +00:00
Happy-melon
a25885d336 (bug16979) Add tracking categories for __INDEX__ and __NOINDEX__. 2009-09-20 22:14:09 +00:00
Brion Vibber
63b39c9164 Revert r53832, r53897, r54145 "(bug 17988) Spaces before [[Category:]] links are no longer ignored" and followup
Causes entire page to go blank under some circumstances.
2009-09-17 00:57:10 +00:00
Andrew Garrett
41437106a9 Relax === check for blank signatures to ==, fixes bug 19261 (alternative solution to r54585) 2009-09-09 17:30:52 +00:00
Aryeh Gregor
d87f3188bc Don't embed ?> in string literals
It messes up some syntax highlighters for some unknown reason.
2009-09-07 00:23:04 +00:00
Nephele
91716a9d7a (bug 2257) Add a $frame parameter to recursiveTagParse so tag extensions can expand template parameters 2009-08-30 06:37:10 +00:00
Andrew Garrett
33f5a8983b Revert r52983 for now, could cause unexpected syntax interactions, we want to investigate this before deploying it 2009-08-27 17:16:15 +00:00
Alexandre Emsenhuber
152638e907 * (bug 8143) Localised parser function names are now correctly case insensitive if they contain non-ASCII characters
Patch by Matěj Grabovský - http://bug-attachment.wikimedia.org/attachment.cgi?id=6406
2009-08-26 15:47:03 +00:00
Raimond Spekking
e1e2c80783 * (bug 20318) Distinct CSS classes for ISBN/RFC/PMID special links added 2009-08-20 09:13:29 +00:00
Tim Starling
831b6d2bf7 * Per my CR comments on r44560: merged FileCache into RepoGroup and fixed wfFindFile() global function bloat. Did not port unused functions such as the batch loading functions.
* Fixed the formal parameter bloat in the file finding functions by making wfFindFile(), RepoGroup::findFile() and FileRepo::findFile() take an associative array of options instead of a rapidly growing collection of formal parameters. Maintained backwards compatibility for the $time parameter, which was the only one used in an extension.
* Took the advice of the todo comment on FileRepo::findFiles() and implemented a calling convention for specifying times (and other options)
* Removed the file object cache from Parser, redundant with the RepoGroup file cache
* Deleted clueless and non-functional LocalRepo::findFiles(). Does not respect redirects, deletion bitfields, or anything else nuanced about FileRepo::findFile(). Does not have the same calling convention as FileRepo::findFiles().
2009-08-15 09:59:59 +00:00
Alexandre Emsenhuber
378e29e5df Per Nikerabbit's comment on r53897 (i.e. fix for r53832, second attempt): changed "m" modifier to "D" so that $ really only matches the end of the string 2009-08-01 12:41:45 +00:00
Alexandre Emsenhuber
afe90f6ffc Per Simetrical's comment on r53832: only trim if there're newlines 2009-07-28 20:16:17 +00:00
Alexandre Emsenhuber
d9944c772a * (bug 17988) Spaces before [[Category:]] links are no longer ignored
* some code style fixes
2009-07-27 19:42:24 +00:00
Brion Vibber
43bf053fd0 * (bug 14080) Short notation links to subpages didn't work in edit summaries
Moved Parser::maybeDoSubpage guts to Linker to call from both locations.
Added some parser test cases.
Note that this might not behave exactly like the main parser in cases where the link text would get altered, but the links are functional. Yay!
2009-07-20 02:07:56 +00:00
Alex Z
95ef1b6fd6 (bug 19814) - Interwiki links from file links - [[File:Foo.jpg|link=de:Test]] - are no longer recorded in the pagelinks table
Also update Parser::makeImage() docs for the link option
2009-07-18 22:49:31 +00:00
Roan Kattouw
b18ec94952 * Fix typo in Linker.php
* Only call ParserOutput::setTOCHTML() if a TOC was really generated
2009-07-14 13:35:07 +00:00
Remember the dot
a70213071d Removed repetition of URIs in the title attributes (tooltips) of external links. Web browsers typically display the target URIs of links in the status bar, making repeating the URIs in tooltips redundant. Some browsers, like Opera, can be configured to display the URIs in tooltips instead of the status bar without the web page having to supply title attributes at all.
As part of this process, I refactored some of Linker.php and removed an unused parameter from getExternalLinkAttributes.
2009-07-12 23:32:16 +00:00
Victor Vasiliev
9bc1e60cab Add function-like tag hooks. They are tags, which content is not preprocessed. Those hooks has access to PPFrame and are parsed on preprocessing stage. They might be useful for built-in programming languages. 2009-07-11 13:03:35 +00:00
Andrew Garrett
9de04ff5b4 * Allow leading-> as syntax for quoting. 2009-07-09 15:17:56 +00:00
Remember the dot
05978d7cf3 Title attributes are now always blank on framed and thumbnailed images, and default to blank on inline images instead of defaulting to the image's filename. Additionally, the alt attribute now defaults to the filename on framed and thumbnailed images if no caption or alt attribute is specified.
I was unable to run the parser test suite ("MediaWiki internal error"), so the test suite may need to be updated to reflect these changes.
2009-07-03 05:13:58 +00:00
Roan Kattouw
82022f21bc Core changes for NavigableTOC extension:
* Always generate the section tree, even when we're not generating a TOC
* Add Parser::mergeSectionTrees() to merge two section trees into one
* Add Linker::generateTOC() to generate the HTML for a TOC from a section tree, and add the section anchor to the section tree to facilitate this. This adds the ability to generate TOCs in extensions; haven't converted Parser.php to use it (yet?). As a side effect, this fixes API bug 18720
2009-06-25 11:05:22 +00:00
Roan Kattouw
7c199a872b (bug 19323) Calls to recursiveTagParse() overwrite ParserOptions::$mSections, causing the real section tree to be overwritten in some cases 2009-06-21 12:52:24 +00:00
Roan Kattouw
ae130186e8 Core changes for NavigableTOC extension:
* Add TOC HTML to ParserOutput
* Add class tocsection-$section to <li> elements in the TOC representing sections in the current page (as opposed to transcluded sections)
2009-06-20 21:47:10 +00:00
Roan Kattouw
5097164dce Add 'index', 'fromtitle', and 'byteoffset' fields to ParserOutput::getSections(). This makes these fields available through the API with action=parse&prop=sections . Also, the byte offset will be needed by the new NavigableTOC extension. 2009-06-20 18:25:30 +00:00
Andrew Garrett
046d986b16 Documentation I added while trying to figure out doBlockLevels, might be useful to others 2009-06-18 20:51:48 +00:00
Niklas Laxström
019a132ebf Regression in r51797, anon signature links where prefixed with contributions/ because default value changed from '' to null 2009-06-15 15:17:40 +00:00
Siebrand Mazeland
38ca12aa82 * replace some use of deprecated makeKnownLinkObj() by link() in core
* use array type parameter instead of string to escapeLocalUrl(), getFullURL() and getFullUrl() for readability
* add FIXME in Parser.php and LogEventsList.php where I didn't know how to replace makeKnownLinkObj by link()
* return type for private method Skin::editUrlOptions() changed from string to array
* some code readability improvements

Linking this to r51559 for CodeReview as there is some discussion there, and these changes are very similar.

Todo: core special pages
2009-06-07 15:02:12 +00:00
Siebrand Mazeland
055fcbd7cb * replace use of deprecated makeLinkObj() by link() in core
* add FIXME where makeLinkObj was used in documentation
2009-06-06 15:45:43 +00:00
Rotem Liss
b57bce94c5 Multiple whitespace in TOC anchors is now stripped, for consistency with the link from the edit comment. 2009-06-02 19:32:51 +00:00
Siebrand Mazeland
0d23260d81 (bug 19017) TOC level calculation error in an odd case. Patch by Brad Jorsch. 2009-06-01 16:39:18 +00:00
Shinjiman
21c11b8f40 * (bug 5755) Introduce {{CURRENTMONTH1}} and {{LOCALMONTH1}} to display the month number without the leading zero
* added {{CURRENTMONTH2}} and {{LOCALMONTH2}} as alias of {{CURRENTMONTH}} and {{LOCALMONTH}} for consistency with other magic words
2009-05-20 07:14:03 +00:00
Arash Boostani
28a9ea2b1c Reverting the code that encloses article sections in their own div for the time being, because there are certain scenarios that break the document structure. 2009-05-19 15:12:05 +00:00
Arash Boostani
e1e727ec5d Fixed a minor problem with $wgSectionContainers that was causing some divs to not be closed properly 2009-05-06 23:21:55 +00:00