Index: trunk/extensions/EtherpadLite/EtherpadLite.php |
— | — | @@ -73,7 +73,7 @@ |
74 | 74 | // https://www.mediawiki.org/wiki/Manual:Tag_extensions |
75 | 75 | function efEtherpadLiteParser_Initialize( &$parser ) { |
76 | 76 | $parser->setHook('eplite', 'efEtherpadLiteParserFunction_Render'); |
77 | | - return true; |
| 77 | + return true; |
78 | 78 | } |
79 | 79 | |
80 | 80 | # Define a default Etherpad Lite server Url and base path |
— | — | @@ -88,12 +88,11 @@ |
89 | 89 | $wgEtherpadLiteShowAuthorColors = 'true'; |
90 | 90 | |
91 | 91 | function efEtherpadLiteParserFunction_Render( $input, $args, $parser, $frame ) { |
92 | | - |
| 92 | + |
93 | 93 | global $wgUser; |
94 | | - global $wgEtherpadLiteDefaultPadUrl,$wgEtherpadLiteDefaultWidth, |
95 | | - $wgEtherpadLiteDefaultHeigth,$wgEtherpadLiteMonospacedFont,$wgEtherpadLiteShowControls, |
96 | | - $wgEtherpadLiteShowLineNumbers,$wgEtherpadLiteShowChat,$wgEtherpadLiteUserName, |
97 | | - $wgEtherpadLiteShowAuthorColors; |
| 94 | + global $wgEtherpadLiteDefaultPadUrl, $wgEtherpadLiteDefaultWidth, $wgEtherpadLiteDefaultHeight, |
| 95 | + $wgEtherpadLiteMonospacedFont, $wgEtherpadLiteShowControls, $wgEtherpadLiteShowLineNumbers, |
| 96 | + $wgEtherpadLiteShowChat, $wgEtherpadLiteShowAuthorColors; |
98 | 97 | |
99 | 98 | $padId = ( !empty( $args['pad-id'] ) ) ? $args['pad-id'] : "" ; |
100 | 99 | $height = ( !empty( $args['height'] ) ) ? $args['height'] : $wgEtherpadLiteDefaultHeight; |
— | — | @@ -104,17 +103,17 @@ |
105 | 104 | $showLineNumbers = ( !empty( $args['show-linenumbers'] ) ) ? $args['show-linenumbers'] : $wgEtherpadLiteShowLineNumbers; |
106 | 105 | $showChat = ( !empty( $args['show-chat'] ) ) ? $args['show-chat'] : $wgEtherpadLiteShowChat; |
107 | 106 | $noColors = ! ( ( !empty( $args['show-colors'] ) ) ? $args['show-colors'] : $wgEtherpadLiteShowAuthorColors ); |
108 | | - |
| 107 | + |
109 | 108 | $epliteHostUrl = Sanitizer::cleanUrl ( |
110 | 109 | ( !empty( $args['pad-url'] ) ) ? $args['pad-url'] : $wgEtherpadLiteDefaultPadUrl |
111 | | - ); |
| 110 | + ); |
112 | 111 | |
113 | 112 | // preset the pad username from MediaWiki username or IP |
114 | 113 | // attention: |
115 | 114 | // the pad username can currently be overwritten when editing the pad |
116 | 115 | |
117 | 116 | $userName = $wgUser->getName(); |
118 | | - |
| 117 | + |
119 | 118 | $iframeAttributes = array( |
120 | 119 | "style" => "width:$width;height:$height", |
121 | 120 | "id" => "epframe$padId", |
— | — | @@ -126,10 +125,9 @@ |
127 | 126 | "&userName=$userName" . |
128 | 127 | "&noColors=$noColors" |
129 | 128 | ); |
130 | | - |
| 129 | + |
131 | 130 | $output = Html::rawElement( 'iframe', $iframeAttributes ); |
132 | | - |
| 131 | + |
133 | 132 | wfDebug( "EtherpadLite:efEtherpadLiteParserFunction_Render $output\n" ); |
134 | 133 | return array( $output, 'noparse' => true, 'isHTML' => true ); |
135 | | - |
136 | 134 | } |