CyberfusionIO / HostFact-Verwerkersovereenkomst

Let debtors agree to your DPA (verwerkersovereenkomst) in HostFact.
MIT License
5 stars 5 forks source link

Header should show proper message #7

Closed WilliamDEdwards closed 5 years ago

WilliamDEdwards commented 6 years ago

When I was developing the plugin, I had a header code that statically uses the URL dpa, but because the language variable dpa, url can be set to another value for different languages, that's broken.

It would become something like this:

<?php
        $dpa = new Dpa\Dpa_Model();

        if ($dpa->debtorDPAStatus() !== false && strpos('https://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'], 'dpa') == false) {
                echo __('dpa', 'url', __CLASS__);
                echo '<div class="alert alert-warning" role="alert"><p>'.__('not checked').' <a href="/dpa">'.__('accept').'</a></p></div>';
        }
?>

But debtorDPAStatus() and the language variables are not returning anything because it can only call that function on the dpa page. Including a controller or a model is not something I consider practical.. I guess we should include those values in the array that $dpa returns by writing some functions and making those variables public or global.

YWatchman commented 6 years ago

Pull Request #10 has been tested

EffectICT commented 6 years ago

Hi, When will this bug be fixed and is it possible to view all clients that have not signed the DPA. Thanks in advanced.