Permalink
Browse files

Merged devel-framework branch (r5746:5779) back into trunk

  • Loading branch information...
1 parent 8764b6e commit c321a955a7b0f6d6b13ffaebf040a6c7091037ae @thomascube thomascube committed Jan 16, 2012
Showing with 3,373 additions and 2,208 deletions.
  1. +11 −8 bin/msgexport.sh
  2. +8 −4 index.php
  3. +3 −2 installer/rcube_install.php
  4. 0 program/include/iniset.php
  5. +41 −333 program/include/main.inc
  6. +158 −103 program/include/rcmail.php
  7. +745 −0 program/include/rcube_charset.php
  8. +3 −3 program/include/rcube_config.php
  9. +1,045 −1,095 program/include/rcube_imap.php
  10. +19 −15 program/include/rcube_imap_cache.php
  11. +11 −11 program/include/rcube_message.php
  12. +13 −13 program/include/rcube_result_index.php
  13. +26 −26 program/include/rcube_result_thread.php
  14. +0 −117 program/include/rcube_shared.inc
  15. +1,055 −0 program/include/rcube_storage.php
  16. +2 −2 program/include/rcube_template.php
  17. +0 −249 program/lib/utf7.inc
  18. +1 −1 program/localization/en_US/messages.inc
  19. +18 −14 program/steps/mail/check_recent.inc
  20. +11 −11 program/steps/mail/compose.inc
  21. +1 −1 program/steps/mail/copy.inc
  22. +3 −3 program/steps/mail/folders.inc
  23. +40 −50 program/steps/mail/func.inc
  24. +4 −4 program/steps/mail/get.inc
  25. +3 −3 program/steps/mail/getunread.inc
  26. +1 −1 program/steps/mail/headers.inc
  27. +12 −11 program/steps/mail/list.inc
  28. +26 −19 program/steps/mail/mark.inc
  29. +25 −18 program/steps/mail/move_del.inc
  30. +6 −6 program/steps/mail/pagenav.inc
  31. +9 −11 program/steps/mail/search.inc
  32. +10 −10 program/steps/mail/sendmail.inc
  33. +7 −7 program/steps/mail/show.inc
  34. +2 −2 program/steps/mail/viewsource.inc
  35. +8 −9 program/steps/settings/edit_folder.inc
  36. +27 −24 program/steps/settings/folders.inc
  37. +8 −10 program/steps/settings/func.inc
  38. +6 −6 program/steps/settings/save_folder.inc
  39. +4 −4 program/steps/settings/save_prefs.inc
  40. +1 −2 tests/mailfunc.php
View
@@ -31,10 +31,14 @@ function export_mailbox($mbox, $filename)
{
global $IMAP;
- $IMAP->set_mailbox($mbox);
+ $IMAP->set_folder($mbox);
+
+ $index = $IMAP->index($mbox, null, 'ASC');
+ $count = $index->countMessages();
+ $index = $index->get();
vputs("Getting message list of {$mbox}...");
- vputs($IMAP->messagecount()." messages\n");
+ vputs("$count messages\n");
if ($filename)
{
@@ -48,17 +52,16 @@ function export_mailbox($mbox, $filename)
else
$out = STDOUT;
- for ($count = $IMAP->messagecount(), $i=1; $i <= $count; $i++)
+ for ($i = 0; $i < $count; $i++)
{
- $headers = $IMAP->get_headers($i, null, false);
+ $headers = $IMAP->get_message_headers($index[$i]);
$from = current(rcube_mime::decode_address_list($headers->from, 1, false));
fwrite($out, sprintf("From %s %s UID %d\n", $from['mailto'], $headers->date, $headers->uid));
- fwrite($out, $IMAP->conn->fetchPartHeader($mbox, $i));
- fwrite($out, $IMAP->conn->handlePartBody($mbox, $i));
+ fwrite($out, $IMAP->print_raw_body($headers->uid));
fwrite($out, "\n\n\n");
- progress_update($i, $count);
+ progress_update($i+1, $count);
}
vputs("\ncomplete.\n");
@@ -116,7 +119,7 @@ if ($IMAP->connect($host, $args['user'], $args['pass'], $imap_port, $imap_ssl))
vputs("IMAP login successful.\n");
$filename = null;
- $mailboxes = $args['mbox'] == '*' ? $IMAP->list_mailboxes(null) : array($args['mbox']);
+ $mailboxes = $args['mbox'] == '*' ? $IMAP->list_folders(null) : array($args['mbox']);
foreach ($mailboxes as $mbox)
{
View
@@ -48,7 +48,7 @@
}
// check DB connections and exit on failure
-if ($err_str = $DB->is_error()) {
+if ($err_str = $RCMAIL->db->is_error()) {
raise_error(array(
'code' => 603,
'type' => 'db',
@@ -128,9 +128,9 @@
$OUTPUT->redirect($redir);
}
else {
- $error_code = (isset($RCMAIL->imap) && is_object($RCMAIL->imap)) ? $RCMAIL->imap->get_error_code() : 1;
+ $error_code = is_object($RCMAIL->storage) ? $RCMAIL->storage->get_error_code() : 1;
- $OUTPUT->show_message($error_code < -1 ? 'imaperror' : (!$auth['valid'] ? 'invalidrequest' : 'loginfailed'), 'warning');
+ $OUTPUT->show_message($error_code < -1 ? 'storageerror' : (!$auth['valid'] ? 'invalidrequest' : 'loginfailed'), 'warning');
$RCMAIL->plugins->exec_hook('login_failed', array(
'code' => $error_code, 'host' => $auth['host'], 'user' => $auth['user']));
$RCMAIL->kill_session();
@@ -139,7 +139,11 @@
// end session (after optional referer check)
else if ($RCMAIL->task == 'logout' && isset($_SESSION['user_id']) && (!$RCMAIL->config->get('referer_check') || rcube_check_referer())) {
- $userdata = array('user' => $_SESSION['username'], 'host' => $_SESSION['imap_host'], 'lang' => $RCMAIL->user->language);
+ $userdata = array(
+ 'user' => $_SESSION['username'],
+ 'host' => $_SESSION['storage_host'],
+ 'lang' => $RCMAIL->user->language,
+ );
$OUTPUT->show_message('loggedout');
$RCMAIL->logout_actions();
$RCMAIL->kill_session();
@@ -41,6 +41,7 @@ class rcube_install
'addrbook_show_images' => 'show_images',
'imap_root' => 'imap_ns_personal',
'pagesize' => 'mail_pagesize',
+ 'default_imap_folders' => 'default_folders',
);
// these config options are required for a working system
@@ -179,9 +180,9 @@ function create_config($which, $force = false)
else if ($prop == 'smtp_pass' && !empty($_POST['_smtp_user_u'])) {
$value = '%p';
}
- else if ($prop == 'default_imap_folders') {
+ else if ($prop == 'default_folders') {
$value = array();
- foreach ($this->config['default_imap_folders'] as $_folder) {
+ foreach ($this->config['default_folders'] as $_folder) {
switch ($_folder) {
case 'Drafts': $_folder = $this->config['drafts_mbox']; break;
case 'Sent': $_folder = $this->config['sent_mbox']; break;
View
0 program/include/iniset.php 100755 → 100644
No changes.
Oops, something went wrong.

0 comments on commit c321a95

Please sign in to comment.