Commit graph

69 commits

Author SHA1 Message Date
Max Semenik 1464069ffa API for getting gadget categories 2011-04-17 05:37:56 +00:00
Max Semenik 168ac422fe Gadgets: API for retrieving gadget information 2011-04-16 16:29:33 +00:00
Niklas Laxström e4ab22033d Typo and whitespace 2011-04-16 15:48:24 +00:00
Max Semenik 66a0821cb7 Merged branches/Gadgets-work/ to trunk. It now uses ResourceLoader (scripts must be explicitly marked as supporting it to be loaded this way), and in process I've completely rewritten its internal organisation in OOP style. Documentation commits will follow. 2010-11-11 18:19:57 +00:00
Niklas Laxström 94670275f1 Fix oversight in r75973 that broke gadgets tab in preferences 2010-11-06 09:21:00 +00:00
Sam Reed 588a5f1030 Code cleanup, mainly unused variables 2010-11-04 01:29:10 +00:00
Sam Reed df0b297e0c Can only use continue in a loop 2010-10-29 21:36:49 +00:00
Sam Reed 3a82759a8a More deprecated method call removals and updates 2010-10-29 15:32:44 +00:00
Max Semenik a40744c3b4 Gadgets: prevent section <gadget-section-> from appearing in preferences when there are no sections defined, or there are gadgets defined before the first section. 2010-08-10 19:48:39 +00:00
Max Semenik 9c360c1e94 Follow-up r70719 and r70721: on the second thought, this permission reflects my previous design, where gadget export page was much more computation-heave. It's not needed. 2010-08-08 19:01:28 +00:00
Max Semenik b0004f78c9 Gadgets: added export feature for easier reuse 2010-08-08 18:22:22 +00:00
Niklas Laxström c04518be2b Refactor part of gadgets code
Renamed some confusingly named variables. Made wfApplyGadgetCode
to do less stuff and simpler. Use LinkBatch since every page
results in db query due to getting the latest revision.
2010-07-08 08:15:04 +00:00
Liangent ab8947fca2 Add revision ids of js/css pages to URLs to have them auto-reloaded by users' browsers when they are changed on the wiki 2010-06-09 10:15:57 +00:00
Alexandre Emsenhuber d0cbc88d98 Big changes to extensions' documentation:
* changed all @addtogroup to @ingroup
* added some @file where needed
* changed some @package/@subpackage to @ingroup
2010-06-06 15:12:22 +00:00
Daniel Kinzler 4c1ade6fdd PHP compatibility: 5.3.1 is picky about pass-by-reference. Restrict use of &$foo to actual output parameters. This should probably be done for the entire code base. 2010-06-02 09:10:09 +00:00
Aryeh Gregor d0d3d059b5 Remove most named character references from output
Recommit of r66254 to trunk.  This was just

find extensions phase3 -iname '*.php' \! -iname '*.i18n.php' \! -iname 'Messages*.php' \! -iname '*_Messages.php' -exec sed -i 's/&nbsp;/\&#160;/g;s/&mdash;/―/g;s/&bull;/•/g;s/&aacute;/á/g;s/&acute;/´/g;s/&agrave;/à/g;s/&alpha;/α/g;s/&auml;/ä/g;s/&ccedil;/ç/g;s/&copy;/©/g;s/&darr;/↓/g;s/&deg;/°/g;s/&eacute;/é/g;s/&ecirc;/ê/g;s/&euml;/ë/g;s/&egrave;/è/g;s/&euro;/€/g;s/&harr;//g;s/&hellip;/…/g;s/&iacute;/í/g;s/&igrave;/ì/g;s/&larr;/←/g;s/&ldquo;/“/g;s/&middot;/·/g;s/&minus;/−/g;s/&ndash;/–/g;s/&oacute;/ó/g;s/&ocirc;/ô/g;s/&oelig;/œ/g;s/&ograve;/ò/g;s/&otilde;/õ/g;s/&ouml;/ö/g;s/&pound;/£/g;s/&prime;/′/g;s/&Prime;/″/g;s/&raquo;/»/g;s/&rarr;/→/g;s/&rdquo;/”/g;s/&Sigma;/Σ/g;s/&times;/×/g;s/&uacute;/ú/g;s/&uarr;/↑/g;s/&uuml;/ü/g;s/&yen;/¥/g' {} +

