Merge branch 'wip-mdl-52799-m30' of git://github.com/rajeshtaneja/moodle into MOODLE_30_STABLE
This commit is contained in:
@@ -638,7 +638,11 @@ abstract class testing_util {
|
||||
|
||||
foreach ($data as $table => $records) {
|
||||
if ($borkedmysql) {
|
||||
if (empty($records) and isset($empties[$table])) {
|
||||
if (empty($records)) {
|
||||
if (!isset($empties[$table])) {
|
||||
// Table has been modified and is not empty.
|
||||
$DB->delete_records($table, null);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -660,9 +664,8 @@ abstract class testing_util {
|
||||
}
|
||||
|
||||
if (empty($records)) {
|
||||
if (isset($empties[$table])) {
|
||||
// table was not modified and is empty
|
||||
} else {
|
||||
if (!isset($empties[$table])) {
|
||||
// Table has been modified and is not empty.
|
||||
$DB->delete_records($table, array());
|
||||
}
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user