WordPress.org

Make WordPress Core

Changeset 22350


Ignore:
Timestamp:
10/31/12 22:26:20 (18 months ago)
Author:
nbachiyski
Message:

Replace gp_endswith() with working implementation

In [22349] we introduced a call to gp_endswith(),
whcih doesn't exist in WordPress, only in GlotPress.

See #22337

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/pomo/po.php

    r22349 r22350  
    356356        } 
    357357        $line = $use_last_line? $last_line : fgets($f); 
    358         $line = gp_endswith( $line, "\r\n" )? rtrim( $line, "\r\n" ) . "\n" : $line; 
     358        $line = ( "\r\n" == substr( $line, -2 ) ) ? rtrim( $line, "\r\n" ) . "\n" : $line; 
    359359        $last_line = $line; 
    360360        $use_last_line = false; 
Note: See TracChangeset for help on using the changeset viewer.