Cleaned up HTMLDiff implementation for readability:
authorRoan Kattouw <catrope@users.mediawiki.org>
Mon, 18 Aug 2008 13:48:44 +0000 (13:48 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Mon, 18 Aug 2008 13:48:44 +0000 (13:48 +0000)
commit4a286d57f60854e47290caa228aaea10af0591fb
tree1751d4ed2b974e5097211c352f97d578842379f6
parent2b37d013fb3c31a4d153b430abc7c6ecc03c1aee
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()
includes/Diff.php
includes/DifferenceEngine.php
includes/HTMLDiff.php