Skip to content
This repository was archived by the owner on Mar 28, 2021. It is now read-only.

Commit ba02ed8

Browse files
committed
cleanup
1 parent 912b3a5 commit ba02ed8

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/backend.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
# load php dependencies:
66
require_once './backend-libs/autoload.php';
77

8-
$imap_settings = $config['imap'];
9-
$mailbox = new PhpImap\Mailbox($imap_settings['url'], $imap_settings['username'], $imap_settings['password']);
8+
$mailbox = new PhpImap\Mailbox($config['imap']['url'],
9+
$config['imap']['username'],
10+
$config['imap']['password']);
1011

1112
/**
1213
* print error and stop program.
@@ -104,12 +105,7 @@ function delete_old_messages() {
104105
header("Cache-Control: post-check=0, pre-check=0", false);
105106
header("Pragma: no-cache");
106107

107-
if (!isset($_GET['action'])) {
108-
error(400, 'invalid parameter');
109-
}
110-
$action = $_GET['action'];
111-
112-
if ($action === "get" && isset($_GET['username'])) {
108+
if (isset($_GET['username'])) {
113109
print_inbox($_GET['username']);
114110
} else {
115111
error(400, 'invalid action');

0 commit comments

Comments
 (0)