File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -137,8 +137,8 @@ private static function remove_from_sortindex(&$toberemoved) {
137
137
global $ DB ;
138
138
if (isset ($ toberemoved ->sortindex )) {
139
139
$ subplugins = $ DB ->get_records_select ('tool_lifecycle_step ' ,
140
- " sortindex > $ toberemoved -> sortindex " ,
141
- ['workflowid ' => $ toberemoved ->workflowid ]);
140
+ ' workflowid = :workflowid AND sortindex > : sortindex' ,
141
+ ['workflowid ' => $ toberemoved ->workflowid , ' sortindex ' => $ toberemoved -> sortindex ]);
142
142
foreach ($ subplugins as $ record ) {
143
143
$ subplugin = step_subplugin::from_record ($ record );
144
144
$ subplugin ->sortindex --;
Original file line number Diff line number Diff line change @@ -179,8 +179,8 @@ private static function remove_from_sortindex(&$toberemoved) {
179
179
global $ DB ;
180
180
if (isset ($ toberemoved ->sortindex )) {
181
181
$ subplugins = $ DB ->get_records_select ('tool_lifecycle_trigger ' ,
182
- " sortindex > $ toberemoved -> sortindex " ,
183
- ['workflowid ' => $ toberemoved ->workflowid ]);
182
+ ' workflowid = :workflowid AND sortindex > : sortindex' ,
183
+ ['workflowid ' => $ toberemoved ->workflowid , ' sortindex ' => $ toberemoved -> sortindex ]);
184
184
foreach ($ subplugins as $ record ) {
185
185
$ subplugin = trigger_subplugin::from_record ($ record );
186
186
$ subplugin ->sortindex --;
You can’t perform that action at this time.
0 commit comments