use actions

This commit is contained in:
Synox 2018-02-23 21:56:12 +01:00
parent e66fd86dc7
commit debf73aba4
2 changed files with 2 additions and 2 deletions

View File

@ -182,7 +182,7 @@ $purifier = new HTMLPurifier($purifier_config);
<a class="btn btn-sm btn-outline-danger" <a class="btn btn-sm btn-outline-danger"
role="button" role="button"
href="?delete_email_id=<?php echo $safe_email_id; ?>&amp;address=<?php echo $user->address ?>">Delete href="?action=delete_email&delete_email_id=<?php echo $safe_email_id; ?>&amp;address=<?php echo $user->address ?>">Delete
</a> </a>
</div> </div>
</div> </div>

View File

@ -35,7 +35,7 @@ class Router {
} elseif ($this->action === "download_email" && isset($this->get_vars['download_email_id']) && isset($this->get_vars['address'])) { } elseif ($this->action === "download_email" && isset($this->get_vars['download_email_id']) && isset($this->get_vars['address'])) {
return new DownloadEmailPage($this->get_vars['download_email_id'], $this->get_vars['address'], $this->config['domains']); return new DownloadEmailPage($this->get_vars['download_email_id'], $this->get_vars['address'], $this->config['domains']);
} elseif (isset($this->get_vars['delete_email_id']) && isset($this->get_vars['address'])) { } elseif ($this->action === "delete_email" && isset($this->get_vars['delete_email_id']) && isset($this->get_vars['address'])) {
return new DeleteEmailPage($this->get_vars['delete_email_id'], $this->get_vars['address'], $this->config['domains']); return new DeleteEmailPage($this->get_vars['delete_email_id'], $this->get_vars['address'], $this->config['domains']);
} elseif (isset($this->get_vars['random'])) { } elseif (isset($this->get_vars['random'])) {