Commit graph

56 commits

Author SHA1 Message Date
jenkins-bot d9dc4ca640 Merge "Inputbox: Some code conventions cleanup" 2014-05-19 16:56:55 +00:00
Derk-Jan Hartman a1a1e64e46 Inputbox: Some code conventions cleanup
Change-Id: I16fcd16d81a7eecc845b5d36fd8af8e14792eea1
2014-05-18 23:19:20 +02:00
jenkins-bot 417e67d74a Merge "InputBox: Don't append id to class" 2014-05-18 17:05:16 +00:00
jenkins-bot ea7c78f446 Merge "InputBox: Cleanup usage of inline styles" 2014-05-18 17:00:08 +00:00
jenkins-bot 8160f5815d Merge "Avoid duplicate ids" 2014-05-18 16:54:47 +00:00
Brian Wolff 8b4932ca81 Avoid duplicate ids
There can be more then one <inputbox> in page. Don't reuse id
attributes.

See also r60072

Bug: 11777
Change-Id: If7c518445c966aa5c0b16929ccdf22cdf014b59d
2014-05-18 13:46:53 -03:00
Derk-Jan Hartman c76ede7b4f InputBox: Don't append id to class
The search2 form type was adding the id to the classname. Probably a
left over from a rewrite.

Change-Id: I0f8c962a3fdadd7555c2b8add93e2b131aedece9
2014-05-18 11:53:13 +02:00
Derk-Jan Hartman d05173bdd2 InputBox: Cleanup usage of inline styles
Change-Id: I2e1384e1f46e8592ecba7bbfea81884804f0128a
2014-05-18 11:51:07 +02:00
Kevin Israel 6cfaec4f1a Remove use of message 'postcomment'
Also changed spaces to tabs in i18n/en.json.

Change-Id: Id613f71d87150d7b6701952c27f9f5f9c0e68d8f
2014-04-22 11:53:22 -04:00
jenkins-bot a95d45c730 Merge "Fix capitalization and tests of $this->mId." 2014-04-06 13:49:14 +00:00
Jackmcbarn c3fd290fff Allow InputBoxes to be used to move pages
Add an option to InputBoxes to allow them to prefill Special:MovePage with
prefixes and other similar options to pages being created

Change-Id: I1740497030b5e9872162a1a261ac38791bb1373a
2014-04-05 22:16:16 -04:00
Brian Wolff 048a97e560 Fix capitalization and tests of $this->mId.
Property name is $mID, certain parts were testing $mId, and then
using isset to (presumably) hide the undefined property warnings.

Change-Id: I0c2d29fbdb8314aa0c04bea387364a7307e68b9b
2014-04-05 20:58:33 -03:00
Siebrand Mazeland f14419180a Use key names with the extension name as prefix
This prevents possible current or future key conflicts. Keys for
translations will be updated at translatewiki.net.

Change-Id: Ie94fa53340c9534f45a70cbafc4d55a7e2d58a7c
2014-04-05 22:00:44 +02:00
grunny b4b70b55d9 Remove cases of double escaping
These variables are included in attributes of elements built
with Xml::openElement or Xml:element which escape them using
Sanitizer::encodeAttribute.

