Commit graph

81 commits

Author SHA1 Message Date
Aaron Schulz
ef0a444264 (bug 11330) Improper use of WebRequest::getIntOrNull() 2009-01-02 11:07:12 +00:00
Brion Vibber
df408a59ad Revert r45160 "(bug 11330) Passing default to Request->getInt() is good enough, rather than added code to do the same thing"
This rev changes the behavior, forcing $smaxage to $wgSquidMaxage in cases where we would have previously ended up with $wgForcedRawSMaxage or 0.
2008-12-31 21:05:21 +00:00
Aaron Schulz
147e58f804 (bug 11330) Passing default to Request->getInt() is good enough, rather than added code to do the same thing 2008-12-29 18:58:27 +00:00
Aaron Schulz
0dd5d00e67 FileCache tweaks:
* Fix typo self -> MediaWiki
* View updates run on client cache hits
* Removed unneeded $wgOut->disable() call
* Disabled unused output on rawpage cache hits
* Removed redundant checkLastModified()
2008-12-28 15:03:57 +00:00
Aaron Schulz
f0a60c4fef FileCache cleanuo:
* Add a clearFileCache() function in the place of various unlink() calls. This also clears the raw page cache.
* Fix useFileCache() for loop
* Add mType field to file cache objects
2008-12-28 14:19:39 +00:00
Aaron Schulz
a339ab8ee1 Enable filecache for raw page hits if $wgUseFileCache is on 2008-12-28 13:32:32 +00:00
Aaron Schulz
d3e278c4f0 Minor RawPage tweaks 2008-12-10 04:54:46 +00:00
Alexandre Emsenhuber
177b1e264a Tweaks for skins:
* Moved SkinTemplate::addStyle() and related stuff to OutputPage so that it can be used non-SkinTemplate skins and avoid duplication with the actual OutputPage::addStyle() (the two functions have the same format).
* Non-SkinTemplate skins now also load their CSS with <link> tags instead of @import.
* Moved SkinTemplate::setupUserCss() to Skin.
* Merged action=raw&gen=(js|css) for SkinTemplate and non-SkinTemplate skins, renamed functions to Skin::generateUserJs() and Skin::generateUserStyleSheet() and dropped a lot of cascading call which is a bit incomprehensible.
2008-08-21 14:09:57 +00:00
Alexandre Emsenhuber
087a9f70c5 WARNING: HUGE COMMIT
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>

Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage

One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
Siebrand Mazeland
79d5225c0e * remove end of line whitespace
* remove empty lines at end of file
* remove "?>" where still present
2008-04-14 07:45:50 +00:00
Brion Vibber
bacf4234d4 * (bug 12938) Fix template expansion and 404 returns for action=raw with section
Function returned early, so further processing didn't happen in the section case.
2008-02-13 02:36:28 +00:00
Brion Vibber
da6377abb1 Restore the complete prohibition on action=raw with arbitrary script entry points.
While only MSIE is known to let the URL's "extension" override the allowed mime types, other browsers will still happily download a file with the name from the URL. That seems unwise as the content may be arbitrary (and perhaps executable).
2008-01-19 01:18:23 +00:00
Brion Vibber
669a6b4bab * (bug 12505) Fixed section=0 with action=raw
PHP's fuzzy type comparisons strike again! A check for $this->mSection != '', probably intended to protect against an unset value, matched for integer values of 0 as well. (The fun part is that 0=='' and 0=='0' but '0'!='' :) Since the parameter is validated through getIntOrNull(), only the null check is necessary here.
2008-01-09 02:18:58 +00:00
Domas Mituzas
9d70db7d8c Cache by default raw views for CSS & JS files for all users, controllable by $wgForcedRawSMaxage 2007-11-13 13:24:51 +00:00
Daniel Cannon
393ce6d8df (bug 11353) Add ability to retrieve raw section content via 'action=raw' by specifying a 'section' parameter in the URL. 2007-09-26 05:23:03 +00:00
Brion Vibber
d740bd3bb6 Revert r24105, r24106, r24107 'security fix' forbidden text/css and text/javascript for pages not matching some particular formats.
This doesn't actually do the job; browsers aren't this picky about their JavaScript, and many aren't picky about CSS either. Further, this actually breaks internal JS such as the gen=js mode.
2007-07-17 15:50:50 +00:00
Rob Church
d4b6572b83 MIME is an acronym... 2007-07-15 05:08:06 +00:00
Daniel Cannon
3d94b0e49b Actually, let's make that message a tid bit more clear: "Page type not compatible with requested mime type." 2007-07-15 05:04:24 +00:00
Daniel Cannon
2d92044bb7 Security fix: Previously it was possible to include unprotected and even content pages in site and user jss/css pages via action=raw. Now when requesting a page as text/javascript or text/css, if it should not contain such content, it simply returns '/* EMPTY */'. 2007-07-15 04:57:45 +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
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
Brion Vibber
1ef7033d4c * (bug 9044) Send a comment with action=raw pages in CSS/JS output mode
to work around IE/Mac bug where empty pages time out verrrrryyyyy slowly,
  particularly with new keepalive-friendly HTTP on Wikipedia
