Commit graph

43 commits

Author SHA1 Message Date
Brion Vibber
1b92442084 More checks for IE hideousness. 2004-09-28 23:32:18 +00:00
Zheng Zhu
2d244b91f7 Attempt to fix links not fixed in the wgLang->wgContLang transition 2004-09-24 18:24:01 +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
79a3ad65ef Verify known image types on upload. 2004-09-23 20:57:35 +00:00
Antoine Musso
5afa9385dd Fix http://bugzilla.wikipedia.org/show_bug.cgi?id=538.
Reuploading image should work now.
2004-09-21 17:51:19 +00:00
Antoine Musso
56a9b26a39 Fix http://bugzilla.wikipedia.org/show_bug.cgi?id=538
Return an 'emptyfile' error page if filename is empty.
2004-09-20 16:23:10 +00:00
Antoine Musso
c1a9612d1d comments / single quotes. 2004-09-20 16:10:48 +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
Antoine Musso
90155b8a97 Changing comments layout preparing for generated documentation with Phpdocumentor 2004-09-02 23:28:24 +00:00
Brion Vibber
0d2104a5e6 XHTML fixes for Special:Upload
* well-formedness fix on the tables and forms
* switch 'uploadtext' message from HTML to wikitext
2004-08-14 11:41:10 +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
Jens Frank
5df9f462f8 Fix for Bug [ 720843 ]: Replace invalid chars in uploaded file names instead of cutting off the end of the string 2004-08-09 21:37:27 +00:00
Jens Frank
3e4e98b51c Show a warning message when uploading empty files (e.g. due to typos) 2004-08-03 18:57:04 +00:00
Brion Vibber
e4cc42b022 Detect illegal title from uploaded file and show a helpful error message
instead of dying with a PHP fatal error.
* [ 991457 ] "+" in filename generates an error

Also html-escapes filename fragments in error message output.
2004-08-02 05:57:33 +00:00
Gabriel Wicke
65ec7dcab7 add a class to the ul to make it styleable (red exclamation mark icon in front of each for example) 2004-06-24 22:32:15 +00:00
Gabriel Wicke
3db0f7fa2f make sure all applicable warnings are displayed (as li's and not as intrusive as before) and honour -\>mIgnoreWarning 2004-06-24 22:30:16 +00:00
Gabriel Wicke
18631648be * Image protection: if the image page is protected, uploading a new file is protected as well
* Filename already exists warning: new key 'fileexists' with param $1 = link to the existing image page. Please translate.
2004-06-24 22:02:59 +00:00
Antoine Musso
e137ce07a8 patch by Laurent GUERBY to use/check copyright upload. Disabled by default. 2004-06-24 13:26:08 +00:00
Tim Starling
8014c61fe2 Configurable size warning (change to DefaultSettings.php on way) 2004-06-09 12:06:17 +00:00
Jens Frank
42f39da880 wfImageUrl moved from Globalfunctions to Image
Preferred access via $image->getUrl(), but for compatibility
Image::wfImageUrl() still works
2004-04-24 23:45:11 +00:00
Tim Starling
c10b49adf4 refactoring and $wgRequest use 2004-04-01 12:37:45 +00:00
Brion Vibber
f29fd89dd8 HTTP_POST_VARS obsolete, annoying 2004-03-28 01:48:13 +00:00
Brion Vibber
8510acd5a4 Clean up initialized variables; fix upload error. 2004-03-20 08:41:33 +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
Brion Vibber
9e53bfc81c Imported the register_globals hack from REL1_2. Also starting work on
elimination of the use of import_request_variables (which gives us all
the insecurity of register_globals). Uncomment the define of DEBUG_GLOBALS
in index.php to turn on extra error reporting and trace down use of
uninitialized variables and nassssty globals.

Also rearranged the magic_quotes fixing, may not yet cover everything...
2004-03-08 01:51:32 +00:00
Brion Vibber
b59ce22943 Replace the random boolean parameters on Title::getURL() with a set of
practical, clear methods:
  Title::getLocalURL() - "/wiki/index.php/Foobar" or "/wiki/index.php?title=Foobar&action=edit"
  Title::getFullUrl() - ditto with $wgServer on the front
  Title::getInternalUrl() - ditto with $wgInternalServer on the front (for some squid-related functions)
  Title::escapeLocalUrl() - local URL escaped for HTML output
  Title::escapeFullUrl() - full URL escaped for HTML output

All take an optional query parameter.

Title::getURL(), wfFullUrl() and wfFullUrlE() are now officially
deprecated and will result in instant death. wfLocalUrl() and wfLocalUrlE()
will be killed shortly; they are still used in the language files.
2004-03-07 07:26:56 +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
Brion Vibber
1aaf3e6b2e Quickie blacklist & stricter whitelist for upload extensions.
Whitelist isn't perfect yet, since some server configs may interpret
multiple extensions and we pass the wrong one.
2004-01-20 04:12:21 +00:00
Brion Vibber
7ece699c85 Adjust whitespace 2003-12-10 11:39:33 +00:00
Evan Prodromou
9dda120350 Made two new global variables for checking file extensions. The list of
extensions is now configurable, and you can turn on and off file extension
checking. There isn't yet a "hard" check, though.
2003-12-09 18:20:32 +00:00
Brion Vibber
0a164de2ba Revert globals patch pending further work 2003-11-24 00:48:10 +00:00
Brion Vibber
13c17d0cc9 Commit JeLuF's register_globals fixes, first phase 2003-11-23 22:46:01 +00:00
Brion Vibber
077ccb298c Use wfMsg()'s parameters 2003-11-15 13:41:26 +00:00
Tim Starling
46787701ce Nov. branch merge. Various features backported from stable, various bug fixes. 2003-11-09 11:45:12 +00:00
Luc Van Oostenryck
896454c69e in uploadWarning() 2003-11-04 01:29:45 +00:00
Tim Starling
12c92db0e8 Security fix: wpReUpload 2003-10-15 12:32:16 +00:00
Magnus Manske
2afd409ebb upload add-on 2003-09-17 13:48:08 +00:00
Bogdan Stancescu
154f1f39a4 Addel label tag for wcUploadAffirm label 2003-08-15 20:22:25 +00:00
Brion Vibber
f92d41d6c3 Date/time fixes: try to ensure that timestamps are always kept in GMT, with conversion where necessary. 2003-06-30 01:33:16 +00:00
Brion Vibber
8ee5d70735 Check for IP blocks on upload 2003-04-30 07:43:55 +00:00
Lee Daniel Crocker
d82c14fb4f Initial revision 2003-04-14 23:10:40 +00:00