Skip to content
This repository was archived by the owner on Aug 15, 2023. It is now read-only.

Commit 384103d

Browse files
committed
Merge pull request #3 from mficzel/master
Handle allowed actions in database-compare properly
2 parents 0137200 + befcff0 commit 384103d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Classes/Service/DatabaseApiService.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,35 +101,35 @@ public function databaseCompare($actions) {
101101
$allowedRequestKeys = $this->getRequestKeys($update_statements, $remove_statements);
102102
$results = array();
103103

104-
if ($actions[self::ACTION_UPDATE_CLEAR_TABLE] == 1) {
104+
if ($allowedActions[self::ACTION_UPDATE_CLEAR_TABLE] == 1) {
105105
$results[] = $this->sqlHandler->performUpdateQueries($update_statements['clear_table'], $allowedRequestKeys);
106106
}
107107

108-
if ($actions[self::ACTION_UPDATE_ADD] == 1) {
108+
if ($allowedActions[self::ACTION_UPDATE_ADD] == 1) {
109109
$results[] = $this->sqlHandler->performUpdateQueries($update_statements['add'], $allowedRequestKeys);
110110
}
111111

112-
if ($actions[self::ACTION_UPDATE_CHANGE] == 1) {
112+
if ($allowedActions[self::ACTION_UPDATE_CHANGE] == 1) {
113113
$results[] = $this->sqlHandler->performUpdateQueries($update_statements['change'], $allowedRequestKeys);
114114
}
115115

116-
if ($actions[self::ACTION_REMOVE_CHANGE] == 1) {
116+
if ($allowedActions[self::ACTION_REMOVE_CHANGE] == 1) {
117117
$results[] = $this->sqlHandler->performUpdateQueries($remove_statements['change'], $allowedRequestKeys);
118118
}
119119

120-
if ($actions[self::ACTION_REMOVE_DROP] == 1) {
120+
if ($allowedActions[self::ACTION_REMOVE_DROP] == 1) {
121121
$results[] = $this->sqlHandler->performUpdateQueries($remove_statements['drop'], $allowedRequestKeys);
122122
}
123123

124-
if ($actions[self::ACTION_UPDATE_CREATE_TABLE] == 1) {
124+
if ($allowedActions[self::ACTION_UPDATE_CREATE_TABLE] == 1) {
125125
$results[] = $this->sqlHandler->performUpdateQueries($update_statements['create_table'], $allowedRequestKeys);
126126
}
127127

128-
if ($actions[self::ACTION_REMOVE_CHANGE_TABLE] == 1) {
128+
if ($allowedActions[self::ACTION_REMOVE_CHANGE_TABLE] == 1) {
129129
$results[] = $this->sqlHandler->performUpdateQueries($remove_statements['change_table'], $allowedRequestKeys);
130130
}
131131

132-
if ($actions[self::ACTION_REMOVE_DROP_TABLE] == 1) {
132+
if ($allowedActions[self::ACTION_REMOVE_DROP_TABLE] == 1) {
133133
$results[] = $this->sqlHandler->performUpdateQueries($remove_statements['drop_table'], $allowedRequestKeys);
134134
}
135135

0 commit comments

Comments
 (0)