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: https://develop.svn.wordpress.org/trunk@22350 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Nikolay Bachiyski 2012-10-31 22:26:20 +00:00
parent 1a9ffb97a7
commit b5b580e50a
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;
@ -381,4 +381,4 @@ class PO extends Gettext_Translations {
return $s;
}
}
endif;
endif;