Commit graph

361 commits

Author SHA1 Message Date
Brion Vibber
3150abb758 * Gracefully ignore non-legal titles in a <gallery> 2004-12-15 09:07:21 +00:00
Brion Vibber
9a2a36ce5e * Defer message cache initialization, shaving a few ms off file cache hits 2004-12-09 05:51:20 +00:00
Brion Vibber
e6bb9de12b Merge image gallery fixlets from 1.4 2004-12-09 02:13:00 +00:00
Shane King
94ba835da9 Added support for .. style backlinks within subpages. See bug #981
for full details.
2004-12-07 01:23:32 +00:00
Brion Vibber
c6d4472efb Allowed HTML list has been frozen for some time, and we're trying not to add new tags. 2004-11-30 08:00:17 +00:00
Antoine Musso
229ac8759b Fix bug http://bugzilla.wikimedia.org/show_bug.cgi?id=671
* allow <abbr> and <acronym>
2004-11-30 05:22:39 +00:00
Evan Prodromou
4b42f18b66 Removed CVS keywords from files, to make merging between branches
easier. Interpolated keywords cause lots of conflicts and headaches at
merge time for older (<1.12.x) CVS versions.
2004-11-29 18:25:30 +00:00
Brion Vibber
b7557bf809 Profiling points 2004-11-28 04:05:05 +00:00
Brion Vibber
d66f60ed43 Loop invariant optimization: skip further checks for subpages on namespaces where subpages aren't allowed. Saves ~20ms on [[List of Royal Navy ship names]] on my test rig. 2004-11-28 03:29:50 +00:00
Brion Vibber
ffe8c4594e Avoid undefined string index notice on {{}} 2004-11-28 02:46:52 +00:00
Brion Vibber
f75240210c Tell regexp parser to use extra analysis on external link regexp;
this saves about 10ms on [[Zuiderzee Works]] on my test rig.
2004-11-26 12:10:24 +00:00
Brion Vibber
7a4c860acc Tell regexp engine to do extra analysis on doBlockLevels() paragraph-level
HTML checking. This speeds up this part of the operation from about 30ms
to about 7ms in Zuiderzee_Works on my test rig.
2004-11-26 10:49:46 +00:00
Brion Vibber
e39dd4532c (bug 934) List each category on a page only once.
Dan Keshet's patch (http://bugzilla.wikipedia.org/attachment.cgi?id=134&action=view) plus an added version check on parser cache objects, to automatically discard cached objects using the incompatible older format.
2004-11-25 22:02:30 +00:00
Brion Vibber
5a8cf9de43 Profiling points etc 2004-11-23 07:41:07 +00:00
Brion Vibber
f8c3d4bfb4 Inner loop optimization: reverse order of conditions for language variant link check, so the condition short-circuits correctly and we can skip the expensive per-link lookup. 2004-11-22 10:05:11 +00:00
Brion Vibber
2376b2c6f1 Avoid asking for the day, month etc name messages and the total number of articles over and over. InitialiseVariables() gets called during message transformations, so this saves several milliseconds of startup time which can be a significant portion of execution time on ParserCache'd page views. 2004-11-21 14:07:24 +00:00
Jens Frank
5b8630e1bf Added magic PubMed-Link, links to PubMed DB can be set like RFC
or ISBN links, using PMID 15545900 magic link.

Some code beautifying.
2004-11-20 11:28:37 +00:00
Tim Starling
ac77eb5b2c Fixed bug causing interwiki links to disappear unless accompanied by an internal link 2004-11-13 14:24:42 +00:00
Jens Frank
a8369d40dd Moved <gallery> code to Parser, registering images in a gallery as link 2004-11-13 12:04:31 +00:00
Jens Frank
e34d357e9d New tag "<gallery>" to generate a table of image thumbnails 2004-11-13 10:53:46 +00:00
Erik Moeller
1c54b48e4a [[Wikinews:Bla]] should not be matched as a news:// URL type.
Change regex to require that URL_PROTOCOLS is at the beginning of a link
(e.g. [[news:bla]]) for it to match.

Note: This will break if someone decides to reverse the order of
replaceExternal and replaceInternal again.
2004-11-07 10:14:36 +00:00
Brion Vibber
35cd7657f5 Remove old commented-out section which has some literals that break my editor's syntax highlighting 2004-10-28 01:22:49 +00:00
Erik Moeller
d2f27cf300 restore old order of replaceInternal/replaceExternal, mask absolute URLs
left behind by [[Media:]] links to prevent them from being parsed twice.
2004-10-25 05:24:23 +00:00
Jens Frank
bbfc760c1f Rename fields of user_rights and user_groups table to tablename_columnname schema 2004-10-24 09:21:53 +00:00
Tim Starling
412eda0517 Correcting bugs due to double-prefixing table names. Removing obsolete Database member functions. Adding comments to Database.php 2004-10-24 07:10:33 +00:00
Zheng Zhu
2f305c082a forgot to move the comment 2004-10-23 13:00:33 +00:00
Brion Vibber
2e7cecdeb6 Remove $wgCurParser kludge 2004-10-23 07:10:37 +00:00
Erik Moeller
0d02b52702 Preliminary support for shared upload directory. This is primarily intended
for the Wikimedia Commons. If $wgUseSharedUploads is set, MediaWiki will try
to locate an image file in the shared upload directory if it is not found
locally. Thumbnails for shared images will also be generated in the
shared directory.

