[Tickets #2016] NEW: 'scriptparams[variables]' Setting in config/backends.php Not Being Used

bugs@bugs.horde.org bugs at bugs.horde.org
Sat May 21 21:00:51 PDT 2005


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=2016
-----------------------------------------------------------------------
 Ticket             | 2016
 Created By         | derek at battams.ca
 Summary            | 'scriptparams[variables]' Setting in config/backends.php Not Being Used
 Queue              | Ingo
 Version            | 1.0.1
 State              | Unconfirmed
 Priority           | 2. Medium
 Type               | Bug
 Owners             | 
-----------------------------------------------------------------------


derek at battams.ca (2005-05-21 21:00) wrote:

I am using procmail as the backend and when I add an entry to the
'scriptparams[variables]' array in config/backends.php it is not being used
in the .procmailrc generation.  Basically I'm trying to add a parameter
called 'LOGFILE' so that logfiles are created for all users.  But when I add
the parameter to the array it is not being written to the generated
.procmailrc file.

>From what I can see by tracing the code, my guess is that the problem comes
from the fact that the Ingo_Script_procmail class is not calling its parent
constructor, which causes the _params property of the class to not be set
properly.  However, I'm not able to completely follow the code in this area
so I can't provide a patch nor am I even certain I'm correct, but it seems
like I'm at least in the right area?  A trace of the code brings me to this
block in the generate() method of the Ingo_Script_procmail class in
lib/Script/procmail.php:

        /* Add variable information, if present. */
        if (!empty($this->_params['variables']) &&
            is_array($this->_params['variables'])) {
            foreach ($this->_params['variables'] as $key => $val) {
                $this->addItem(new Procmail_Variable(array('name' => $key,
'value' => $val)));
            }
        }

Dumping the value of $this->_params['variables'] spits out an array of size
0, even when I set a value in the backends.php file.  Again, my guess is
that this array is not being set properly because this Ingo_Script_procmail
class doesn't initialize it via a call to its parent constructor on object
instantiation.




More information about the bugs mailing list