r82609 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82608‎ | r82609 | r82610 >
Date:16:38, 22 February 2011
Author:reedy
Status:ok
Tags:
Comment:
Function documentation
Modified paths:
  • /trunk/extensions/Transliterator/Transliterator_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Transliterator/Transliterator_body.php
@@ -65,10 +65,11 @@
6666 /**
6767 * Handle the {{#transliterate: $mapname | $word | $format? | $answer? }} call.
6868 *
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
7374 */
7475 function render( $parser, $mapname = '', $word = '', $format = '$1', $answer = '' ) {
7576 // Handle the case when people use {{#transliterate:<>|<>||<>}}
@@ -403,6 +404,8 @@
404405 ksort( $attrs );
405406 $wasPrefixed = false;
406407 $naturalCased = false;
 408+ $naturalCasedFrom = '';
 409+ $prefixedFrom = '';
407410 foreach ( $attrs as $from => $attr ) {
408411
409412 // If the current rule has been auto-upcased, but a prefix of this rule wasn't,
@@ -511,7 +514,7 @@
512515 /**
513516 * Decide whether the title represents a Transliterator map.
514517 *
515 - * @param Title
 518+ * @param $title Title
516519 * @return Boolean
517520 */
518521 static function isMapPage( &$title ) {
@@ -526,6 +529,8 @@
527530 /**
528531 * Remove the article from the Transliterator caches.
529532 * (ArticlePurge, ArticleDeleteComplete)
 533+ *
 534+ * @param $article Article
530535 */
531536 static function purgeArticle( &$article ) {
532537 $title = $article->getTitle();
@@ -535,6 +540,8 @@
536541 /**
537542 * Remove the article from the Transliterator caches.
538543 * (NewRevisionFromEditComplete)
 544+ *
 545+ * @param $article Article
539546 */
540547 static function purgeArticleNewRevision( $article ) {
541548 $title = $article->getTitle();
@@ -552,6 +559,8 @@
553560 /**
554561 * Remove the title from the Transliterator caches.
555562 * (ArticleUndelete hook)
 563+ *
 564+ * @param $title Title
556565 */
557566 static function purgeTitle( &$title ) {
558567 global $wgMemc;
@@ -568,6 +577,11 @@
569578 * Does not follow redirects.
570579 *
571580 * (EditFilter hook)
 581+ *
 582+ * @param $editPage EditPage
 583+ * @param $text String
 584+ * @param $section
 585+ * @param $hookError
572586 */
573587 static function validate( $editPage, $text, $section, &$hookError ) {
574588 // FIXME: Should not access private variables
@@ -596,6 +610,8 @@
597611 /**
598612 * Called on first use to create singleton
599613 * (ParserFirstCallInit hook)
 614+ *
 615+ * @param $parser Parser
600616 */
601617 static function setup( &$parser ) {
602618 $trans = new ExtTransliterator;

Status & tagging log