Commit graph

559 commits

Author SHA1 Message Date
Tim Starling
c1fdc0b922 Configurable expiry time for the sidebar cache 2008-02-09 09:11:45 +00:00
Victor Vasiliev
b74eff81db * Use $wgScriptExtension for opensearch_desc.php 2008-02-04 04:48:14 +00:00
Roan Kattouw
b94eff773e Adding SkinSubPageSubtitle hook on Wiredtape's request. 2008-01-29 15:05:48 +00:00
Aryeh Gregor
6b998e4c82 Avoid relying on isset(). This can cause problems with PHP's (thankfully now uncommon) register_globals setting. Instead, just give the variable a default value in the code. 2008-01-24 20:14:35 +00:00
Huji
42257dc68a (bug 12753) Empty captions in MediaWiki:Sidebar result in PHP errors.
* The previous commit didn't cover the cases where the whole caption line was missing.
2008-01-24 17:06:19 +00:00
Huji
ede64c3d1e (bug 12753) Empty captions in MediaWiki:Sidebar result in PHP errors 2008-01-24 12:52:53 +00:00
Brion Vibber
82d8207223 * (bug 12668) Support for custom iPhone bookmark icon via $wgAppleTouchIcon 2008-01-19 05:39:41 +00:00
Victor Vasiliev
ee98b38445 * (bug 12536) User should be able to get MediaWiki version from any page
* (bug 12622) A JavaScript constant to declare whether api.php is available
2008-01-14 18:42:39 +00:00
Huji
2d8a62941c (bug 12608) Unifying the spelling of getDBkey() in the code. 2008-01-14 09:13:04 +00:00
Tim Starling
156a1a288a Revert r29647, as per my comment on bug 12536. 2008-01-12 13:44:08 +00:00
Victor Vasiliev
0a8e010308 * (bug 12536) User should be able to get MediaWiki version from any page 2008-01-12 12:31:20 +00:00
Brion Vibber
49c06d3c73 * (bug 12446) Permissions check fix for undelete link
Patch by  Alexandre Emsenhuber  - http://bugzilla.wikimedia.org/attachment.cgi?id=4483
2007-12-31 21:09:43 +00:00
Aryeh Gregor
c43bc0c383 We want to be including MonoBook.php here, clearly, not Standard.php. 2007-12-14 19:14:12 +00:00
Tim Starling
c032e6c934 * Allow skins to be defined in extensions
* Removed some unused Skin member variables
* Use Monobook as a default if the skin doesn't exist, instead of classic/standard.
2007-12-14 06:53:15 +00:00
Niklas Laxström
f615325e85 1 PHP Strict Standards: Only variables should be assigned by reference in /var/www/w/includes/Skin.php on line 1506 2007-12-03 09:52:51 +00:00
Aryeh Gregor
e6bc73f6b5 Fix regression from r26893: a few messages that formerly accepted character entities such as &nbsp; no longer did. This broke existing behavior with no effective workaround, since a very common browser (Firefox < 3) cannot save forms containing literal nbsp (Mozilla bug 218277). The messages (which are link text) now allow entities, but not wikitext or other HTML, via a new 'escapenoentities' option for wfMsgExt. 2007-11-30 18:03:29 +00:00
Niklas Laxström
071da49d3d Argh what a code. Underline setting "browser default" doesn't even work in monobook because it's forced to none. But in any case, let's not produce invalid css
and throw ugly notices.
2007-11-23 08:40:46 +00:00
Niklas Laxström
956f219d89 * (bug 11921) Support plural in message number_of_watching_users_pageview 2007-11-10 14:52:56 +00:00
Raimond Spekking
6235449e09 * (bug 11809) Use formatNum() for more numbers
Based on a patch of Roozbeh Pournader
2007-10-30 11:57:39 +00:00
Niklas Laxström
3aa031f1c9 * Support grammar here too 2007-10-22 20:45:58 +00:00
Brion Vibber
3ef37ae128 Cleanup r26692:
* Use content language, not UI language, when adding language suffix to OpenSearch description
* Use $wgContLang->getLanguageName() instead of grabbing a whole array of every name ever :)
* If there isn't a defined language name for this code, don't spew a PHP notice and output "()". Use the language code instead, so non-standard and as-yet-unused languages won't break.
2007-10-18 15:07:55 +00:00
Niklas Laxström
e7ee1f5dd5 * Use proper function instead of a global 2007-10-13 11:24:50 +00:00
Tim Laqua
ef7d430773 Added SkinAfterBottomScripts hook to Skin::bottomScripts(), documented in hooks.txt 2007-08-23 22:34:12 +00:00
Rob Church
bf2a2cd71e * Indicate when a preview is unavailable/failed
* Show a little progress "spinner" during the AJAX request
2007-07-14 23:54:00 +00:00
Brion Vibber
33db268866 * (bug 10316) Prevent inconsistent cached skin settings in gen=js by setting the intended skin directly in the URL.
Not sure whether the global 'skin' and 'stylepath' settings should be removed from the gen=js or from the inline vars, but this fixes the inconsistency between them.
It also fixes the inconsistent use of skin-specific .js files (MediaWiki:Monobook.js loaded for wrong skin, etc).
By passing the skin name directly in the gen=js, we ensure both that we have the correct skin information cached
and that you'll get the JS along with useskin= on an HTML page.

