From 2f89609706d25a38a6480bef6889acec34a50a60 Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Thu, 6 Nov 2008 22:43:19 +0000 Subject: [PATCH] Partial revert of r43269 for HTMLDiff.php. In file addHtml() is a method. Thanks to demon for spotting this. --- includes/diff/HTMLDiff.php | 62 +++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/includes/diff/HTMLDiff.php b/includes/diff/HTMLDiff.php index eec09ca23a..0698059f47 100644 --- a/includes/diff/HTMLDiff.php +++ b/includes/diff/HTMLDiff.php @@ -634,7 +634,7 @@ class ChangeTextGenerator { $txt = new ChangeText; $rootlistopened = false; if (count($differences) > 1) { - $txt->addHTML(''); } return $txt; } @@ -697,7 +697,7 @@ class ChangeText { private $txt = ""; - public function addHTML($s) { + public function addHtml($s) { $this->txt .= $s; } @@ -759,14 +759,14 @@ class TagToString { $tagDescription = "<" . $this->node->qName . ">"; } if ($this->sem == TagToStringFactory::MOVED) { - $txt->addHTML( wfMsgExt( 'diff-movedoutof', 'parseinline', $tagDescription ) ); + $txt->addHtml( wfMsgExt( 'diff-movedoutof', 'parseinline', $tagDescription ) ); } else if ($this->sem == TagToStringFactory::STYLE) { - $txt->addHTML( wfMsgExt( 'diff-styleremoved' , 'parseinline', $tagDescription ) ); + $txt->addHtml( wfMsgExt( 'diff-styleremoved' , 'parseinline', $tagDescription ) ); } else { - $txt->addHTML( wfMsgExt( 'diff-removed' , 'parseinline', $tagDescription ) ); + $txt->addHtml( wfMsgExt( 'diff-removed' , 'parseinline', $tagDescription ) ); } $this->addAttributes($txt, $this->node->attributes); - $txt->addHTML('.'); + $txt->addHtml('.'); } public function getAddedDescription(ChangeText $txt) { @@ -775,14 +775,14 @@ class TagToString { $tagDescription = "<" . $this->node->qName . ">"; } if ($this->sem == TagToStringFactory::MOVED) { - $txt->addHTML( wfMsgExt( 'diff-movedto' , 'parseinline', $tagDescription) ); + $txt->addHtml( wfMsgExt( 'diff-movedto' , 'parseinline', $tagDescription) ); } else if ($this->sem == TagToStringFactory::STYLE) { - $txt->addHTML( wfMsgExt( 'diff-styleadded', 'parseinline', $tagDescription ) ); + $txt->addHtml( wfMsgExt( 'diff-styleadded', 'parseinline', $tagDescription ) ); } else { - $txt->addHTML( wfMsgExt( 'diff-added', 'parseinline', $tagDescription ) ); + $txt->addHtml( wfMsgExt( 'diff-added', 'parseinline', $tagDescription ) ); } $this->addAttributes($txt, $this->node->attributes); - $txt->addHTML('.'); + $txt->addHtml('.'); } protected function addAttributes(ChangeText $txt, array $attributes) { @@ -797,17 +797,17 @@ class TagToString { $attr = $attributes[$key]; if($firstOne) { $firstOne = false; - $txt->addHTML( wfMsgExt('diff-with', 'escapenoentities', $this->translateArgument($key), htmlspecialchars($attr) ) ); + $txt->addHtml( wfMsgExt('diff-with', 'escapenoentities', $this->translateArgument($key), htmlspecialchars($attr) ) ); continue; } - $txt->addHTML( wfMsgExt( 'comma-separator', 'escapenoentities' ) . + $txt->addHtml( wfMsgExt( 'comma-separator', 'escapenoentities' ) . wfMsgExt( 'diff-with-additional', 'escapenoentities', $this->translateArgument( $key ), htmlspecialchars( $attr ) ) ); } if ($nbAttributes_min_1 > 0) { - $txt->addHTML( wfMsgExt( 'diff-with-final', 'escapenoentities', + $txt->addHtml( wfMsgExt( 'diff-with-final', 'escapenoentities', $this->translateArgument($keys[$nbAttributes_min_1]), htmlspecialchars($attributes[$keys[$nbAttributes_min_1]]) ) ); } @@ -833,15 +833,15 @@ class NoContentTagToString extends TagToString { if( wfEmptyMsg( 'diff-' . $this->node->qName, $tagDescription ) ){ $tagDescription = "<" . $this->node->qName . ">"; } - $txt->addHTML( wfMsgExt('diff-changedto', 'parseinline', $tagDescription ) ); + $txt->addHtml( wfMsgExt('diff-changedto', 'parseinline', $tagDescription ) ); $this->addAttributes($txt, $this->node->attributes); - $txt->addHTML('.'); + $txt->addHtml('.'); } public function getRemovedDescription(ChangeText $txt) { - $txt->addHTML( wfMsgExt('diff-changedfrom', 'parseinline', $tagDescription ) ); + $txt->addHtml( wfMsgExt('diff-changedfrom', 'parseinline', $tagDescription ) ); $this->addAttributes($txt, $this->node->attributes); - $txt->addHTML('.'); + $txt->addHtml('.'); } } @@ -853,7 +853,7 @@ class AnchorToString extends TagToString { protected function addAttributes(ChangeText $txt, array $attributes) { if (array_key_exists('href', $attributes)) { - $txt->addHTML(' ' . wfMsgExt( 'diff-withdestination', 'parseinline', htmlspecialchars($attributes['href']) ) ); + $txt->addHtml(' ' . wfMsgExt( 'diff-withdestination', 'parseinline', htmlspecialchars($attributes['href']) ) ); unset($attributes['href']); } parent::addAttributes($txt, $attributes); @@ -988,18 +988,18 @@ class DelegatingContentHandler { } function startElement($qname, /*array*/ $arguments) { - $this->delegate->addHTML(Xml::openElement($qname, $arguments)); + $this->delegate->addHtml(Xml::openElement($qname, $arguments)); } function endElement($qname){ - $this->delegate->addHTML(Xml::closeElement($qname)); + $this->delegate->addHtml(Xml::closeElement($qname)); } function characters($chars){ - $this->delegate->addHTML(htmlspecialchars($chars)); + $this->delegate->addHtml(htmlspecialchars($chars)); } function html($html){ - $this->delegate->addHTML($html); + $this->delegate->addHtml($html); } } -- 2.20.1