Skip to content

Commit

Permalink
Fix POP3 email download bug (Issue #66), changed UPGRADE.md to reflec…
Browse files Browse the repository at this point in the history
…t location change of cron jobs
  • Loading branch information
cpinfold committed Oct 5, 2015
1 parent e68d86f commit 505c92a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
3 changes: 3 additions & 0 deletions docs/UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ Upgrading from version 2.2 and from versions upwards
require_once(APP_INC_PATH."workflow/class.abstract_workflow_backend.php");
require_once(APP_INC_PATH."customer/class.abstract_customer_backend.php");
```
6. Update your cron jobs to point to the scripts in the new location (see INSTALL.md).
Previously the scripts were in 'crons', now in 'bin', eg:
0 * * * * <PATH-TO-EVENTUM>/bin/download_emails.php username_here mail.domain.com INBOX

Upgrading from versions before 2.2
----------------------------------
Expand Down
12 changes: 9 additions & 3 deletions lib/eventum/class.email_account.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
// | along with this program; if not, write to: |
// | |
// | Free Software Foundation, Inc. |
// | 51 Franklin Street, Suite 330 |
// | 51 Franklin Street, Suite 330 |
// | Boston, MA 02110-1301, USA. |
// +----------------------------------------------------------------------+
// | Authors: João Prado Maia <jpm@mysql.com> |
Expand Down Expand Up @@ -123,9 +123,15 @@ public static function getAccountID($username, $hostname, $mailbox)
{{%email_account}}
WHERE
ema_username=? AND
ema_hostname=? AND
ema_folder=?';
ema_hostname=?';
try {
if (is_null($mailbox)) {
$res = DB_Helper::getInstance()->getOne($stmt, array($username, $hostname));
} else {
$stmt .= ' AND ema_folder=?';
$res = DB_Helper::getInstance()->getOne($stmt, array($username, $hostname, $mailbox));
}

$res = DB_Helper::getInstance()->getOne($stmt, array($username, $hostname, $mailbox));
} catch (DbException $e) {
return 0;
Expand Down

0 comments on commit 505c92a

Please sign in to comment.