Author Topic: $rcmail_config['protect_default_folders'] & Settings - Preferences - Special Folders  (Read 6262 times)

Offline Makc666

  • Jr. Member
  • **
  • Posts: 23
    • http://makc666.com
Version 0.7.1 stable (no prefix in forums still).

In main.inc.php I have:
// protect the default folders from renames, deletes, and subscription changes
$rcmail_config['protect_default_folders'] = true;


Then I log in and go to:
Settings -> Preferences -> Special Folders

There in "Main Options" I am able to change folders and Save them.

Is this correct behavior?
« Last Edit: January 12, 2012, 09:21:15 AM by Makc666 »
...... ...... "А стукачков мы не любим!"

Offline alec

  • Hero Member
  • *****
  • Posts: 1,365
Yes. Take a look at dont_override setting.

Offline Makc666

  • Jr. Member
  • **
  • Posts: 23
    • http://makc666.com
Quote from: alec;37949
Yes. Take a look at dont_override setting.

I have looked at it.

I even tried:
$rcmail_config['dont_override'] = array('protect_default_folders');

But this one didn't help.

There is still a way to change destination of default folders.

What I am doing wrong?
...... ...... "А стукачков мы не любим!"

Offline alec

  • Hero Member
  • *****
  • Posts: 1,365
Every special folder has separate config option, which should be listed in dont_override.

Offline Makc666

  • Jr. Member
  • **
  • Posts: 23
    • http://makc666.com
Quote from: alec;37952
Every special folder has separate config option, which should be listed in dont_override.
Hm...
Thanks!
Looks like I got what I want.

I have the line:
$rcmail_config['dont_override'] = array('drafts_mbox','junk_mbox','sent_mbox','trash_mbox','archive_mbox');

I don't see Settings -> Preferences -> Special Folders any more.

But now I have a new problem and it seems like a bug.

In Settings -> Folders the folders lost there English (and translation names).

They look like this:

  • Inbox
  • INBOX.Drafts
  • INBOX.Sent
  • INBOX.Junk
  • INBOX.Trash
  • Archive

You can see the screenshot attached.

This is a BUG?

One more.

I tried to change line to:
$rcmail_config['dont_override'] = array('default_imap_folders');

After that in $rcmail_config['log_dir'] -> tail -F errors
when I try to see "Settings -> Preferences -> Special Folders"
I began to see error:
Code: [Select]
[13-Jan-2012 14:38:13] PHP Fatal error:  Call to a member function list_mailboxes() on a non-object in /www/program/include/main.inc on line 1246
[13-Jan-2012 14:38:27] PHP Fatal error:  Call to a member function list_mailboxes() on a non-object in /www/program/include/main.inc on line 1246
[13-Jan-2012 14:38:41] PHP Fatal error:  Call to a member function list_mailboxes() on a non-object in /www/program/include/main.inc on line 1246

Line 1246 is:
$list $RCMAIL->imap->list_mailboxes(''$p['folder_name'], $p['folder_filter'], $p['folder_rights']);

This looks like another bug.
« Last Edit: January 13, 2012, 05:47:15 AM by Makc666 »
...... ...... "А стукачков мы не любим!"

Offline alec

  • Hero Member
  • *****
  • Posts: 1,365
How did you define these *_mbox options? Add a namespace prefix to folder names.

Offline Makc666

  • Jr. Member
  • **
  • Posts: 23
    • http://makc666.com
Quote from: alec;37962
How did you define these *_mbox options?


As default in main.inc.php.dist

$rcmail_config['drafts_mbox'] = 'Drafts';
$rcmail_config['junk_mbox'] = 'Junk';
$rcmail_config['sent_mbox'] = 'Sent';
$rcmail_config['trash_mbox'] = 'Trash';

$rcmail_config['default_imap_folders'] = array('INBOX''Drafts''Sent''Junk''Trash''Archive');

//For Plugin Archive
$rcmail_config['archive_mbox'] = 'Archive';


Quote from: alec;37962
Add a namespace prefix to folder names.


I have tired with out $rcmail_config['dont_override']:
$rcmail_config['drafts_mbox'] = 'INBOX.Drafts';
$rcmail_config['junk_mbox'] = 'INBOX.Junk';
$rcmail_config['sent_mbox'] = 'INBOX.Sent';
$rcmail_config['trash_mbox'] = 'INBOX.Trash';

$rcmail_config['default_imap_folders'] = array('INBOX''INBOX.Drafts''INBOX.Sent''INBOX.Junk''INBOX.Trash''INBOX.Archive');

//For Plugin Archive
$rcmail_config['archive_mbox'] = 'INBOX.Archive';


And after this one I don't see folders translations in "/?_task=mail&_mbox=INBOX".
And see the same in Settings -> Folders the folders lost there English (and translation names).

They look like this:

  • Inbox
  • INBOX.Drafts
  • INBOX.Sent
  • INBOX.Junk
  • INBOX.Trash
  • Archive
...... ...... "А стукачков мы не любим!"

Offline Makc666

  • Jr. Member
  • **
  • Posts: 23
    • http://makc666.com
Do you need other information from me?
...... ...... "А стукачков мы не любим!"