| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | public function html() |
||
| 17 | { |
||
| 18 | echo '<h1>Instructions to create the swarm webhook with IFTTT</h1>'; |
||
| 19 | $secret = $this->getConf('hook_secret'); |
||
| 20 | if (empty($secret)) { |
||
| 21 | $exampleSecret = md5(time()); |
||
| 22 | $settingsID = 'plugin____swarmwebhook____plugin_settings_name'; |
||
| 23 | $configHRef = DOKU_REL . DOKU_SCRIPT . '?do=admin&page=config#' . $settingsID; |
||
| 24 | $configLink = '<a href="' . $configHRef . '">' . $this->getLang('configuration') . '</a>'; |
||
| 25 | $secretNeededMsg = sprintf( |
||
| 26 | $this->getLang('secret needed'), |
||
| 27 | $configLink, |
||
| 28 | '<code>' . $exampleSecret . '</code>' |
||
| 29 | ); |
||
| 30 | echo '<p>' . $secretNeededMsg . '</p>'; |
||
| 31 | return; |
||
| 32 | } |
||
| 33 | |||
| 34 | echo $this->iftttInstructionsHTML(); |
||
| 35 | } |
||
| 54 |