Normally useskin= prevents caching, but RawPage handles its own caching headers, so this doesn't cause any problems here. Doesn't seem to be a performance problem in my quick ab testing either.
2007-07-09 21:39:42 +00:00
Aryeh Gregor
728362918b Add comment on cacheability of getUserJs() to fend off other wayward devs 2007-07-05 19:46:14 +00:00
Tim Starling
5be52dcc37 unused variable 2007-07-05 18:25:04 +00:00
Brion Vibber
757f4717d6 Don't bother including the ajax watch localizations for anon users. Should save a few bytes times a few billion hits per month. :) 2007-07-05 17:51:37 +00:00
Tim Starling
e1a8b177c1 gen=js has the wrong cache properties for language-dependent text. Moved wgAjaxWatch initialisation to makeGlobalVariablesScript(). Added associative array capability to Xml::encodeJsVar(). 2007-07-05 13:57:54 +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
Brion Vibber
6bd571c66e * (bug 10396) Fix AJAX error when $wgScriptPath/index.php is not valid;
using $wgScript now included in JS info
2007-06-28 15:13:28 +00:00
Aryeh Gregor
a3959eccdf Use shared.css as a common CSS file for all skins, and oldshared.css in place of common.css for pre-Monobook skins (avoiding "common" to reduce naming confusion with MediaWiki:Common.css). 2007-06-10 17:16:54 +00:00
Raimond Spekking
aeafb71568 * Added variables 'wgRestrictionEdit' and 'wgRestrictionMove' for JS to header 2007-06-04 10:09:41 +00:00
Tim Starling
ed4303922f Merged filerepo-work branch:
* Added support for configuration of an arbitrary number of commons-style file repositories.
* Split Image.php into filerepo/File.php and filerepo/LocalFile.php
* Renamed Image::getImagePath() to File::getPath()
* Added initial support for timestamp-based file fetching (OldLocalFile), to be expanded upon by aaron.
* Changed the interface for Image/File object creation: use wfFindFile() or wfLocalFile() depending on semantics
* ImageGallery::add() now accepts a title object as the first parameter
* Moved file handling operations on upload from SpecialUpload to File
* Removed path-related functions from ImageFunctions.php. Removed static path accessors from File. 
* Added a Content-Disposition header to thumb.php output
* Improved thumb.php error handling
* Updated the unit test suite to kind of partially work with modern computers. RunTests.php doesn't work just yet. Fixed an actual regression that the test suite detected -- moved some defines to Defines.php where they will be loaded consistently.
2007-05-30 21:02:32 +00:00
Ilmari Karonen
d0fcb1af79 It's dead code, Jim! 2007-05-14 07:40:10 +00:00
Ilmari Karonen
183818b0a7 Disable user scripts on Special:Preferences, to prevent a compromised
script from being able to sniff passwords etc.

