* (bug 3194) default implementation of translateBlockExpiry which uses ipboptions
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Tue, 3 Jan 2006 20:59:19 +0000 (20:59 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Tue, 3 Jan 2006 20:59:19 +0000 (20:59 +0000)
RELEASE-NOTES
languages/Language.php

index e0311cd..cb6b1c1 100644 (file)
@@ -398,7 +398,9 @@ fully support the editing toolbar, but was found to be too confusing.
 * Removed broken wgAllowAnonymousMinor and added new group right minoredit
 * (bug 4457) Update for Portuguese language (pt)
 * convertPlural breakage fixed a little
-* Bug 4456: Add hook for marking article patrolled
+* (bug 4456) Add hook for marking article patrolled
+* (bug 3194) default implementation of translateBlockExpiry
+  which uses ipboptions
 
 
 === Caveats ===
index 3df742d..154eded 100644 (file)
@@ -2896,6 +2896,22 @@ class Language {
         * @see LanguageFi.php for example implementation
         */
        function translateBlockExpiry( $str ) {
+
+               $scBlockExpiryOptions = wfMsg( 'ipboptions' );
+
+               if ( $scBlockExpiryOptions == '-') {
+                       return $str;
+               }
+
+               foreach (explode(',', $scBlockExpiryOptions) as $option) {
+                       if ( strpos($option, ":") === false )
+                               continue;
+                       list($show, $value) = explode(":", $option);
+                       if ( strcmp ( $str, $value) == 0 )
+                               return '<span title="' . htmlspecialchars($str). '">' .
+                                       htmlspecialchars( trim( $show ) ) . '</span>';
+               }
+
                return $str;
        }