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


git-svn-id: http://core.svn.wordpress.org/trunk@22350 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Nikolay Bachiyski 2012-10-31 22:26:20 +00:00
parent dcc0729a6c
commit 8a2548a137
1 changed files with 2 additions and 2 deletions

View File

@ -355,7 +355,7 @@ class PO extends Gettext_Translations {
return true;
}
$line = $use_last_line? $last_line : fgets($f);
$line = gp_endswith( $line, "\r\n" )? rtrim( $line, "\r\n" ) . "\n" : $line;
$line = ( "\r\n" == substr( $line, -2 ) ) ? rtrim( $line, "\r\n" ) . "\n" : $line;
$last_line = $line;
$use_last_line = false;
return $line;