Commit graph

43 commits

Author SHA1 Message Date
Brion Vibber
103be1dda1 * Further work on rev_deleted; changed to a bitfield with several data-hiding
options. Not yet ready for production use; Special:Revisiondelete is
  incomplete, and the flags are not preserved across page deletion/undeletion.
  To try it; add the 'deleterevision' permission to a privileged group.
Also split some functions from GlobalFunctions to XmlFunctions.php, added
some convenience functions for building form controls, some more Linker
conveniences for formatting various types of standard link clusters.
2006-03-16 19:04:25 +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
72b8bb845f Don't disappear a parameter in a derived class just because you don't use it; that's unclean and poor practice 2005-12-05 02:20:09 +00:00
Antoine Musso
178cb1ac22 * argument passed by reference but not changed
* unused argument
2005-12-04 19:55:01 +00:00
Antoine Musso
2ca68a256d Clean up unused globals! 2005-12-04 18:27:59 +00:00
Brion Vibber
874fa5ddbf * Fix WebRequest::getRequestURL() to strip off the host bits squid prepends
Corrects self-link in Atom 1.0 feeds.
2005-11-05 10:53:21 +00:00
Niklas Laxström
5facdf5fa0 * (bug 2554) Tell users they are uploading too large file 2005-08-26 15:31:05 +00:00
Brion Vibber
af2177edfd Code cleanup: normalize case for intval(), strval(), floatval() calls. 2005-08-16 23:36:16 +00:00
Brion Vibber
753cfc1553 * Various code cleanup and HTML escaping fixlets on page history, contribs etc
* fix page history with table prefix
* fix paging on history
* switch 'earliest' and 'latest' link order to fix 'prev' and 'next'
* use null where appropriate
* switch some messages to plaintext or wikitext
2005-06-29 06:16:03 +00:00
Brion Vibber
0f8f8105a6 speling 2005-06-28 06:50:34 +00:00
Brion Vibber
7b263cc131 * Convert non-UTF-8 URL parameters even if referer is local 2005-06-27 02:04:44 +00:00
Brion Vibber
fe40fe9da8 * Replace wfMungeToUtf8 and do_html_entity_decode with a single function
that does both numeric and named chars: Sanitizer::decodeCharReferences
* Removed some obsolete UTF-8 converter functions
2005-05-31 11:54:36 +00:00
Brion Vibber
7e5a4414f4 * (bug 1933) Fix PATH_INFO usage under IIS with PHP ISAPI module 2005-04-20 10:41:52 +00:00
Ævar Arnfjörð Bjarmason
49e4a88068 \t^*$ between the comment and params for consistant formatting 2005-04-07 14:13:06 +00:00
Brion Vibber
6f5560867c Start removing the Latin-1 hacks. We're going pure UTF-8 for 1.5... 2005-03-26 22:23:48 +00:00
Brion Vibber
67c82a607a Change WebRequest::getVal() to always return a string (or null), and add getArray() method for the rare times that's what we want. 2004-12-18 11:18:56 +00:00
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