Brion Vibber
63d80f72c1
Prudency measure: only enable $wgRawHtml usage if $wgWhitelistEdit is on.
2004-09-14 05:49:15 +00:00
Jens Frank
2429d63748
BUG#463 Strip first leading blank from preformatted text in output
2004-09-12 13:07:52 +00:00
Brion Vibber
b0c2c0449d
Use <i> and <b> for '' and ''' instead of <em> and <strong>. There's no
...
good reason to use <em> and <strong> here; they increase cache storage
and bandwidth requirements ;) and may be abusing semantic markup.
* Bug 369: '' should be interpreted as <i>, not <em>
http://bugzilla.wikipedia.org/show_bug.cgi?id=369
* Bug 370: ''' should be interpreted as <b>, not <strong>
http://bugzilla.wikipedia.org/show_bug.cgi?id=370
2004-09-11 08:40:26 +00:00
River Tarnell
5012260a95
here is the correct fix for head (MF 1.3)
2004-09-09 23:24:36 +00:00
River Tarnell
b19e0b60ce
don't parse blank ISBNs
2004-09-09 23:04:08 +00:00
Jens Frank
227b54cbfd
BUG#76 For categories, don't use the Category:-prefix for the sortkey.
...
[[Category:Mountains of Panama]] now gets cl_sortkey='Mountains of Panama' instead of 'Category:Mountains of Panama'.
Avoids later issues with sorting.
2004-09-07 22:08:01 +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
Brion Vibber
67e6306a0e
Avoid numeric and boolean interpretation of "0" in self-link check and Go searching.
...
Fix for bug 174: 0 as an article name behaves strangely (numerical comparison in article-ids).
http://bugzilla.wikipedia.org/show_bug.cgi?id=174
2004-08-31 02:26:55 +00:00
Jens Frank
dac2ca94f4
BUG#160 Internationalize display of numbers:
...
* section numbers in TOC
* file size in edit page warning for big articles.
2004-08-28 19:08:49 +00:00
Jens Frank
312187e477
BUG#219 enable link shortcuts like [[:Category:catname|]]
2004-08-28 16:42:57 +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
Jens Frank
48cf90b00f
removed forgotten debugging statement
2004-08-27 06:16:16 +00:00
Jens Frank
be8efb66ca
cleanup of unused categoryMagic code
2004-08-27 06:15:13 +00:00
Jens Frank
3d4d040658
BUG#206: replace <!--LINK tags by the link text for displaying text in TOCs
...
Thanks to Daniel D�sentrieb for his help writing the regexp.
2004-08-26 18:48:13 +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
Brion Vibber
16514740cf
Remove what seems to be an accidentally checked-in testing line:
...
'/([^> ]+(0(1|3|9);)[^< ]*)/i' => '<span class="diacrit">\\1</span>',
(Originally added by gwicke in revision 1.197)
With very long 'words' this regexp is super slow, and causes timeouts:
Bug 183: timeout in Parser.php with Tidy
http://bugzilla.wikipedia.org/show_bug.cgi?id=183
2004-08-22 09:57:12 +00:00
Jens Frank
1eb2480014
Moved category stuff to CategoryPage, copying logic of ImagePage
2004-08-22 09:42:12 +00:00
Jens Frank
d289825788
Fix notice regarding invalid array index -1
2004-08-22 07:22:13 +00:00
Antoine Musso
9a3ae4a58e
Reverting patch 1.246 made by Guillaume. It breaks things such as [[100]].
2004-08-21 19:59:43 +00:00
Brion Vibber
830e915970
Add some more profiling points
2004-08-19 08:44:13 +00:00
Guillaume Blanchard
a3581bcf9c
*fix bug in non-breaking space regexp
...
*add non-breaking code for French numbers
*set MAX_INCLUDE_REPEAT to 100 (I'll remove it when I'll update the per page size max)
2004-08-17 15:42:42 +00:00
Antoine Musso
440edce494
* some comments (using # instead of /* */ )
...
* function foobar () { shema
2004-08-16 20:01:21 +00:00
Antoine Musso
c5686b5b32
more double to single quotes
2004-08-16 15:29:17 +00:00
Antoine Musso
354e912799
Comments, double to single quotes, foobar () { shema.
2004-08-16 15:23:46 +00:00
Jens Frank
426899ec1b
Move check for wgUseGeoMode to where the function is called, avoids copying the text around
2004-08-15 13:49:14 +00:00
Arne Heizmann
af38689651
New PHPtal-based skin 'Chick'. Designed for PDAs and other low-resolution devices.
...
See non-whitespace-changing patch at http://bugzilla.wikipedia.org/show_bug.cgi?id=49
2004-08-14 22:38:46 +00:00
Arne Heizmann
69eaf5751b
Fixes to the bold/italics rendering problems [Bug 40]
...
http://bugzilla.wikipedia.org/show_bug.cgi?id=40
2004-08-14 08:32:57 +00:00
Brion Vibber
41c8b7bf72
Antiglobalization!
...
* Remove some unused and some useless functions from GlobalSettings.php
* wfEscapeHTML() replaced with PHP built-in htmlspecialchars().
* Moved some functions into Parser.php and Image.php
2004-08-13 15:55:59 +00:00
Guillaume Blanchard
1c8f04ece2
MAX_INCLUDE_REPEAT 5 => 20
...
Fix non-breaking space before ';'
2004-08-13 14:15:21 +00:00
Antoine Musso
4054b8773c
Fix source forge bug #1007149 . Wrong plural when listing categories and subcategories. Added two new messages in language.php
2004-08-12 13:58:54 +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
d2ac7399cc
tweaking escaping of external links
2004-08-10 11:24:24 +00:00
Magnus Manske
7b0686a408
(Hopefully) fixing various template bugs once and for all!
2004-08-08 18:05:41 +00:00
Tim Starling
5d58e45c1a
Fixing bug #584804 , extra characters requested in $sep for external links. This includes the right parenthesis fix suggested by Brion.
2004-08-07 18:45:30 +00:00
Tim Starling
badf11ffe6
Rewrote external link handler, using preg_split(). Passes all external link test cases on [[m:Parser testing]]. Fixes some parts of bug #583234 : fixes URL inside URL problem and incorrectly rejected character problem
2004-08-07 18:24:12 +00:00
Arne Heizmann
96206ce09b
Bugfix: produce valid XHTML even if user entered invalid '' / ''' mark-up.
2004-08-07 12:37:20 +00:00
Arne Heizmann
2e76b8fa28
rm trailing white space
2004-08-07 12:35:59 +00:00
Tim Starling
ea050f787c
comments and descriptive variable names
2004-08-07 08:54:52 +00:00
Tim Starling
d73935a5f0
New feature, nicer display of redirects. Removed special case for redirects from Parser.php, which probably would have caused problems anyway. Changed a few places to use NS_xxx constants instead of the old Namespace:: functions.
2004-08-07 03:50:46 +00:00
Arne Heizmann
99b447f83b
Performance optimisation: Merge two for loops into one.
2004-08-06 21:13:30 +00:00
Arne Heizmann
11093c73a1
Somewhat less hacky fix to the French l''''homme''' problem.
2004-08-06 20:47:21 +00:00
Magnus Manske
406abe0b0a
Adding option $fixLbug to fix bug 948549
2004-08-06 17:52:43 +00:00
Jens Frank
152dcb411d
Category links are not part of mBodyText, so <!--LINK tags are not converted.
...
set postParseLinkColour to false to force "real" link. There must be a better way to do this.
2004-08-05 20:15:32 +00:00
Magnus Manske
a56f343767
This should fix bug 980557
2004-08-04 20:56:46 +00:00
Jens Frank
61fb81f125
Removed debug output
2004-08-04 20:04:54 +00:00
Magnus Manske
ef2acad514
fixing several bugs at once, or creating new ones?
2004-08-04 19:59:04 +00:00
Magnus Manske
5d88dfc609
fixing my redirect bug fix (hopefully)
2004-08-04 17:08:33 +00:00
Jens Frank
40d9911ee1
Allow indentation of tables using :{|
...
Bug #989788 .
2004-08-04 16:37:48 +00:00
Brion Vibber
73a4662190
Move magic ISBN, RFC, and GEO links to between replaceExternalLinks and
...
replaceInternalLinks. This is a basic fix for the infamous bug
[ 708163 ] [[ISBN #]] doesn't work correctly
ISBN, RFC links accidentally put inside [[ ]] brackets will now come up
relatively straightforwardly, with extra brackets. This is much nicer
than a horror of HTML errors that there were before; does not solve
problem with embedded <a>-in-<a> tag if you put it in a link piped
text, but that's a smaller problem.
Someday a full tokenized parser will wish this problem away into the
cornfields.
2004-08-04 01:53:29 +00:00
Magnus Manske
10a7bdc143
category redirect bug fix
2004-08-03 19:50:37 +00:00
Arne Heizmann
d6b0fc1ab5
Allowing for piped links inside template variables; by Emmanuel Engelhart
...
http://mail.wikipedia.org/pipermail/wikitech-l/2004-July/011776.html ff.
2004-07-31 14:13:07 +00:00
Brion Vibber
a3e3155936
Fix fragments on interwiki links and in-wiki links with case sensitive option on.
...
* [ 991569 ] Interwiki Links to Sections Do Not Work
2004-07-29 04:48:42 +00:00
Brion Vibber
81911cace9
Use localized numerals for CURRENTMONTH, CURRENTDAY, CURRENTYEAR, NUMBEROFARTICLES
2004-07-28 21:20:49 +00:00
Brion Vibber
67833d481c
$wgRawHtml option to enable <html>...</html> container for RAW UNCHECKED
...
UNPARSED html bits. Don't enable this except on trusted sites!
2004-07-24 22:59:44 +00:00
Arne Heizmann
a75b7d316f
sp :)
2004-07-24 01:03:16 +00:00
Arne Heizmann
6697d32053
Prevent category stuff ("There are 0 articles in this category.") from appearing in
...
the middle of articles because it is appended when a {{macro}} is expanded.
2004-07-24 00:46:27 +00:00
Jens Frank
063befc4cc
Changed template inclusion code to detect loops and to limit the text length.
...
Based on an algorithm proposed by Emmanuel Engelhardt in
http://mail.wikipedia.org/pipermail/wikitech-l/2004-July/011254.html
slightly modified.
2004-07-24 00:37:24 +00:00
Jens Frank
4c5f567db2
allow blank lines in preformatted text started by blanks. BUG #993991
2004-07-19 19:03:43 +00:00
Jens Frank
6b37aa9a04
New global config setting $wgMaxTocLevel: Maximum indent level of toc.
2004-07-19 05:15:50 +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
Magnus Manske
67bcaab800
GEO mode
2004-07-16 20:32:44 +00:00
Gabriel Wicke
90f6f42193
improved pre/list interaction, cleanup
2004-07-14 18:46:02 +00:00
Gabriel Wicke
c3a00f5a65
allow pre's in lists, report by rizzo and mhnoyes
2004-07-14 18:38:28 +00:00
Jens Frank
6606778166
move $this->initialiseVariables down to where the variables are used the first time. This removes one SQL query per page view if no variables are used on that page.
2004-07-13 06:42:55 +00:00
Arne Heizmann
460d5f9aa9
Use linktrail instead of na�ve \\S*
2004-07-13 00:01:33 +00:00
Jens Frank
ecd99db4ab
use makeKnownLink istead of makeLink. A page pointing to another page must exist que definitionem
2004-07-12 23:00:08 +00:00
Arne Heizmann
92fded9b95
This fixes the issue that something like [ http://url/ link]s (i.e. text directly following
...
the closing square bracket) would produce something ugly in printing:
link (http://url/ )s
Now it finishes the word first:
links (http://url/ )
The given example seems pointless, but in languages other than English this happens more
frequently.
2004-07-12 22:57:13 +00:00
Arne Heizmann
bc18a0867d
- fix issue outlined by Emmanuel Engelhart <emmanuel@engelhart.org> on wikitech-l
...
- fix indentation
- remove commented-out code
2004-07-12 19:49:20 +00:00
Tim Starling
b96b707efa
OOP calling convention for database functions. DBMS abstraction implemented by means of functions instead of global variables, PostgreSQL object converted to a subclass instead of a drop-in replacement. Also the beginnings of a flexible table name feature.
2004-07-10 03:09:26 +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
Guillaume Blanchard
af9ce48b3e
add [;] to french space character list
2004-06-29 10:38:55 +00:00
Tim Starling
61819d059b
Corrected spelling error
2004-06-19 06:48:02 +00:00
Antoine Musso
7936e29ba5
* doExponant() function. Convert ^^th^^ in <small><sup>th</sup></small>.
...
The function call is commented
2004-06-17 17:29:54 +00:00
Tim Starling
3545cddd9b
oops, removed random speculation
2004-06-12 07:15:27 +00:00
Tim Starling
85ef7f8865
changed code formatting, changed parser hook calling convention so updating will require a simultaneous update of the extensions. Now use $wgParser->setHook() instead of Parser::setHook()
2004-06-12 06:15:09 +00:00
Jens Frank
21891fe83f
Fix sorting of subcategories without a sortkey. Use Category name as sortkey, not the first letter of Category. See comment for details.
2004-06-10 22:32:04 +00:00
Jens Frank
f3a14034f4
use sortkey for subcategories, too
2004-06-10 12:06:25 +00:00
Tim Starling
3ac0a71c13
Hiero and timeline as fully modular extensions. To use, just include the header file from LocalSettings.php
2004-06-09 12:15:42 +00:00
Jens Frank
07db37945d
Don't show underscores instead of spaces for subcategories. BUG #969473
2004-06-09 12:07:32 +00:00
Antoine Musso
107062dbba
Replacement of most double quotes by single quotes for plain text strings. Should be bug free as I did not make change unless I was sure it was bug less.
2004-06-08 18:11:28 +00:00
Antoine Musso
e197696c58
Don't generate article list if we have no article to show
2004-06-07 08:27:13 +00:00
Antoine Musso
c629470933
bug fix in newcategorymagic: first char was alway the one of the category namespace (aka C)
2004-06-07 03:46:33 +00:00
Jens Frank
29c1135460
new layout for Category:XXX pages.
...
Can be turned on or off using MediaWiki:Usenewcategorypage
2004-06-06 09:24:07 +00:00
Antoine Musso
6ec37b9507
some comments added
2004-06-05 15:17:08 +00:00
Gabriel Wicke
c410b3f316
section anchor cleanup, unurlencode :
2004-06-05 10:34:32 +00:00
Tim Starling
2650e92361
More profiling sections
2004-06-05 04:51:24 +00:00
Tim Starling
242d225e10
removed non-matching wfProfileOut() calls
2004-06-05 02:22:16 +00:00
Gabriel Wicke
94c2a67f51
/tr added to tags
2004-06-02 23:22:24 +00:00
Gabriel Wicke
e4562fbd4c
The Arab al[[Razi]] cleanup
2004-06-02 22:54:01 +00:00
Gabriel Wicke
6aa81d268b
The Arab al[[Razi]] back on board
2004-06-02 22:39:06 +00:00
Gabriel Wicke
a0fbb5e730
section anchor encoding:
...
'%' -> '.'
pseudo-urlencoded for enough uniqueness in non-ascii languages
2004-06-02 15:19:28 +00:00
Gabriel Wicke
f982803ae9
nowiki handling
...
* unstrip done for nowiki separately (unstripNoWiki())
* unstripNoWiki() called *after* doBlockLevels
2004-06-02 12:29:15 +00:00
Brion Vibber
5830e7c6f9
Reverting to previous revision; this broke at least one example and I'm not sure why.
2004-06-02 08:01:48 +00:00
Brion Vibber
8f4bf54583
Don't put literal <nowiki>, <hiero>, or <timeline> into the output. This
...
breaks (X)HTML validation as well as the general rule of rejecting
unknown tags by showing them as text. (<nowiki> is never unknown of course,
so it never appears. Just its text remains raw.)
2004-06-02 07:43:05 +00:00
Jens Frank
cdd0bae0ab
workaround, strip nowikis again in doBlockLevels. BUG #96447
2004-06-02 05:54:52 +00:00
Gabriel Wicke
e30390b38f
performance fix
2004-06-02 02:42:13 +00:00
Gabriel Wicke
9feaa3422a
sig fix II
2004-06-02 01:22:29 +00:00
Gabriel Wicke
10fa17d61b
bug fix: list item with nowiki
2004-06-02 00:39:02 +00:00
Gabriel Wicke
afd3aaa6d1
nowiki handling
...
nowiki areas are wrapped in <span class="nowiki></span > (allows styling) and treated similar to pre areas in doBlockLevels
2004-06-01 22:19:22 +00:00
Gabriel Wicke
32f3b62bab
keep unwrapped text arounf
2004-06-01 11:03:39 +00:00
Gabriel Wicke
c54913969e
th matching in doBlockLevels
2004-06-01 07:52:44 +00:00
Gabriel Wicke
6b87eb0077
table handling fix and notice silencing instead of buggy checking in the html strip function
2004-06-01 07:25:48 +00:00
Erik Moeller
cd18b85daa
unbreak template parametrization
2004-05-31 21:50:12 +00:00
Jens Frank
9134865cca
Only pop an array if it really is an array. BUG # 963554
2004-05-31 13:02:19 +00:00
Jens Frank
e2d600aa8d
Fix transclusion inside of tables. BUG #962494
2004-05-31 12:12:18 +00:00
Tim Starling
a713b369c6
Changing handling of newlines in templates
2004-05-31 10:59:39 +00:00
Brion Vibber
6ae494e9e9
<br/> isn't compatible with Netscape 4.x; use <br /> to avoid gratuitously breaking it. (bug 963341)
2004-05-31 00:58:57 +00:00
Antoine Musso
9dc65ef54e
fix bug 963205 : text starting with space & ! or ? or : will be <pre>ed instead of space replaced by
2004-05-30 18:36:33 +00:00
Tim Starling
3d1698b760
Fixed $wgCacheEpoch handling
2004-05-30 07:31:26 +00:00
Tim Starling
c479abef0c
Removed PST <br> conversion, unnecessary, was annoying people
2004-05-30 02:34:44 +00:00
Tim Starling
d6dc042e00
repaired gwicke's horrible mangling of brace expansion, partial support for nested expansion (restoring 1.2 capabilities)
2004-05-29 05:19:27 +00:00
Tim Starling
d70f59f2c2
quieter tidy errors
2004-05-29 04:51:29 +00:00
Gabriel Wicke
6769ea37c9
bug fixes: no newline at end of includes, interwiki link handling, safety net in the include while loop
2004-05-27 16:08:12 +00:00
Tim Starling
a42101c0a0
Parser cache moved to memcached
2004-05-27 15:24:04 +00:00
Gabriel Wicke
14abd5d7d2
run replaceInternalLinks twice to render links/images in captions of images
2004-05-27 01:38:38 +00:00
Gabriel Wicke
b938a02ef5
image link handling
2004-05-27 01:10:01 +00:00
Gabriel Wicke
3070017d21
adjacent include handling
2004-05-27 00:27:24 +00:00
Gabriel Wicke
2e74792381
typo in magicRFC
2004-05-26 22:03:30 +00:00
Gabriel Wicke
f37a24d487
french space fix
2004-05-26 21:58:03 +00:00
Gabriel Wicke
0958e9dde1
fixed regex
2004-05-26 21:11:54 +00:00
Gabriel Wicke
b97850e021
while instead of if
2004-05-26 21:01:58 +00:00
Gabriel Wicke
e554a146d0
experimental {{foo{{bar}}}} support- Tim, please review this
2004-05-26 20:32:19 +00:00
Gabriel Wicke
4a18c231f9
french spaces return
2004-05-26 18:31:00 +00:00
Gabriel Wicke
3df865dc6b
timelines now in strip()
2004-05-26 18:11:52 +00:00
Gabriel Wicke
6d41132f82
temporary removal of tokenizer for performance
...
To be done:
* integrate timelines into strip() / unstrip()
* 'blank' token handling (french spaces, maybe numbers)
2004-05-26 16:29:04 +00:00
Tim Starling
1a5b4b7000
Fixed profiling
2004-05-26 12:30:36 +00:00
Gabriel Wicke
bce772029e
accept urlencoded (interwiki) links
2004-05-25 14:26:14 +00:00
Gabriel Wicke
bd2fd09422
pre handling fix
2004-05-24 10:25:49 +00:00
Tim Starling
587f150879
Changing template argument syntax from {{arg}} to {{{arg}}}
2004-05-23 03:39:24 +00:00
Tim Starling
6a6489ac07
fixed weird bug causing meta to fail spectacularly
2004-05-23 01:21:04 +00:00
Gabriel Wicke
4bcf953707
allow paragraphing inside div's
2004-05-22 18:22:05 +00:00
Brion Vibber
ac9621badb
Add categorylinks table to separately list category relationships. Actual
...
_page_ links to category pages like [[:category:Some cat]] will stay in
links/brokenlinks and not be listed in the category page list anymore.
A link can optionally specify a sort key like this: [[category:cat|Sort me]].
The page will then be sorted in category lists according to the given text
instead of the page name; thus categories may be sorted arbitrarily, by
last name or whatever.
There is also a timestamp field included on gwicke's request; this is not
used yet. Also it will currently be updated at every edit of the page,
this can be changed by implementing differential updating for the cat links.
TODO:
* Make sure that automatic sort keys are updated on page rename.
* Make sure cateory pages get cache-invalidated and purged
* Use proper text sorting instead of raw binary sort
* Allow specification of the display style on category pages: comma list
or bullet list or number list; by sortkey or by timestamp; etc
2004-05-15 00:29:39 +00:00
Gabriel Wicke
53acea5138
don't create a pre for a whitespace-only line
2004-05-14 22:09:33 +00:00
Gabriel Wicke
32c2c1272a
strip out urlencoded \ (inserted for french spaces, e.g. first space in 'something : something') for section anchors
2004-05-14 13:38:33 +00:00
Gabriel Wicke
51be5ecccf
accidentially removed nl fix
2004-05-14 01:18:12 +00:00
Gabriel Wicke
d181a35170
Made strong/em handling more forgiving against unbalanced ticks
...
* close any open em's or strong tags before each heading
* close any open em's or strong's at the end of the text
2004-05-14 00:18:43 +00:00
Jens Frank
60ffb9f53a
fixed '''Caesar''''s bug where 4 ticks where not properly handled.
2004-05-13 20:48:34 +00:00
Jens Frank
f2752c7fc0
Repaired rendering of ''emph ''' bold emph '' bold ''' to produce valid HTML.
2004-05-13 19:47:09 +00:00
Erik Moeller
2b029cff36
fix duplicate TOC problem again, which is independent of section folding
...
feature (occurred when template contained more than three headlines).
2004-05-13 17:16:50 +00:00
Gabriel Wicke
6af7c5ce7b
After a longer phone call Erik and me agreed on working on an equivalent feature most likely based on categories that interacts better with caching. More discussion on to follow.
...
Removed with Erik's agreement.
2004-05-13 14:17:44 +00:00
Erik Moeller
201af52713
restore section folding
2004-05-13 12:20:59 +00:00
Gabriel Wicke
4f9f8df852
Silenced this, $token["pos"] was undefined when parsing '''hi'''''hi'' which created a notice. Output is fine, so silencing it should be ok.
2004-05-13 12:08:02 +00:00
Gabriel Wicke
df08e4792a
removed section folding
2004-05-13 11:54:19 +00:00
Erik Moeller
ac44b37065
fix collapsing problem with templates (templates would be expanded and
...
formatted first and thus cause a duplicate TOC, the internal parser now has
an isMain parameter to specify whether it is called from the main article
text, or from a template.
2004-05-12 22:01:25 +00:00
Erik Moeller
cc357845fc
fix a couple of section collapsing bugs
2004-05-12 21:38:01 +00:00
Erik Moeller
c245bfe3ae
fix a =/== typo
2004-05-12 13:55:40 +00:00
Erik Moeller
472272dc61
New feature:
...
Automatic or manual collapsing and expanding of long pages.
Pages can be collapsed automatically according to a size threshold
set in the user preferences. Pages can be collapsed manually by clicking
the "Collapse" link in the TOC.
When a page is collapsed, only the intro & TOC are displayed. The
individual TOC lines link to section views, which can be individually edited
(classic section editing).
Section editing/viewing behavior has also been improved. When a section
with subsections is viewed or edited, all subsections are also loaded.
Known issues:
- After saving a section, we return to the full article view
rather than the section view, even if we previously were in section view
mode.
- Should work with Standard and Monobook, not tested with Cologne Blue yet.
- In Monobook, no backlink to the mother article is shown during section
viewing (Gabriel, can you fix that?)
2004-05-12 13:26:36 +00:00
Gabriel Wicke
fd7106bf4c
preserve newline before braced variables
2004-05-12 12:48:36 +00:00
Brion Vibber
33f1e77c11
PHP 4.1.2 compatibility fixes (based on patch submission by Asheesh Laroia)
...
Also, urlencode anchor names for non-ascii compatibility. This is the
recommendation of HTML 4.01 standard in B.2.1, as far as I can tell.
Works in UTF-8 at least for IE6/win, Firefox, Safari.
2004-05-10 01:54:56 +00:00
Brion Vibber
5bcd470847
Add $wgUserHtml option; set to false to disable use of user-supplied HTML
...
in wiki markup. Note that <nowiki>, <pre>, <math> etc are counted as wiki
markup. That <pre> looks like HTML's <pre> is a coincidence; they behave
differently (<pre> also disables other wiki markup like <nowiki> does).
Also, escape the <math> tag when $wgUseTeX is off.
2004-05-09 12:04:59 +00:00
Brion Vibber
762b8e9b47
Allow installing and running the wiki on a server where ini_set has been
...
disabled via disable_functions in php.ini (bug #928168 )
The PHPTal skin doesn't function unless the PEAR bits are in include_path,
so it's disabled if ini_set can't be used. If the files are manually placed
or a real PEAR installation is available with the right stuff, one can
use $wgUsePHPTal = true;
There are likely other things that need to be taken into account for
restricted environments. Maintenance scripts haven't been tweaked for
such an environment yet either.
2004-05-09 10:37:00 +00:00
Tim Starling
8f22cb45b1
include_once -> require_once
2004-05-07 13:43:10 +00:00
Gabriel Wicke
dc58bc8458
add encoding option
2004-05-07 09:06:45 +00:00
Gabriel Wicke
6267cadb18
pipe for stderr was troublesome on pages with many errors (buffer filled up), generic message now
2004-05-06 21:06:23 +00:00
Gabriel Wicke
315d66c796
* simpler html strip function if tidy is used
...
* error reporting if tidy doesn't honour force-output option *and* html is severely broken (if unknown elements are encountered), never return uncleaned version
2004-05-06 19:01:05 +00:00
Gabriel Wicke
3a4d20b02f
return the uncleaned text if tidy isn't there or if nothing is returned
2004-05-06 13:38:23 +00:00
Gabriel Wicke
c6fe32ac5b
New tidy function that uses html tidy ( http://tidy.sf.net ) to make sure the output is valid xhtml/xml
...
Disabled by default, set $wgUseTidy = true to enable
Possible improvements:
* Tweaking it to work on windows (don't know if that's possible)
* use the php5 built-in tidy module if available, that seems to allow a fine-grained config on which tags are allowed as well (see http://www.php.net/manual/en/ref.tidy.php )
2004-05-06 12:50:04 +00:00
Gabriel Wicke
4671bf4b40
\n rather than \n (although they both seem to work)
2004-05-02 23:53:10 +00:00
Gabriel Wicke
dea42dfed8
experimental fix to the template-inserts-newline-on-save problem
2004-05-02 23:18:25 +00:00
Gabriel Wicke
96bdd88017
two bug fixes: html comments don't add a paragraph anymore, lang links don't eat following text anymore
2004-05-02 21:27:56 +00:00
Brion Vibber
40e3893b51
Partial fix for #595869 ": in URL after ; parsed as list item"
...
Also put sensible names on many variables in doBlockLevels() and added
some comments.
This partial fix requires there to be a space prior to the post-; : to get
parsed as the definition:
; def title : def text
thus it doesn't trigger on a URL or namesapce properly written:
; def title [http://link ] : def text
However the regexp will fail and break things if there's an actual space
before a : in the link, which is possible in piped text etc. It may be
desirable to deal with this at the tokenizer level, to keep it clear
of links, tags, etc.
2004-04-29 06:16:21 +00:00
Erik Moeller
dfecc217ab
fix longstanding bug with section editing where section headers within
...
<nowiki> or <!-- .. --> tags would cause it to miscount section
numbers. Parser::extractTags modified to allow stripping HTML comments
as well. Note: Presently HTML comments are completeley removed from
the output using preg_replace. Should they ever be rendered instead,
Parser::extractTags should be used.
2004-04-28 04:50:35 +00:00
Jens Frank
c37ee075be
Hooks for Erik Zachte's EasyTimeline extension.
...
Plus one one-line patch by Dori.
2004-04-26 10:20:54 +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
ba15ec0d1b
removed debugging code
2004-04-24 10:46:22 +00:00
Jens Frank
b606373905
Handle French typographical rules for spaces before and after punctuation
2004-04-24 10:34:22 +00:00
Brion Vibber
09b9b3a92f
Fix category link display for unmade pages; it used to display every page in the database instead of just linking pages
2004-04-24 09:28:22 +00:00
Brion Vibber
95201d803b
Fix trail on bolded self-links (bug #938954 ).
...
Adds Skin::makeSelfLinkObj. These all have some duplicate code for dealing
with link trails and the link and could probably be folded together more.
2004-04-23 20:13:31 +00:00
Magnus Manske
3b07de6290
Category namespaces
2004-04-21 20:45:00 +00:00
Magnus Manske
de18da5eeb
Category namespaces
2004-04-21 20:28:00 +00:00
Magnus Manske
cc1fbbe002
Category namespaces
2004-04-20 21:30:59 +00:00
Magnus Manske
9c9119439f
Category namespaces
2004-04-20 21:08:24 +00:00
Gabriel Wicke
f26cfcb59d
allow del and ins, other xhtml tags might be worth to allow as well (acronym and similar)
2004-04-19 17:04:22 +00:00
Antoine Musso
0fa4d73384
Fix bug 868957
...
Allow indentation with spaces in table wikisyntax !
( rtrim -> trim)
2004-04-18 17:26:47 +00:00
Jerome Jamnicky
039760d64f
Correct call-time pass by reference in newFromUser()
...
(fix from Tim Starling)
2004-04-17 11:20:15 +00:00
Gabriel Wicke
ad9c9e6364
\n in " instead of '
2004-04-16 14:28:03 +00:00
Gabriel Wicke
7822095a10
proper closing of lists when pre follows
2004-04-16 11:21:51 +00:00
Gabriel Wicke
274686b792
use class for center-replacement divs
2004-04-16 00:05:44 +00:00
Gabriel Wicke
34f603fe70
div again, we don't really know what will be inside the center tags. Could be another div for example, or a table.
2004-04-15 16:06:25 +00:00
Gabriel Wicke
919db72fdf
forgot to move the actual preg_match as well, p instead of div for center
2004-04-15 16:01:39 +00:00
Gabriel Wicke
c23cb2c9c2
move fixtag replacement before doBlockLevels to avoid div inside pre
2004-04-15 14:59:46 +00:00
Gabriel Wicke
90a58a55d2
no list parsing inside pre areas
2004-04-15 14:25:34 +00:00
Tim Starling
10cf99ecb9
fixing <center>: text-align is a block level element, needs to be in a div
2004-04-15 11:26:29 +00:00
Arne Heizmann
7e25305c3f
spelling mistake in comment.
2004-04-12 23:59:37 +00:00
Gabriel Wicke
37e1db3273
doBlockLevels after unstrip to avoid wrapping templates in p's (which is often invalid)
2004-04-12 18:49:55 +00:00
Gabriel Wicke
f39b48539b
doBlockLevels and fixtags only in parse(), restored amp regex, ? not valid in anchor names
2004-04-12 16:10:17 +00:00
Tim Starling
5733d21563
template arguments, various improvements to handling of recursive inclusion
2004-04-11 16:46:06 +00:00
Gabriel Wicke
38355c2d18
no doBlockLevels when parsing included messages
2004-04-10 18:03:25 +00:00
Gabriel Wicke
47cdc34af9
asses li and ul to blocklevel regex, those are coming from included templates.
2004-04-10 16:06:30 +00:00
Gabriel Wicke
54717da9f9
paragraphs again, amp matching moved to match stripped areas as well
2004-04-10 15:11:14 +00:00
Erik Moeller
f3eaad894c
fix notice
2004-04-10 10:46:17 +00:00
Erik Moeller
83912993db
fix notices (jeluf, please enable E_NOTICE in your php.ini, also take a look
...
at the diff, please)
2004-04-10 10:24:02 +00:00
Erik Moeller
d0229d46bf
fix paragraphs again
2004-04-10 06:50:49 +00:00
Brion Vibber
c27d8f8bfa
Try to escape unaccompanied ampersands.
...
This doesn't yet verify that named character entities are valid, however.
2004-04-10 04:28:19 +00:00
Gabriel Wicke
f2ac7b2598
now pre for real
2004-04-10 03:09:52 +00:00
Gabriel Wicke
05eb3bb416
pre area no longer cut in pieces
2004-04-10 03:05:11 +00:00
Gabriel Wicke
158510d926
five quite fix
2004-04-10 02:38:05 +00:00
Gabriel Wicke
f530b18831
no new p on single newline
2004-04-10 01:13:48 +00:00
Gabriel Wicke
f2e949d974
added p to open tags, included templates usually start with a p
2004-04-09 17:44:23 +00:00
Gabriel Wicke
90804e0d92
some cleanup on save
2004-04-09 16:22:12 +00:00
Tim Starling
79258b548a
Processing inclusions using recursive parsing rather than substitution halfway through. This fixes several bugs, but introduces some weird behaviour, for example TOC handling
2004-04-09 15:29:33 +00:00
Gabriel Wicke
ccac58dbb4
pre area fixes, ampersand hack
2004-04-09 14:55:12 +00:00
Gabriel Wicke
3e14e94db3
* no empty paragraphs anymore, two blank lines give a <p><br/></p> now.
...
* removed $inBlockElem = false bug
* same in formatHeadings
* Todo: stack for nestable block levels
2004-04-09 13:40:50 +00:00
Erik Moeller
2f7946f0bb
make doBlockLevels last parser stage again, and fix missing paragraphs from
...
intro bug
2004-04-09 11:26:27 +00:00
Erik Moeller
248f0aedf1
refix xhtml (I'm going by trial and error here)
2004-04-09 08:17:59 +00:00
Erik Moeller
d6c69e3b94
quickfix for bug that caused
...
- paragraphs to be stripped from intro sections
- <br> instead of paragraphs after the intro section
will break xhtml
2004-04-09 07:55:37 +00:00
Antoine Musso
cf9a0125d5
new global UNIQ_PREFIX used to init $uniq_prefix in two functions. It prevented the doBlockLevels to parse the escaped <pre> tag.
2004-04-09 07:31:35 +00:00
Tim Starling
9b6a910f1b
fixed handling of invalid title in {{double braces}}
2004-04-08 13:47:11 +00:00
Gabriel Wicke
e592d588c4
* doTokenizedParser doesn't assume leading text token anymore, 0 !== false
...
* pre nesting problem fixed by matching against $uniq_prefix . '-' . $tag, marker changed to this format. If stripped areas shouldn't be nested in p's, add those tags to the $inBlockElem = false; regex in doBlockLevels
2004-04-07 17:56:13 +00:00
Gabriel Wicke
3fba40b06c
finally found the reason for the li bug, top a now in skin
2004-04-07 16:12:18 +00:00
Antoine Musso
93b85a43d3
Fix a bug I closed without checking and I cant find right now :(
...
Basicly creating an internal link with a <nowiki> thing generate bad link in the database (using a NaodW29). I used the unstrip function of parser.php to remove that from the text before it is send to the internal link handler. Seems to fix things quite well
2004-04-07 13:44:14 +00:00
Antoine Musso
90196ec9ca
Fix sourceforge bug 872981
...
Typo ;)
2004-04-07 12:38:01 +00:00
Gabriel Wicke
1c2d1a2662
dirty hack to work around the one-space-at-beginning-required problem
2004-04-05 11:41:41 +00:00
Gabriel Wicke
c5d47384c0
no br if line contains whitespace, no empty line added after parsing interwiki language links
2004-04-05 11:34:13 +00:00
Tim Starling
ba00eafeae
Added transformation to wfMsg output, allowing tags such as {{SITENAME}} and {{localurl:Special:Preferences}} in the language files and MediaWiki namespace
2004-04-05 10:38:40 +00:00
Gabriel Wicke
a2bb8422d2
* some fiddling with the remaining pre-inside-p problem
...
* ' also stripped
2004-04-04 19:56:14 +00:00
Gabriel Wicke
b7100af7e8
fixtags hack slightly cleaned up
2004-04-04 14:48:29 +00:00
Gabriel Wicke
e02c22b027
tocline was missing
2004-04-04 14:15:11 +00:00
Gabriel Wicke
0155f1f84e
* anchor stripping now positively defined, only a few explicitly defined invalid characters are replaced by _:
...
$canonized_headline = preg_replace("/[ &\\/<>\\(\\)\\[\\]=,+]+/", '_', html_entity_decode(trim( $canonized_headline )));
* additional fixes for closing p's in tables
2004-04-04 13:59:45 +00:00
Gabriel Wicke
a19696f511
xhtml tweaks, please review!
...
fixed problems:
* surplus closing p's
* invalid nesting of table / div (floated images) / hr in <p>'s
* generation of multiple empty p's
* invalid nesting of section editing spans
* invalid anchor names- attention! this might break links! Replacing [^a-z0-9] -> '_' now
known issues:
* needs a space at the beginning of the first line in the wikisource to parse leading ''', * and similar
2004-04-04 01:45:02 +00:00
Brion Vibber
a0506cac17
Basic page rendering and editing now works in XHTML! Yeah!
...
To test:
$wgMimeType = "text/xml";
$wgDocType = "-//W3C//DTD XHTML 1.0 Transitional//EN";
$wgDTD = "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ";
2004-04-03 10:23:26 +00:00
Brion Vibber
3d2a067e8c
HTML tweaks inching towards XHTML-friendly output. To test:
...
$wgMimeType = "text/xml";
$wgDocType = "-//W3C//DTD XHTML 1.0 Transitional//EN";
$wgDTD = "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ";
Mozilla will spit out angry erorrs at all the well-formedness errors.
2004-04-03 10:01:08 +00:00
Tim Starling
02914ea8c8
__FORCETOC__ to display a TOC even on pages with less than 4 headings, written by Silsor
2004-04-03 04:38:09 +00:00
Magnus Manske
073d13e93d
fixing category links, nth time
2004-04-02 20:34:13 +00:00
Tim Starling
e9aa758d7a
Removed dependence on register_globals from everything except the special pages. Fixed miscellaneous bugs.
2004-03-29 14:48:07 +00:00
Jens Frank
94c5c43767
renamed replaceInternalLinks to doTokenizedParser
2004-03-28 10:01:13 +00:00
Tim Starling
e12289e771
alterations to allow a command-line wikitext processor
2004-03-27 22:47:25 +00:00
Brion Vibber
dbf5ee150d
Fix missing initialization
2004-03-26 21:25:48 +00:00
Mr. E23
80da50e5f6
Experimental support for WikiHiero
2004-03-26 19:02:24 +00:00
Mr. E23
3af17a1fbe
forgot to remove some testing code
2004-03-26 17:19:09 +00:00
Mr. E23
b320d46394
Code cleanup for strip() and unstrip()
2004-03-26 17:14:23 +00:00
Gabriel Wicke
6135b741d3
fixed section anchors
2004-03-23 11:37:15 +00:00
Tim Starling
e7b00f8fee
allowing redirects in inclusions
2004-03-23 10:16:32 +00:00
Gabriel Wicke
fee06ca65b
xhtml tweaks, incomplete. sometimes closing p where there should be none
2004-03-22 23:52:36 +00:00
Brion Vibber
339b742275
Printable mode cleanup. Now done through stylesheets, <link>ed so that the
...
print command on a regular page will actually use the print stylesheet.
Explicitly following the printable link will also show the printable view
on screen.
CAVEATS: IE/Win may oversimplify the link style in what should be colored
or underlined text. Page title is not shown in Nostalgia skin printable
view. Part of the footer is duplicated in the output and will be visible in a styleless
user agent (lynx, really old Netscape, etc). Some render options aren't
totally handled right for printable, such as ? brokenlinks.
Also, section edit links are now available in diff view if the dest rev is
the current revision.
Some misc code clean-up and formatting as well.
2004-03-21 11:28:44 +00:00
Arne Heizmann
a25fa64b94
Make ~~~~~ (five tildes) insert just date/time, without [[User:username]]
2004-03-21 03:30:41 +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
Magnus Manske
c4ba35185d
fixing category feature, again
2004-03-20 12:10:25 +00:00
Brion Vibber
8510acd5a4
Clean up initialized variables; fix upload error.
2004-03-20 08:41:33 +00:00
Antoine Musso
f65c2c4601
Fix source forge bug 803693
...
When a title is given in a == == headline, the html was incorectly generated as:
<a name="sectionname"></a><a class="internal">link</a>
It now generates:
<a class="internal" name="sectioname">link</a>
2004-03-16 14:25:09 +00:00
Antoine Musso
834b876308
fix source forge bug 787780
...
Allow = sign in headers. Ex: = my text = crap = will render as <h1>my text = crap</h1>
2004-03-16 03:58:36 +00:00
Antoine Musso
9f7012d8e9
removing a debugging line (echo $variable)... I feel so lame :(
2004-03-16 02:27:42 +00:00
Antoine Musso
92b1a41750
Fix sourceforge bug 872981
...
Render [[[link]]] as [<a href...>link</a>]
Render [[[link|text]]] as [<a href...>text</a>]
UNTESTED with $wgLang->linkPrefixExtension() true
2004-03-16 02:17:33 +00:00
Jens Frank
88d72e04d1
fixed language linking bug left from elimination of globals
2004-03-14 21:29:30 +00:00
Mr. E23
627e06bda6
Standardizing linebreaks
2004-03-14 00:55:43 +00:00
Brion Vibber
59c6e92429
Some changes to the link tables. They now all use a key on cur_id for the *_from column instead of strings, and have a unique index to force prevent any duplicate entries. There's not yet a clean step in the update script, so just clear out your links tables (patch-linktables.sql) and rebuild them with refreshLinks.php.
...
This saves trouble in a number of places where we can now do joins with the link tables to get other info (such as cur_is_redirect!) as well as the name, and fewer bits need to be juggled on page renaming, as outgoing links no longer have to be changed (cur_id remains the same when a page is renamed).
rebuildLinks.inc and some of the tools in the 'maintenance page' still need to be updated to work with the new setup. (Special:Maintenance needs a *lot* of cleanup in general. It's kind of a catch-all of vaguely defined features which suck performance like a hydroelectric dam.)
Also I've slipped in some extra debug code. And, I think 'indexes.sql' is a big waste of time and should all be moved into tables.sql. Building indexes separately doesn't help on InnoDB and won't do anything on MyISAM either if you're just going to replace the table after it's built with an imported one from a dump which creates it with indexes.
2004-03-11 09:06:13 +00:00
Tim Starling
14a51853f3
bug fix, mContainsOldMagic goes in mOutput now
2004-03-08 09:26:23 +00:00
Brion Vibber
014093acc4
More globals and uninitialized variables fixes. Added WebRequest ($wgRequest)
...
object to encapsulate the handling of get/post variables:
The following grab something out of $_REQUEST. The first parameter is the
variable name and is required. The second is an optional default value:
$wgRequest->getVal() - any type, returns NULL if no default given
$wgRequest->getInt() - forced integer, 0 default
$wgRequest->getText() - runs through $wgLang->recodeInput()
$wgRequest->getBool() - return true/false
$wgRequest->getCheck() - returns true if the var is set, even if to ""
$wgRequest strips slashes at initialization if necessary.
Also in this fine object:
$wgRequest->wasPosted() - returns false if this wasn't a real form post,
so we can protect against faked submissions in get urls.
There's still plenty of work to do, not everything uses the new functions
yet. To test the strict mode, do define('DEBUG_GLOBALS', 1);
2004-03-08 09:09:35 +00:00