[horde] using Trash folder default

Robert Schetterer rs at sys4.de
Tue Oct 8 14:35:19 UTC 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 08.10.2013 16:11, schrieb Oscar del Rio:
> On 10/ 8/13 09:29 AM, Robert Schetterer wrote:
>> Hi, i want to set the imap Trash folder as default for all users
>> in imp latest stable, it seem the syntax has changed ,i failed
>> create the wanted values in prefs.local.php of imp
>> 
>> i guess it should be like
>> 
>> $_prefs['trash_folder'] = array( 'value' => 'Trash' );
>> 
>> $_prefs['use_trash'] array( 'value' => '1' );
> 
> $_prefs['trash_folder']['value'] = 'Trash'; 
> $_prefs['use_trash']['value'] = 1;
> 

that looks like the right syntax ( seen in docs ) , but its not working
speculation ..related Trash is a imap special-use folder in my setup
it perfectly works in gui users settings but i want it to get settings
preconfigured for all


related entries should be ( out of imps prefs.php )

// *** Delete/Move Messages Preferences ***

$prefGroups['delmove'] = array(
    'column' => _("Message"),
    'label' => _("Deleting and Moving Messages"),
    'desc' => _("Set preferences for what happens when you move and
delete messages."),
    'members' => array(
        'mailbox_return', 'delete_mark_seen', 'use_trash', 'trashselect',
        'delhide_trash', 'empty_trash_menu', 'purge_trash_interval',
        'purge_trash_keep'
    )
);

$_prefs['mailbox_return'] = array(
    'value' => 0,
    'type' => 'checkbox',
    'desc' => _("Return to the mailbox listing after deleting, moving,
or copying a message?") . ' (<em>' . _("Basic view only") . '</em>)'
);

$_prefs['delete_mark_seen'] = array(
    'value' => 0,
    'advanced' => true,
    'type' => 'checkbox',
    'desc' => _("Mark messages as seen when deleting?")
);

$_prefs['use_trash'] = array(
    'value' => 0,
    'type' => 'checkbox',
    'desc' => _("Move deleted messages to your Trash mailbox instead
of marking them as deleted in the current mailbox?"),
    'on_change' => function() {
        if ($trash_mbox = IMP_Mailbox::getPref('trash_folder')) {
            $trash_mbox->expire(IMP_Mailbox::CACHE_SPECIALMBOXES);
        }
        if ($GLOBALS['prefs']->getValue('use_trash') &&
            !$GLOBALS['prefs']->getValue('trash_folder')) {
            $GLOBALS['notification']->push(_("You have activated move
to Trash but no Trash mailbox is defined. You will be unable to delete
messages until you set a Trash mailbox in the preferences."),
'horde.warning');
        }
    }
);







Best Regards
MfG Robert Schetterer

- -- 
[*] sys4 AG

http://sys4.de, +49 (89) 30 90 46 64
Franziskanerstraße 15, 81669 München

Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer
Aufsichtsratsvorsitzender: Florian Kirstein
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSVBghAAoJEP8jBObu0LlEzgUIAMyXvkOtuMYQb8sQOcZGilSg
onfmRmswn6ZtC2yobJ67dC5uXfQ0JVfNlAcYOl4zzhnm0bon1VWsJEgheqYvamkD
aHGyTD7DStTM1tLikZt39RP0Qsei9ppuy2zGrTRqf9FRmIZ+xR1qr+B1ZLje/CPd
7dDiTNnYoRq6U1cNMcKga5AbKDR4Ag9iYDYC+aujJDhOTzwcMrO/+6TlD2z5UrTn
VLW1q0eLr1wIy6mvUncexicvwol5VPRRrO8qQktdcG8GRrGZhIYS1a1kxi/AbHqb
KvtQEB4pQqcmXQcwzsUug/AljhpcO0Qmvf+ycwsntQN8R/FcdOYvCdUNK+EB+GQ=
=1BIv
-----END PGP SIGNATURE-----


More information about the horde mailing list