followed by reading over every single line of the resulting diff and
fixing a whole bunch of false positives.  The reason for this change is
given in <http://lists.wikimedia.org/pipermail/wikitech-l/2010-April/047617.html>.
I cleared it with Tim and Brion on IRC before committing.  It might
cause a few problems, but I tried to be careful; please report any
issues.

I skipped all messages files.  I plan to make a follow-up commit that
alters wfMsgExt() with 'escapenoentities' to sanitize all the entities.
That way, the only messages that will be problems will be ones that
output raw HTML, and we want to get rid of those anyway.

This should get rid of all named entities everywhere except messages.  I
skipped a few things like &nbsp that I noticed in manual inspection,
because they weren't well-formed XML anyway.

Also, to everyone who uses non-breaking spaces when they could use a
normal space, or nothing at all, or CSS padding: I still hate you.  Die.
2010-05-30 17:33:59 +00:00
Chad Horohoe 7464a94254 Revert r66934 (Removing wfLoadExtensionMessages() from everything). I disagree on principle...we branch extensions for this very reason. But people want trunk extensions compatible for several versions back, meh. 2010-05-27 15:56:53 +00:00
Chad Horohoe 16fa29f47e Large commit. Removed 800+ references to no-op wfLoadExtensionMessages() 2010-05-26 22:25:32 +00:00
Daniel Kinzler 1ff985a53e fix for bug 22929: disable gadgets on Special:Userlogin 2010-04-06 21:00:39 +00:00
Alexandre Emsenhuber dc06d8be5d * Use Html::linkedStyle() to load styles
* Simplify a bit the code to detect Special:Preferences
2010-04-06 20:05:16 +00:00
Siebrand Mazeland f7c6687361 * Remove $wgExtensionCredits['description'] where $wgExtensionCredits['descriptionmsg'] present. This feature was introduced in MediaWiki 1.12, and 'description' is not used if 'descriptionmsg' is present.
* Random indentation updates and trailing whitespace removed
2010-02-22 23:41:51 +00:00
Brion Vibber d39d253951 bug 19785 tablerow for gadgets-prefstext not valid 2009-07-19 16:54:29 +00:00
Tim Starling 5bd433876f Removed nasty cache-destroying feature which puts messages from the mediawiki namespace into $wgMessageCache->addMessages() so that Special:Allmessages can be even slower and uglier than it already was. It's not really practical to support this with the new LocalisationCache. 2009-07-02 06:54:38 +00:00
Siebrand Mazeland b3ea80e01e * Rename "<ExtName>.i18n.alias.php" to "<ExtName>.alias.php"
* Add support for ConfirmEdit and Mibbit special page localisation to Translate
2009-05-24 22:12:11 +00:00
Chad Horohoe 1c23bebc10 $wgUser -> $user. It's confusing to say the former unless you're using the global. 2009-05-07 20:18:15 +00:00
Chad Horohoe 2d7a5477d4 * Use new LoadAllMessages hook
* Remove useless globals ($wgTitle, $wgMessageCache, $wgLang, $wgSkin)
* NULL -> null
2009-05-07 19:23:10 +00:00
Alexandre Emsenhuber b7e73b25e9 'parseinline' -> 'parse' for gadgets-prefstext to fix XHTML error.
'parseinline' doesn't remove the <p> tags in the middle of the text, but since this message contains two paragraphs in its definition, the </p> <p> beetween these two paragraphs are not removed.
2009-05-04 10:08:27 +00:00
Shinjiman abc5516e8c Follows up r49890, adding file location itself to obtaining the revision number shown in the Special:Version 2009-04-27 03:15:19 +00:00
Andrew Garrett a9058edced Fix double display of headings 2009-04-24 11:10:04 +00:00
Andrew Garrett 238a208393 Localisation of gadget section titles 2009-04-24 09:07:51 +00:00
Andrew Garrett 6b5f13b911 Branch merge of preferences work branch. Includes fixes for several bugs. WARNING: Breaks some extensions which have not been adapted to use it properly (basically anything not used on Wikimedia). 2009-04-24 01:31:17 +00:00
Michael Dale 623a37af65 switched from addScript() call to addScriptFile() call to support scriptLoader 2009-04-16 22:28:23 +00:00
Chad Horohoe 9926aa38b0 Big commit. Removing svn-version and svn-date from extensions. Per the list, these versions do not give valuable information and are often wildly inaccurate. 2009-03-26 17:39:49 +00:00
Alexandre Emsenhuber dfa01adeb9 Fix compat with PHP 5.3: third parameter is passed by value and not by ref (was throwing E_WARNING) 2009-03-10 17:06:04 +00:00
Daniel Kinzler 3e277d2caf fix inversed test in short-cirquit condition 2009-02-17 09:41:42 +00:00
Siebrand Mazeland c6b911e0f9 Consistent casing for addHTML() 2008-11-06 22:20:29 +00:00
Daniel Kinzler 2768552d83 fixed double-mangling of messages. still need to find a better way to defined defaults 2008-08-18 11:58:04 +00:00
Daniel Kinzler b2bcce951b fixed fallback to content lang, behavior for special:allmessages is a bit odd now. needs some more thought. 2008-08-18 09:26:26 +00:00
Daniel Kinzler e6010c67cc better support for on-wiki i18n 2008-08-17 15:42:26 +00:00
Alexandre Emsenhuber 8126e99c96 More PHP 5.3.0alpha1 fixes: E_WARNING: argument cannot be passed by reference, value given 2008-08-09 19:13:57 +00:00
Jon Harald Søby 717fedb9a1 Adding <label> in Gadgets extension 2008-07-29 15:53:19 +00:00
Raimond Spekking 2a925620c2 * Add special page aliases file
* Add special page group
2008-07-09 14:57:19 +00:00
Brion Vibber 740da4c34d Revert r37263 for now:
* (bug 12211) Show some gadgets only for admins
	* (bug 13742) Allow for gadgets to be turned on by default

