Ticket #2508: 2508.patch

File 2508.patch, 2.8 KB (added by Artur Formella, 16 years ago)
  • FCKeditorParser.body.php

     
    153153         * @private
    154154         */
    155155        function strip( $text, $state, $stripcomments = false , $dontstrip = array () ) {
    156                 global $wgContLang, $wgUseTeX, $wgScriptPath;
     156                global $wgContLang, $wgUseTeX, $wgScriptPath, $showRef;
    157157
    158158                wfProfileIn( __METHOD__ );
    159159                $render = ($this->mOutputType == OT_HTML);
     
    166166                $elements = array_merge(
    167167                array( 'nowiki', 'gallery', 'math' ),
    168168                array_keys( $this->mTagHooks ) );
     169                if( $showRef )
     170                        $elements = array_merge( $elements, array( 'ref', 'references' ) );
    169171                global $wgRawHtml;
    170172                if( $wgRawHtml ) {
    171173                        $elements[] = 'html';
     
    177179                        unset ( $elements[$k] );
    178180                }
    179181
     182                $elements = array_unique($elements);   
    180183                $matches = array();
    181184                $text = Parser::extractTagsAndParams( $elements, $text, $matches, $uniq_prefix );
    182185
     
    196199                                                        $output = "$tag-->";
    197200                                                }
    198201                                                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;
    199208                                        case 'html':
    200209                                                if( $wgRawHtml ) {
    201210                                                        $output = $this->fck_wikiTag('html', $content, $params);
  • mw12/FCKeditorParser_OldPP.body.php

     
    154154         * @private
    155155         */
    156156        function strip( $text, $state, $stripcomments = false , $dontstrip = array () ) {
    157                 global $wgContLang, $wgUseTeX, $wgScriptPath;
     157                global $wgContLang, $wgUseTeX, $wgScriptPath, $showRef;
    158158
    159159                wfProfileIn( __METHOD__ );
    160160                $render = ($this->mOutputType == OT_HTML);
     
    167167                $elements = array_merge(
    168168                array( 'nowiki', 'gallery', 'math' ),
    169169                array_keys( $this->mTagHooks ) );
     170                if( $showRef )
     171                        $elements = array_merge( $elements, array( 'ref', 'references' ) );
    170172                global $wgRawHtml;
    171173                if( $wgRawHtml ) {
    172174                        $elements[] = 'html';
     
    178180                        unset ( $elements[$k] );
    179181                }
    180182
     183                $elements = array_unique($elements);   
    181184                $matches = array();
    182185                $text = self::extractTagsAndParams( $elements, $text, $matches, $uniq_prefix );
    183186
     
    197200                                                        $output = "$tag-->";
    198201                                                }
    199202                                                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;
    200209                                        case 'html':
    201210                                                if( $wgRawHtml ) {
    202211                                                        $output = $this->fck_wikiTag('html', $content, $params);
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy