[horde] Ingo - no vacation filter available

Jens Wahnes wahnes at uni-koeln.de
Sat Jul 18 20:26:53 UTC 2015


On Fri, Jul 17 2015, at 12:11:24 +0200, Jens Hellermann wrote:

> So I wrote a prefs.local php (I seperated the line here after the ; for  
> better readability).
>
> <?php
>
> $_prefs['rules']['value'] =  
> 'a:5:{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:"enable";b:1;
> }i:2;a:2:{s:4:"name";s:9:"Blacklist";s:6:"action";i:' .  
> Ingo_Storage::ACTION_BLACKLIST . ';
> }i:3;a:3:{s:4:"name";s:11:"Spam Filter";s:6:"action";i:' .  
> Ingo_Storage::ACTION_SPAM . ';s:7:"disable";b:1;
> }i:4;a:3:{s:4:"name";s:7:"Forward";s:6:"action";i:' .  
> Ingo_Storage::ACTION_FORWARD . ';s:7:"disable";b:1;}}',
> $_prefs['rules']['locked'] = false,
> $_prefs['rules']['type'] => 'implicit'
>
> When I try to lock on to Horde Webmail the website is stuck and shows  
> plain white.

you are not using correct PHP syntax.  PHP statements end with a
semicolon.  So at the very least that one line there should read

$_prefs['rules']['locked'] = false;

with a semicolon instead of a comma at the end.

The last line (with the 'implicit' setting) could use a semicolon as
well but I think it's not strictly required if it's the last line
within the statement block. 
However, I would always put I semicolon there because it doesn't hurt
to do so and if you expand your file at a later time, you will run into
errors if you forget to add that semicolon then.

If the first "logical" line, which you spread into many lines for
readability, is actually correct or not is hard for me to tell at first
sight.  Luckily, there is help available to tell you if it is
(syntactically) correct.  Use

php -l prefs.local.php

to have PHP tell you whether or not your code is OK.

Aside from syntax errors, there may be "real" errors present in your
code as well, but I don't know Ingo settings well enough to be able to
spot those right away.

Jens


More information about the horde mailing list