Changeset 2077

Show
Ignore:
Timestamp:
2008-06-17 15:01:25 (6 months ago)
Author:
wwalc
Message:

Fix for #2226 (improved formatting, extension credits)

Location:
MediaWiki/trunk
Files:
7 modified

Legend:

Unmodified
Added
Removed
  • MediaWiki/trunk/FCKeditor.body.php

    r2076 r2077  
    11<?php 
    22 
    3 class FCKeditor_MediaWiki 
    4 { 
     3class FCKeditor_MediaWiki { 
    54        private $count = array(); 
    65        private $wgFCKBypassText = ""; 
     
    2928        static $messagesLoaded = false; 
    3029 
    31         function __call($m,$a) 
    32         { 
     30        function __call($m, $a) { 
    3331                print "\n#### " . $m . "\n"; 
    3432                if (!isset($this->count[$m])) { 
     
    3937        } 
    4038 
    41         function onMonoBookTemplateToolboxEnd() 
    42         { 
     39        function onMonoBookTemplateToolboxEnd() { 
    4340                if ($this->debug) { 
    4441                        print_r($this->count); 
     
    4643        } 
    4744 
    48         private function getExcludedNamespaces() 
    49         { 
     45        private function getExcludedNamespaces() { 
    5046                global $wgUser; 
    5147 
     
    6258        } 
    6359 
    64         public function onLanguageGetMagic(&$magicWords, $langCode) 
    65         { 
     60        public function onLanguageGetMagic(&$magicWords, $langCode) { 
    6661                $magicWords['NORICHEDITOR'] = array( 0, '__NORICHEDITOR__' ); 
    6762                 
     
    6964        } 
    7065         
    71         public function onParserBeforeInternalParse(&$parser, &$text, &$strip_state) 
    72         { 
     66        public function onParserBeforeInternalParse(&$parser, &$text, &$strip_state) { 
    7367                MagicWord::get( 'NORICHEDITOR' )->matchAndRemove( $text ); 
    7468                 
     
    7670        } 
    7771         
    78         public function onEditPageShowEditFormFields($pageEditor, $wgOut) 
    79         { 
     72        public function onEditPageShowEditFormFields($pageEditor, $wgOut) { 
    8073                global $wgUser, $wgFCKEditorIsCompatible, $wgTitle, $wgVersion; 
    8174 
     
    111104        } 
    112105 
    113         public function onEditPageBeforeConflictDiff($pageEditor, $wgOut) 
    114         { 
     106        public function onEditPageBeforeConflictDiff($pageEditor, $wgOut) { 
    115107                global $fckPageEditor, $wgRequest; 
    116108 
     
    125117        } 
    126118         
    127         public function onSanitizerAfterFixTagAttributes($text, $element, &$attribs) 
    128         { 
     119        public function onSanitizerAfterFixTagAttributes($text, $element, &$attribs) { 
    129120                $text = preg_match_all("/Fckmw\d+fckmw/", $text, $matches); 
    130121                 
     
    181172        } 
    182173 
    183         public function onCustomEditor(&$article, &$user) 
    184         { 
     174        public function onCustomEditor(&$article, &$user) { 
    185175                global $wgRequest, $mediaWiki; 
    186176 
     
    204194        } 
    205195 
    206         public function onEditPageBeforePreviewText(&$editPage, $previewOnOpen) 
    207         { 
     196        public function onEditPageBeforePreviewText(&$editPage, $previewOnOpen) { 
    208197                global $wgUser, $wgRequest; 
    209198 
     
    216205        } 
    217206 
    218         public function onEditPagePreviewTextEnd(&$editPage, $previewOnOpen) 
    219         { 
     207        public function onEditPagePreviewTextEnd(&$editPage, $previewOnOpen) { 
    220208                global $wgUser; 
    221209 
     
    227215        } 
    228216 
    229         public function onParserAfterTidy(&$parser, &$text) 
    230         { 
     217        public function onParserAfterTidy(&$parser, &$text) { 
    231218                global $wgUseTeX, $wgUser, $wgTitle, $wgFCKEditorIsCompatible; 
    232219 
     
    248235        } 
    249236 
    250         public function onMessagesPreLoad() 
    251         { 
     237        public function onMessagesPreLoad() { 
    252238                global $wgMessageCache, $wgUser, $wgContLanguageCode; 
    253239 
     
    538524var sajax_request_type = "GET"; 
    539525 
    540 function WikiToHTML_Result(result) 
    541 { 
     526function WikiToHTML_Result(result) { 
    542527        var oEditor = FCKeditorAPI.GetInstance('wpTextbox1'); 
    543528        oEditor.SetHTML(result.responseText); 
    544529} 
    545 function WikiToHTML_Call() 
    546 { 
     530function WikiToHTML_Call() { 
    547531        var oEditor = FCKeditorAPI.GetInstance('wpTextbox1'); 
    548532        sajax_do_call('wfSajaxWikiToHTML', [oEditor.GetHTML()], WikiToHTML_Result); 
  • MediaWiki/trunk/FCKeditorEditPage.body.php

    r1929 r2077  
    11<?php 
    22 
    3 class FCKeditorEditPage extends EditPage 
    4 { 
     3class FCKeditorEditPage extends EditPage { 
    54        /** 
    65         * Should we show a preview when the edit form is first shown? 
  • MediaWiki/trunk/FCKeditorParser.body.php

    r1941 r2077  
    11<?php 
    22 
    3 class FCKeditorParser extends Parser 
    4 { 
     3class FCKeditorParser extends Parser { 
    54        public static $fkc_mw_makeImage_options; 
    65        protected $fck_mw_strtr_span; 
  • MediaWiki/trunk/FCKeditorParserOptions.body.php

    r1660 r2077  
    11<?php 
    22 
    3 class FCKeditorParserOptions extends ParserOptions 
    4 { 
    5         function getNumberHeadings() {return false;} 
    6         function getEditSection() {return false;} 
     3class FCKeditorParserOptions extends ParserOptions { 
     4        function getNumberHeadings() { return false; } 
     5        function getEditSection() { return false; } 
    76 
    87        function getSkin() { 
  • MediaWiki/trunk/FCKeditor.php

    r2075 r2077  
    44if (!defined('MEDIAWIKI')) { 
    55        echo <<<HEREDOC 
    6 To install my extension, put the following line in LocalSettings.php: 
     6To install FCKeditor extension, put the following line in LocalSettings.php: 
    77require_once( "\$IP/extensions/FCKeditor/FCKeditor.php" ); 
    88HEREDOC; 
     
    5353 
    5454if (empty ($wgFCKEditorExtDir)) { 
    55     $wgFCKEditorExtDir = "extensions/FCKeditor" ; 
     55    $wgFCKEditorExtDir = "extensions/FCKeditor"; 
    5656} 
    5757if (empty ($wgFCKEditorDir)) { 
    58     $wgFCKEditorDir = "extensions/FCKeditor/fckeditor" ; 
     58    $wgFCKEditorDir = "extensions/FCKeditor/fckeditor"; 
    5959} 
    6060if (empty ($wgFCKEditorToolbarSet)) { 
    61     $wgFCKEditorToolbarSet = "Wiki" ; 
     61    $wgFCKEditorToolbarSet = "Wiki"; 
    6262} 
    6363if (empty ($wgFCKEditorHeight)) { 
    64     $wgFCKEditorHeight = "0" ; // "0" for automatic ("300" minimum). 
     64    $wgFCKEditorHeight = "0"; // "0" for automatic ("300" minimum). 
    6565} 
    6666 
     
    7878 
    7979$wgExtensionCredits['other'][] = array( 
    80 "name" => "FCKeditor extension", 
    81 "author" => "FCKeditor.net (inspired by the code written by Mafs [Meta])", 
    82 "version" => 'fckeditor/mw-extension $Rev$ 2008', 
    83 "url" => "http://meta.wikimedia.org/wiki/FCKeditor", 
    84 "description" => "FCKeditor extension" 
     80    'name' => 'FCKeditor', 
     81    'author' => array('FCKeditor.net', 'Wikia'), 
     82    'version' => 'fckeditor/mw-extension $Rev$ 2008', 
     83    'url' => 'http://www.mediawiki.org/wiki/Extension:FCKeditor_%28by_FCKeditor_and_Wikia%29', 
     84    'description' => 'FCKeditor extension for editing wiki pages (WYSIWYG editor)' 
    8585); 
    8686 
     
    9191$oFCKeditorExtension->registerHooks(); 
    9292 
    93  
    94  
    95  
    96  
    97  
    98  
    99  
  • MediaWiki/trunk/FCKeditorSajax.body.php

    r1836 r2077  
    11<?php 
    22 
    3 function wfSajaxGetMathUrl( $term ) 
    4 { 
     3function wfSajaxGetMathUrl( $term ) { 
    54        $originalLink = MathRenderer::renderMath( $term ); 
    65 
     
    1514} 
    1615 
    17 function wfSajaxGetImageUrl( $term ) 
    18 { 
     16function wfSajaxGetImageUrl( $term ) { 
    1917        global $wgExtensionFunctions, $wgTitle; 
    2018 
     
    3937} 
    4038 
    41 function wfSajaxSearchSpecialTagFCKeditor($empty) 
    42 { 
     39function wfSajaxSearchSpecialTagFCKeditor($empty) { 
    4340        global $wgParser; 
    4441 
     
    5249} 
    5350 
    54 function wfSajaxSearchImageFCKeditor( $term ) 
    55 { 
     51function wfSajaxSearchImageFCKeditor( $term ) { 
    5652        global $wgContLang, $wgOut; 
    5753        $limit = 10; 
     
    6662        return ""; 
    6763 
    68         $db =& wfGetDB( DB_SLAVE ); 
     64        $db = wfGetDB( DB_SLAVE ); 
    6965        $res = $db->select( 'page', 'page_title', 
    7066        array(  'page_namespace' => NS_IMAGE, 
     
    7571 
    7672        $ret = ""; 
    77         $i=0; 
     73        $i = 0; 
    7874        while ( ( $row = $db->fetchObject( $res ) ) && ( ++$i <= $limit ) ) { 
    7975                $ret .= $row->page_title ."\n"; 
     
    8581} 
    8682 
    87 function wfSajaxSearchArticleFCKeditor( $term ) 
    88 { 
     83function wfSajaxSearchArticleFCKeditor( $term ) { 
    8984        global $wgContLang, $wgOut; 
    9085        $limit = 10; 
     
    113108        } 
    114109 
    115         $db =& wfGetDB( DB_SLAVE ); 
     110        $db = wfGetDB( DB_SLAVE ); 
    116111        $res = $db->select( 'page', 'page_title', 
    117112        array(  'page_namespace' => $ns, 
     
    122117 
    123118        $ret = ""; 
    124         $i=0; 
     119        $i = 0; 
    125120        while ( ( $row = $db->fetchObject( $res ) ) && ( ++$i <= $limit ) ) { 
    126121                if (isset($prefix) && !is_null($prefix)) { 
     
    135130} 
    136131 
    137 function wfSajaxSearchTemplateFCKeditor($empty) 
    138 { 
     132function wfSajaxSearchTemplateFCKeditor($empty) { 
    139133        global $wgContLang, $wgOut; 
    140134        $ns = NS_TEMPLATE; 
    141135 
    142         $db =& wfGetDB( DB_SLAVE ); 
     136        $db = wfGetDB( DB_SLAVE ); 
    143137        $res = $db->select( 'page', 'page_title', 
    144         array(  'page_namespace' => $ns), 
     138        array( 'page_namespace' => $ns), 
    145139        "wfSajaxSearch" 
    146140        ); 
     
    154148} 
    155149 
    156 function wfSajaxWikiToHTML( $wiki ) 
    157 { 
     150function wfSajaxWikiToHTML( $wiki ) { 
    158151        global $wgTitle; 
    159152 
  • MediaWiki/trunk/FCKeditorSkin.body.php

    r1854 r2077  
    11<?php 
    22 
    3 class FCKeditorSkin 
    4 { 
     3class FCKeditorSkin { 
    54        private $skin; 
    65 
     
    2019         */ 
    2120        function makeImageLinkObj( $nt, $label, $alt, $align = '', $params = array(), $framed = false, 
    22         $thumb = false, $manual_thumb = '', $valign = '' ) 
    23         { 
     21        $thumb = false, $manual_thumb = '', $valign = '' ) { 
    2422                $orginal = $nt->getText(); 
    2523                $img   = new Image( $nt ); 
     
    216214        } 
    217215 
    218         function makeKnownLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' , $aprops = '', $style = '' ) 
    219         { 
     216        function makeKnownLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' , $aprops = '', $style = '' ) { 
    220217                $fname = 'FCKeditorSkin::makeKnownLinkObj'; 
    221218                wfProfileIn( $fname ); 
     
    258255        } 
    259256 
    260         function makeBrokenLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' ) 
    261         { 
     257        function makeBrokenLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' ) { 
    262258                # Fail gracefully 
    263259                if ( ! isset($nt) ) { 
     
    345341        } 
    346342 
    347         function __call( $m, $a) 
    348         { 
     343        function __call( $m, $a) { 
    349344                return call_user_func_array( array( $this->skin, $m ), $a ); 
    350345        } 
    351346 
    352         function __construct( &$skin ) 
    353         { 
     347        function __construct( &$skin ) { 
    354348                $this->skin = $skin; 
    355349        }