Ticket #2508: 2508.patch
File 2508.patch, 2.8 KB (added by , 15 years ago) |
---|
-
FCKeditorParser.body.php
153 153 * @private 154 154 */ 155 155 function strip( $text, $state, $stripcomments = false , $dontstrip = array () ) { 156 global $wgContLang, $wgUseTeX, $wgScriptPath ;156 global $wgContLang, $wgUseTeX, $wgScriptPath, $showRef; 157 157 158 158 wfProfileIn( __METHOD__ ); 159 159 $render = ($this->mOutputType == OT_HTML); … … 166 166 $elements = array_merge( 167 167 array( 'nowiki', 'gallery', 'math' ), 168 168 array_keys( $this->mTagHooks ) ); 169 if( $showRef ) 170 $elements = array_merge( $elements, array( 'ref', 'references' ) ); 169 171 global $wgRawHtml; 170 172 if( $wgRawHtml ) { 171 173 $elements[] = 'html'; … … 177 179 unset ( $elements[$k] ); 178 180 } 179 181 182 $elements = array_unique($elements); 180 183 $matches = array(); 181 184 $text = Parser::extractTagsAndParams( $elements, $text, $matches, $uniq_prefix ); 182 185 … … 196 199 $output = "$tag-->"; 197 200 } 198 201 break; 202 case 'references': 203 $output = $this->fck_wikiTag('references', $content, $params); 204 break; 205 case 'ref': 206 $output = $this->fck_wikiTag('ref', $content, $params); 207 break; 199 208 case 'html': 200 209 if( $wgRawHtml ) { 201 210 $output = $this->fck_wikiTag('html', $content, $params); -
mw12/FCKeditorParser_OldPP.body.php
154 154 * @private 155 155 */ 156 156 function strip( $text, $state, $stripcomments = false , $dontstrip = array () ) { 157 global $wgContLang, $wgUseTeX, $wgScriptPath ;157 global $wgContLang, $wgUseTeX, $wgScriptPath, $showRef; 158 158 159 159 wfProfileIn( __METHOD__ ); 160 160 $render = ($this->mOutputType == OT_HTML); … … 167 167 $elements = array_merge( 168 168 array( 'nowiki', 'gallery', 'math' ), 169 169 array_keys( $this->mTagHooks ) ); 170 if( $showRef ) 171 $elements = array_merge( $elements, array( 'ref', 'references' ) ); 170 172 global $wgRawHtml; 171 173 if( $wgRawHtml ) { 172 174 $elements[] = 'html'; … … 178 180 unset ( $elements[$k] ); 179 181 } 180 182 183 $elements = array_unique($elements); 181 184 $matches = array(); 182 185 $text = self::extractTagsAndParams( $elements, $text, $matches, $uniq_prefix ); 183 186 … … 197 200 $output = "$tag-->"; 198 201 } 199 202 break; 203 case 'references': 204 $output = $this->fck_wikiTag('references', $content, $params); 205 break; 206 case 'ref': 207 $output = $this->fck_wikiTag('ref', $content, $params); 208 break; 200 209 case 'html': 201 210 if( $wgRawHtml ) { 202 211 $output = $this->fck_wikiTag('html', $content, $params);