Note: I changed
                $text = $this->replaceInternalLinks ( $text );
                $text = $this->replaceExternalLinks( $text );
to
                $text = $this->replaceExternalLinks( $text );
                $text = $this->replaceInternalLinks ( $text );

in Parser.php. Otherwise [[Media:Bla.jpg]] to an absolute URL would be
incorrectly parsed as external links. The header of
replaceExternalLinks says:

        Note: we have to do external links before the internal ones

So the old order was not consistent with the documentation. I did some
tests and nothing seems to be broken, but I have some problems executing
parserTests.php so I couldn't test it systematically.
2004-10-21 05:04:14 +00:00
Zheng Zhu
ccf6536d52 Moving code that checks for valid link in another variant from Parser.php to Language.php 2004-10-21 02:47:51 +00:00
Zheng Zhu
b6093aad4e Added option wgDisableLangConversion to disable langauge variant conversion, mainly for debugging and testing purpose. 2004-10-19 18:02:44 +00:00
Zheng Zhu
7bb0a0b64b removed double conversion of linked text. 2004-10-19 17:44:00 +00:00
Brion Vibber
da056c312e (bug 737) only use the post-parse link placeholders within replaceInternalLinks().
The recent move of the replacement step from OutputPage into Parser completely
broke a crapload of special pages; this makes the links show again.
2004-10-19 07:30:56 +00:00
Wil Mahan
4bc5a37c98 Move replaceLinkHolders() from OutputPage to Parser, because
it needs to happen before unstripNoWiki() and before tidy.
This also makes the parser more self-contained, so there is
no need to create an OutputPage object for the parser
tester.

Call unstripNoWiki() before creating a Title object
for an internal link; this fixes <nowiki> inside of
a link target. Need to make sure this does not degrade
performance.
2004-10-15 17:39:10 +00:00
Wil Mahan
ac9d5ac85f When checking for self links, use Title::getFragment() rather
than searching for '#', so that self-links escaped with
character entities are handled correctly. Related to
bug 337.
2004-10-13 04:30:19 +00:00
Wil Mahan
07ba17d234 Also add " to disallowed URI characters, per RFC 2396, fixing
some more test cases.
2004-10-11 22:10:14 +00:00
Wil Mahan
346f93fc27 Oops, invalid chars in bracketed external links should
be added to the link description, not the trail.
2004-10-11 19:15:24 +00:00
Wil Mahan
b22f8f318a Re-exclude '<' and '>' from external links, since brion pointed
out cases where it matters. We don't need to exclude them from
external link text, to allow for e.g. bold text in the link
description.
2004-10-11 18:54:35 +00:00
Wil Mahan
a2f8c159a9 Detect and disallow &gt; and &lt; within external links.
Fixes bug 289.
2004-10-11 16:57:49 +00:00
Wil Mahan
6838bf3e06 Prevent double-escaping of '<' and '>' in external links;
allow them in free external links again, at least until there
is a consistent way of handling them. Convert some spaces to
tabs from zhengzhu's last commit.
2004-10-11 16:16:27 +00:00
Zheng Zhu
3285ea4627 performance tweak related to title conversion 2004-10-08 04:27:07 +00:00
Wil Mahan
5d887f3e68 Trivial fix from Rowan Collins to better handle
malformed images with captions containing links.
2004-10-06 19:22:42 +00:00
Wil Mahan
f984174290 Don't call Parser::replaceInternalLinks twice, but instead
recursively replace links inside of image captions. Patch
by Rowan Collins (IMSoP), loosely based on a patch by me.
Fixes bug 637.
2004-10-05 03:55:41 +00:00
Wil Mahan
73f357a52b Oops, I committed the wrong file - sorry. :) 2004-10-05 00:21:52 +00:00
Wil Mahan
da2c08db84 Move length check to secureAndSplit(), so it is always used.
Also, don't query the DB for the max length, but use a
hardcoded 255.
2004-10-05 00:17:25 +00:00
Wil Mahan
c69017e8c7 Use Skin::makeExternalLink() rather than hardcoding HTML
in Parser; be more careful not to slow down the common
case of only one language variant.
2004-10-04 20:42:51 +00:00
Zheng Zhu
bfc27da4c4 Convert the title of an article to the preferred language variant. 2004-10-04 03:47:39 +00:00
Wil Mahan
0401df5c2e Disallow '<' and '>' in free external URIs; this is consistent
with RFC 2396 and fixes a parser test case. Remove the
INVERSE_EXT_LINK_URL_CLASS constant, which has never been used.
2004-10-02 21:33:06 +00:00
Wil Mahan
4f31d83137 Fix bug 553: when a piped link contains a template parameter, it
sometimes confuses the table code, because '|' is also used
to delimit cell attributes. This change prevents doTableStuff()
from treating any text containing '[[' as attributes.
2004-10-01 21:20:47 +00:00
Wil Mahan
b117cc2b6e A different fix for ':' in definitions that makes
[http://blah foo : bar ]: baz
work as expected
2004-09-27 21:01:39 +00:00
Wil Mahan
66c2f28ec1 Fix "; url://blah blah : definition" definition lists and related cases,
noted by brion and JeLuF
2004-09-27 06:13:07 +00:00