Follow-up r74173: remove more PHP pre-5.1.0 comments, including two TODOs. Yay.
authorSiebrand Mazeland <siebrand@users.mediawiki.org>
Sat, 2 Oct 2010 22:49:41 +0000 (22:49 +0000)
committerSiebrand Mazeland <siebrand@users.mediawiki.org>
Sat, 2 Oct 2010 22:49:41 +0000 (22:49 +0000)
languages/Language.php

index a44a50d..09c66ad 100644 (file)
@@ -669,7 +669,6 @@ class Language {
         * @param $ts String: 14-character timestamp
         *      YYYYMMDDHHMMSS
         *      01234567890123
-        * @todo emulation of "o" format character for PHP pre 5.1.0
         * @todo handling of "o" format character for Iranian, Hebrew, Hijri & Thai?
         */
        function sprintfDate( $format, $ts ) {
@@ -844,18 +843,11 @@ class Language {
                                        }
                                        $num = gmdate( 'L', $unix );
                                        break;
-                               # 'o' is supported since PHP 5.1.0
-                               # return literal if not supported
-                               # TODO: emulation for pre 5.1.0 versions
                                case 'o':
                                        if ( !$unix ) {
                                                $unix = wfTimestamp( TS_UNIX, $ts );
                                        }
-                                       if ( version_compare( PHP_VERSION, '5.1.0' ) === 1 ) {
-                                               $num = date( 'o', $unix );
-                                       } else {
-                                               $s .= 'o';
-                                       }
+                                       $num = date( 'o', $unix );
                                        break;
                                case 'Y':
                                        $num = substr( $ts, 0, 4 );