Ticket #2508: 2508 _2.patch
File 2508 _2.patch, 3.3 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 ((isset ($wgHooks['ParserFirstCallInit']) && (in_array('wfCite',$wgHooks['ParserFirstCallInit']) )) 170 || (isset ($wgExtensionFunctions) && (in_array('wfCite',$wgExtensionFunctions) ))){ 171 $elements = array_merge( $elements, array( 'ref', 'references' ) ); 172 } 169 173 global $wgRawHtml; 170 174 if( $wgRawHtml ) { 171 175 $elements[] = 'html'; … … 177 181 unset ( $elements[$k] ); 178 182 } 179 183 184 $elements = array_unique($elements); 180 185 $matches = array(); 181 186 $text = Parser::extractTagsAndParams( $elements, $text, $matches, $uniq_prefix ); 182 187 … … 196 201 $output = "$tag-->"; 197 202 } 198 203 break; 204 case 'references': 205 $output = $this->fck_wikiTag('references', $content, $params); 206 break; 207 case 'ref': 208 $output = $this->fck_wikiTag('ref', $content, $params); 209 break; 199 210 case 'html': 200 211 if( $wgRawHtml ) { 201 212 $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, $wgHooks; 158 158 159 159 wfProfileIn( __METHOD__ ); 160 160 $render = ($this->mOutputType == OT_HTML); … … 165 165 $generalItems = array(); 166 166 167 167 $elements = array_merge( 168 array( 'nowiki', 'gallery', 'math' ), 169 array_keys( $this->mTagHooks ) ); 168 array( 'nowiki', 'gallery', 'math' ), 169 array_keys( $this->mTagHooks ) ); 170 if ((isset ($wgHooks['ParserFirstCallInit']) && (in_array('wfCite',$wgHooks['ParserFirstCallInit']) )) 171 || (isset ($wgExtensionFunctions) && (in_array('wfCite',$wgExtensionFunctions) ))){ 172 $elements = array_merge( $elements, array( 'ref', 'references' ) ); 173 } 170 174 global $wgRawHtml; 171 175 if( $wgRawHtml ) { 172 176 $elements[] = 'html'; … … 178 182 unset ( $elements[$k] ); 179 183 } 180 184 185 $elements = array_unique($elements); 181 186 $matches = array(); 182 187 $text = self::extractTagsAndParams( $elements, $text, $matches, $uniq_prefix ); 183 188 … … 197 202 $output = "$tag-->"; 198 203 } 199 204 break; 205 case 'references': 206 $output = $this->fck_wikiTag('references', $content, $params); 207 break; 208 case 'ref': 209 $output = $this->fck_wikiTag('ref', $content, $params); 210 break; 200 211 case 'html': 201 212 if( $wgRawHtml ) { 202 213 $output = $this->fck_wikiTag('html', $content, $params);