I'm a bit leery of the 'on by default' entirely at the moment. :)

A few comments:
* The readme examples don't seem to clearly show the option format
* Why are numeric constants being used as indexes to the option array? Strings are easier to work with and debug.
* There's a lot of stuff like this which feels very ugly:
	if( isset( $gadget->options[Gadget::RIGHTS] ) && !empty( $gadget->options[Gadget::RIGHTS] ) ) {
  Since it's all hard-coded anyway, why not just do something nice and clear like this?
	if( !empty( $gadget->rights ) ) {
* And this:
    if( wfGadgetAllowed( $gadget->options ) ) {
  to:
    if( $gadget->isAllowed() ) {
2008-07-07 18:50:47 +00:00
Victor Vasiliev a1e40d79c1 * (bug 12211) Show some gadgets only for admins
* (bug 13742) Allow for gadgets to be turned on by default
Modified patch by MaxSem
2008-07-07 16:54:20 +00:00
Daniel Kinzler 5328152d53 added id for gadget sections on preferences page 2008-06-26 13:07:45 +00:00
Alexandre Emsenhuber 1649992bf5 * Use $wgOut->addWikiMsg() instead of $wgOut->addHtml( wfMsgWikiHtml() ) as brion pointed out
* Remove parsermag option to wfMsgExt(), parseinline override it
2008-06-06 15:45:29 +00:00
Alexandre Emsenhuber 06c8af8ede Fix XHTML error: <p> are automatically added by wfMsgWikiHtml() 2008-06-06 10:07:53 +00:00
Niklas Laxström 7dc50825a3 * Fixed a bug that caused gadgets definition to be reparsed on every request 2008-05-09 17:09:08 +00:00
Tim Starling e0b6b1094e Don't call preg_replace ~80 times per request. Leave the heavy lifting to Special:Version, using the new svn-revision member of $wgExtensionCredits. 2008-05-06 11:59:58 +00:00
Niklas Laxström 61b48c5bf5 * Fix cache check 2008-03-22 20:52:41 +00:00