Index: trunk/extensions/ArticleComments/ArticleComments.php |
— | — | @@ -130,8 +130,9 @@ |
131 | 131 | */ |
132 | 132 | function wfArticleCommentForm( $title = null, $params = array() ) { |
133 | 133 | |
134 | | - global $wgScript, $wgContLang, $wgArticleCommentDefaults; |
135 | | - |
| 134 | + global $wgScript, $wgArticleCommentDefaults, $wgContentLang, $wgContLang; |
| 135 | + $wcl = ($wgContentLang ? $wgContentLang : $wgContLang); |
| 136 | + |
136 | 137 | # Merge in global defaults if specified |
137 | 138 | if (is_array($wgArticleCommentDefaults) && |
138 | 139 | !empty($wgArticleCommentDefaults)) { |
— | — | @@ -149,7 +150,7 @@ |
150 | 151 | } |
151 | 152 | |
152 | 153 | $ac = 'article-comments-'; |
153 | | - $formAction = $wgScript.'?title='.$wgContLang->getNsText(NS_SPECIAL).':ProcessComment'; |
| 154 | + $formAction = $wgScript.'?title='.$wcl->getNsText(NS_SPECIAL).':ProcessComment'; |
154 | 155 | |
155 | 156 | # Build out the comment form. |
156 | 157 | $content = |
— | — | @@ -163,7 +164,7 @@ |
164 | 165 | '<input type="text" id="commenterName" name="commenterName" /></p>'. |
165 | 166 | ($params['showurlfield']=='false' || $params['showurlfield']===false?'': |
166 | 167 | '<p>'.wfMsgForContent($ac.'url-field').'<br />'. |
167 | | - '<input type="text" id="commenterURL" name="commenterURL" /></p>' |
| 168 | + '<input type="text" id="commenterURL" name="commenterURL" value="http://" /></p>' |
168 | 169 | ). |
169 | 170 | '<p>'.wfMsgForContent($ac.'comment-field').'<br />'. |
170 | 171 | '<textarea id="comment" name="comment" style="width:30em" rows="5">'. |
— | — | @@ -290,7 +291,8 @@ |
291 | 292 | */ |
292 | 293 | function specialProcessComment() { |
293 | 294 | |
294 | | - global $wgOut, $wgContLang, $wgParser, $wgUser; |
| 295 | + global $wgOut, $wgParser, $wgUser, $wgContentLang, $wgContLang; |
| 296 | + $wcl = ($wgContentLang ? $wgContentLang : $wgContLang); |
295 | 297 | |
296 | 298 | # Retrieve submitted values |
297 | 299 | $titleKey = $_POST['titleKey']; |
— | — | @@ -381,8 +383,8 @@ |
382 | 384 | } |
383 | 385 | |
384 | 386 | # Determine signature components |
385 | | - $d = $wgContLang->timeanddate( date( 'YmdHis' ), false, false) . ' (' . date( 'T' ) . ')'; |
386 | | - if ($commenterURL) $sigText = "[$commenterURL $commenterName]"; |
| 387 | + $d = $wcl->timeanddate( date( 'YmdHis' ), false, false) . ' (' . date( 'T' ) . ')'; |
| 388 | + if ($commenterURL && $commenterURL!='http://') $sigText = "[$commenterURL $commenterName]"; |
387 | 389 | else if ($wgUser->isLoggedIn()) $sigText = $wgParser->getUserSig( $wgUser ); |
388 | 390 | else $sigText = $commenterName; |
389 | 391 | |