Commit graph

95 commits

Author SHA1 Message Date
Alexandre Emsenhuber
0ea2add9f0 Fix for r63675: the parameter is $attribs, not $attrs 2010-03-18 17:14:24 +00:00
Happy-melon
85a6396920 Strict type checking, otherwise can't set a default value of '0'. 2010-03-13 16:11:36 +00:00
Happy-melon
f8151c1594 Apply CSS classes for XML checkboxes/radiobuttons to their labels as well. 2010-03-13 14:59:44 +00:00
Tim Starling
4438c46cf3 Revert r56514 and r60421 per CR. 2010-02-03 04:54:20 +00:00
Aryeh Gregor
b621f9f104 Use Html::element() for Xml::submitButton()
There are a bunch of other places where we could switch to Html methods
here too.  See
<http://www.mediawiki.org/wiki/Special:Code/MediaWiki/61130#c5451>.
2010-01-27 18:59:52 +00:00
Tim Starling
ad19c032b0 Fix for bug 9413 and the related Malayalam issue reported on wikitech-l.
* Added $wgFixArchaicUnicode, which, if enabled, converts some deprecated Unicode sequences in Arabic and Malayalam text to their Unicode 5.1 equivalents.
* Added generateNormalizerData.php to generate the relevant data files. Added the generated data files also. 
* Made most things call the new wrapper method $wgContLang->normalize() instead of UtfNormal::cleanUp(), so that Unicode normalization can be customised on a per-language basis.
* Added some generic support for conversion tables to Language so that subclasses can easily implement these kinds of transformations.
2010-01-04 08:28:50 +00:00
OverlordQ
6dd459c848 Followup to r56514 r56174 empty strings are not NULL 2009-12-26 23:15:03 +00:00
OverlordQ
a989843cd0 Code cleanup, covert leading spaces into tabs per coding style 2009-11-14 21:27:13 +00:00
Alexandre Emsenhuber
b4b89afea3 fix some doxygen warnings 2009-10-04 21:21:30 +00:00
Andrew Garrett
1b8de0bdf2 In Xml::encodeJsVar, keep backwards compatibility by encoding empty arrays as empty arrays rather than empty objects. Regression in r56032, reported as bug 20671 2009-09-17 09:31:16 +00:00
Brion Vibber
cec03907df Revert r55842 "Can now pass in element attributes other than just id to buildTable functions"
Code won't actually work because $id can't be an array, per notes on http://www.mediawiki.org/wiki/Special:Code/MediaWiki/55842#c3882
2009-09-08 17:42:02 +00:00
Andrew Garrett
8ce84340bf Add AJAX category management system. Includes suggestion system, dialogs for setting edit summaries and confirming, and methods for adding and removing all categories, but only directly in the page text (as categories in templates cannot be removed). 2009-09-08 15:02:41 +00:00
Nimish Gautam
e1d42d5106 Can now pass in element attributes other than just id to buildTable functions 2009-09-04 23:18:16 +00:00
Aryeh Gregor
7f937555e5 Make Xml::hidden() a wrapper around Html::hidden()
HTML-specific stuff should go into the Html class; it doesn't belong in
Xml.
2009-08-21 21:57:53 +00:00
Niklas Laxström
592be1ab8c Core change for r52446, allow querying params like id 2009-06-26 11:17:12 +00:00
Andrew Garrett
155ddf6de4 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
Alexandre Emsenhuber
b6e00a655b Fix doxygen warnings 2009-04-17 16:58:52 +00:00
Aaron Schulz
18bff5deff Fixed E_NOTICE 2009-02-18 03:12:26 +00:00
Aaron Schulz
1e06acb820 * consolidated getDateMenu duplication into xml.php
* made filter settings carry over when pressing "go"
* made filter links a bit smaller
* removed DefaultQuery cruft
* updated docs
2009-02-12 19:02:14 +00:00
Brion Vibber
16aaf74c1e Revert r45027, r45028 "* summary and subject messages now uses wiki text rather than raw HTML"
Changing the format of existing messages is disruptive, which is why we don't do it as a rule -- we introduce new messages that replace the old ones.
2008-12-31 17:10:02 +00:00
Alexandre Emsenhuber
b613687121 * summary and subject messages now uses wiki text rather than raw HTML
* Added the colon in summary, subject and subject-preview messages rather than using colon-separator
* Changed the note in RELEASE-NOTES to also point to bug 212
* Also escaped other messages that weren't escaped
* Added new $attribs option to Xml::label(), using it in Xml::inputLabel(), Xml::inputLabelSep(), Xml::checkLabel() and Xml::radioLabel()
* $fname -> __METHOD__
* Whitespaces tweaks
2008-12-25 15:22:01 +00:00
Chad Horohoe
beea7f4f9e Add two new XML methods for building tables (buildTable and buildTableRow). Accepts associative arrays where the key is the row/cell id and the value is its value. Non-string keys are skipped. 2008-12-16 14:07:58 +00:00
Chad Horohoe
2167d03261 Cleanup for Xml::namespaceSelector():
* Removed useless $hidden param, cleaned up calls that specified it (only 1, and it passed default false)
* Add $label param for easy attachment of labels to the selector.
2008-09-30 14:05:21 +00:00
Victor Vasiliev
cd6b69e5b4 As Raymond points out, there is a mw-submit class 2008-08-29 20:27:25 +00:00
Victor Vasiliev
f7df81b59f * Add class='mw-input' to the input row
* Move submit button to the table
2008-08-29 20:16:29 +00:00
Andrew Garrett
e75a08f1bc PHP Sucks. Having a value of 0 was making $value appear as false, so you couldn't set a value when adding an option. Fixed this up with a strict check. 2008-08-20 12:30:31 +00:00
Aryeh Gregor
2658e07fb9 Cleanup some of my old code a bit. These should still be replaced with nicer functions altogether, though, as Brion would have it. 2008-08-13 14:52:40 +00:00
Aryeh Gregor
81d611bcac Re-commit turning makeKnownLinkObj(), makeBrokenLinkObj(), makeLinkObj() into link() wrappers. This should mean that all link processing now goes through link(). Per Brion's advice, remove the BrokenLink hook and replace it with LinkBegin and LinkEnd hooks. All parser tests pass except the usual suspects. 2008-08-05 17:05:59 +00:00
Brion Vibber
bd600419c4 Revert r38591 -- "Make good-faith effort to run BrokenLink hook in Linker::link(). No parser-test regressions, and it shouldn't change behavior unless Xml::expandAttributes() and Sanitizer::decodeTagAttributes() aren't inverses up to normalization."
IMHO this is an excellent opportunity to kill a horrible interface and replace it with a sane one. Note the only use of the BrokenLink hook currently in our SVN is in SemanticForms:

