remove trailing newlines

This commit is contained in:
Ralf Becker 2010-08-10 07:40:12 +00:00
parent 3cef21d501
commit 7ee9859bab

View File

@ -160,6 +160,11 @@ function do_editsvnchangelog()
$cmd = $config['editor'].' '.escapeshellarg($logfile);
passthru($cmd);
$config['changelog'] = file_get_contents($logfile);
// remove trailing newlines
while (substr($config['changelog'],-1) == "\n")
{
$config['changelog'] = substr($config['changelog'],0,-1);
}
// allow user to abort, by deleting the changelog
if (strlen($config['changelog']) <= 2)
{