Run subroutine in new module will allways called 3 times

English! place to talk about development, programming and coding
Post Reply
nicmic
Znuny newbie
Posts: 7
Joined: 31 Jan 2015, 15:23
Znuny Version: 4.0.5

Run subroutine in new module will allways called 3 times

Post by nicmic »

Hello,

i have developed an OTRS addon which adds a additional textfield to ticketzoom to save additional data to a specific value in a dynamic field in an additional sql table. So far it works. The textfield will be added to ticket zoom.

Now my question is, i have learned due log outputs in sub run() in my new module that the run subroutine will always 3 times called. So i get always 3 log outputs on 1 page load. Is this a normal behavior of OTRS? From my code i have no idea why this happens, maybe somebody of the devs can give me an advise here.
nicmic
Znuny newbie
Posts: 7
Joined: 31 Jan 2015, 15:23
Znuny Version: 4.0.5

Re: Run subroutine in new module will allways called 3 times

Post by nicmic »

I have saved the ${ $Param{Data} } now to a file during the sub run. There will be created 3 files, one with 7KB, one with 16KB and one with 35KB.

So i have added a return if there is no {${ $Param{Data} } =~ m{(<div class="MainBox)} ) so the procedure will exit if there is not the full page delivered.
Post Reply