Antoine Musso
c771fc9c96
Use Doxygen @addtogroup instead of phpdoc @package && @subpackage
2007-01-20 15:09:52 +00:00
Antoine Musso
b144fcb85d
Rename constructors to __constructor
2007-01-20 13:34:31 +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
Nick Jenkins
ae8554c45b
Completing code housekeeping stuff for rest of includes/ directory: removing unused local vars, removing unused globals, replacing extract() where simple to do, declaring output arrays before calling preg_match(), and so forth.
2006-11-29 11:43:58 +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
Niklas Laxström
78034ed0d1
* (bug 7459) Magic word variables are always case sensitive
2006-10-08 13:00:42 +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
Jimmy Collins
57aa38cc61
* (bug 6092) Introduce magic words {{REVISIONDAY}}, {{REVISIONDAY2}, {{REVISIONMONTH}},
...
{{REVISIONYEAR}} and {{REVISIONTIMESTAMP}}
2006-09-26 17:20:36 +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
Tim Starling
4f4120b5e4
Added {{CURRENTHOUR}}
2006-08-14 22:43:50 +00:00
Tim Starling
8831c8e13d
MagicWord initialisation deferred.
2006-07-14 16:36:35 +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
Antoine Musso
fd076f7b78
Fix #6526 : Undefined offset notice in MagicWord.php on bad input
...
Filter first, check after.
2006-07-11 13:42:34 +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
b875dcf1d3
comments end at column 80
2006-07-05 18:25:39 +00:00
Tim Starling
2113a11b0b
Revert addToArray() change, add isCaseSensitive()
2006-07-03 08:57:29 +00:00
Tim Starling
3b628d1173
Made MagicWord::addToArray() support case-insensitive arrays
2006-07-03 03:29:32 +00:00
Tim Starling
e1c587ba06
getSynonyms()
2006-07-02 17:47:24 +00:00
Niklas Laxström
165955b292
* Added formatnum magic word
2006-06-29 13:37:06 +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
Rob Church
6a5d22374a
(bug 5932) Introduce {{PAGESINNAMESPACE}} magic word
2006-06-12 12:38:41 +00:00
Antoine Musso
5a5cc201b1
having some fun with doxygen error log
2006-06-10 18:28:50 +00:00
Rob Church
9b5ddbb646
(bug 5945) Introduce {{CONTENTLANGUAGE}} magic word
2006-06-08 13:30:35 +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
Rob Church
38f609789b
(bug 3926) Introduce {{#language:}} magic word
2006-05-31 01:41:36 +00:00
Rob Church
d38df9ce99
(bug 6099) Introduce {{DIRECTIONMARK}} magic word (with {{DIRMARK}} as an alias)
2006-05-28 21:30:43 +00:00
Rob Church
b95074f87c
Add {{CURRENTTIMESTAMP}} magic word
2006-05-24 15:55:01 +00:00
Brion Vibber
54005e7a9d
* Reordered wiki table handling and __TOC__ extraction in the parser to better handle some overlapping tag cases.
...
* Only the first __TOC__ is now turned into a TOC.
The table change doesn't disrupt either the parser tests or the en.wikipedia main page. Hopefully it won't break other real content...
2006-05-23 07:19:01 +00:00
Rob Church
e7f5589bfe
(bug 839) Add URLENCODE magic word
2006-05-17 15:36:05 +00:00
Rob Church
310e59e559
(bug 5845) Introduce BASEPAGENAME and BASEPAGENAMEE magic words
2006-05-14 03:51:36 +00:00
Rob Church
1cea04c788
* Introduce NUMBEROFPAGES magic word
...
* (bug 5833) Introduce CURRENTVERSION magic word
2006-05-13 17:30:42 +00:00
Antoine Musso
7ebdb6de89
Revert to r14165 . Did too many changes, didnt even run parserTests (i am bad)
2006-05-11 22:40:38 +00:00
Antoine Musso
acb150a105
a round of static statements
2006-05-11 19:39:50 +00:00
Antoine Musso
bc14eb8045
Replacing var keyword with private / public as we now require PHP5.
2006-05-11 19:10:41 +00:00
Rob Church
cc001cf787
(bug 4876) Add __NEWSECTIONLINK__ magic word to force the "new section" link/tab to show up on specific pages on demand
2006-05-01 20:35:08 +00:00
Rob Church
35670dacb9
Add "raw suffix" magic word for some magic words, e.g. {{NUMBEROFUSERS|R}} will produce a count minus formatting
2006-04-30 18:02:03 +00:00
Rob Church
b99de7897e
(bug 5741) Introduce {{NUMBEROFUSERS}} magic word
2006-04-29 01:58:39 +00:00
Rob Church
3e64af3615
Add TALKSPACE, SUBJECTSPACE, TALKPAGENAME, SUBJECTPAGENAME (and encoded forms for all) magic words
2006-04-12 15:38:17 +00:00
Magnus Manske
e2106c4036
New DISPLAYTITLE magic template; decativated by default so not to scare Brion
2006-04-11 10:16:27 +00:00
Rob Church
9d1d87dbc0
(bug 5167) Add SUBPAGENAMEE
2006-04-02 16:19:29 +00:00
Rob Church
3cbd2f2916
(bug 5167) Add {{SUBPAGENAME}} variable
2006-03-04 23:29:46 +00:00
Tim Starling
61bc10203f
Various improvements to interwiki transclusion. Introduced {{raw:..}}, to force raw transclusion when subst: isn't in use. Referer header set in wfGetHTTP(), this could be for weak (honour-bound) detection of the external site, for statistics or license notices.
2006-02-01 04:41:53 +00:00
Ævar Arnfjörð Bjarmason
2ffee5ab5b
* Add a getRegexCase() accessor for getting i or nothing depending on the
...
case-insensitiveness of the thing, only needed with getBaseRegex() since that
won't include it automatically..
2006-01-08 05:35:03 +00:00
Ævar Arnfjörð Bjarmason
6e7ab16d57
* Fixed bug, $this->mBaseRegex would contain an invalid regular expression if
...
the supplied magic word synonyms contained /, of course none of them do, but
hey;)
2006-01-08 04:25:43 +00:00
Magnus Manske
11eca563ed
Fix for bug 2522
2006-01-07 22:33:54 +00:00
Ævar Arnfjörð Bjarmason
a26d5a49d7
* s~\t+$~~
2006-01-07 13:31:29 +00:00
Ævar Arnfjörð Bjarmason
7bbe971aec
* s~ +$~~
2006-01-07 13:09:30 +00:00
Ævar Arnfjörð Bjarmason
d8e90514ab
* Documentation: @private => @access private
2006-01-07 12:48:44 +00:00
Brion Vibber
41701080d2
* (bug 4453) fix for __TOC__ dollar-number breakage
2006-01-04 00:27:48 +00:00
Antoine Musso
b7db9837bf
some useless calls / unitialized $matches arrays
2005-12-04 21:15:04 +00:00
Ævar Arnfjörð Bjarmason
7d08ec49e1
* Avoid fatal errors during installation by not calling wfRunHooks() during it
2005-11-25 23:17:39 +00:00
Ævar Arnfjörð Bjarmason
c67565e3df
* (bug 3420) Allow extensions to specify new parser variables ({{VAR}})
2005-11-25 06:53:20 +00:00
Ævar Arnfjörð Bjarmason
3397275259
* (bug 3831) {{NAMESPACEE}} variable
...
* (bug 3997) {{FULLPAGENAME}} and {{FULLPAGENAMEE}} variables
* Restructured the magic word definitions to make it easier to add new ones
2005-11-21 17:50:47 +00:00
Ævar Arnfjörð Bjarmason
6645656730
* {{lc:}} magic word
...
* {{uc:}} magic word
2005-10-22 19:57:38 +00:00
Ævar Arnfjörð Bjarmason
f1b567058f
* {{lcfirst:}} magic word
...
* {{ucfirst:}} magic word
2005-10-22 18:18:08 +00:00
Tim Starling
18657a50e4
added {{fullurl:}} and {{fullurle:}} functions
2005-09-23 12:10:39 +00:00
Ævar Arnfjörð Bjarmason
c62b79d3e3
* Pluralform => Plural
2005-09-06 17:02:19 +00:00
Alexander Sigachov
b7b513f611
New magic word: PLURALFORM (like GRAMMAR)
2005-09-05 19:22:09 +00:00
Rowan Collins
f19c94aa72
Fix manual thumbnail syntax to use a proper "MagicWord" (MAG_IMG_MANUALTHUMB) rather than a weird hack.
2005-08-20 13:27:21 +00:00
Ævar Arnfjörð Bjarmason
76d3a0b5f3
* A new magic word, {{NUMBEROFFILES}}, returns the number of rows in the
...
image table
2005-06-26 03:23:24 +00:00
Ævar Arnfjörð Bjarmason
9048d60b57
* Added a new magic word, {{SERVERNAME}}, that returns $wgServerName, useful
...
for things like bug 1825
2005-06-24 02:54:52 +00:00
Ævar Arnfjörð Bjarmason
0ecd7aa835
* MAG_PATH renamed to MAG_SCRIPTPATH
2005-06-20 11:06:33 +00:00
Ævar Arnfjörð Bjarmason
97cf74d1c9
* A new magic word, {{PATH}}, returns $wgScriptPath
2005-06-19 16:09:00 +00:00
Ævar Arnfjörð Bjarmason
fe8625db80
* Restored the {{msg:}} magic word, except now it's the wikisyntax
...
representation of wfMsgForContent() rather than a shorthand for {{Template:}}
2005-05-23 23:24:00 +00:00
Brion Vibber
fe2ac1409b
Revert __LCFIRST__ patch. Title objects should be treated as value objects;
...
any Title object for a given title should always act the same. Poking around
with the guts of one to change some of its return values is not a good idea.
2005-05-15 20:42:11 +00:00
Ævar Arnfjörð Bjarmason
71f1c34ce4
* (bug 2118) Added a __LCFIRST__ magic word for forcing the first character of
...
a pages heading to render in its lower case form on output, however the page
is still saved under its upper case name in the database so this is purely an
aesthetic change (unlike setting $wgCapitalLinks to false).
2005-05-15 17:21:58 +00:00
Ævar Arnfjörð Bjarmason
a7054a9cd8
* Deprecated the {{msg:}} syntax for inclusion from the Template namespace.
2005-05-13 11:11:30 +00:00
Brion Vibber
89971cdee6
* (bug 688) MagicWord.php uses incorrect regex and logic for "$1" variable capturing
...
Fixes cyrillic 'pks' form for image widths (eg 150pks instead of 150px) in
Russian localization.
2005-05-04 07:49:42 +00:00
Ævar Arnfjörð Bjarmason
b84ec26855
* Documented
...
* Indented
2005-04-28 20:46:11 +00:00
Antoine Musso
4caf76c1ea
Implement #1739 : new magickeyword REVISIONID. Give the diff / latest revision id for the article being view. Useful for proper citation.
...
New fetchedRevId method in Article::
2005-03-26 18:24:32 +00:00
Ævar Arnfjörð Bjarmason
b04b29509d
* (bug 1662) Implemented a new magic word, {{CURRENTMONTHABBREV}} which returns
...
the abbreviation of the current month, cleaned up the sourcecode while I was
at it to always display CURRENTMONTH, CURRENTMONTHNAME, CURRENTMONTHNAMEGEN
and CURRENTMONTHABBREV in that order that's mnemonics for you.
2005-03-24 03:00:06 +00:00
Zheng Zhu
e6085b2c76
Merged in my changes from REL1_4
2005-01-22 03:22:16 +00:00
Antoine Musso
f2baa43923
Implement #1206
...
Patch by M7 "computerville (at) gmail (tod) com"
FORPORT from 1_4
2005-01-11 01:30:13 +00:00
Zheng Zhu
c7c31c6fec
Added magic word MAG_NOTITLECONVERT to indicate that the title of the page do not need to be converted. Useful in zh:
2004-12-29 02:47:33 +00:00
Jens Frank
87bae60403
Fix bounding box feature of thumbnails (e.g. |200x200px|)
2004-10-11 19:02:56 +00:00
Zheng Zhu
f84493db51
First batch of files modified to switch wgLang to wgContLang.
2004-09-24 13:14:52 +00:00
Jens Frank
45134645f8
Parentheses needed for this regex for correct treatment of alternatives.
...
^(#REDIRECT|#UMLEITUNG) instead of ^#REDIRECT|#UMLEITUNG, where the anchor would only be used for #REDIRECT
Bug reported by borislav for Bulgarian deletion log page
2004-09-06 20:36:35 +00:00
Antoine Musso
ba2afcd9fa
Split files and classes in different packages for phpdocumentor. I probably changed some double quotes to single and used function foo () { shema
2004-09-03 23:00:01 +00:00
Antoine Musso
90155b8a97
Changing comments layout preparing for generated documentation with Phpdocumentor
2004-09-02 23:28:24 +00:00
Tim Starling
0f9c5b24fd
Abstracted site name in LanguageFi.php. This required the implementation of general handling for inflected languages, in particular the {{grammar:}} tag
2004-08-27 14:55:41 +00:00
Antoine Musso
3d60242fb5
massive double to single quotes conversion. I have not noticed any bug after a lot of testing
2004-08-22 17:24:50 +00:00
Antoine Musso
6291a4774d
implement a new magic word: PAGENAMEE wich return the escaped title. Implement sourceforge feature requests 999044 and 997771
2004-08-12 13:32:04 +00:00
Tim Starling
ac549401d4
* Support for table name prefixes throughout the code. No support yet for converting static SQL, which also means no installation. But it has been tested by creating the tables in the ordinary way and then renaming them
...
* DB_WRITE now called DB_MASTER, DB_READ now called DB_SLAVE
* Converted to use SQL wrapper functions instead of direct SQL in various places
* Experimental method for preserving the chronological order of events when slave servers are used. Untested.
* Fixes to the new post-parse existence test feature
* Some.. other stuff
2004-07-18 08:48:43 +00:00
Gabriel Wicke
944b872646
New magic word __TOC__ that inserts the toc at the place it is found
...
Implies __FORCETOC__
2004-06-29 23:59:30 +00:00
Jens Frank
d4f2fe39ea
thumbs with alt text starting with center or ending in centre are centred, which they shouldn't. BUG #963876
2004-06-01 06:02:13 +00:00
Jens Frank
ad76b42c79
Fixed problems caused by merging of a patch which was generated from an old version
2004-04-24 21:20:32 +00:00
Brion Vibber
f0f5a17d5b
Add {{NAMESPACE}} and {{PAGENAME}} magic words. (dori's patch)
2004-04-24 20:19:05 +00:00
Jens Frank
06eb1fc1b5
New parameter 'framed' for Extended Image Syntax
...
Frame the image using the same box the thumbnail uses, but don't scale the image and
don't show the zoom-icon
2004-04-24 01:05:49 +00:00
Tim Starling
c503774b28
Moved MAG_XXXX constants to MagicWord.php, changed canonical name for NS 4 to "MetaNamespace"
2004-04-09 07:02:29 +00:00
Tim Starling
2ca258fd03
* Changed inclusion syntax to allow e.g. {{stub}}
...
* Split MediaWiki namespace into MediaWiki and Template (requires changes to all language files)
* Purge links to on edit of Template namespace
* General refactoring of purging and cache invalidation code
2004-03-20 15:03:26 +00:00
Tim Starling
840dee3ad4
* Fixed magic quotes in $_REQUEST, in Setup.php
...
* Converted many instances of globals from the query to $_REQUEST
* Renamed near-useless Title::getURL() to Title::getPartialURL()
* Created new Title::getURL(), to replace wfLocalUrl, wfLocalUrlE, wfFullUrl and wfFullUrlE. Replaced most instances throughout the code
* In Parser.php, generalised stripping of <nowiki>, <pre> and <math> to allow more general use such as nesting
* Moved body of Article::preSaveTransform to Parser.php
* Put lots of comments in Title.php
2004-03-06 01:49:16 +00:00
Brion Vibber
0332f4c598
Fix for compatibility with short_open_tag = Off
2004-02-18 02:15:00 +00:00
Tim Starling
536b796ee1
More characters allowed in message names (or more generally, MagicWord "variables")
2004-01-25 02:38:47 +00:00
Erik Moeller
99f6383f37
JeLuF's image resizing code
2004-01-12 00:55:01 +00:00
Mr. E23
225fa83227
Cleaned up OutputPage::replaceVariables() a bit. Some performance gain by doing several replacements at once in MagicWord::replaceMultiple()
2004-01-10 22:49:37 +00:00
Mr. E23
16b6b929ca
A patch to cache articles after conversion to HTML but before insertion
...
into a full page. Significant speed improvements on cache hits, especially
on pages with many links.
2004-01-07 02:51:47 +00:00
Tim Starling
788ff5c181
Comments
2003-12-14 14:25:44 +00:00
Tim Starling
ee4c7f2f49
Various fixes, see the version of [[m:Development status]] before this commit for details
2003-11-02 13:57:24 +00:00
Tim Starling
d8cc830c4a
block/unblock log; split off profiling into Profiling.php and broke it (turn it off for now)
2003-10-16 13:30:45 +00:00