r74174 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74173‎ | r74174 | r74175 >
Date:22:49, 2 October 2010
Author:siebrand
Status:ok
Tags:
Comment:
Follow-up r74173: remove more PHP pre-5.1.0 comments, including two TODOs. Yay.
Modified paths:
  • /trunk/phase3/languages/Language.php (modified) (history)

Diff [purge]

Index: trunk/phase3/languages/Language.php
@@ -669,7 +669,6 @@
670670 * @param $ts String: 14-character timestamp
671671 * YYYYMMDDHHMMSS
672672 * 01234567890123
673 - * @todo emulation of "o" format character for PHP pre 5.1.0
674673 * @todo handling of "o" format character for Iranian, Hebrew, Hijri & Thai?
675674 */
676675 function sprintfDate( $format, $ts ) {
@@ -844,18 +843,11 @@
845844 }
846845 $num = gmdate( 'L', $unix );
847846 break;
848 - # 'o' is supported since PHP 5.1.0
849 - # return literal if not supported
850 - # TODO: emulation for pre 5.1.0 versions
851847 case 'o':
852848 if ( !$unix ) {
853849 $unix = wfTimestamp( TS_UNIX, $ts );
854850 }
855 - if ( version_compare( PHP_VERSION, '5.1.0' ) === 1 ) {
856 - $num = date( 'o', $unix );
857 - } else {
858 - $s .= 'o';
859 - }
 851+ $num = date( 'o', $unix );
860852 break;
861853 case 'Y':
862854 $num = substr( $ts, 0, 4 );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r74173Remove comment related to PHP pre-5.1 version.siebrand22:45, 2 October 2010

Status & tagging log