(The control flow here is hopelessly tangled between OutputPage and
the skins, and it doesn't help that Skin and SkinTemplate do things
differently for no particular reason.  I haven't made any attempt to
untangle it in this commit, but hopefully I at least haven't made it
too much worse.  Cleanup is welcome.)
2007-05-08 20:48:02 +00:00
Nick Jenkins
1a60bd4c84 (bug 7958) Special:Cite of older version of an article should use old version id.
Applying Brion's patch, with one-line tweak:
 - uses the existing Skin/$wgOut-based revision ID record, rather than oldid value from WebRequest.
 - additionally sets it to the current revision for parser cache hits (where
   it was not previously needed, since it was only used to feed to parser objects
   to fill the {{REVISIONID}} variable).
 - Explicit declaration of the existing $mRevisionId data member in Skin.
 - "Permanent link" should now work too when paging through historical versions (previously it
   would be greyed out when paging backwards or forwards through old revisions).
2007-05-03 06:08:12 +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
Antoine Musso
343420d0ad Convert whitespaces to tabulations 2007-04-21 14:44:56 +00:00
Antoine Musso
be73785e8f Fix #3366 : require skins based on SkinTemplate to override the skinname property. 2007-04-16 13:23:16 +00:00
Rob Church
984e7ada40 (bug 8421) Expose current action in JavaScript globals (as 'wgAction') 2007-03-27 21:15:23 +00:00
Aryeh Gregor
a4fd25f587 (bug 9217) Balance wfProfile calls in Skin::outputPage 2007-03-08 01:40:56 +00:00
Nick Jenkins
c6c3d72563 (bug 3678) Allow disabling [[MediaWiki:aboutsite]] in the same way as
[[MediaWiki:Disclaimers]]; Also means that if any of the footer links are
disabled in the wiki's default language (by setting to "-"), they'll also
be disabled in other languages too (e.g. if the user specifies uselang=fr),
which was probably want the site admin wanted to happen anyway.
2007-02-16 03:43:40 +00:00
Niklas Laxström
a2b6b9ab69 * Some enhancements to live preview 2007-02-09 20:34:57 +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
8baca0fdf1 Final fix for #8712 : publish effective user groups to javascript.
Patch by Carl Fürstenberg http://bugzilla.wikimedia.org/attachment.cgi?id=3126
2007-01-23 20:10:02 +00:00
Nick Jenkins
f88c771756 The war on redundant ampersand usage!
* Convert "$dbw =& wfGetDB( DB_MASTER );" --> "$dbw = wfGetDB( DB_MASTER );"
* convert "$skin =& $wgUser->getSkin();" --> "$skin = $wgUser->getSkin();"

For the time being have not changed the function definitions of wfGetDB() or User::getSkin() [i.e. they are still both return-by-ref], so as to ensure the interface does not change for extensions [some of which may still be trying to run on PHP4 environments]. However presumably at some point this can be changed too.

Also includes tiny tweak to newlines in parserTests - will show 1 rather than 2 newlines between the "Reading tests from" strings when in quiet mode.
2007-01-22 23:50:42 +00:00
Tim Starling
096eb47ffd Fix Skin::preloadExistence() for special pages. 2007-01-22 19:19:15 +00:00
Rob Church
031d38fdce * (bug 8712) Expose user groups as a JavaScript global [patch c/o AzaToth]
* Tweak release notes from hashar's last commmit
2007-01-20 19:38:51 +00:00
Antoine Musso
f5e16ebe09 userCan(Edit|Create|Move) are deprecated : do not use them 2007-01-20 17:58:38 +00:00