Show
Ignore:
Timestamp:
04/25/05 09:16:07 (8 years ago)
Author:
benoitg
Message:

2005-04-25 Benoit Gr�goire <bock@…>

  • Integration merge, should work, but there will be display problems everywhere. Expect further commits today.
  • Almost 100% complete Network abstraction
  • Much better object encapsulation. Deprecated methods not removed yet.
  • Add MainUI class. Used to display the interface. Inner workings still need work.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/wifidog-auth/wifidog/classes/Node.php

    r555 r566  
    5757                else 
    5858                { 
    59                         $object = getCurrentRealNode(); 
     59                        $object = self::getCurrentRealNode(); 
    6060                } 
    6161                return $object; 
     
    7474         * @param        * @return a Node object, or null if it can't be found. 
    7575         */ 
    76         public function getCurrentRealNode() 
     76        public static function getCurrentRealNode() 
    7777        { 
    7878                global $db; 
     
    484484        } 
    485485 
     486/** The list of users online at this node 
     487 * @return An array of User object, or en empty array */ 
    486488        function getOnlineUsers() 
    487489        { 
    488490                global $db; 
    489  
    490                 $db->ExecSql("SELECT users.user_id, users.username, users.account_origin FROM users,connections WHERE connections.token_status='".TOKEN_INUSE."' AND users.user_id=connections.user_id AND connections.node_id='{$this->id}'", $users, false); 
     491                $retval=array(); 
     492                $db->ExecSql("SELECT users.user_id FROM users,connections WHERE connections.token_status='".TOKEN_INUSE."' AND users.user_id=connections.user_id AND connections.node_id='{$this->id}'", $users, false); 
     493                if($users!=null) 
     494                { 
     495                        foreach ($users as $user_row) 
     496                        { 
     497                                $retval[]=getObject($user_row['user_id']); 
     498                        } 
     499                } 
    491500                return $users; 
    492501        } 
     
    548557        } 
    549558 
     559/** Warning, the semantics of this function will change */ 
    550560        public static function getAllOnlineUsers() 
    551561        {