Commit graph

10 commits

Author SHA1 Message Date
Aryeh Gregor
c064c285aa Start to improve HTMLDiff.php localization. For the time being, I recommend that the messages *not* be localized, because they're likely to change form quite a bit more before they're stable. Someone might want to temporarily mark them "do not change" and have BetaWiki not pick them up. I'd appreciate help on this, of course. 2008-08-21 22:16:44 +00:00
Chad Horohoe
bd31a86947 Use wfEmptyMsg() instead of !$message. 2008-08-21 20:20:15 +00:00
Guy Van den Broeck
3dbc4b0dcd Simplified i18n for HTMLDiff 2008-08-21 18:32:53 +00:00
Chad Horohoe
a817efbe7b * Move messages from a hardcoded $bundle to core message files.
* getString() is now a wrapper for htmlspecialchars( wfMsgNoTrans() ) as these messages are plaintext (per guyvdb)
* Could probably use more cleanup, but this is a nice start in the right direction.
2008-08-21 00:22:02 +00:00
Guy Van den Broeck
60b87b4ef0 Escape characters that were unescaped by the parser 2008-08-20 19:19:36 +00:00
Brion Vibber
0e830bd136 fix for html diff on page with images -- ImageNode $attributes member was incorrectly declared as private 2008-08-20 18:25:45 +00:00
Guy Van den Broeck
44fcbc51c5 Using referenses inside of foreach loops. 2008-08-18 14:55:36 +00:00
Roan Kattouw
4a286d57f6 Cleaned up HTMLDiff implementation for readability:
* Coding style consistency and indentation
* Removed unneccesary require_once(), the AutoLoader will load the right file automatically
* sizeof -> count, TRUE -> true, FALSE -> false, NULL -> null
* Use Xml:: functions
* Rename TagNode::splitUntill() to splitUntil() and $hasNotDeletedDescendant to $hasNonDeletedDescendant
* Flip TagNode::$blocks, TagToStringFactory::$containerTags and TagToStringFactory::$styleTags
* Merging if's in Node::getParentTree()
* Use a smart foreach() loop rather than two while()s and an if() in TagNode::splitUntil()
* Put all of TextNodeDiffer's members on top rather than scattering them between functions
* Use PHP's double-quoted string coolness rather than sprintf() or concatenation
* Use a smart foreach loop rather than array_keys() and a for() in TagToString::addAttributes()

TODO:
* Use interface messages rather than TagToString::$bundle so they can be translated
* Use constants for magic numbers like 1.35, 1000 and 2000 in calls to WikiDiff3::__construct()
2008-08-18 13:48:44 +00:00
Guy Van den Broeck
3712ab270d Performance improvements to diff algorithms 2008-08-18 00:16:32 +00:00
Guy Van den Broeck
89f8141a7f New implementation of wikidiff3 algorithm replacing the previous one and basic HTML diffing support, both integrated with DifferenceEngine 2008-08-15 11:46:46 +00:00