Change-Id: Ib34a21a6312ba88b390110115d655b46a64b9dcd
2014-01-04 20:14:39 +10:00
Siebrand Mazeland edc7b6931d Replace usage of deprecated Title::escapeLocalURL()
Change-Id: I1bd4bc60cba052ac158de91322e6621ad5badfa7
2013-12-29 15:31:12 +01:00
shirayuki a8e6cdf204 American spelling for "unrecognized"
Change-Id: I9739f4767e0c549e300a636baa74745c5d6612cd
2013-03-05 21:18:56 +09:00
Marius Hoch e18b7e6c7b Make InputBoxes cache ones per language
InputBoxes creates HTML which will later be cached (probably).
Right now this can lead to strange button labels eg.
https://www.wikidata.org/wiki/Wikidata:Requests_for_comment?uselang=qqx&action=purge
will cache the qqx of the createarticle button so that all users
see it (till it's purged again). To prevent this we set the parser
to cache per user language.

Change-Id: I69ade88bb43f73404965b7cb63e88b824561d988
2012-11-17 19:43:47 +01:00
Amir E. Aharoni 60c610da47 (bug 37018) Explicit dir attribute for input boxes
Change-Id: I76f5d2316ef26c05b81f6912128005347360eadc
2012-09-03 16:40:18 +03:00
Siebrand 81177b5e68 Merge "(bug 39728) Replace obsolete align attribute with CSS" 2012-09-03 06:49:18 +00:00
Siebrand Mazeland 4b7fdd00cc Maintenance for InputBox extension.
* Replace deprecated methods.
* Remove superfluous newlines.
* Fix docs for a few methods.
* Add some type hints.

Change-Id: I09671b5e70d33ffa9746e95c965bd1bc2bbd4a3f
2012-08-30 18:20:32 +02:00
Krenair baf4944903 (bug 39728) Replace obsolete align attribute with CSS
Change-Id: I29db1146b7c907133b69d85df141ae7daecd34bc
2012-08-28 13:22:43 +01:00
Chad Horohoe 4d2eef4508 (bug 31158) Multiple namespaces marked as default (**) should all be used instead of just one. Patch by Bagariavivek 2012-01-12 17:23:46 +00:00
Mark A. Hershberger 6b49e7d6d8 Apply patch from Bug 29580 - “allow placeholder for inputbox” from Grunny 2011-10-26 20:31:20 +00:00
Sam Reed c8ae65ce9c Swap
/*
 *

for

/**
 *
2011-10-26 03:49:06 +00:00
Brian Wolff 0950958d3a (bug 29066) Decode character references in input to InputBox so they don't get double-encoded later by Xml::openElement. 2011-10-25 13:16:01 +00:00
Robin Pepermans a5347ca4d3 Use strpos() instead of strstr(), per Catrope on r92138. 2011-08-22 23:47:01 +00:00
Robin Pepermans f16ce57a5e InputBox:
* instead of checking each namespace if it is given through the parameter, check each given namespace if it is a valid one
* this fixes the inconsistency where 2 namespaces are given but only 1 is valid and that one is shown (normally if there is only 1 given, it is hidden)
* fix bug 22591 (Allow i18n of Main namespace search option label)
* allow namespace aliases as well
* also trim the given namespaces, so spaces do not make them invalid
2011-07-14 03:51:10 +00:00
Mark A. Hershberger f2a1bb33fc Bug 17504 - Inputbox extension should have single namespace search option
Apply patch from DaSch
2011-07-04 17:01:45 +00:00
Sam Reed ea4384d8c9 Swap else if for elseif
Trimming trailing whitespace also
2011-06-17 16:26:31 +00:00
Sam Reed 71e04c06a0 Another big cull on unused variables and such 2010-10-29 21:55:29 +00:00
Sam Reed 0200023513 More deprecated method call removals and updates 2010-10-29 15:32:44 +00:00
Sam Reed fbe7fb6395 Start removing/fixing calls to deprecated methods in WMF used extensions 2010-10-29 15:14:44 +00:00
Aryeh Gregor a1c4503226 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 8f51920bac 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 7d30faca78 Large commit. Removed 800+ references to no-op wfLoadExtensionMessages() 2010-05-26 22:25:32 +00:00
Tobias 77107c56a7 Adding nosummary as option for newsection-comment 2010-03-31 12:33:11 +00:00
Tim Starling 6bdcff7eaf Validate background colour to avoid arbitrary style attribute injection. Leads to XSS in versions of IE that support dynamic properties (IE<8, and IE 8 in quirks mode). 2010-03-30 03:59:15 +00:00
Happy-melon c30239bf87 (bug 6640) add a prefix= parameter to creation inputboxes; using a intercept/munge/redirect method stolen from Wikia. 2010-03-18 19:11:12 +00:00
Chad Horohoe f48730b7fd (bug 11777) Multiple inputboxes make page invalid due to repetitive similar id. Let users specify an ID like we do for the search box, otherwise omit it entirely 2009-12-15 11:23:43 +00:00
Aaron Schulz 6bd9e5192e (bug 17161) Make 'enter' work right on IE for fulltext type 2009-02-26 20:15:49 +00:00
X! 967e55e56c (bug 17002) Add minor and summary parameters to InputBox 2009-01-13 02:18:30 +00:00
Raimond Spekking 2ad7747074 Add a space between input field and button. Looks smarter :) 2009-01-01 13:29:46 +00:00
Robert Stojnić ecbb8ed97c (bug 5552) add a fulltext-only search mode to inputbox
Reuse getSearchForm() for both 'search' and 'fulltext' type, IMO it should also be used for 'search2' (exact-match only), but since 'search2' is kindof strange and ignores some params (like 'break') for which I'm not sure if it's bug or feature, leaving 'search2' as separate function.
2009-01-01 00:55:18 +00:00
Brion Vibber 424e0fecf6 Revert r45213 "(bug 5552) add a fulltext-only search mode to inputbox"
"hidego" sounds kind of icky to me; perhaps type="fulltext" would be better?
2008-12-31 22:18:32 +00:00
Robert Stojnić 161f75f454 Send 'prefix' GET param if one is defined in the inputbox. This will be handled by Special:Search 2008-12-31 03:31:41 +00:00
Robert Stojnić ff6f2e6407 (bug 5552) add a fulltext-only search mode to inputbox 2008-12-31 02:53:33 +00:00
Aryeh Gregor 6ca784f7f3 Improve ugly interface for Sanitizer::escapeId()
Calling it with no extra arguments will now assume that you're escaping
a whole id, not an id fragment, which is safer.  Also, instead of ugly
bitfield-based options, I've changed the options to use an array of
strings.  I fixed all callers in trunk.  Out-of-tree callers that were
using Sanitizer::NONE will get correct behavior, while those that were
calling it with no arguments will get slightly changed behavior (an x
will be prepended).  I think this is harmless enough that we can skip
back-compat cruft here.

This should cause no visible changes.  No parser test regressions.
2008-12-30 00:22:14 +00:00
Alex Z. 7f746a908a Fix parsing of labeltext on the "search2" form, make sure labels are correctly associated with an input. 2008-11-29 04:07:46 +00:00
X! 80c1798b7b Add hidden parameter 2008-11-17 21:54:38 +00:00
Aaron Schulz 7563919a8f Cleanup for r42696: use class defaults 2008-11-13 08:50:13 +00:00