Commit graph

1012 commits

Author SHA1 Message Date
Steve Sanbeg
1aa0bba50b clean up indentation 2007-05-01 23:08:23 +00:00
Steve Sanbeg
344e48f5f4 Fix my own stupid patching error 2007-05-01 22:56:22 +00:00
Steve Sanbeg
15fd78857c cleanup of my previous commit, per Tim. 2007-05-01 22:42:41 +00:00
Steve Sanbeg
90763fe60d fix bug 9670: follow redirects in section edit links 2007-05-01 17:26:57 +00:00
Brion Vibber
34d2b8da54 * (bug 6204) Fixes for indentation with $wgMaxTocLevel:
- don't emit too many list close tags after an invisible header
  - don't emit too many final list close tags if last header is invisible
  - don't emit TOC when there are no visible headers
2007-04-30 19:51:56 +00:00
Brion Vibber
5dd20241ab Reverting r21560 as discussed; there are severe problems with relying on a user-language variable, which is why it has not been added. 2007-04-27 15:12:22 +00:00
River Tarnell
9c06b47065 9697: Adding InternalParseBeforeLinks Parser Hook for Semantic MediaWiki (documentation updates), from Jim R. Wilson 2007-04-25 21:23:43 +00:00
Daniel Kinzler
ee4ddd5ded introducing magic word {{USERLANG}}; This should fix a lot of problems for multilingual wikis. 2007-04-25 12:42:18 +00:00
Brion Vibber
3d0b03d0eb Revert r21461 for now; a cleanup patch which doesn't change functionality but makes more things to clean up -- ugly function names, incorrect profiling function titles... 2007-04-23 18:52:51 +00:00
Antoine Musso
8eb0cdfdfa Move tidy callbacks from the Parser class to a new Tidy class. This is to keep
Parser.php at a reasonable size.
2007-04-21 23:25:36 +00:00
Tim Starling
b15d8cffc4 * Introduced media handler modules for file-type specific operations: thumbnailing, img_metadata, capabilities, etc.
* Deprecated $wgUseImageResize, thumbnailing will be enabled unconditionally.
* Fixed interaction of page parameter to ImagePage with the HTML file cache
* Improved error reporting for image thumbnailing
* Fixed MIME type for SVG files, will be silently changed from image/svg to image/svg+xml after loading from the database.
* Workaround for djvutoxml bug #1704049 (poor performance). Use djvudump instead.
* Fixed odd behaviour in ImagePage on DjVu thumbnailing errors
* Improved error reporting for image thumbnailing
* Added sharpening option for ImageMagick thumbnailing
* Removed Image::selectPage(), added page parameters to getWidth() and getHeight(), deprecated Image::renderThumb() and Image::getThumbnail()
* Changed default contents of img_metadata to empty string instead of a:0:{}
* Moved responsibility for respecting $wgGenerateThumbnailOnParse from the UI to Image.php
2007-04-20 12:31:36 +00:00
Nick Jenkins
f9619da3f0 Yet more doc tweaks:
* Add @addtogroup tags to various classes, to try and group conceptually-related classes together.
* Add brief descriptions to various Special pages, thanks to Phil Boswell.
* Moving some docs to be right above the classes they represent, so that they are picked up.
2007-04-20 08:55:14 +00:00
Ivan Lanin
73bb06d1a0 Introduce magic word {{NUMBEROFEDITS}} 2007-04-17 09:23:31 +00:00
Antoine Musso
096c1d0e7d In regex, do not capture stuff when you dont need it, use (?:) 2007-04-13 00:23:49 +00:00
Nick Jenkins
113bb1c772 Documentation tweaks to help documentation systems (Doxygen + PHPDocumentor)
pick up the appropriate tags, and documentation blobs for classes. This is 
the same as per r20769, but with the grouping changes (e.g. removing "@{{") omitted.
Please be advised that more related documentation tweaks may follow later - e.g. 
Doxygen generates a log file of warnings that is 574 Kb in size, when run over 
the just the trunk/phase3 code ... eek! Thankfully, much of that is just 
whining about functions without documentation   ;-)
2007-04-04 05:22:37 +00:00
River Tarnell
1376b31eb4 erroneous indentation 2007-03-30 19:38:11 +00:00
Steve Sanbeg
412e981d1f fix section/size links from cached templates, so templates look teh same whether from db or cache. 2007-03-29 19:31:25 +00:00
Brion Vibber
3a6ac5a3c3 Revert r20769: we don't use PHPDocumentor anymore, we use doxygen.
If making mass changes to tweak to its preferences, probably better to do it for the tool we actually generate docs with. :)
2007-03-28 14:16:43 +00:00
Nick Jenkins
5fef2333d4 PHPDocumentor [http://en.wikipedia.org/wiki/PhpDocumentor] documentation tweaking stuff.
Minor doc tweaks to prevent some PHPDocumentor warnings or errors when run on the includes/ directory. PHPDocumentor uses a syntax very similar to javadoc - mostly we already use this, but there were a few scattered places that were adjusted to make them consistent with the rest of the code. In practical terms, these changes were made:
* @url becomes @link
* @fixme becomes @todo
* HTML tags in descriptions must be closed / balanced.
* @bug was removed (where the bug was long fixed), or changed into a @todo (in the few situations where the bug was still pending)
* @obsolete becomes @deprecated
* Things like "/**@{{" and "/**@}}*/" which cause "unknown tag" warnings were removed
* @access must be a valid access level.
* @desc tag not needed, removed.
* Doesn't seem to like @licence, will accept @license however.
* Use full comment block notation in a few places (i.e. open block with "/**", start each line with " *", and end block with " */")

Then additional to this, to get some class docs associated with their respective classes:
* Moved some docs to right above those classes (deleting blank lines, or moving descriptions from the file headers)
* Marked some classes without docs as "@todo document"
* (done up to "class MIMEsearchPage" on the "classtrees_MediaWiki.html" page for the includes/ directory)
2007-03-28 08:53:02 +00:00
Markus Krötzsch
cb557c8adc Added parser hook InternalParseBeforeLinks, closes Bug#8578. The hook is relevant for all parser extensions that want templates, nowiki, etc. to
be taken care of before they do their magic.
2007-03-23 16:47:58 +00:00
Greg Sabino Mullane
d51e743d23 Trim makeImage option list, for bug #8582 2007-03-17 19:18:21 +00:00
Steve Sanbeg
ec4174f085 When calling edit page for nonexistent section, generate error inside of just discarding edits, since edit links sometimes go to the wrong place. 2007-03-14 18:20:21 +00:00
Antoine Musso
5bb6ed98ea Ignore lonely wiki text '''''. Fix a parser test. 2007-03-13 18:09:20 +00:00
Aryeh Gregor
e70fd13f80 Introducing broken changes in commits meant to fix broken changes is vaguely ironic. 2007-03-04 16:11:25 +00:00
Aryeh Gregor
6cd5179d61 Fix r20109, which was kind of insane. It was a wikitext list with only some output items part of the list, with <br />s at the end of each item. Converted to a proper classed and id'd XHTML list. 2007-03-04 15:44:38 +00:00
Aryeh Gregor
1ad70e60d3 Explicitly mark public methods public 2007-02-28 17:25:41 +00:00
Daniel Kinzler
e67bceab97 wgNonincludableNamespaces option to disable inclusion for specific namespaces. Helps to make read-protection work 2007-02-15 01:23:47 +00:00
Brion Vibber
35f4c25b3f * (bug 8897) Fix whitespace removal for interlanguage links with link prefix 2007-02-06 07:45:06 +00:00
Aryeh Gregor
b672f737ab * (bug 6987) Allow perrow, widths, and heights attributes for <gallery> (I deliberately called them "widths"/"heights" and not "width"/"height" because the latter two would most obviously mean width and height of the gallery itself)
* Convert <gallery> caption to, well, a <caption>
2007-02-02 03:32:03 +00:00
Aryeh Gregor
b63102c574 * (bug 8535) Allow CSS vertical alignment keywords to be used for images. 2007-02-02 00:44:42 +00:00
Nick Jenkins
61678d8a5d * Removing a handful of unused globals.
* $stack is not modified in Profiler::calltreeCount(), no need to pass-by-ref.
* Add FIXME marker to non-cross-platform line.
* A freshly created string does not need to be returned by reference. [Xml::namespaceSelector() and HTMLnamespaceselector() ].
2007-01-23 07:29:58 +00:00
Nick Jenkins
f88c771756 The war on redundant ampersand usage!
* Convert "$dbw =& wfGetDB( DB_MASTER );" --> "$dbw = wfGetDB( DB_MASTER );"
* convert "$skin =& $wgUser->getSkin();" --> "$skin = $wgUser->getSkin();"

For the time being have not changed the function definitions of wfGetDB() or User::getSkin() [i.e. they are still both return-by-ref], so as to ensure the interface does not change for extensions [some of which may still be trying to run on PHP4 environments]. However presumably at some point this can be changed too.

Also includes tiny tweak to newlines in parserTests - will show 1 rather than 2 newlines between the "Reading tests from" strings when in quiet mode.
2007-01-22 23:50:42 +00:00
Antoine Musso
46c4fb40c9 Remove any additional trailing slashes when subpaging is enabled 2007-01-21 03:47:38 +00:00
Rob Church
d03c0c2c6b (bug 8403) Respect bad image list exceptions in galleries on wiki pages 2007-01-20 22:34:05 +00:00
Antoine Musso
5f8ab0b700 Fix an error introduced with r19483. Pointed out by LeonWP. 2007-01-20 21:22:31 +00:00
Antoine Musso
c771fc9c96 Use Doxygen @addtogroup instead of phpdoc @package && @subpackage 2007-01-20 15:09:52 +00:00
Antoine Musso
52d2e48d27 Split out ParserOptions and ParserOutput classes in their own files.
Made using svn copy so the logs are kept.
2007-01-20 12:50:56 +00:00
Antoine Musso
d228f80fc2 whitespaces killing 2007-01-17 19:48:48 +00:00
Rob Church
0957e88447 (bug 8678) Fix detection of self-links for numeric titles in Parser 2007-01-17 19:29:11 +00:00
Aryeh Gregor
9cd25c1e2d Parser::parse() a) is used by Article, CoreParserFunctions, EditPage, JobQueue, OutputPage, and SkinTemplate; and b) is listed as an entry point in the Parser class documentations. I don't think it's very @private. 2007-01-15 16:03:27 +00:00
Brion Vibber
f724ad0838 Quick and dirty guard against a FakeTitle making its way into message transformation.
This could break job processing when a message using {{PAGENAME}} or similar got interpreted;
for instance using {{int:noarticeltext}}.

The message transformation uses $wgTitle, which is... probably not super.
Better fix might be to distinguish inline transformation in some nice way,
so the parser would use its own title object already set locally... or something.

ugh!
2007-01-13 22:36:32 +00:00
Tim Starling
4e7c424df2 Removed broken __END__ feature. 2007-01-13 22:29:32 +00:00
Brion Vibber
cf506938b5 * fix last commit so quickUserCan() actually skips the cascading query
* use quick check for move tab privilege check
* drop quickUserCan(Edit|Move|*); just provide one quickUserCan and use the permission keys explicitly. the other (non-quick) funcs are i think deprecated, so marking them so
* adjusted some whitespace
2007-01-13 03:22:20 +00:00
Andrew Garrett
78eb71793d Possibly partial patch to make userCanEdit avoid running cascade-protection queries on page-view. 2007-01-13 02:37:02 +00:00
Antoine Musso
f13cb9e09b braces are usefull 2007-01-09 20:57:10 +00:00
Aryeh Gregor
2493e3df03 * Move headline construction to Linker function (from being hardcoded in Parser)
* Use ?P<title> for capturing in the main headline-munching loop, for readability

Should have no impact on output except whitespace.
2007-01-08 02:11:45 +00:00
Brion Vibber
16783ab510 Fix regression in transclusion of {{MediaWiki:}} messages that don't exist locally.
(Regression because they used to be in the database and now aren't in most cases.)
Some UI messages use this to get page names, for instance.
Now grabs the value out of the message system if the page doesn't exist.
2007-01-07 12:30:46 +00:00
Rob Church
9095dd44a0 Rename ImageGallery::setCaptionSafe() to ImageGallery::setCaptionHtml(), since as Simetrical points out...it's not actually safe :D 2007-01-05 01:07:04 +00:00
Tim Starling
38eafdce8a Improve Parser::strip() performance by delaying update of the strip state until the end of the parse. This improves performance in two ways: firstly by minimising the size of the state array in the case of large numbers of tags, and secondly by avoiding unnecessary invalidation of the FSS object, when FSS is enabled. The same function is preserved, because a placeholder from one recursion level should never find its way into the output of the same recursion level. 2007-01-04 21:56:37 +00:00
Rob Church
a411a4e6f5 * Move escaping of image gallery captions to ImageGallery::setCaption()
* Allow developers to set HTML gallery captions with ImageGallery::setCaptionSafe()
* (bug 8489) Support basic links in <gallery> caption attribute
2007-01-04 19:47:11 +00:00
Brion Vibber
e3e1cef83c * Fix for interwiki transclusion where target wiki uses query string for title
* Resolve namespaces on interwiki Title objects using canonical namespace names
  if possible (should not happen, though, outside interwiki transclusion... and
  maybe not even then, but it does)
2006-12-31 03:04:49 +00:00
Rob Church
71c7757111 (bug 5908) Allow overriding the default category sort key for all items on a page using {{DEFAULTSORT}} 2006-12-29 10:39:35 +00:00
Robert Stojnić
21a9d83443 More language variant stuff:
* Added some basic parser tests for variants
* Enable selflinks to be written in variants
* Prevent username lookup in variants for sr.wiki (per community request)
* Update release notes (also notes for last commit, when I forgot)
2006-12-26 12:19:45 +00:00
Rotem Liss
c0d5b63588 Commited the categories redirect stuff by mistake. 2006-12-22 19:50:56 +00:00
Rotem Liss
d7a9acb13d Update. 2006-12-22 19:48:46 +00:00
Brion Vibber
241f12f441 Tweak fix for bug 8335 to avoid breaking dubious, but used, variants.
If we were able to get an integer out of it, let it pass.
2006-12-22 01:02:52 +00:00
Steve Sanbeg
27895ef12a save path level before recursing into functions, for better cycle detection 2006-12-21 00:07:13 +00:00
Antoine Musso
d0183a2a80 Fix 8335 : Image syntax does not parse "px" in image caption correctly 2006-12-20 14:24:57 +00:00
Ilmari Karonen
c74eb46f20 (bug 8110) Make magic ISBN linking stricter: only match ten-digit sequences
(plus optional ISBN-13 prefix) with no immediately following alphanumeric
character, disallow multiple consecutive internal redirects.  This required
fixing a number of broken parser tests that had used a too-short ISBN.
2006-12-18 01:12:19 +00:00
Ilmari Karonen
7325234d67 Change the regexen in doBlockLevels() to handle <center> tags the same as
<div>.  This fixes bug 8293: Use of center tag ruins paragraph formatting,
but COULD SOMEONE PLEASE EXPLAIN TO ME WHY??!?  Trying to make sense of
that code gives me a headache.  (Ps. See also related change in r14690.)
2006-12-17 16:51:01 +00:00
Robert Stojnić
650c9d1e12 Small patch to minimize the number of category variants need to be fetched. 2006-12-14 01:06:28 +00:00
Robert Stojnić
95b08838a8 Should add only link variants (and not category variants) to pagelinks table. 2006-12-12 18:57:19 +00:00
Steve Sanbeg
f9524cb8e6 per Rob's comment, make call to createAssocArgs() more clearly static. 2006-12-12 16:12:30 +00:00
Steve Sanbeg
7adb982f57 refactor template arg parsing into static method; this may prevent a future fork of it, since it could be useful for parserfunctions, too. 2006-12-11 23:50:41 +00:00
Robert Stojnić
66999c01a4 * Enable category names to be written in variants (use single linkbatch for both link and category variants)
* introduce armourMath(), use to put -{ }- around math if needed (not needed for zh, but needed for sr, and probably kk)
2006-12-11 23:33:27 +00:00
Steve Sanbeg
cad8e5f472 Add variable for edit section offset, to help account for sections that were not transcluded. 2006-12-07 18:48:29 +00:00
Leon Weber
a074694631 * (bug 8141) Cleanup of Parser::doTableStuff() (patch by Carl Fürstenberg/AzaTht)
* Slightes change of a code snippet of me to make it look nicer
2006-12-04 20:08:53 +00:00
Brion Vibber
8fc22c7ec6 * (bug 8117) {{REVISIONTIMESTAMP}} showed weird default if $wgLocalTZoffset set;
now uses current time for previews and if timestamp can't be loaded from DB
* {{REVISIONTIMESTAMP}} now uses site local timezone instead of user timezone
  to ensure consistent behavior
* {{REVISIONTIMESTAMP}} and friends should now work on non-MySQL backends
2006-12-02 23:56:25 +00:00
Ilmari Karonen
75a2ed9ffa disallow embedded line breaks in ISBNs; allowing them breaks things in a most interesting manner 2006-12-01 03:16:22 +00:00
Ilmari Karonen
2732754a5c avoid matching "ISBN " in "ISBN foo" 2006-12-01 02:59:21 +00:00
Ilmari Karonen
3f71e0fb34 (bug 8110) allow spaces in ISBNs 2006-12-01 02:39:19 +00:00
Nick Jenkins
74ea267553 Prevent the following strict-standards warnings - i.e. when running with error_logging(E_ALL | E_STRICT); - which seems to disable the yucky "@" operator, as well as maxing out the pedantry of warnings. Nothing major found, just nice to be as explicit and as forward-compatible as possible.
* Strict Standards: Undefined index: switch in includes/Parser.php on line 3849
* Strict Standards: Undefined index: ref in includes/Parser.php on line 3818
* Strict Standards: Non-static method OutputPage::setEncodings() should not be called statically in index.php on line 11
* Strict Standards: Only variables should be assigned by reference in includes/Skin.php on line 888
* Strict Standards: Non-static method Title::newFromURL() should not be called statically in includes/SpecialContributions.php on line 178
* Strict Standards: Only variables should be assigned by reference in includes/GlobalFunctions.php on line 2054
* Strict Standards: Undefined index:  contributions-summary in languages/Language.php on line 764
* Strict Standards: Undefined index:  trackbackhtml in skins/MonoBook.php on line 86
* Strict Standards: Undefined index:  blockip in skins/MonoBook.php on line 204
* Strict Standards: Undefined index:  tagline in skins/MonoBook.php on line 261
* Strict Standards: Undefined index: uselang in includes/SkinTemplate.php on line 1159
* Strict Standards: Non-static method CoreParserFunctions::plural() cannot be called statically in includes/Parser.php on line 2902
* Strict Standards: Undefined offset:  0 in includes/SkinTemplate.php on line 196
* Strict Standards: Undefined index:  USE INDEX in includes/Database.php on line 1015
* Strict Standards: Undefined index:  image_tests in includes/Parser.php on line 3488
* Strict Standards: Undefined offset:  0 in includes/Parser.php on line 3507
* Strict Standards: Non-static method ChangesList::newFromUser() should not be called statically in includes/SpecialWatchlist.php on line 361
* Strict Standards: Non-static method RecentChange::newFromCurRow() should not be called statically in includes/SpecialWatchlist.php on line 367
* Strict Standards: is_a(): Deprecated. Please use the instanceof operator in includes/Exception.php on line 168
* Strict Standards: Non-static method LogPage::logName() should not be called statically in includes/SpecialContributions.php on line 325
* Strict Standards: ob_end_flush(): failed to delete and flush buffer. No buffer to delete or flush. in maintenance/commandLine.inc on line 191
* Strict Standards: Undefined index:  meatball in languages/Language.php on line 234
* Strict Standards: rmdir(/tmp/mwParser-2108164586-images/thumb): Directory not empty in maintenance/parserTests.inc on line 605
* Cleaning out some new temp files left over by parserTests (there were one or two straggler dirs/files that would persist after the test run ended, due to new tests being added over time)
* Strict Standards: Non-static method CoreParserFunctions::special() cannot be called statically in includes/Parser.php on line 2902
* Strict Standards: Declaration of ListUsersPage::preprocessResults() should be compatible with that of QueryPage::preprocessResults() in includes/SpecialListusers.php on line 38
* Strict Standards: Only variables should be passed by reference in includes/SpecialBlockip.php on line 175
* Strict Standards: Skin::include_once(skins/Standard.deps.php) [<a href='function.include-once'>function.include-once</a>]: failed to open stream: No such file or directory in includes/Skin.php on line 121
* Strict Standards: Declaration of ApiMain::getResult() should be compatible with that of ApiBase::getResult() in includes/api/ApiMain.php on line 35
* Strict Standards: is_a(): Deprecated. Please use the instanceof operator in includes/WikiError.php on line 63
* Strict Standards: Non-static method WikiError::isError() should not be called statically in includes/SpecialImport.php on line 64
* Strict Standards: Non-static method ImportStreamSource::newFromInterwiki() should not be called statically in includes/SpecialImport.php on line 58<b
* Strict Standards: Only variables should be assigned by reference in includes/SpecialUndelete.php on line 501
* Strict Standards: Non-static method Image::newFromName() should not be called statically in thumb.php on line 56
* Strict Standards: Non-static method CoreParserFunctions::numberoffiles() cannot be called statically in includes/Parser.php on line 2902
* Strict Standards: Non-static method CoreParserFunctions::statisticsFunction() should not be called statically in includes/CoreParserFunctions.php on line 139
* Strict Standards: Non-static method CoreParserFunctions::isRaw() should not be called statically in includes/CoreParserFunctions.php on line 128
* Strict Standards: Non-static method CoreParserFunctions::grammar() cannot be called statically in includes/Parser.php on line 2902
* Strict Standards: Undefined offset:  1 in includes/SpecialMIMEsearch.php on line 130
* Strict Standards: Undefined index:  recentchangeslinked in skins/MonoBook.php on line 184
* Strict Standards: Declaration of DumpNotalkFilter::pass() should be compatible with that of DumpFilter::pass() in includes/Export.php on line 612
* Strict Standards: Declaration of DumpNamespaceFilter::pass() should be compatible with that of DumpFilter::pass() in includes/Export.php on line 665
* Strict Standards: Non-static method ImportStreamSource::newFromUpload() should not be called statically in includes/SpecialImport.php on line 46
* Strict Standards: Undefined offset:  5 in includes/Sanitizer.php on line 396
* Strict Standards: Undefined index:  wikidbUserName in includes/SpecialUserlogin.php on line 562
* Strict Standards: Only variables should be assigned by reference in includes/api/ApiQueryBase.php on line 95
* Strict Standards: Only variables should be assigned by reference in includes/api/ApiQueryBase.php on line 116
* Strict Standards: Only variables should be assigned by reference in includes/api/ApiQueryWatchlist.php on line 128
* Strict Standards: Undefined property:  stdClass::$rc_id in includes/api/ApiQueryBase.php on line 131
* Strict Standards: Undefined property:  stdClass::$rc_last_oldid in includes/api/ApiQueryBase.php on line 164
* Strict Standards: Undefined property:  stdClass::$rc_moved_to_ns in includes/api/ApiQueryBase.php on line 285
* Strict Standards: Undefined property:  stdClass::$rc_patrolled in includes/api/ApiQueryBase.php on line 176
* Strict Standards: Undefined index:  comment in includes/api/ApiFeedWatchlist.php on line 85
* Strict Standards: Undefined offset:  0 in includes/Skin.php on line 302
* Strict Standards: Non-static method User::SetupSession() should not be called statically in includes/SpecialUserlogin.php on line 15

... There are certain to be other things too, so this is not intended to be comprehensive, rather the above just stops most of the notifications I observed.
2006-11-29 05:45:03 +00:00
Tim Starling
f9ca2e9672 Fixed Parser::getRevisionTimestamp() 2006-11-27 03:15:38 +00:00
Nick Jenkins
14c53b728f Code housekeeping stuff (and barring any stuff-ups on my behalf, there should be no changes in behaviour whatsoever after this) -
* removing some unused global declarations.
* removing or commenting out or adding comments for unused local vars.
* Adding one or two local var declarations.
* Declaring $matches array passed to preg_match() / preg_match_all() as array() before using [not required, just have a slight preference for the explicitness].
* remove one or two pass-by-reference function declarations where the value is not modified.
* Adding some braces to if-else blocks.
* In Parser.php, stripstrate is now an object rather than an array as per r17820, so we no longer need ask for a reference to it (as in "$x =& $this->mStripState;"), and in fact it's probably just simpler to get rid of $x altogether.
* Moving some preg regexes from "" quoting to '' quoting to stop static analyzer whinging about bad escape sequences.

... up to "LinksUpdate.php" in the includes/ directory.
2006-11-23 08:25:56 +00:00
Tim Starling
2f12a58d93 * Introduced StringUtils.php, populated it with some generic string functions, both new and collected from various other files.
* Removed some backtracking regexes with an O(N^2) worst case, replaced with StringUtils::delimiterReplace(). There is a beneficial functional difference: /*/ is no longer considered to be a complete CSS comment.
* Changed the parser strip state from an array to an object. This should hopefully avoid the PHP bugs with array references. StripState uses the new ReplacementArray to do the replacements, thereby supporting FSS. 
* Removed DatabaseFunctions.php from the default startup sequence. Moved wfGetDB() to GlobalFunctions.php.
* Introduced the SiteStats class, with a collection of cached site stats accessor functions.
* Removed all global functions from Parser.php, they don't belong there.
* Made LanguageConverter use the new ReplacementArray class instead of managing its own FSS objects.
2006-11-21 09:53:45 +00:00
Brion Vibber
7ca126466e Revert 17507 and 17518; more weird screwing about with headers, messing up styles.
Can we maybe stop playing with this on trunk?
2006-11-12 15:20:21 +00:00
Tim Starling
1dd2e57717 profiling 2006-11-12 10:47:10 +00:00
Aryeh Gregor
6dcead7dde Fix regression in usability per <http://mail.wikipedia.org/pipermail/wikitech-l/2006-October/039465.html>. Document structure tweaked so that <h#> tags once more contain only the header text and not the section edit links. 2006-11-09 07:06:58 +00:00
Tim Starling
36ed0cd96c Reverting 17479/17480, breaks subclassing of Linker methods by skins. See my comment on bug 7405. 2006-11-08 07:12:03 +00:00
Nick Jenkins
332eed5df0 Fix parserTests regression introduced in r17479.
Example of failing test:
----------------------
Running test Magic links: RFC (bug 479)... FAILED!
--- /tmp/mwParser-1109840392-expected   2006-11-08 05:39:04.000000000 +0000
+++ /tmp/mwParser-1109840392-actual     2006-11-08 05:39:04.000000000 +0000
@@ -1,2 +1,2 @@
-<p><a href="http://www.ietf.org/rfc/rfc822.txt" class="external" title="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>
+<p><a href="http://www.ietf.org/rfc/rfc822.txt" class="external " title="http://www.ietf.org/rfc/rfc822.txt" rel="nofollow">RFC 822</a>
 </p>
----------------------

Also applied to the "BUG 1887: A RFC with a thumbnail" and "RFC code coverage" tests.
2006-11-08 06:03:01 +00:00
Nick Jenkins
fa239349f2 * (bug 7405) Make Linker methods static. Patch by Dan Li. 2006-11-08 05:21:15 +00:00
Brion Vibber
e0b7262afc Revert r17367 "(bug 7723) Add ic: parser function, with alias tc:, which capitalises the first letter of each word."
Feature creep with no apparent usefulness; would produce obviously incorrect results for mixed-case or all-caps words.
2006-11-03 08:36:28 +00:00
Andrew Garrett
dc223c593f * (bug 7723) Add ic: parser function, with alias tc:, which capitalises the first letter of each word. 2006-11-03 05:25:10 +00:00
Tim Starling
ac28d6f10a Added {{#special:}} parser function, to give the local default title for special pages 2006-10-31 13:25:47 +00:00
Tim Starling
a3b490d2c4 * Made special page names case-insensitive and localisable. Care has been taken to maintain backwards compatibility.
* Used special page subpages in a few more places, instead of query parameters
2006-10-30 06:25:31 +00:00
Tim Starling
0dd85f7013 docs 2006-10-18 09:19:28 +00:00
Aryeh Gregor
ace123a337 * (bug 4525) Move section links down visually to same level as headings editsection links are now inside the heading elements).
* Document structure changed, so some JavaScript/CSS may need tweaking (wikibits.js updated to reflect changes).
* Parsertests updated, but don't seem to run, so someone please confirm that there are no (illusory) regressions.
* $wgStyleVersion bumped.
2006-10-18 06:53:19 +00:00
Nick Jenkins
505878dc62 Revert part of r17066 - ParserOptions private variables not being treated as private, reported by Simetrical, may only be experienced when tidy is enabled, I need to grep more in future. 2006-10-18 05:29:57 +00:00
Nick Jenkins
55886772f4 * Make ParserOptions private variables private.
* Remove two unused globals.
* Remove pass-by-ref usage when arg is never modified (objects automatically passed-by-ref in PHP5)
* Removed some unused local variables.
* Mark a possibly dubious pass-by-ref on an uninitialized var as "FIXME: Please check that this initialization is correct", and added what I presume is the correct initialization.
* Declare preg_match arg 3 (output matches argument) as an array() before using it. Nothing wrong with not doing this, just feels slightly more explicit to me than a function call that also implictly creates and populates an array.
* My editor has automatically removed trailing spaces at the end of lines (which is not inherently a bad thing, but I have turned this option off now to help minimize diff sizes in future).
* Have confirmed that "php maintenance/parserTests.php --quiet --quick --color=no" shows no regressions, and that "php maintenance/fuzz-tester.php --specific-test=editPageTest --max-runtime=5" still shows no errors.
2006-10-17 08:49:27 +00:00
Tim Starling
dd785270d7 Converted User to use lazy initialisation. This is to avoid unstub loops, and also for performance. Interfaces and semantics have been largely preserved, except for a minor change involving setLoaded(). 2006-10-14 06:58:19 +00:00
Aryeh Gregor
8825de5e6f Revert last two commits. Broke wikibits and don't know how to fix it at the moment. 2006-10-12 09:02:25 +00:00
Aryeh Gregor
2d6344080e * (bug 4525) Move section links down to same level as headings (editsection links are now inside the h# elements) 2006-10-12 08:01:19 +00:00
Nick Jenkins
8182a4c2ae (bug 6835): Removing the includes/Parser.php::getTemplateArgs() function, because it seems to be unused:
* Nobody on #mediawiki seems to definitively know of anything that uses it.
* A "grep -inr getTemplateArgs" shows that there seem to be no calls to it in MediaWiki or the extensions in SVN.
* A google codesearch ( http://www.google.com/codesearch?q=getTemplateArgs&btnG=Search+Code ) seems to show no out-of-tree usage.
* A straight google showed nothing obvious.
* An "svn blame includes/Parser.php" shows that it was added in r4452 (2 years 2 months ago) and has hardly been touched since.
* A "php parserTests.php --quiet --quick --color=no" shows no new regressions when it's removed.
* Using a code coverage tool I simply could not get this function to be invoked.
* Nobody requested this be kept when removing it was first suggested on wikitech-l three months ago (http://mail.wikipedia.org/pipermail/wikitech-l/2006-July/036969.html ).
* A PHPXref output for MW 1.6.3 ( http://mediawiki.openapp.org/mediawiki/nav.html?_functions/index.html ) showed zero references to this function.
In short, it looks like dead code, and seeing as this is the very start of the 1.9 cycle, now is probably the ideal time to remove it, so as to give a maximum window of opportunity for complaints in case it turns out someone somewhere is actually using this.
Also purging the RELEASE-NOTES of stuff from the 1.8 series, since the RELEASE-NOTES need to be updated anyway for this.
2006-10-11 05:45:16 +00:00
Jens Frank
06d6e4fe14 (bug 7529) Including a non-existent category in an article places that article in the category 2006-10-09 11:53:12 +00:00
Niklas Laxström
78034ed0d1 * (bug 7459) Magic word variables are always case sensitive 2006-10-08 13:00:42 +00:00
Ilmari Karonen
80dc474cdc Bug 6826: Extend context link ("pipe trick") syntax to pages with commas in title 2006-10-04 21:32:09 +00:00
Tim Starling
ea4e4b0ed1 strcspn bug: http://bugs.php.net/bug.php?id=39032 2006-10-04 08:43:09 +00:00
Brion Vibber
bf63ffaa2c Committed a bunch of live hacks from Wikimedia servers
A few left, but these don't look too evil
2006-10-02 17:04:13 +00:00
Tim Starling
efdd9ae981 Made {{INT:}} a core parser function instead of a special case. The syntax and behaviour is largely unchanged. 2006-09-30 04:53:36 +00:00
Jimmy Collins
2a13633f31 * (bug 7425) Preceeding whitespace in [[...]] breaks subpages 2006-09-27 17:07:50 +00:00
Jimmy Collins
1fc51442c5 Fix update made in r16659 - now use field revision_timestamp instead of page_touched. 2006-09-26 22:45:16 +00:00
Jimmy Collins
57aa38cc61 * (bug 6092) Introduce magic words {{REVISIONDAY}}, {{REVISIONDAY2}, {{REVISIONMONTH}},
{{REVISIONYEAR}} and {{REVISIONTIMESTAMP}}
2006-09-26 17:20:36 +00:00
Tim Starling
240a6cb24d Added exception list feature to the bad image list 2006-09-25 01:35:41 +00:00
Brion Vibber
61b04a3e95 * Updates to language variant code for Serbian et al 2006-09-20 10:22:12 +00:00
Brion Vibber
376014e981 * Added experimental $wgRevisionCacheExpiry to cache extracted revision text
in $wgMemc, to further reduce hits to external storage.
  Set to 0 (disabled) by default.
2006-09-18 18:10:20 +00:00
Brion Vibber
a38c8add84 reverting SerbianVariants check-in, not ready to go live yet on Wikimedia 2006-09-15 21:02:35 +00:00
Brion Vibber
1657774656 Merge from SerbianVariants branch, trunk 16500 vs SerbianVariants 16523 2006-09-15 20:08:21 +00:00
Rob Church
95f74874a6 Whoops, left in commented-out code 2006-08-30 08:04:55 +00:00
Rob Church
930ddce13a * Include SVN revision number in {{CURRENTVERSION}} output, where applicable
* Make the MediaWiki version-reading functions in SpecialVersion.php static
2006-08-30 08:03:10 +00:00
Rob Church
df1e411f4b * (bug 7059) Introduce "anchorencode" colon function 2006-08-30 07:51:44 +00:00
Rob Church
d5364e2bea * (bug 7075) List registered parser function hooks on Special:Version
* Make the exception text in Parser::setFunctionHook() a bit more succinct
2006-08-30 07:45:07 +00:00
Jens Frank
41440bf516 update metadata for old images, ignore page= if no djvu renderer has been supplied 2006-08-27 18:36:54 +00:00
Jens Frank
b728e4fabe Fix missing img_page in rev 16036 (missing commit of MessagesEn.php) 2006-08-27 16:07:45 +00:00
Rotem Liss
51e44c9f4c (bug 366) Time-Variables like CURRENTTIME and CURRENTDAY should use time zones
Actually, creating new magic words, replacing CURRENT with LOCAL in their names, which use the local time zone, per discussion: http://mail.wikimedia.org/pipermail/mediawiki-l/2006-August/014542.html . The behavior of the current magic words is not changed.
2006-08-23 16:45:49 +00:00
Rob Church
73ee792c4d * (bug 7044) Introduce "padleft" and "padright" colon functions 2006-08-18 17:30:35 +00:00
Tim Starling
5e75e9bc22 Added [[:Image:Foo.png]] style links to the pagelinks table 2006-08-18 05:00:16 +00:00
Tim Starling
bf8f5e6da1 Show a link to the template when the inclusion limit is reached, as per enwiki request 2006-08-17 22:20:06 +00:00
Tim Starling
415de1d56a Second attempt 2006-08-15 02:40:20 +00:00
Tim Starling
5709ce706e optionally remove comments in preprocess() 2006-08-15 02:24:59 +00:00
Tim Starling
4f4120b5e4 Added {{CURRENTHOUR}} 2006-08-14 22:43:50 +00:00
Tim Starling
4ed04eff9f Added Parser::preprocess() entry point and OT_PREPROCESS output type, to expand templates and other similar entities producing valid wikitext as output. The immediate application is a special page extension, shortly to be committed, but it may be used in the future to produce an intermediate cache, to improve the rendering speed of stable versions or other kinds of old revisions. Added some shortcut aliases for output type comparsions. 2006-08-14 07:10:31 +00:00
Brion Vibber
ce9b1d9d08 Revert part of 16036 using an undefined magic word, spews errors everywhere 2006-08-13 23:42:38 +00:00
Jens Frank
7f7e79022b (bug 6420) Render thumbnails for djvu images, show multipage preview on image page 2006-08-13 17:34:48 +00:00
Tim Starling
68e5a2906b Fixed regex in doMagicLinks (broken since r15976) 2006-08-12 06:12:54 +00:00
Tim Starling
c4bcbda084 Template expansion size limit 2006-08-10 21:28:49 +00:00
Tim Starling
91006d5acb Optimised Sanitizer::removeHTMLtags, Parser::unstrip, Parser::doMagicLinks, Parser::replaceInternalLinks and Parser::replace_callback. Introduced fast abridged entry point Parser::recursiveTagParse, for recursive parsing called from Cite.php and similar extensions. Resolved a known fail parser test. 2006-08-06 14:01:47 +00:00
Rotem Liss
3afb14b6bc Fixing a comment. 2006-08-04 17:59:59 +00:00
Ilmari Karonen
c05f5dcafe more minor tweaking to context link code, +comment 2006-07-26 19:33:13 +00:00
Ilmari Karonen
bbc5776faa further simplify context link code; use non-greedy matching instead of modifying the character class 2006-07-26 18:20:12 +00:00
Ilmari Karonen
d44217416d simplify context link handling in pstPass2(); don't use three regexps where one will do 2006-07-26 18:09:04 +00:00
Tim Starling
43b2fb56b6 Merged localisation-work branch:
* Made lines from initialiseMessages() appear as list items during installation
* Moved the bulk of the localisation data from the Language*.php files to the Messages*.php files. Deleted most of the Languages*.php files.
* Introduced "stub global" framework to provide deferred initialisation of core modules. 
* Removed placeholder values for $wgTitle and $wgArticle, these variables will now be null during the initialisation process, until they are set by index.php or another entry point.
* Added DBA cache type, for BDB-style caches. 
* Removed custom date format functions, replacing them with a format string in the style of PHP's date(). Used string identifiers instead of integer identifiers, in both the language files and user preferences. Migration should be transparent in most cases.
* Simplified the initialisation API for LoadBalancer objects.
* Removed the broken altencoding feature.
* Moved default user options and toggles from Language to User. Language objects are still able to define default preference overrides and extra user toggles, via a slightly different interface.
* Don't include the date option in the parser cache rendering hash unless $wgUseDynamicDates is enabled.
* Merged LanguageUtf8 with Language. Removed LanguageUtf8.php. 
* Removed inclusion of language files from the bottom of Language.php. This is now consistently done from Language::factory(). 
* Add the name of the executing maintenance script to the debug log. Start the profiler during maintenance scripts.
* Added "serialized" directory, for storing precompiled data in serialized form.
2006-07-26 07:15:39 +00:00
Tim Starling
5fae7ad49b Made OutputPage::tryParserCache() use addParserOutputNoText(), this fixes {{DISPLAYTITLE:}} and any similar entity. Added accessor for the subtitle in ParserOutput. 2006-07-24 05:25:12 +00:00
Brion Vibber
ba78b052b0 Revert 15733 and 15719 for the moment; I see some eval'd string code and other thinsg which make me nervous and I don't think anybody's reviewed this 2006-07-19 20:13:39 +00:00
Robert Stojnić
6c02619402 Commiting patch r15625:15661 from branches/SerbianVariants.
Enable titles in fixed variants (e.g. -{Title}-), rewrote
the Parser code for variants (do a single query for all 
variants of all links, instead 1 query per link per variant).
2006-07-18 19:36:25 +00:00
Tim Starling
8831c8e13d MagicWord initialisation deferred. 2006-07-14 16:36:35 +00:00
Tim Starling
6dc8e2b09f Fixed Parser::setFunctionHook(), broken by last commit. Passed parserTests.php either way due to conincidence. Also fixed a couple of comments broken by perl script^W^W meticulous hand-editing. 2006-07-14 16:08:16 +00:00
Tim Starling
cdbbe0ad4a Got rid of the MagicWord indexing constants (MAG_xxx), replaced them by string indexing, like messages. The associated change to the extensions, i.e. removing the MagicWordMagicWords hook and using string instead of integer indices, is in fact compatible with MW 1.6 and 1.7, which tells you something about the utility of the hook function. 2006-07-14 15:39:23 +00:00
Brion Vibber
843f9a8eb7 * Pre-strip characters ignored in IDNs from URLs so they can't be used to break the blacklists for regular URLs
Moved shared behavior of URL fixing from two Parser functions into Sanitizer::cleanUrl
This would be a good place to add some validation...
2006-07-11 19:54:20 +00:00
Antoine Musso
65290ec3b6 Fix ugly hack. Assume PHP5 does a nice job with references. 2006-07-11 17:46:30 +00:00
Antoine Musso
29946e5f61 Some evil whitespaces. Sorry. 2006-07-11 17:40:11 +00:00
Antoine Musso
ab8b197963 Some new strictness with PHP5 2006-07-11 14:03:17 +00:00
Antoine Musso
fa813bd470 Fix #6622: image::newFromTitle deprecated but still used 2006-07-10 19:49:22 +00:00
Brion Vibber
dcfb49111d * (bug 6299) Maintain parser's revision ID across recursive calls to fix
{{REVISIONID}} when Cite extension is used
2006-07-10 18:25:56 +00:00
Antoine Musso
fd912a148b A lot more of static issues when using E_STRICT from the commandline. 2006-07-10 15:41:30 +00:00
Antoine Musso
c4cbef35ec static E_STRICT warnings 2006-07-10 15:08:51 +00:00
Brion Vibber
0148602a91 * (bug 6560) Avoid PHP notice when trimming ISBN whitespace 2006-07-06 17:09:10 +00:00
Tim Starling
9514688876 More profiling sections 2006-07-04 08:11:44 +00:00
Rob Church
6757b518c1 When parsing, if we encounter a blacklisted image, add the image to the output anyway, otherwise the imagelinks table is not quite correct. 2006-07-04 03:40:37 +00:00
Tim Starling
514122332d Got rid of about 20 regex calls in braceSubstitution() relating to function-like constructs, replaced them with a hashtable lookup styled after the parser function extension interface. The function bodies were moved to CoreParserFunctions.php. Disabled PAGESINNAMESPACE by default, yet another O(N) count of page table rows. 2006-07-03 11:07:00 +00:00
Tim Starling
56d3b87bd0 Better extension function synonym cache 2006-07-03 03:29:57 +00:00
Tim Starling
d470007a89 Function synonym cache for faster lookup of internationalised parser function extensions 2006-07-02 17:43:32 +00:00
Tim Starling
2ff288720c Various performance and initialisation issues:
* Made autoloader work for unserialize()
* Made XmlFunctions.php and HttpFunctions.php autoloadable modules, via Http:: and Xml::
* Made Image class autoloadable, global functions moved to ImageFunctions.php where they can be loaded on every invocation.
* Removed some unnecessary require_once() calls
* Deferred $wgValidSkinNames initialisation
* Fixed a couple of silly construct/initialise splits. My idea from C++ experience, bad practice in PHP.
* Deferred skin initialisation in ParserOptions
* Removed $wgMwRedir during an attempt to make MagicWord autoloadable. Didn't complete that, but removing the global is still the right direction.
2006-07-02 15:57:59 +00:00
Niklas Laxström
165955b292 * Added formatnum magic word 2006-06-29 13:37:06 +00:00
Rob Church
0106842e64 * (bug 6201) Treat spaces as underscores in parameters to {{ns:}} 2006-06-29 00:36:01 +00:00
Rotem Liss
bca1ed3db9 ParserFunctions are now set using magic words; backwards compatibility is retained. 2006-06-25 21:24:14 +00:00
Rob Church
5b8647d770 * Revert apparent breakage 2006-06-24 21:56:05 +00:00
Rotem Liss
92d3f2527c Now should set the parser functions as magic words via the appropriate hooks (MagicWordMagicWords, MagicWordwgVariableIDs and LanguageGetMagic). Backwards compatibility is retained. This allows us to translate the parser functions. 2006-06-24 14:40:25 +00:00
Rob Church
3d291f615b Cripple the wiki text stuff for now. It doesn't SEEM dangerous but I haven't tested the lot. 2006-06-24 00:27:16 +00:00
Rob Church
73be040a7a * (bug 2316) Add "caption" attribute to <gallery> tag
* Allow setting the skin object that ImageGallery will use; needed during parse operations (the skin must come from the ParserOptions, not $wgUser)
* Prod a few skin files and increment some cache-smashers
2006-06-24 00:12:34 +00:00
Rob Church
63099f6408 Missing $this-> 2006-06-23 21:54:31 +00:00
Antoine Musso
d0dbebb4c1 Remove ~{3,5} in Nickname when saving the preferences. Make sure
sig in sig get removed even when fancy username is disabled or
nickname is empty.
2006-06-23 19:50:55 +00:00
Antoine Musso
6b7a67266c typo 2006-06-23 18:23:01 +00:00
Tim Starling
b739dc6de2 Fixed issues with careless use of Sanitizer::decodeCharReferences(), added a parser test case for one of them. 2006-06-23 09:20:44 +00:00
Brion Vibber
c86110d645 * (bug 6398) Work around apparent PCRE bug breaking section editing when massively-indented preformatted text immediately followed a header 2006-06-21 23:13:05 +00:00
Brion Vibber
44d6ff48e9 Revert 14849; breaks standard time keywords and provides no alternatives either 2006-06-20 21:03:47 +00:00
Rotem Liss
b0099858a3 (bug 5727) Time magic words should use $wgLocaltimezone instead of UTC:
1. Not using anymore the functions wfTimestamp (for {{CURRENTTIME}}) and wfTimestampNow (for {{CURRENTTIMESTAMP}}) for the time magic words, because they output a UTC date; instead, using the built-in function "date" with the parameters "YmdHis".
2. Fix number 1 makes the time magic words OK when using the server default timezone (actually, all of them were OK except {{CURRENTIME}} and {{CURRENTTIMESTAMP}}), but the problem is still exist when setting $wgLocaltimezone, as it isn't noticed. Therefore, setting the timezone to "TZ" enviroment variable like in the signature, getting the various dates and times by "date" function, then setting the "TZ" to its previous value.
2006-06-20 18:29:54 +00:00
Rob Church
718783df19 Fix {{NUMBEROFADMINS}} magic word 2006-06-17 22:36:12 +00:00
Tim Starling
859a3e942e Avoid fatal error on invalid title 2006-06-17 08:55:44 +00:00
Niklas Laxström
7818d542f0 * (bug 6300) Bug fixes for sr: variants
* Patch from Robert Stojnic
2006-06-16 22:30:39 +00:00
Rob Church
907125da5c Introduce {{NUMBEROFADMINS}} magic word 2006-06-16 13:58:42 +00:00
Magnus Manske
7f2155fa9e Bug 6031 (feature request for __NOGALLERY__ on category pages) fixed 2006-06-13 11:37:09 +00:00
Magnus Manske
17dddf5313 bug 2700 (preSaveTransform not working in gallery links) fixed 2006-06-13 10:11:12 +00:00
Rob Church
6a5d22374a (bug 5932) Introduce {{PAGESINNAMESPACE}} magic word 2006-06-12 12:38:41 +00:00
Brion Vibber
a5ac8a50c2 HTML normalization: use double-quotes on RFC and PMID quotes for consistency with upcoming normalizer's output 2006-06-12 06:04:51 +00:00
Brion Vibber
3487221d36 * Fix regression(?) in behavior of initial-whitespace-pre in <center> 2006-06-09 21:59:26 +00:00
Niklas Laxström
4c085983f2 * {{PLURAL}} can now take up to five forms. Needed for some languages 2006-06-08 19:42:07 +00:00
Rob Church
9b5ddbb646 (bug 5945) Introduce {{CONTENTLANGUAGE}} magic word 2006-06-08 13:30:35 +00:00
Brion Vibber
bceb7558ad * (bug 6230) Regression fix: <nowiki> in [URL link text] 2006-06-07 09:18:34 +00:00
Tim Starling
02547dac72 Removed most exit() calls from the MediaWiki core, by replacing them with either a throw or by classic error checking. OutputPage::fatalError() and similar functions are deprecated, use either OutputPage::showFatalError() to return control or throw new FatalError() to relinquish it. Backwards compatibility of all interfaces has been maintained, thus extensions should continue to work and can be ported at a later date. 2006-06-07 06:40:24 +00:00
Brion Vibber
02ff859a87 * (bug 3837) Leave <center> as is instead of doing an unsafe text replacement
to <div class="center">. <center> is perfectly valid in the target doctype
  (XHTML 1.0 Transitional), while the replacement didn't catch all cases and
  could even result in invalid output from valid input.
2006-06-06 23:50:16 +00:00
Brion Vibber
9e56a35f7c * (bug 3202) Attributes now allowed on <pre> tags
* Sanitizer::validateTagAttributes now available to discard illegal/unsafe
  attribute values from an array.
2006-06-06 22:56:38 +00:00
Domas Mituzas
bb5a77358a AutoLoad ImageGalery 2006-06-06 11:46:16 +00:00
Domas Mituzas
e2ae8925ff AutoLoad Math.php 2006-06-06 10:00:53 +00:00
Brion Vibber
939ddd8793 * (bug 2587) Fix for section editing with comment prefix
* (bug 2607) Fix for section editing with mix of wiki and HTML headings
* (bug 3342) Fix for section editing with headings wrapped in <noinclude>
* (bug 3476) Fix for section editing with faux headings in extensions
* (bug 5272) Fix for section editing with HTML-heading subsections
* Fix for bogus wiki headings improperly detected with following text
* Fix for HTML headings improperly not detected with preceding/following text
* Section extraction and replacement functions merged into one implementation
  on the Parser object, so they can't get out of sync with each other.
2006-06-06 00:51:34 +00:00
Brion Vibber
3cbc209ac2 * (bug 5021) Transcluding the same special page twice now works 2006-06-04 02:41:52 +00:00
Brion Vibber
622823a595 * Add <ol> to the list of block elements for doBlockLevels; avoids <p>s being interspersed into your ordered lists.
Since this doesn't have larger consequences, I'm checking this in before the bigger Sanitizer parts of the bug 5497 fix.
2006-06-04 02:06:24 +00:00
Brion Vibber
076c412e80 Some more microoptimizations on the new definition list code. Now only about 4x slower than the old code instead of 6x. 2006-06-02 23:56:19 +00:00
Brion Vibber
ff807a12ad * Improve handling of ;: definition list construct with overlapping or nested HTML tags 2006-06-02 20:54:34 +00:00
Brion Vibber
2a368380cf * (bug 6164) Fix regression with <gallery> resetting <ref> state 2006-06-01 21:22:05 +00:00
Brion Vibber
3da7dcf91d Fix regressions in parser with incomplete tag stripping, plus some old bugs:
* (bug 885) Pre-save transform no longer silently appends close tags
* Pre-save transform no longer changes the case of close tags
2006-06-01 19:38:14 +00:00
Brion Vibber
1bdddfa608 Regression with funny spellings of <matH> 2006-06-01 08:31:12 +00:00
Brion Vibber
25e285f0af Fix regression with unclosed extension tags.
Behavior is still silly (PST adds an end tag) but matches prior behavior until fix is made.
2006-06-01 08:24:22 +00:00
Brion Vibber
0a26267688 Revert to r14512; domas introduced massive breakage with incomplete experimental changes. They will be recommitted when they work. :) 2006-06-01 08:19:02 +00:00
Domas Mituzas
bda0b8e104 Use AutoLoader to load classes:
* remove require_once() throughout whole code, yet left in few places
* move global functions in HttpUtils, ProxyTools, Credits to class methods
* php5 only: __autoload() now used, combined with class->file map and require()
* move initialization of $wgValidSkinNames to Skin::getSkinNames()
* few more changes that will surely break stuff.
2006-06-01 07:22:49 +00:00
Brion Vibber
6711d4714c Fix for DynamicPageList, which registers a mixed-case tag name.
The new system needs tag names to be case-folded internally so
that tags are properly case-insensitive.
2006-06-01 06:41:32 +00:00
Brion Vibber
48b0722fd9 * (bug 5384) Fix <!-- comments --> in <ref> extension
* Nesting of different tag extensions and comments should now work more
  consistently and more safely. A cleaner, one-pass tag strip lets the
  'outer' tag either take source (<nowiki>-style) or pass it down to
  further parsing (<ref>-style). There should no longer be surprise
  expansion of foreign extensions inside HTML output, or differences
  in behavior based on the order tags are loaded.
2006-06-01 06:16:55 +00:00
Rob Church
38f609789b (bug 3926) Introduce {{#language:}} magic word 2006-05-31 01:41:36 +00:00
Brion Vibber
6ec6ce7da7 * (bug 6133) Update strip state as we work. This mostly fixes extensions
used in Cite.php <ref> tags when Tidy is on.
2006-05-29 23:02:21 +00:00
Rob Church
d38df9ce99 (bug 6099) Introduce {{DIRECTIONMARK}} magic word (with {{DIRMARK}} as an alias) 2006-05-28 21:30:43 +00:00
Brion Vibber
f6a581a9b9 Had to revert the changes in r14424 / r14427 due to massive side-effect breakage on zh.wikipedia.org:
* Move parameter replacement before brace transformations in most of the
  wfMsg() family (except for wfMsgHtml). This allows things like {{plural:}},
  {{urlencode:}}, and {{fullurl:}} to be used in most cases correctly.
  The content or UI language will be used accordingly for (forContent)?.
* Work around glitch with the above in {{int:}}; skip redundant transformations,
  allow the including parser to do it.
* Fix {{int:}} to use content language, so it won't break caches and links
  tables and randomly include data from the wrong language.

Uncertain what the cause is of the breakage, I have a hard time duplicating it
and it looks massively wrong (should not be possible). Failure on Parser.php
line 590, claims var not array, but the check two lines above ensures that
it is first...
2006-05-28 09:31:04 +00:00