| Conditions | 3 |
| Paths | 4 |
| Total Lines | 21 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 43 | public function reparse($current = 0) |
||
| 44 | { |
||
| 45 | $reparser = new \blitze\sitemaker\migrations\v30x\textreparser\plugins\custom_block_text( |
||
| 46 | $this->db, |
||
| 47 | $this->table_prefix . 'sm_cblocks' |
||
| 48 | ); |
||
| 49 | |||
| 50 | if (empty($current)) |
||
| 51 | { |
||
| 52 | $current = $reparser->get_max_id(); |
||
| 53 | } |
||
| 54 | |||
| 55 | $limit = 50; // lets keep the reparsing conservative |
||
| 56 | $start = max(1, $current + 1 - $limit); |
||
| 57 | $end = max(1, $current); |
||
| 58 | |||
| 59 | $reparser->reparse_range($start, $end); |
||
| 60 | |||
| 61 | $current = $start - 1; |
||
| 62 | |||
| 63 | return ($current === 0) ? true : $current; |
||
| 64 | } |
||
| 66 |