Index: trunk/extensions/TimedMediaHandler/TimedMediaTransformOutput.php |
— | — | @@ -73,17 +73,17 @@ |
74 | 74 | if( $this->width <= $wgMinimumVideoPlayerSize && $this->isVideo ){ |
75 | 75 | return $this->getImagePopUp(); |
76 | 76 | } else { |
77 | | - return $this->getXmlMediaTagOutput(); |
| 77 | + return $this->getHtmlMediaTagOutput(); |
78 | 78 | } |
79 | 79 | } |
80 | | - // XXX migrate this to the mediawiki XML class as 'tagSet' helper function |
81 | | - static function xmlTagSet( $tagName, $tagSet ){ |
| 80 | + // XXX migrate this to the mediawiki Html class as 'tagSet' helper function |
| 81 | + static function htmlTagSet( $tagName, $tagSet ){ |
82 | 82 | $s = ''; |
83 | 83 | if( empty( $tagSet ) ){ |
84 | 84 | return ''; |
85 | 85 | } |
86 | 86 | foreach( $tagSet as $attr ){ |
87 | | - $s.= Xml::tags($tagName, $attr, ''); |
| 87 | + $s.= Html::rawElement($tagName, $attr, ''); |
88 | 88 | } |
89 | 89 | return $s; |
90 | 90 | } |
— | — | @@ -94,7 +94,7 @@ |
95 | 95 | 'class' => 'PopUpMediaTransform', |
96 | 96 | 'style' => "width:" . intval( $this->width ) . "px;height:" . |
97 | 97 | intval( $this->height ) . "px", |
98 | | - 'data-videopayload' => $this->getXmlMediaTagOutput( $this->getPopupPlayerSize() ), |
| 98 | + 'data-videopayload' => $this->getHtmlMediaTagOutput( $this->getPopupPlayerSize() ), |
99 | 99 | ), |
100 | 100 | Xml::tags( 'img', array( |
101 | 101 | 'style' => "width:" . intval( $this->width ) . "px;height:" . |
— | — | @@ -128,7 +128,7 @@ |
129 | 129 | * Call mediaWiki xml helper class to build media tag output from |
130 | 130 | * supplied arrays |
131 | 131 | */ |
132 | | - function getXmlMediaTagOutput( $sizeOverride = array() ){ |
| 132 | + function getHtmlMediaTagOutput( $sizeOverride = array() ){ |
133 | 133 | // Try to get the first source src attribute ( usually this should be the source file ) |
134 | 134 | $mediaSources = $this->getMediaSources(); |
135 | 135 | $firstSource = current( $mediaSources ); |
— | — | @@ -137,13 +137,13 @@ |
138 | 138 | return 'Error missing media source'; |
139 | 139 | }; |
140 | 140 | // Build the video tag output: |
141 | | - $s = Xml::tags( $this->getTagName(), $this->getMediaAttr( $sizeOverride ), |
| 141 | + $s = Html::rawElement( $this->getTagName(), $this->getMediaAttr( $sizeOverride ), |
142 | 142 | |
143 | 143 | // The set of media sources: |
144 | | - self::xmlTagSet( 'source', $mediaSources ) . |
| 144 | + self::htmlTagSet( 'source', $mediaSources ) . |
145 | 145 | |
146 | 146 | // Timed text: |
147 | | - self::xmlTagSet( 'track', $this->getTextHandler()->getTracks() ) . |
| 147 | + self::htmlTagSet( 'track', $this->getTextHandler()->getTracks() ) . |
148 | 148 | |
149 | 149 | // Fallback text displayed for browsers without js and without video tag support: |
150 | 150 | /// XXX note we may want to replace this with an image and download link play button |