Disabling tracking is not working

Please report bugs here!

Moderator: Thorsten

Post Reply
ashamash
Posts: 2
Joined: Tue Mar 31, 2009 1:33 am

Disabling tracking is not working

Post by ashamash »

We would like to disable tracking, but this is not working. We did the following
  • - Wsed the administration UI to uncheck "use Tracking".
    - Verified that this is disabled in the database:

    Code: Select all

    mysql> select config_name, config_value from faqconfig where config_name like '%User%';
    +-------------------------+--------------+
    | config_name             | config_value |
    +-------------------------+--------------+
    | main.enableUserTracking | false        | 
    +-------------------------+--------------+
    1 row in set (0.10 sec)
    
    - We restarted the web server, but tracking is still happening.
We traced it down to this line of code in functions.php:

Code: Select all

function Tracking($action, $id = 0)
{
...
    if (isset($PMF_CONF["main.enableUserTracking"])) {
According to the php manual at http://us2.php.net/isset, isset 'determine whether a variable is set'. In this particular case, this variable is set, it just happens to be set to 'false'. Shouldn't the code be something like this instead? When we made this change, tracking was disabled:

Code: Select all

function Tracking($action, $id = 0)
{
...
    if (isset($PMF_CONF["main.enableUserTracking"]) && ($PMF_CONF["main.enableUserTracking"]) ) {
Either that, or this code in Configuration.php needs to change to check for false values and not set the configuration variable:

Code: Select all

function getAll()
{
...
    while ($row = $this->db->fetch_object($result)) {
        $this->config[$row->config_name] = $row->config_value;
    }
} // end func getAll()
It can change to something like this (I did not test this):

Code: Select all

function getAll()
{
...
    while ($row = $this->db->fetch_object($result)) {
        if($row->config_value) {
            $this->config[$row->config_name] = $row->config_value;
        }
    }
} // end func getAll()

Regards,
Ari Shamash
Thorsten
Posts: 15729
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Disabling tracking is not working

Post by Thorsten »

HI,

thanks for the detailed bug report. I can confirm the issue and I fixed it in SVN. The fix will be released with 2.0.13.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
ashamash
Posts: 2
Joined: Tue Mar 31, 2009 1:33 am

Re: Disabling tracking is not working

Post by ashamash »

Thank you for the prompt response..
Post Reply