/**
 * Sets the URL for form-based adding of a nonexistent (broken-linked, AKA
 * red-linked) page
 */
function sffSetBrokenLink(&$linker, $title, $query, &$u, &$style, &$prefix, &$text, &$inside, &$trail) {
	$link = sffAddDataLink($title);
	if ($link != '')
		$u = $link;
	return true;
}

In the unlikely event that anybody else is really needing the exact hook details, I'm sure there's a much nicer, more future-friendly way to do it. Make a new hook and let these hypothetical extensions fix themselves up. :)
2008-08-05 04:56:29 +00:00
Aryeh Gregor
47a1e38e78 Make good-faith effort to run BrokenLink hook in Linker::link(). No parser-test regressions, and it shouldn't change behavior unless Xml::expandAttributes() and Sanitizer::decodeTagAttributes() aren't inverses up to normalization. 2008-08-04 19:36:20 +00:00
Aryeh Gregor
280afa8af2 Last commit contained errors. Revert most of it, keep only the tweaks to link() itself (and relevant parser test changes). 2008-08-03 17:05:17 +00:00
Aryeh Gregor
b83553af8b * Output title before class in Linker::link() to match behavior of makeLink() and friends, so as not to have to change old parser tests.
* Do not add action=edit to nonexistent special pages.
* Add profiling point for the bit where we add classes in linkAttribs().
* Turn makeLinkObj(), makeKnownLinkObj(), makeBrokenLinkObj() into wrappers for link().  This requires the creation of two new functions to turn query strings/attribute strings into arrays, but still results in fewer LOC (-11 lines) due to less code duplication.  This should be well-tested by the parser tests, because pretty much all link creation now goes through link(), but the only changes are encoding single quotes in attributes, which is a good change.  I find no additional database queries, so since this isn't a CPU bottleneck, there should be no performance issues.
2008-08-03 16:52:55 +00:00
Alexandre Emsenhuber
5cfdfc467b Don't allow contentless tags for <textarea> 2008-06-27 11:01:04 +00:00
Andrew Garrett
553d942726 Don't let textareas be done in short form 2008-06-27 10:46:04 +00:00
Andrew Garrett
ff32fc15cf Use class=mw_label instead of valign and align 2008-06-27 07:22:21 +00:00
Andrew Garrett
171c47e0a2 Core changes for AbuseFilter extension.
In particular:
Xml.php
* Add textarea method to Xml class.
* Make submit button optional for Xml::buildForm
* Right-align labels in buildForm.

Article.php:
* Make ArticleDelete hook display a real error

EditPage.php:
* Split off getBaseRevision()

Title.php:
* Allow errors to be ignored to be sent to getUserPermissionsErrors.
* Allow AbortMove hook to display a real error.

Block.php:
* Add 'mAngryAutoblock' option, for blocks by software, which does retroactive autoblocks on the last 5 IPs used in the last 7 days.
2008-06-27 06:24:42 +00:00
Niklas Laxström
53db0f0a35 * Fix comments 2008-06-17 08:10:50 +00:00
Chad Horohoe
9ba8e6fbf1 Document Xml::hidden(). 2008-06-10 23:18:15 +00:00
Alexandre Emsenhuber
8097d1cb20 Fixed Doxygen warnings when generating documentation for this file and document a bit. 2008-05-16 16:31:37 +00:00
Niklas Laxström
9df08aabb8 * Code cleanup 2008-05-11 21:43:16 +00:00
Niklas Laxström
ef44c50636 * Consistent case and autoloader 2008-05-10 13:46:05 +00:00
Niklas Laxström
6934849a0a * Added code two commonly needed use cases: separate label and input, and select 2008-05-10 13:44:25 +00:00
Niklas Laxström
8774063fa5 * Typo in comment 2008-05-10 09:48:03 +00:00
Alexandre Emsenhuber
5cf24493fa bug fixes:
* Be sure that article name is escaped when outputing a redirect page
* Mark Xml::buildForm() as static
2008-04-28 18:00:58 +00:00
Andrew Garrett
3e1d5464d1 Typo 2008-04-24 12:01:26 +00:00
Andrew Garrett
14b8af061d Fix loss of in moving buildForm to Xml.php, generalise it (this isn't just for global blocking anymore :-)) 2008-04-24 11:53:05 +00:00
Andrew Garrett
34ee5d8675 By suggestion of NikeRabbit, move wfBuildForm into Xml.php 2008-04-24 11:46:20 +00:00
Niklas Laxström
cab3560abc * Shortcut for common use case 2008-04-19 13:51:01 +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
Aryeh Gregor
d168c31923 Use the standard we've agreed upon for class names: prefixed with "mw-", words separated by hyphens. 2008-04-13 14:18:22 +00:00