[ingo] removing default rule buttons

Nicolas Schmitz Nicolas.Schmitz at ec-nantes.fr
Tue Jun 28 09:43:38 PDT 2005


In fact you need to edit the "value" field in $_prefs['rules'] :
in the following example I have disabled Vacation and Forward :

$_prefs['rules'] = array(
 //    'value' => 
'a:4:{i:0;a:2:{s:4:"name";s:9:"Whitelist";s:6:"action";i:' . 
INGO_STORAGE_ACTION_WHITELIST . 
';}i:1;a:3:{s:4:"name";s:8:"Vacation";s:6:"action";i:' . 
INGO_STORAGE_ACTION_VACATION . 
';s:7:"disable";b:1;}i:2;a:2:{s:4:"name";s:9:"Blacklist";s:6:"action";i:' 
. INGO_STORAGE_ACTION_BLACKLIST . ';}   
i:3;a:2:{s:4:"name";s:7:"Forward";s:6:"action";i:' . 
INGO_STORAGE_ACTION_FORWARD . ';}       }',

     'value' => 
'a:2:{i:0;a:2:{s:4:"name";s:9:"Whitelist";s:6:"action";i:' . 
INGO_STORAGE_ACTION_WHITELIST . 
';}i:2;a:2:{s:4:"name";s:9:"Blacklist";s:6:"action";i:' . 
INGO_STORAGE_ACTION_BLACKLIST . ';}}',

      'locked' => false,
    'shared' => false,
    'type' => 'implicit'
);


And remember what Jan Schneider said :

**

"You should know what you're doing if you hassle with serialized arrays. 
You didn't update the array counter: "'a:4:'" should be "'a:3:'"."


Nicolas Schmitz



amy.rich at tufts.edu a écrit :

>I'm in the process of removing all of the default rules from ingo.  I've
>changed prefs.php to:
>
>// filter rules
>$_prefs['rules'] = array(
>    'value' => '',
>    'locked' => false,
>    'shared' => false,
>    'type' => 'implicit'
>);
>
>I also removed the black/white list stuff from the horde/config/registry.php
>file:
>
>$this->applications['ingo'] = array(
>    'fileroot' => dirname(__FILE__) . '/../ingo',
>    'webroot' => $this->applications['horde']['webroot'] . '/ingo',
>    'name' => _("Filters"),
>    'status' => 'active',
>    'provides' => array('mail/applyFilters', 'mail/canApplyFilters',
>    'mail/showF
>ilters'),
>    'menu_parent' => 'imp'
>);
>
>However, I still see the buttons for Vacation and Forward after I log out,
>stop and restart apache, and log back in.  Since INGO_STORAGE_ACTION_VACATION
>and INGO_STORAGE_ACTION_FORWARD are no longer specified in rules, these
>buttons shouldn't be showing up, correct?  Or have I missed someplace else
>where code needs to be removed?
>
>
>Thanks...
>
>  
>


-- 
Nicolas Schmitz



More information about the ingo mailing list