fixed issue when settings contain a ": "

This commit is contained in:
Roland Gruber 2017-02-09 19:39:10 +01:00
parent 1d8a6b3e28
commit 6508042ec2
2 changed files with 12 additions and 1 deletions

View File

@ -624,7 +624,7 @@ class LAMConfig {
// empty global settings
$this->$keyword = '';
}
elseif (sizeof($parts) == 2) {
elseif ((sizeof($parts) > 1) && !in_array($keyword, array('modules', 'types', 'tools', 'jobs'))) {
// global setting with value
$this->$keyword = substr($line, $startIndex);
}

View File

@ -552,6 +552,17 @@ class LAMConfigTest extends PHPUnit_Framework_TestCase {
$this->assertEquals($val, $this->lAMConfig->getLamProMailText());
}
/**
* Tests LAMConfig->getLamProMailText() and LAMConfig->setLamProMailText() with a value that contains ": "
*/
public function testLamProMailTextColoon() {
$val = 'some: @@uid@@\r\ntext';
$this->lAMConfig->setLamProMailText($val);
$this->assertEquals($val, $this->lAMConfig->getLamProMailText());
$this->doSave();
$this->assertEquals($val, $this->lAMConfig->getLamProMailText());
}
/**
* Tests LAMConfig->getJobsBindUser() and LAMConfig->setJobsBindUser()
*/