Conditions | 3 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
22 | public function run($request) |
||
23 | { |
||
24 | $this->dryRun = $request->getVar('forreal') ? false : true; |
||
25 | $this->dryRunMessage(); |
||
26 | |||
27 | $files = AllFilesInfo::inst()->getAllFiles(); |
||
28 | $obj = Injector::inst()->get(AddAndRemoveFromDb::class); |
||
29 | $obj->setIsDryRun($this->dryRun); |
||
30 | foreach ($files as $file) { |
||
31 | $array = $file->toMap(); |
||
32 | $obj->run($array, 'add'); |
||
33 | } |
||
34 | $this->dryRunMessage(); |
||
35 | DB::alteration_message('=== DONE ===', ''); |
||
36 | } |
||
48 |