[horde] locking prefs in ingo in oder to lock forward

LALOT Dominique dom.lalot at gmail.com
Fri Aug 19 16:37:06 UTC 2011


Hello,

I played a long day to try easy things without success. To simplify, I just
change prefs.php

// Forwarding.
$_prefs['forward'] = array(
    'value' => 'a:2:{s:1:"a";a:0:{}s:1:"k";i:0;}',
    // Lock this preference to disable forwarding.
    'locked' => true,
    'type' => 'implicit'
);

But, first forward is in the menu (why not), but when I click on it I should
receive a notification saying it's disabled. I put traces and dump
categories array

Aug 19 18:16:58 horde4 HORDE: [ingo] vacation locked tracedom8 [pid 31182 on
line 78 of "/var/www/horde/ingo/lib/Ingo.php"]
Aug 19 18:16:58 horde4 HORDE: [ingo] forward locked  tracedom10 [pid 31182
on line 82 of "/var/www/horde/ingo/lib/Ingo.php"]
Aug 19 18:16:58 horde4 HORDE: [ingo] tracedom categories:Array#012(#012
[0] => 1#012    [1] => 2#012    [2] => 3#012    [3] => 4#012    [4] =>
5#012    [5] => 11#012    [6] => 6#012    [7] => 12#012    [9] => 7#012
[11] => 8#012    [12] => 10#012    [13] => 14#012)#012 [pid 31182 on line 93
of "/var/www/horde/ingo/lib/Ingo.php"]
Aug 19 18:32:37 horde4 HORDE: [ingo] tracedom 10 Array#012(#012    [0] =>
1#012    [1] => 2#012    [2] => 3#012    [3] => 4#012    [4] => 5#012    [5]
=> 11#012    [6] => 6#012    [7] => 12#012    [9] => 7#012    [11] =>
8#012    [12] => 10#012    [13] => 14#012)#012 [pid 31180 on line 17 of
"/var/www/horde/ingo/forward.php"]

as you can see entry 10 is unset for forward

$res=print_r($session->get('ingo', 'script_categories'),true);
Horde::logMessage('tracedom '.Ingo_Storage::ACTION_FORWARD.' '.$res,ERR);

/* Redirect if forward is not available. */
if (!in_array(Ingo_Storage::ACTION_FORWARD, $session->get('ingo',
'script_categories'))) {

--> I should go here normaly?

    $notification->push(_("Forward is not supported in the current filtering
driver."), 'horde.error');
    Horde::url('filters.php', true)->redirect();
}

I am not a pro in PHP, but in_array should have said not found. I really
don't understand why such an easy action is not working..
PHP 5.3.5-1ubuntu7.2 with Suhosin-Patch (cli) (built: May  2 2011 23:00:17)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with XCache v1.3.1, Copyright (c) 2005-2010, by mOo

ingo:2.0.4 Horde 4.0.8

Help

Dom

-- 
Dominique LALOT
Ingénieur Systèmes et Réseaux
http://annuaire.univmed.fr/showuser.php?uid=lalot


More information about the horde mailing list