Changeset 733

Show
Ignore:
Timestamp:
09/10/05 15:39:51 (8 years ago)
Author:
aprilp
Message:

isset, and issues preventing users from logging out.

Location:
trunk/wifidog-auth
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/wifidog-auth/ChangeLog

    r732 r733  
    22        * signup.php: Fixed bug in detecting is the user is already part of the 
    33        network. 
     4        * classes/{Authenticator,Network,Node}.php: isset, and issues preventing 
     5        users from logging out. 
    46 
    572005-09-10 Francois Proulx <francois.proulx@gmail.com> 
  • trunk/wifidog-auth/wifidog/classes/Authenticator.php

    r722 r733  
    7272                        { 
    7373                                //Try to destroy all connections tied to the current node 
    74                                 $sql = "SELECT conn_id FROM connections WHERE user_id = '{$user->getId()}' AND node_id={$node->getId()} AND token_status='".TOKEN_INUSE."';\n"; 
     74                                $sql = "SELECT conn_id FROM connections WHERE user_id = '{$user->getId()}' AND node_id='{$node->getId()}' AND token_status='".TOKEN_INUSE."';\n"; 
    7575                        $conn_rows = null; 
    7676                                $db->ExecSql($sql, $conn_rows, false); 
     
    129129                        $conn_rows = array (); 
    130130                        $db->ExecSql($sql, $conn_rows, true); 
    131                         foreach ($conn_rows as $conn_row) 
    132                         { 
    133                                 $this->acctStop($conn_row['conn_id']); 
    134                         } 
     131                        if (isset($conn_rows)) { 
     132                foreach ($conn_rows as $conn_row) 
     133                            { 
     134                                    $this->acctStop($conn_row['conn_id']); 
     135                            } 
     136            } 
    135137                } 
    136138 
  • trunk/wifidog-auth/wifidog/classes/Network.php

    r726 r733  
    333333                        throw new Exception("Network::getAuthenticator():  Security error:  The parameters passed to the constructor of the authenticator are potentially unsafe"); 
    334334                } 
    335                 $objstring = 'return new '.$this->mRow['network_authenticator_class'].'('.$this->mRow['network_authenticator_params'].');'; 
     335                $objstring = 'return new '.$this->mRow['network_authenticator_class']."('".$this->mRow['network_authenticator_params']."');"; 
    336336                return eval ($objstring); 
    337337        } 
  • trunk/wifidog-auth/wifidog/classes/Node.php

    r727 r733  
    11631163                // Get all network, but exclude user subscribed content if asked 
    11641164                if ($exclude_subscribed_content == true && $subscriber) 
    1165                         $sql = "SELECT content_id FROM node_has_content WHERE node_id='$this->id' AND content_id NOT IN (SELECT content_id FROM user_has_content WHERE user_id = '{$subscriber->getId()}') ORDER BY subscribe_timestamp DESC"; 
     1165                        $sql = "SELECT content_id FROM node_has_content WHERE node_id='{$this->id}' AND content_id NOT IN (SELECT content_id FROM user_has_content WHERE user_id = '{$subscriber->getId()}') ORDER BY subscribe_timestamp DESC"; 
    11661166                else 
    1167                         $sql = "SELECT content_id FROM node_has_content WHERE node_id='$this->id' ORDER BY subscribe_timestamp DESC"; 
     1167                        $sql = "SELECT content_id FROM node_has_content WHERE node_id='{$this->id}' ORDER BY subscribe_timestamp DESC"; 
    11681168                $db->ExecSql($sql, $content_rows, false); 
    11691169