[rt-users] Add value to array in RT_SiteConfig.pm
Kevin Falcone
falcone at bestpractical.com
Fri Apr 26 10:49:22 EDT 2013
On Fri, Apr 26, 2013 at 12:12:48PM +0300, Pavel Gulchouck wrote:
> I want to add one custom script to @JSFiles, but cannot find
> anything like Push() or Add() in config parser, only Set().
> Is the only way copy all predefined array from RT_Config.pm to
> RT_SiteConfig.pm?
For @JSFiles you have to copy (we've fixed this in the development
series). You also have to be careful on upgrades in case we add files
to @JSFiles.
If you're writing a local extension, you want to use
http://bestpractical.com/rt/docs/latest/RT.html#AddJavaScript
from your code rather than munging the config.
> The same question for add (or modify) some key/value of %Lifecycles hash
> without copying it all to RT_SiteConfig.pm.
For Lifecyeles, if you want to change general you have to copy all of
general, but you can skip copying the approvals one.
We merge at the top level of that hash, but not deeper.
-kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 235 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20130426/56892667/attachment.sig>
More information about the rt-users
mailing list