File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed
tine20/Timetracker/Setup/Update Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -166,14 +166,21 @@ public function update007()
166
166
};
167
167
}
168
168
169
- /** @var Timetracker_Model_Timesheet $ts */
170
- foreach ($ tsBackend ->getAll () as $ ts ) {
171
- $ fn ($ ts );
172
- if ($ ts ->isDirty ()) {
173
- $ tsBackend ->update ($ ts );
169
+ $ start = 0 ;
170
+ do {
171
+ $ rs = $ tsBackend ->search (null , new Tinebase_Model_Pagination ([
172
+ Tinebase_Model_Pagination::FLD_LIMIT => 1000 ,
173
+ Tinebase_Model_Pagination::FLD_START => $ start ,
174
+ ]));
175
+ $ start += 1000 ;
176
+ /** @var Timetracker_Model_Timesheet $ts */
177
+ foreach ($ rs as $ ts ) {
178
+ $ fn ($ ts );
179
+ if ($ ts ->isDirty ()) {
180
+ $ tsBackend ->update ($ ts );
181
+ }
174
182
}
175
- }
176
-
183
+ } while (1000 === $ rs ->count ());
177
184
$ this ->addApplicationUpdate (Timetracker_Config::APP_NAME , '17.7 ' , self ::RELEASE017_UPDATE007 );
178
185
}
179
186
}
You can’t perform that action at this time.
0 commit comments