Commit graph

75 commits

Author SHA1 Message Date
Brion Vibber
953a80768a Correction to r29191 -- don't break $wgArticlePath check when no $wgActionPaths. :D
Cut-n-paste error.
2008-01-02 20:48:01 +00:00
Brion Vibber
de4b7e5b75 * (bug 11428) Allow $wgScript inside $wgArticlePath when emulating PATH_INFO
Fixes 'root'-style rewrite configurations
2008-01-02 20:26:06 +00:00
Aryeh Gregor
8f74078b36 * Fix Special:Userrights logs for users with special characters in their names. Previously it was urlencoding the page name passed to the FauxRequest, which did *not* urldecode it, so the constraint was being ignored by LogReader as invalid and the whole log was being posted.
* Whitespace, __METHOD__, documentation for FauxRequest to avoid (hopefully?) a repeat bug
* Todo: look for other instances of the bug
2007-11-20 19:00:55 +00:00
Aryeh Gregor
a15c419b3d Remove ?>'s from files. They're pointless, and just asking for people to mess with the files and add trailing whitespace. (Yes, I looked over every one and reverted those that were bogus. Slash-enter a million times in less worked well enough, although it was a bit mind-numbing.) 2007-06-29 01:19:14 +00:00
River Tarnell
53d02f0841 use rawurldecode instead of str_replace, from brion 2007-05-21 19:50:37 +00:00
River Tarnell
060c767933 replace + with %2B in REQUEST_URI before urldecoding the title, so that literal "+" in the title works correctly 2007-05-21 19:41:56 +00:00
Brion Vibber
d9d553fa98 Fix for regression in variant short-URLs...
Cleaned up the new URL parsing code a bit, now able to recognize both $wgActionPaths and $wgVariantArticlePath and interpolate those variables.
Moved that bit into WebRequest::interpolateTitle() function which is called after $wgContLang stub object is created, so it can be used to get the variant list.
I'm not totally happy with all this code, but it works. The variant bits generally creep me out.
2007-05-17 20:02:59 +00:00
Brion Vibber
aade61c626 Fix regression where $wgActionPaths were not respected when parsing info out of REQUEST_URI.
There may still be bugs with alternate/compatibility URLs, investigate further...
2007-05-14 13:56:26 +00:00
Tim Starling
c999082474 a couple of fixes 2007-05-12 19:25:25 +00:00
Aaron Schulz
00b3b67205 *Revert r22121, causes a lot of stuff to redirect to main page for no reason, clicking history/edit tabs results in "Editing Main Page" no matter what (Apache/2.2.3_) 2007-05-12 17:46:50 +00:00
Tim Starling
cb5aecf73e Use $_SERVER['REQUEST_URI'] instead of $_SERVER['PATH_INFO'], because Apache 2.x corrupts the latter. Idea came from http://trac.agavi.org/ticket/502 . 2007-05-12 15:44:54 +00:00
Nick Jenkins
bd23ec29c6 Doc tweaks:
* Seems like an opportune time to introduce "@addtogroup Media" documentation tags.
* Merge "@addtogroup Metadata" (used by Exif.php) into "@addtogroup Media".
* Few more moving comment blocks to above classes.
2007-04-24 06:53:31 +00:00
Nick Jenkins
113bb1c772 Documentation tweaks to help documentation systems (Doxygen + PHPDocumentor)
pick up the appropriate tags, and documentation blobs for classes. This is 
the same as per r20769, but with the grouping changes (e.g. removing "@{{") omitted.
Please be advised that more related documentation tweaks may follow later - e.g. 
Doxygen generates a log file of warnings that is 574 Kb in size, when run over 
the just the trunk/phase3 code ... eek! Thankfully, much of that is just 
whining about functions without documentation   ;-)
2007-04-04 05:22:37 +00:00
Brion Vibber
3a6ac5a3c3 Revert r20769: we don't use PHPDocumentor anymore, we use doxygen.
If making mass changes to tweak to its preferences, probably better to do it for the tool we actually generate docs with. :)
2007-03-28 14:16:43 +00:00
Nick Jenkins
5fef2333d4 PHPDocumentor [http://en.wikipedia.org/wiki/PhpDocumentor] documentation tweaking stuff.
Minor doc tweaks to prevent some PHPDocumentor warnings or errors when run on the includes/ directory. PHPDocumentor uses a syntax very similar to javadoc - mostly we already use this, but there were a few scattered places that were adjusted to make them consistent with the rest of the code. In practical terms, these changes were made:
* @url becomes @link
* @fixme becomes @todo
* HTML tags in descriptions must be closed / balanced.
* @bug was removed (where the bug was long fixed), or changed into a @todo (in the few situations where the bug was still pending)
* @obsolete becomes @deprecated
* Things like "/**@{{" and "/**@}}*/" which cause "unknown tag" warnings were removed
* @access must be a valid access level.
* @desc tag not needed, removed.
* Doesn't seem to like @licence, will accept @license however.
* Use full comment block notation in a few places (i.e. open block with "/**", start each line with " *", and end block with " */")

Then additional to this, to get some class docs associated with their respective classes:
* Moved some docs to right above those classes (deleting blank lines, or moving descriptions from the file headers)
* Marked some classes without docs as "@todo document"
* (done up to "class MIMEsearchPage" on the "classtrees_MediaWiki.html" page for the includes/ directory)
2007-03-28 08:53:02 +00:00
Brion Vibber
fd11a81597 * (bug 8847) Strip spurious #fragments from request URI to fix redirect loops on some server configurations 2007-03-05 18:54:27 +00:00
Brion Vibber
6038f9ed00 * Clean up session checks to better handle the case where the session was
opened during the current request. May help with some caching corner
  cases.
2007-02-05 21:42:48 +00:00
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
Brion Vibber
de72df4032 * (bug 3000) Fall back to SCRIPT_NAME plus QUERY_STRING when REQUEST_URI is
not available, as on IIS with PHP-CGI
2007-01-16 01:45:51 +00:00
Tim Starling
9b5d018643 Experimental workaround for http://bugs.php.net/bug.php?id=31892 , will be tested shortly. 2006-10-19 00:56:57 +00:00
Tim Starling
a316d7ae9b Fix for redirect.php 2006-10-04 04:13:08 +00:00
Tim Starling
3005679b0e * Removed lots of explicit require_once statements. The autoloader should theoretically be faster, because it always uses an absolute path, eliminating the need for a search, and it is never called unnecessarily. Absolute paths are also more robust in the face of odd configurations or usage patterns. Moved a few constants around to support this, they always have to be available before the method call.
* Deleted DatabaseMysql.php, no longer necessary, database classes are autoloaded. 
* Moved wfGetMimeMagic() to MimeMagic::singleton()
* Fixed a couple of __CLASS__.'::'.__FUNCTION__ things.
2006-10-03 13:00:52 +00:00
Domas Mituzas
8974bfd94b add some abstraction for web responses, so far minimal and not that used, requires discussion, conflicts and reverts %) 2006-08-12 23:03:53 +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
Brion Vibber
0a26267688 Revert to r14512; domas introduced massive breakage with incomplete experimental changes. They will be recommitted when they work. :) 2006-06-01 08:19:02 +00:00
Domas Mituzas
bda0b8e104 Use AutoLoader to load classes:
* remove require_once() throughout whole code, yet left in few places
* move global functions in HttpUtils, ProxyTools, Credits to class methods
* php5 only: __autoload() now used, combined with class->file map and require()
* move initialization of $wgValidSkinNames to Skin::getSkinNames()
* few more changes that will surely break stuff.
2006-06-01 07:22:49 +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
bc14eb8045 Replacing var keyword with private / public as we now require PHP5. 2006-05-11 19:10:41 +00:00
Ævar Arnfjörð Bjarmason
2c10e0e6ce * Fixed breakage with get[]= url paramters, supposedly... 2006-05-04 02:17:58 +00:00
Antoine Musso
69689725c1 Switching from phpdoc to doxygen (use less than 32MB of memory).
Run maintenance/mwdocgen.php to generate doc in ./docs/html/ .
2006-04-19 15:46:24 +00:00
Brion Vibber
f2c29baf9f Update the FSF's address in all these GPL stub headers 2006-04-05 07:43:17 +00:00
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