Merge remote-tracking branch 'origin/support/2.7' into develop

# Conflicts:
#	application/datamodel.application.xml
This commit is contained in:
Pierre Goiffon
2020-10-07 18:37:06 +02:00
3 changed files with 12 additions and 37 deletions

View File

@@ -4,8 +4,10 @@
<profiles>
<profile id="1024" _delta="define">
<name>REST Services User</name>
<description>Only users having this profile are allowed to use the REST Web Services (unless 'secure_rest_services' is set to false in the configuration file).</description>
<groups />
<description>Only users having this profile are allowed to use the REST Web Services (unless 'secure_rest_services' is set to false
in the configuration file).
</description>
<groups/>
</profile>
</profiles>
</user_rights>

View File

@@ -3699,16 +3699,14 @@ abstract class DBObject implements iDisplay
// save current object values in case of an action failure (in memory rollback)
$aBackupValues = array();
foreach(MetaModel::ListAttributeDefs($sClass) as $sAttCode => $oAttDef)
{
$value = $this->m_aCurrValues[$sAttCode];
if (is_object($value))
{
$aBackupValues[$sAttCode] = clone $value;
}
else
{
$aBackupValues[$sAttCode] = $value;
foreach (MetaModel::ListAttributeDefs($sClass) as $sAttCode => $oAttDef) {
if (isset($this->m_aCurrValues[$sAttCode])) {
$value = $this->m_aCurrValues[$sAttCode];
if (is_object($value)) {
$aBackupValues[$sAttCode] = clone $value;
} else {
$aBackupValues[$sAttCode] = $value;
}
}
}

View File

@@ -212,31 +212,6 @@ class OQLTest extends ItopDataTestCase
);
}
/**
* @dataProvider TypeErrorQueryProvider
* @depends testOQLSetup
*
* @param $sQuery
*
* @expectedException \CoreException
*
* @throws \OQLException
*/
public function testTypeErrorQueryParser($sQuery)
{
$this->debug($sQuery);
$oOql = new OqlInterpreter($sQuery);
$oOql->ParseQuery();
}
public function TypeErrorQueryProvider()
{
return array(
array('SELECT A WHERE A.a MATCHES toto'),
);
}
/**
* Needs actual datamodel
* @depends testOQLSetup