| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | function metarefresh_hook_cron(array &$croninfo): void |
||
| 15 | { |
||
| 16 | Assert::keyExists($croninfo, 'summary'); |
||
| 17 | Assert::keyExists($croninfo, 'tag'); |
||
| 18 | |||
| 19 | Logger::info('cron [metarefresh]: Running cron in cron tag [' . $croninfo['tag'] . '] '); |
||
| 20 | |||
| 21 | $config = Configuration::getInstance(); |
||
| 22 | $mconfig = Configuration::getOptionalConfig('module_metarefresh.php'); |
||
| 23 | |||
| 24 | $mf = new \SimpleSAML\Module\metarefresh\MetaRefresh($config, $mconfig); |
||
| 25 | |||
| 26 | try { |
||
| 27 | $mf->runRefresh($croninfo['tag']); |
||
| 28 | } catch (\Exception $e) { |
||
| 29 | $croninfo['summary'][] = 'Error during metarefresh: ' . $e->getMessage(); |
||
| 30 | } |
||
| 32 |