Index: trunk/phase3/includes/diff/HTMLDiff.php |
— | — | @@ -634,7 +634,7 @@ |
635 | 635 | $txt = new ChangeText; |
636 | 636 | $rootlistopened = false; |
637 | 637 | if (count($differences) > 1) { |
638 | | - $txt->addHTML('<ul class="changelist">'); |
| 638 | + $txt->addHtml('<ul class="changelist">'); |
639 | 639 | $rootlistopened = true; |
640 | 640 | } |
641 | 641 | $nbDifferences = count($differences); |
— | — | @@ -642,44 +642,44 @@ |
643 | 643 | $d = $differences[$j]; |
644 | 644 | $lvl1listopened = false; |
645 | 645 | if ($rootlistopened) { |
646 | | - $txt->addHTML('<li>'); |
| 646 | + $txt->addHtml('<li>'); |
647 | 647 | } |
648 | 648 | if ($d->leftlength + $d->rightlength > 1) { |
649 | | - $txt->addHTML('<ul class="changelist">'); |
| 649 | + $txt->addHtml('<ul class="changelist">'); |
650 | 650 | $lvl1listopened = true; |
651 | 651 | } |
652 | 652 | // left are the old ones |
653 | 653 | for ($i = $d->leftstart; $i < $d->leftend; ++$i) { |
654 | 654 | if ($lvl1listopened){ |
655 | | - $txt->addHTML('<li>'); |
| 655 | + $txt->addHtml('<li>'); |
656 | 656 | } |
657 | 657 | // add a bullet for a old tag |
658 | 658 | $this->addTagOld($txt, $this->other->ancestors[$i]); |
659 | 659 | if ($lvl1listopened){ |
660 | | - $txt->addHTML('</li>'); |
| 660 | + $txt->addHtml('</li>'); |
661 | 661 | } |
662 | 662 | } |
663 | 663 | // right are the new ones |
664 | 664 | for ($i = $d->rightstart; $i < $d->rightend; ++$i) { |
665 | 665 | if ($lvl1listopened){ |
666 | | - $txt->addHTML('<li>'); |
| 666 | + $txt->addHtml('<li>'); |
667 | 667 | } |
668 | 668 | // add a bullet for a new tag |
669 | 669 | $this->addTagNew($txt, $this->ancestorComparator->ancestors[$i]); |
670 | 670 | |
671 | 671 | if ($lvl1listopened){ |
672 | | - $txt->addHTML('</li>'); |
| 672 | + $txt->addHtml('</li>'); |
673 | 673 | } |
674 | 674 | } |
675 | 675 | if ($lvl1listopened) { |
676 | | - $txt->addHTML('</ul>'); |
| 676 | + $txt->addHtml('</ul>'); |
677 | 677 | } |
678 | 678 | if ($rootlistopened) { |
679 | | - $txt->addHTML('</li>'); |
| 679 | + $txt->addHtml('</li>'); |
680 | 680 | } |
681 | 681 | } |
682 | 682 | if ($rootlistopened) { |
683 | | - $txt->addHTML('</ul>'); |
| 683 | + $txt->addHtml('</ul>'); |
684 | 684 | } |
685 | 685 | return $txt; |
686 | 686 | } |
— | — | @@ -697,7 +697,7 @@ |
698 | 698 | |
699 | 699 | private $txt = ""; |
700 | 700 | |
701 | | - public function addHTML($s) { |
| 701 | + public function addHtml($s) { |
702 | 702 | $this->txt .= $s; |
703 | 703 | } |
704 | 704 | |
— | — | @@ -759,14 +759,14 @@ |
760 | 760 | $tagDescription = "<" . $this->node->qName . ">"; |
761 | 761 | } |
762 | 762 | if ($this->sem == TagToStringFactory::MOVED) { |
763 | | - $txt->addHTML( wfMsgExt( 'diff-movedoutof', 'parseinline', $tagDescription ) ); |
| 763 | + $txt->addHtml( wfMsgExt( 'diff-movedoutof', 'parseinline', $tagDescription ) ); |
764 | 764 | } else if ($this->sem == TagToStringFactory::STYLE) { |
765 | | - $txt->addHTML( wfMsgExt( 'diff-styleremoved' , 'parseinline', $tagDescription ) ); |
| 765 | + $txt->addHtml( wfMsgExt( 'diff-styleremoved' , 'parseinline', $tagDescription ) ); |
766 | 766 | } else { |
767 | | - $txt->addHTML( wfMsgExt( 'diff-removed' , 'parseinline', $tagDescription ) ); |
| 767 | + $txt->addHtml( wfMsgExt( 'diff-removed' , 'parseinline', $tagDescription ) ); |
768 | 768 | } |
769 | 769 | $this->addAttributes($txt, $this->node->attributes); |
770 | | - $txt->addHTML('.'); |
| 770 | + $txt->addHtml('.'); |
771 | 771 | } |
772 | 772 | |
773 | 773 | public function getAddedDescription(ChangeText $txt) { |
— | — | @@ -775,14 +775,14 @@ |
776 | 776 | $tagDescription = "<" . $this->node->qName . ">"; |
777 | 777 | } |
778 | 778 | if ($this->sem == TagToStringFactory::MOVED) { |
779 | | - $txt->addHTML( wfMsgExt( 'diff-movedto' , 'parseinline', $tagDescription) ); |
| 779 | + $txt->addHtml( wfMsgExt( 'diff-movedto' , 'parseinline', $tagDescription) ); |
780 | 780 | } else if ($this->sem == TagToStringFactory::STYLE) { |
781 | | - $txt->addHTML( wfMsgExt( 'diff-styleadded', 'parseinline', $tagDescription ) ); |
| 781 | + $txt->addHtml( wfMsgExt( 'diff-styleadded', 'parseinline', $tagDescription ) ); |
782 | 782 | } else { |
783 | | - $txt->addHTML( wfMsgExt( 'diff-added', 'parseinline', $tagDescription ) ); |
| 783 | + $txt->addHtml( wfMsgExt( 'diff-added', 'parseinline', $tagDescription ) ); |
784 | 784 | } |
785 | 785 | $this->addAttributes($txt, $this->node->attributes); |
786 | | - $txt->addHTML('.'); |
| 786 | + $txt->addHtml('.'); |
787 | 787 | } |
788 | 788 | |
789 | 789 | protected function addAttributes(ChangeText $txt, array $attributes) { |
— | — | @@ -797,17 +797,17 @@ |
798 | 798 | $attr = $attributes[$key]; |
799 | 799 | if($firstOne) { |
800 | 800 | $firstOne = false; |
801 | | - $txt->addHTML( wfMsgExt('diff-with', 'escapenoentities', $this->translateArgument($key), htmlspecialchars($attr) ) ); |
| 801 | + $txt->addHtml( wfMsgExt('diff-with', 'escapenoentities', $this->translateArgument($key), htmlspecialchars($attr) ) ); |
802 | 802 | continue; |
803 | 803 | } |
804 | | - $txt->addHTML( wfMsgExt( 'comma-separator', 'escapenoentities' ) . |
| 804 | + $txt->addHtml( wfMsgExt( 'comma-separator', 'escapenoentities' ) . |
805 | 805 | wfMsgExt( 'diff-with-additional', 'escapenoentities', |
806 | 806 | $this->translateArgument( $key ), htmlspecialchars( $attr ) ) |
807 | 807 | ); |
808 | 808 | } |
809 | 809 | |
810 | 810 | if ($nbAttributes_min_1 > 0) { |
811 | | - $txt->addHTML( wfMsgExt( 'diff-with-final', 'escapenoentities', |
| 811 | + $txt->addHtml( wfMsgExt( 'diff-with-final', 'escapenoentities', |
812 | 812 | $this->translateArgument($keys[$nbAttributes_min_1]), |
813 | 813 | htmlspecialchars($attributes[$keys[$nbAttributes_min_1]]) ) ); |
814 | 814 | } |
— | — | @@ -833,15 +833,15 @@ |
834 | 834 | if( wfEmptyMsg( 'diff-' . $this->node->qName, $tagDescription ) ){ |
835 | 835 | $tagDescription = "<" . $this->node->qName . ">"; |
836 | 836 | } |
837 | | - $txt->addHTML( wfMsgExt('diff-changedto', 'parseinline', $tagDescription ) ); |
| 837 | + $txt->addHtml( wfMsgExt('diff-changedto', 'parseinline', $tagDescription ) ); |
838 | 838 | $this->addAttributes($txt, $this->node->attributes); |
839 | | - $txt->addHTML('.'); |
| 839 | + $txt->addHtml('.'); |
840 | 840 | } |
841 | 841 | |
842 | 842 | public function getRemovedDescription(ChangeText $txt) { |
843 | | - $txt->addHTML( wfMsgExt('diff-changedfrom', 'parseinline', $tagDescription ) ); |
| 843 | + $txt->addHtml( wfMsgExt('diff-changedfrom', 'parseinline', $tagDescription ) ); |
844 | 844 | $this->addAttributes($txt, $this->node->attributes); |
845 | | - $txt->addHTML('.'); |
| 845 | + $txt->addHtml('.'); |
846 | 846 | } |
847 | 847 | } |
848 | 848 | |
— | — | @@ -853,7 +853,7 @@ |
854 | 854 | |
855 | 855 | protected function addAttributes(ChangeText $txt, array $attributes) { |
856 | 856 | if (array_key_exists('href', $attributes)) { |
857 | | - $txt->addHTML(' ' . wfMsgExt( 'diff-withdestination', 'parseinline', htmlspecialchars($attributes['href']) ) ); |
| 857 | + $txt->addHtml(' ' . wfMsgExt( 'diff-withdestination', 'parseinline', htmlspecialchars($attributes['href']) ) ); |
858 | 858 | unset($attributes['href']); |
859 | 859 | } |
860 | 860 | parent::addAttributes($txt, $attributes); |
— | — | @@ -988,18 +988,18 @@ |
989 | 989 | } |
990 | 990 | |
991 | 991 | function startElement($qname, /*array*/ $arguments) { |
992 | | - $this->delegate->addHTML(Xml::openElement($qname, $arguments)); |
| 992 | + $this->delegate->addHtml(Xml::openElement($qname, $arguments)); |
993 | 993 | } |
994 | 994 | |
995 | 995 | function endElement($qname){ |
996 | | - $this->delegate->addHTML(Xml::closeElement($qname)); |
| 996 | + $this->delegate->addHtml(Xml::closeElement($qname)); |
997 | 997 | } |
998 | 998 | |
999 | 999 | function characters($chars){ |
1000 | | - $this->delegate->addHTML(htmlspecialchars($chars)); |
| 1000 | + $this->delegate->addHtml(htmlspecialchars($chars)); |
1001 | 1001 | } |
1002 | 1002 | |
1003 | 1003 | function html($html){ |
1004 | | - $this->delegate->addHTML($html); |
| 1004 | + $this->delegate->addHtml($html); |
1005 | 1005 | } |
1006 | 1006 | } |