| Conditions | 7 |
| Paths | 8 |
| Total Lines | 34 |
| Code Lines | 28 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | <?php |
||
| 19 | static function admin_cache_delete () { |
||
| 20 | $Cache = System_cache::instance(); |
||
| 21 | $Page = Page::instance(); |
||
| 22 | $rc = Route::instance()->route; |
||
| 23 | if (isset($rc[2])) { |
||
| 24 | switch ($rc[2]) { |
||
| 25 | case 'clean_cache': |
||
| 26 | time_limit_pause(); |
||
| 27 | if ($_POST['partial_path']) { |
||
| 28 | $result = $Cache->del($_POST['partial_path']); |
||
| 29 | } else { |
||
| 30 | $result = $Cache->clean(); |
||
| 31 | clean_classes_cache(); |
||
| 32 | } |
||
| 33 | time_limit_pause(false); |
||
| 34 | if ($result) { |
||
| 35 | $Cache->disable(); |
||
| 36 | $Page->content(1); |
||
| 37 | } else { |
||
| 38 | $Page->content(0); |
||
| 39 | } |
||
| 40 | break; |
||
| 41 | case 'clean_pcache': |
||
| 42 | if (clean_pcache()) { |
||
| 43 | $Page->content(1); |
||
| 44 | } else { |
||
| 45 | $Page->content(0); |
||
| 46 | } |
||
| 47 | break; |
||
| 48 | } |
||
| 49 | } else { |
||
| 50 | $Page->content(0); |
||
| 51 | } |
||
| 52 | } |
||
| 53 | } |
||
| 54 |