Changeset 5187 in subversion


Ignore:
Timestamp:
Sep 7, 2011 3:25:54 AM (21 months ago)
Author:
alec
Message:
  • Add managesieve_script_name option for default name of the script (#1487956)
Location:
trunk/plugins/managesieve
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/managesieve/Changelog

    r5156 r5187  
    11- Added possibility to create a filter based on selected message "in-place" 
    22- Fixed import from Horde-INGO (#1488064) 
     3- Add managesieve_script_name option for default name of the script (#1487956) 
    34 
    45* version 4.3 [2011-07-28] 
  • trunk/plugins/managesieve/config.inc.php.dist

    r4133 r5187  
    3232$rcmail_config['managesieve_default'] = '/etc/dovecot/sieve/global'; 
    3333 
     34// The name of the script which will be used when there's no user script 
     35$rcmail_config['managesieve_script_name'] = 'managesieve'; 
     36 
    3437// Sieve RFC says that we should use UTF-8 endcoding for mailbox names, 
    3538// but some implementations does not covert UTF-8 to modified UTF-7. 
  • trunk/plugins/managesieve/managesieve.php

    r5186 r5187  
    206206                    // if script not exists build default script contents 
    207207                    $script_file = $this->rc->config->get('managesieve_default'); 
    208                     $script_name = 'roundcube'; 
     208                    $script_name = $this->rc->config->get('managesieve_script_name'); 
     209 
     210                    if (empty($script_name)) 
     211                        $script_name = 'roundcube'; 
     212 
    209213                    if ($script_file && is_readable($script_file)) 
    210214                        $content = file_get_contents($script_file); 
    211215 
    212                 // add script and set it active 
    213                 if ($this->sieve->save_script($script_name, $content)) 
    214                     if ($this->sieve->activate($script_name)) 
    215                         $_SESSION['managesieve_active'] = $script_name; 
     216                    // add script and set it active 
     217                    if ($this->sieve->save_script($script_name, $content)) 
     218                        if ($this->sieve->activate($script_name)) 
     219                            $_SESSION['managesieve_active'] = $script_name; 
    216220                } 
    217221            } 
Note: See TracChangeset for help on using the changeset viewer.