Git Master - Event listeners (engine side) are now persistent

  • Dear community,


    In Git Master, the event listeners (engine side), merely called hook functions, are now persistent along the whole process, which means that it's no longer needed to register them again.


    For instance, the following hook function, which is part of this hook file


    [code=php]
    sub onBeforeNamedBuildConf
    {
    my $tplContent = shift;
    my $tplName = shift;


    if($tplName eq 'named.conf.options') {
    $$tplContent =~ s/^(\s*allow-recursion).*$/$1 { localnets; };/m;
    $$tplContent =~ s/^(\s*allow-query-cache).*$/$1 { localnets; };/m;
    $$tplContent =~ s/^(\s*allow-transfer).*$/$1 { localnets; };/m;
    } else {
    $hooksManager->register('beforeNamedBuildConf', \&onBeforeNamedBuildConf);
    }


    0;
    }
    [/php]


    must become:


    [code=php]
    sub onBeforeNamedBuildConf
    {
    my $tplContent = shift;
    my $tplName = shift;


    if($tplName eq 'named.conf.options') {
    $$tplContent =~ s/^(\s*allow-recursion).*$/$1 { localnets; };/m;
    $$tplContent =~ s/^(\s*allow-query-cache).*$/$1 { localnets; };/m;
    $$tplContent =~ s/^(\s*allow-transfer).*$/$1 { localnets; };/m;
    }


    0;
    }
    [/php]


    You should so update your hook files before updating to last Git Master. All hooks file provided in the plugins corners were not updated yet.


    i-MSCP Team

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

    Edited once, last by Nuxwin ().