Commit graph

25 commits

Author SHA1 Message Date
Jens Frank
39f1d761c9 Fixes needed to make redirect.php work with MEDIAWIKI checks,
i18n and without explicitely set include_path
2004-10-03 09:53:39 +00:00
Brion Vibber
62b3b52e39 Make FauxRequest actually work ;P 2004-09-29 08:20:55 +00:00
Zheng Zhu
c05629c010 Third batch of files modified to replace selected wgLang with wgContLang 2004-09-24 16:45:31 +00:00
Brion Vibber
e199fe8803 Move the check for legacy/UTF character conversion on incoming URLs from
Title::newFromURL into WebRequest itself. Should now work on all get params,
so essentially the full URL will be converted.

(The check is not done if the referer matches the canonical server, as before.)

Fixes problem with latin-1 typed URLs introduced by the stricter UTF-8
validation checks running before the conversion check.

One minor glitch; the canonical URL redirection no longer picks up on a
charset conversion. However it's broken anyway and doesn't pick up eg
non-canonical URLs using ?title= instead of / or other such things. Needs
to be improved...
2004-09-06 03:01:33 +00:00
Brion Vibber
50ae082d03 phpdoc tweaking 2004-09-04 08:34:51 +00:00
Brion Vibber
0e082d4454 Add some documentation comments 2004-09-04 00:12:08 +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
Brion Vibber
066834ea58 Normalize Unicode in uploaded filenames. In particular this is a fix for a problem with non-ascii filenames uploaded with Safari, which encodes the file with HTML character references *with combining characters decomposed*.
* Fix for http://bugzilla.wikipedia.org/show_bug.cgi?id=215
2004-09-03 07:12:46 +00:00
Brion Vibber
2406b511a6 Start cracking down on illegal titles: in UTF-8 mode reject titles which have had the 'replacement character' inserted, representing illegal UTF-8 sequences or non-legal Unicode characters.
Moved the PATH_INFO check from index.php into WebRequest; it now just shoves the param into $_REQUEST['title'].
2004-09-03 06:12:57 +00:00
Antoine Musso
90155b8a97 Changing comments layout preparing for generated documentation with Phpdocumentor 2004-09-02 23:28:24 +00:00
Brion Vibber
81e0b9d3c0 One more unicode normalization fix: don't die horribly on arrays, and get the PATH_INFO title too. 2004-09-02 08:01:13 +00:00
Brion Vibber
b687f14131 Normalize Unicode input to normalization form C. Most of the time input
is already in this form and it shouldn't take very long to verify it.
There is still optimization to be done though.

Partial fix for http://bugzilla.wikipedia.org/show_bug.cgi?id=240

Will also need to verify correct UTF-8 sequences and strip characters
that are illegal in XML.

Some input may not be going through this verification yet (eg the uploaded filenames)
2004-09-02 07:50:04 +00:00
Brion Vibber
4e3ccb6d70 Add FauxRequest class for arbitrary parameters. 2004-09-02 02:23:49 +00:00
Brion Vibber
35c74af604 Start migrating wfCheckLimits to WebRequest::getLimitOffset() 2004-08-23 02:19:02 +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
de584eb3fb Rip out some old debugging code from when this was new. 2004-08-21 10:13:36 +00:00
Tim Starling
629601a5dc don't redirect to the canonical title if other parameters have been passed in $_GET 2004-07-25 11:49:05 +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
df08e4792a removed section folding 2004-05-13 11:54:19 +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
Tim Starling
6f150c86b0 removing now unnecessary global registration, which causes a notice on every page 2004-04-03 01:22:04 +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
Brion Vibber
dc8ac41724 Autodiscovery <link> for RSS feed. Added helper functions for query stuff:
appendQuery() and escapeAppendQuery() to WebRequest.
2004-03-19 08:05:36 +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