Commit graph

14 commits

Author SHA1 Message Date
Fomafix
125cbd8c01 Use \u{00A0} instead of   or  
Directly use the UTF-8 encoding of the 'NO-BREAK SPACE' (U+00A0) instead of
the HTML/XML entities   or   or  .

With the UTF-8 character the generated HTML is shorter and better to read.

Also change the special value for the label in HTMLForm from   to
U+00A0 but also support   for backward compability.

Bug: T154300
Change-Id: I882599ac1120789bb4e524c4394870680caca4f4
2018-06-24 01:20:13 +00:00
Max Semenik
369b3fa977 Normalize PHPDoc attributes
Change-Id: I83e686d099de0ff0aacda7e332972e1c7ee49f04
2018-03-16 22:59:15 -07:00
Umherirrender
b5cddfb27b Remove empty lines at begin of function, if, foreach, switch
Organize phpcs.xml a bit

Change-Id: Ifb767729b481b4b686e6d6444cf48b1f580cc478
2017-07-01 11:34:16 +00:00
Kevin Israel
073eb68ca9 TableDiffFormatter: Don't repeatedly call array_shift()
This also fixes a bug that could cause deleted lines to appear as if
they were replaced with blank lines rather than removed entirely.

Change-Id: I99dc2862b130c02aed311f93236eb6b2dc50a0fb
2016-03-09 04:09:07 -05:00
Kevin Israel
2476589b26 DiffFormatter: Don't mess with PHP output buffering
This is a line-by-line conversion to append to a string property rather
than print into a PHP output buffer.

The changes to the base class break subclasses such as MobileFrontend's
InlineDiffFormatter, which is updated in I81dd01cb.

Depends-On: I81dd01cbb9ce11b87115fb1fed511027aee436a1
Change-Id: Idf2a6c593b81a152edec923d4db6272ca1f3f545
2016-01-27 19:31:17 -05:00
umherirrender
493f4222cb phpcs: Assignment expression not allowed
Fix some "Assignment expression not allowed"

Found by tests:
https://integration.wikimedia.org/ci/job/mediawiki-core-phpcs/2736/consoleFull

Change-Id: I9bc2eff20a317a74671acd49749bb336a0fd9f67
2015-11-16 20:56:32 +00:00
Amir E. Aharoni
c6f066b88c Make long lines shorter to pass phpcs in 6 files
Bug: T102614
Change-Id: I3159c33ddd16bded94a70f363258a294f407fc58
2015-09-26 17:07:06 +00:00
Ricordisamoa
f14acb1374 Use more specific and less ambiguous ids for line numbers in diffs
Per Krinkle's comment on I068c7f6167e20f42cb675335554b98ff1fb83e16

Bug: T63486
Change-Id: I6b334e838b5beaf14ae066c61ddc50d7a4958b97
2015-05-01 17:38:29 +00:00
Federico Leva
1179c7ad47 Add linkable anchor #L<N> to (original text) line number in diff
Bug: T63486
Change-Id: I068c7f6167e20f42cb675335554b98ff1fb83e16
2015-03-13 06:58:34 +00:00
Chad Horohoe
aa21e125a3 Remove obvious function-level profiling
Xhprof generates this data now. Custom profiling of various
sub-function units are kept.

Calls to profiler represented about 3% of page execution
time on Special:BlankPage (1.5% in/out); after this change
it's down to about 0.98% of page execution time.

Change-Id: Id9a1dc9d8f80bbd52e42226b724a1e1213d07af7
2015-01-07 11:14:24 -08:00
umherirrender
c249dfc291 Add comment to TableDiffFormatter::blockHeader
magic strings should have a comment

Change-Id: I23fc7a4de31e22383f0a6ffd1db56717615cfa0c
2014-06-29 08:15:01 +00:00
Thiemo Mättig
6806400129 Added and updated Doxygen comments in content handler and diff namespaces
Reasons for touching this are:
* "@param type $var" were mixed in a lot of places. Both works but the
  MediaWiki coding conventions suggest that specific order.
* Things like String and Bool aren't objects and shouldn't be uppercase.
* Tried to fill missing types in "@param $var".
* Tried to fill missing descriptions in "@return type" when I could.
* Removed duplicate descriptions if a @see is sufficend.
* Removed useless descriptions ("isUsefull returns true if usefull").
* Removed useless @return void.
* Replaces mixed[] with array (does have the exact same meaning).
* Tried to find better replacements for "varargs", phpDocumentor
  suggest $var,...
* Order should be @since, @param, @throws, @return, @see. This is the
  order Doxygen renders this.

There is always more to do but I think this is already much better
than before. Please feel free to put more change sets on top of mine
or request more changes by adding comments.

Change-Id: I05262ce06caabf79f68772302524ac91bbead1c6
2014-03-06 11:17:41 +01:00
Siebrand Mazeland
abefd2c07e Update formatting for includes/diff
Change-Id: Id032a32ca6ebea3daf5313a05602c5e98603d983
2013-11-20 20:11:57 +01:00
Max Semenik
c37b4dc964 Refactor diffs
* Move some classes to separate files to avoid having a monstrous file with a
  dozen classes.
* Remove weird underscores from class names.
* Instead of prefixing members with underscores, specify visibility explicitly.
* Rename c_style -> camelCase per coding conventions.
* Throw exceptions instead of fataling out with trigger_error().
* Remove pointless constant used only once.

Change-Id: Icac23c0f6259c73f5fe07f201b83b9c332ba0469
2013-10-30 21:40:06 +04:00