Index: trunk/extensions/Transliterator/Transliterator_body.php |
— | — | @@ -65,10 +65,11 @@ |
66 | 66 | /** |
67 | 67 | * Handle the {{#transliterate: $mapname | $word | $format? | $answer? }} call. |
68 | 68 | * |
69 | | - * $mapname is the name of the transliteration map to find. |
70 | | - * $word is the string to transliterate (if the map was found) |
71 | | - * $format is a string containing $1 to be replaced by the transliteration if the map exists |
72 | | - * $answer allows for a user-specified transliteration to override the automatic one |
| 69 | + * @param $parser Parser |
| 70 | + * @param $mapname String is the name of the transliteration map to find. |
| 71 | + * @param $word String is the string to transliterate (if the map was found) |
| 72 | + * @param $format String is a string containing $1 to be replaced by the transliteration if the map exists |
| 73 | + * @param $answer String allows for a user-specified transliteration to override the automatic one |
73 | 74 | */ |
74 | 75 | function render( $parser, $mapname = '', $word = '', $format = '$1', $answer = '' ) { |
75 | 76 | // Handle the case when people use {{#transliterate:<>|<>||<>}} |
— | — | @@ -403,6 +404,8 @@ |
404 | 405 | ksort( $attrs ); |
405 | 406 | $wasPrefixed = false; |
406 | 407 | $naturalCased = false; |
| 408 | + $naturalCasedFrom = ''; |
| 409 | + $prefixedFrom = ''; |
407 | 410 | foreach ( $attrs as $from => $attr ) { |
408 | 411 | |
409 | 412 | // If the current rule has been auto-upcased, but a prefix of this rule wasn't, |
— | — | @@ -511,7 +514,7 @@ |
512 | 515 | /** |
513 | 516 | * Decide whether the title represents a Transliterator map. |
514 | 517 | * |
515 | | - * @param Title |
| 518 | + * @param $title Title |
516 | 519 | * @return Boolean |
517 | 520 | */ |
518 | 521 | static function isMapPage( &$title ) { |
— | — | @@ -526,6 +529,8 @@ |
527 | 530 | /** |
528 | 531 | * Remove the article from the Transliterator caches. |
529 | 532 | * (ArticlePurge, ArticleDeleteComplete) |
| 533 | + * |
| 534 | + * @param $article Article |
530 | 535 | */ |
531 | 536 | static function purgeArticle( &$article ) { |
532 | 537 | $title = $article->getTitle(); |
— | — | @@ -535,6 +540,8 @@ |
536 | 541 | /** |
537 | 542 | * Remove the article from the Transliterator caches. |
538 | 543 | * (NewRevisionFromEditComplete) |
| 544 | + * |
| 545 | + * @param $article Article |
539 | 546 | */ |
540 | 547 | static function purgeArticleNewRevision( $article ) { |
541 | 548 | $title = $article->getTitle(); |
— | — | @@ -552,6 +559,8 @@ |
553 | 560 | /** |
554 | 561 | * Remove the title from the Transliterator caches. |
555 | 562 | * (ArticleUndelete hook) |
| 563 | + * |
| 564 | + * @param $title Title |
556 | 565 | */ |
557 | 566 | static function purgeTitle( &$title ) { |
558 | 567 | global $wgMemc; |
— | — | @@ -568,6 +577,11 @@ |
569 | 578 | * Does not follow redirects. |
570 | 579 | * |
571 | 580 | * (EditFilter hook) |
| 581 | + * |
| 582 | + * @param $editPage EditPage |
| 583 | + * @param $text String |
| 584 | + * @param $section |
| 585 | + * @param $hookError |
572 | 586 | */ |
573 | 587 | static function validate( $editPage, $text, $section, &$hookError ) { |
574 | 588 | // FIXME: Should not access private variables |
— | — | @@ -596,6 +610,8 @@ |
597 | 611 | /** |
598 | 612 | * Called on first use to create singleton |
599 | 613 | * (ParserFirstCallInit hook) |
| 614 | + * |
| 615 | + * @param $parser Parser |
600 | 616 | */ |
601 | 617 | static function setup( &$parser ) { |
602 | 618 | $trans = new ExtTransliterator; |