2007-02-21 09:39:33 +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
Leon Weber
05b3050d1e * (bug 8567) Added hook RawPageViewBeforeOutput just before the text is blown out in action=raw,
so extensions might influence the output.
2007-01-11 14:50:34 +00:00
Brion Vibber
373393b0f0 * Fix regression in cachability of generated CSS and JS for MonoBook skin,
while avoiding clobbering of different users' cached data

Added a "Vary: Accept-Encoding, Cookie" a few weeks ago on generated CSS/JS
files to prevent different users' styles from clobbering each other in
caches. Unfortunately browsers don't seem to handle Vary well, and this
caused a lot of extra hits due to poor caching.

This is now removed, replaced with an explicit "Cache-Control: private"
or "Cache-Control: public" depending on the presence of an open session
cookie or logged-in state. This should restore the friendly caching
behavior while ensuring that no users' generated data will clobber
anyone else's.

To additionally ensure that public cached CSS doesn't clobber the
private bits, smaxage=0 is set on the URL used for logged-in views,
as already done for JS.
2006-09-26 05:30:12 +00:00
Brion Vibber
42f36d6011 * Set Vary: Cookie on action=raw generated CSS and JS, to ensure that user
preferences don't get stuck in proxy caches for other people

Man this one's embarassing, we should have fixed it ages ago.
This should I think fix the longtime problem where people sometimes
see things like underlining of links change spontaneously.
2006-09-13 19:30:12 +00:00
Brion Vibber
2997fd7637 * (bug 7064) Replace hard-coded empty message checks with wfEmptyMsg calls 2006-09-11 12:22:35 +00:00
Brion Vibber
47d11d092d * (bug 7026) Fix action=raw&templates=expand
http://bugzilla.wikimedia.org/attachment.cgi?id=2229&action=view
2006-08-31 16:48:37 +00:00
Tim Starling
4657da77f4 Only use the message cache in action=raw if it is explicitly requested. The previous behaviour was counterintuitive unless you're pulling stylesheets or javascript into HTML. It's been the source of many complaints from people trying to use action=raw as an API. 2006-08-29 07:36:02 +00:00
Lupin
b28f82ca6d (bug 6771) Make old revisions of MediaWiki pages available with action=raw 2006-07-28 03:12:54 +00:00
Rob Church
958aa1aef8 * (bug 5903) When requesting the raw source of a non-existent message page, return blank content (as opposed to the message key)
* Improve default blank content of MediaWiki:Common.css and MediaWiki:Monobook.css
2006-06-24 21:17:05 +00:00
Domas Mituzas
e6085d6e36 AutoLoad Revision 2006-06-06 10:56:46 +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
Tim Starling
f1b0c7bc37 Return 404 for non-existent pages. Nonexistent titles are not null, contrary to the assumptions of the original author. 2006-04-05 04:17:21 +00:00
Gabriel Wicke
8f664fd8ef Contact details- now hopefully in the right place 2006-03-24 22:02:53 +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
Lupin
c7408b9223 trailing whitespace removal 2006-03-11 17:13:49 +00:00
Lupin
11337038b3 removing unused globals and some whitespace cleaning 2006-03-07 01:10:39 +00:00
Lupin
2f256763f0 Bug 5136: corner cases with relative oldids are wrong 2006-03-01 03:28:48 +00:00
Rob Church
94b4504457 * (bug 4838) Add relative oldids (prev, next, cur) for raw pages
Patch by Lupin
2006-02-26 16:10:58 +00:00
Brion Vibber
1ac043b6c8 * Fix explicit s-maxage=0 on raw pages; should help with proxy issues in
generated stylesheets... hopefully...
2006-02-18 23:58:49 +00:00
Tim Starling
8da9fca6c0 Fixes and improvements to interwiki transclusion:
* allow interwiki {{subst:...}} using action=raw fetches
* Allowed non-MSIE browsers to access action=raw via the article alias. This is necessary to allow action=raw transclusion, since the only known URL is the article path, not the script path.
* Specify a user agent in wfGetHttp() fetches, when using curl.
* Added transcache table to tables.sql, it was in the updater but not there for some reason.
* Fixed transcache expiry, added option
* Allow interwiki transclusion outside the template namespace using leading colon syntax. Syntax is counterintuitive at times, e.g. to subst the wikipedia main page you would use {{subst::Wikipedia:Main_Page}} not {{subst:Wikipedia::Main_Page}}.
2006-01-31 03:44:08 +00:00
Brion Vibber
158572ffd3 whitespace 2006-01-13 00:07:55 +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
2832d79f21 * (bug 1436) &templates=expand now expands templates 2005-12-19 01:04:32 +00:00
Tim Starling
22e60a4772 dumpHTML improvements:
* Removed dumpHTML-related clutter from Title.php, using hook functions instead
* Prominent link to the online copy
* Better directory distribution
* action=raw support
* Fixed unicode case folding (hopefully)
* Added cool JavaScript "go" button
2005-10-22 16:25:05 +00:00